Group Abstract Group Abstract

Message Boards Message Boards

0
|
9.8K Views
|
9 Replies
|
2 Total Likes
View groups...
Share
Share this post:

FMU generated by SM does not run in Simulation Center

Posted 5 years ago
9 Replies

For a co simulation FMUs the FMU and Modelica model exchange input/outputs at discrete communication points. The FMU wrapper in System Modeler offers two ways of controlling that, using an externa trigger signal (useTriggerInput_=true) or periodically with the step size given by step_ (useTriggerIntput_false).

POSTED BY: Otto Tronarp

For a co simulation FMUs the FMU and Modelica model exchange input/outputs at discrete communication points. The FMU wrapper in System Modeler offers two ways of controlling that, using an externa trigger signal (useTriggerInput_=true) or periodically with the step size given by step_ (useTriggerIntput_false)

Got it, but are the "step" and "stepTrigger" variables that appear in modelica code of the imported FMU created by SM at the time it opens or are they in some "hidden place" in the FMU? I'm asking because I'm developing an application where I execute SM FMU's.

POSTED BY: Michel Oliveira

Got it, but are the "step" and "stepTrigger" variables that appear in modelica code of the imported FMU created by SM at the time it opens or are they in some "hidden place" in the FMU? I'm asking because I'm developing an application where I execute SM FMU's.

No they are not part of the FMU, they are part of the Modelica wrapper that is generated when you import an FMU into System Modeler. So you would get them for every imported co-simulation FMU regardless of the tool used to produce the FMU.

Otto

POSTED BY: Otto Tronarp

I'm suspecting you are simulating the imported FMU with useTriggerInput_=true, but without anything connected to the trigger. You could connect it to a BooleanPulse or SampleTrigger, but the easiest solution is to simply set the useTriggerInput_=false and specify a step_ size.

enter image description here

I hope that helps.

Otto

POSTED BY: Otto Tronarp

Hi Otto, Thanks for the response, I've attached the files that I modified and used. the difference is highlighted on the image below. enter image description here

I'm using System Modeler 12.1, where can I find those simulation options?

POSTED BY: Michel Oliveira

I'm using System Modeler 12.1, where can I find those simulation options?

It's a parameter in the model that is generated when you import the FMU. So you should get that Co-simulation tab when you open the generated model.

Otto

POSTED BY: Otto Tronarp

I found the tab here, set the parameters as you said and it worked! My bad! Thanks for the help Otto!

Michel

POSTED BY: Michel Oliveira

Hi again, I was wondering what the

useTriggerInput_

parameter means? is it a kind of enable signal generator for the solver?

in the FMU that I generated in systemModeler there is a variable:

Interfaces_.Boolean_DiscreteInput stepTrigger_ if useTriggerInput_  >>;

I noticed that SM just generate it if the FMU is for Co-Simulation. So if I'm correct it is a synchronization mechanism for other programs or process that simulate other part of the system.

POSTED BY: Michel Oliveira

Hi,

I cannot reproduce your issue, for me it works (tested with 12.2). Perhaps it's best if you publish the actual model that you used (including the modification).

Otto

enter image description here

POSTED BY: Otto Tronarp
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard