Valve Connection in Ansys Twinbuilder with Modelica

Hi,

I model a pump in ANSYS Twin Builder 2020 R2.4 with Modelica. I want to specify if time derivative of fluid volume, in which fluid is compressed, is greater than 0, low pressure valve is open and high pressure valve is closed.If derivative is smaller than zero, low pressure valve is closed and high pressure valve is open. I wrote a code which specifies this function. But I need to give this information to valve with connector. Valve has a connector which is named opening. When I try to compile my code, it throws an error which says "Hochdruckreiniger2, Line 28 : Unexpected token: opening_NP" How can I connect this information with connector named opening? I would really appreciate your helps. Thanks in advance!



Answers

  • Inside Twin Builder, you can access Modelica examples for the different libraries, you view the diagram and Modelica text for the examples. Also, there are some examples that include user defined equations as well as the definition of initial equations.

    Unfortunately, a full answer to this question is beyond the scope of Ansys employees. Hopefully another member can help you.

  • Hi,

    If you are trying to use the "opening_NP" as a connector to connect to the valves you need to define it as a separate component. Currently, you have defined "opening_NP" as a real variable in your model. You can try adding a "Modelica.Block.Sources.RealExpression" and connecting it to the valves. The "RealExpression" has an output signal "y" - you can assign the value you like to this signal and connect it to the valves.

Sign In or Register to comment.