Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register
  • Index
  • » Users
  • » PJJ3618
  • » Profile

Posts

Posts

Hallo

I have no enough expertise to explain the model error after crash. Normally it does nothing to my models so I never investigated it before. Hope some experts can answer about it so that i also get informed.

Sorry to say that details are always insufficient in your case to say anything. That is the reason of no response from others. Try to include model also in questions.

Best wishes
Joel

Hallo again

You cannot use the same name since it is already existing in modelica library as example. You can rename the model eg: to PumpsystemSample or other in text view of model. Name of Model is at starting and ending of code.

Since the new model is outside the modelica library the path of prescribed pump (maybe the author forgot to add it in library) is unknown and it will be in red square with other components in diagram view. You should give the path of prescribed pump in text view of model ie, Modelica.Fluids.Machines.PrescribedPump. Same like path of other components.

Now you can give the  <system.m_flow_start>  in System component to 1e-15 and simulate

Hope this helps, best regards
Joel

Hallo Iwinklmann

Don't know if you reached solution. Initialization issues in the model. My suggestion is to change <system.m_flow_start>  from 0 to some low values like 1e-15. please try this and reply if problem still sustains.

NB: so far I know you cannot change values in the models of modelica library (uneditable). But you can do this by copying code to a new your own model and then simulate.

Best regards
Joel

Oct-18-18 09:23:54
Standard Fluid Examples failing

Hallo Jeff

The error you mentioned can be because of defining initial values for more variables than needed or incorrect values in the model. More Information required to tell about it correctly. Debugging and using flags while compiling are usual options to solve these.

Best wishes
Joel

Oct-17-18 08:19:12
Standard Fluid Examples failing

Hallo

The example models will successfully simulate when they are given with proper Initial conditions (start values and other values you give to models in diagram view). Since the example models in modelica library is uneditable it is not possible to Change any Initial values in these models and hence Simulation fails. So i suggest you to make your own model and copy to it the entire code from desired example model in library. Now give reasonable Initial conditions to the models. This worked for me.

Best regards
Joel

Oct-17-18 08:01:54
when im trying to simulate my simple fluids model, the grid shows no results

Hallo,

Below issues found in Initializing parameters for the tank:
- <Height> of the tank (1m) cannot be lower than the <level_start> (23m) which you defined. please Switch the values for these variables ie, <Height>=23m, <level_start> =1m
- You opted <true> for portdata and forgot to define its data below. Port data is used when pressure loss calculation across the ports of tank needed to be included. I suggest you to opt portdata <false> and leave blank the portdata section below.

Your simulation fails after 239 secs which logically proves the condition of overflow in tank.

Best Regards
Joel

Oct-02-18 06:35:46
Compressible fluid through pump gives no pressure build up at outlet of pump

Hallo all,

Mistake was mine as I didnt dig deep into the construction of pump. Pump Characteristics define the outlet head of that pump. So Default head values accross volume flow rates needed to be reclared as the medium changed to compressible fluid air. So for getting at least  10bar head with air, 10e5 head needed to be defined in pump characteristics at zeo flow of pump.

Thank you
Joel

Sep-17-18 13:36:57
Compressible fluid through pump gives no pressure build up at outlet of pump

Hallo,

I was trying to model[Openmodelica12.0] a cyclic air flowing pipe system in which high pressure air flows through a valve and the pressure at  the inlet of valve is developed by a compressor. Airtank is taken from Modelica.Fluid.Vessels.ClosedVolume as source of fluid and compressible valve from Modelica.Fluid.Valves.ValveCompressible. As i couldnot find another compatible air pump I replaced the medium and used PrescribedPump from fluid library (thought it would act like a centrifugal compressor). Medium was replaced to DryAirNasa as it has more temperature operating range. Simulation after intialization yielded results but the major issue is the insufficient pressure at the outlet of compressor (from 1.01325bar to 1.024bar). The needed presssure is around 10bar. Did i miss anything?


Is the model incapable of building high pressure with low density fluids?

Below is the code of the model:

model SimpleValveTank
  replaceable package Medium = Modelica.Media.Air.DryAirNasa constrainedby Modelica.Media.Interfaces.PartialMedium;
  inner Modelica.Fluid.System system(T_ambient = 301.15, energyDynamics = Modelica.Fluid.Types.Dynamics.FixedInitial, m_flow_start = 0.000000000000001, momentumDynamics = Modelica.Fluid.Types.Dynamics.SteadyState, p_ambient = 101325) annotation(
    Placement(visible = true, transformation(origin = {86, -88}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Fluid.Machines.PrescribedPump pump(redeclare function flowCharacteristic = Modelica.Fluid.Machines.BaseClasses.PumpCharacteristics.quadraticFlow(V_flow_nominal = {0, 0.25, 0.5}, head_nominal = {100, 60, 0}), redeclare package Medium = Medium, N_nominal = 400, T_start = system.T_start, V(displayUnit = "l") = 0.05, checkValve = true, energyDynamics = Modelica.Fluid.Types.Dynamics.FixedInitial, massDynamics = Modelica.Fluid.Types.Dynamics.FixedInitial, nParallel = 1, use_N_in = false) annotation(
    Placement(visible = true, transformation(origin = {-40, -44}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Fluid.Pipes.StaticPipe pipe(redeclare package Medium = Medium, allowFlowReversal = true, diameter = 0.150, height_ab = 0, length = 5, nParallel = 1) annotation(
    Placement(visible = true, transformation(origin = {-10, -44}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Fluid.Valves.ValveCompressible valveCompressible1(redeclare package Medium = Medium, CvData = Modelica.Fluid.Types.CvTypes.OpPoint, Kv = 50, dp_nominal = 5.9e+11, m_flow_nominal = 400, p_nominal = 6e6) annotation(
    Placement(visible = true, transformation(origin = {34, -44}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Blocks.Sources.Ramp ramp1(duration = 10, height = 1, offset = 0, startTime = 10) annotation(
    Placement(visible = true, transformation(origin = {12, -10}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Fluid.Vessels.ClosedVolume Airtank(redeclare package Medium = Medium, V = 100, energyDynamics = Modelica.Fluid.Types.Dynamics.DynamicFreeInitial, massDynamics = Modelica.Fluid.Types.Dynamics.DynamicFreeInitial, nPorts = 2, use_portsData = false) annotation(
    Placement(visible = true, transformation(origin = {-86, -24}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Fluid.Pipes.StaticPipe pipe1(redeclare package Medium = Medium, allowFlowReversal = true, diameter = 0.3, height_ab = 1, length = 100, nParallel = 1) annotation(
    Placement(visible = true, transformation(origin = {70, -44}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
equation
  connect(pipe1.port_b, Airtank.ports[2]) annotation(
    Line(points = {{80, -44}, {84, -44}, {84, 16}, {-64, 16}, {-64, -40}, {-82, -40}, {-82, -34}, {-86, -34}}, color = {0, 127, 255}));
  connect(Airtank.ports[1], pump.port_a) annotation(
    Line(points = {{-86, -34}, {-86, -44}, {-50, -44}}, color = {0, 127, 255}, thickness = 0.5));
  connect(ramp1.y, valveCompressible1.opening) annotation(
    Line(points = {{23, -10}, {34, -10}, {34, -36}}, color = {0, 0, 127}));
  connect(valveCompressible1.port_b, pipe1.port_a) annotation(
    Line(points = {{44, -44}, {60, -44}}, color = {0, 127, 255}));
  connect(pipe.port_b, valveCompressible1.port_a) annotation(
    Line(points = {{0, -44}, {24, -44}}, color = {0, 127, 255}));
  connect(pump.port_b, pipe.port_a) annotation(
    Line(points = {{-30, -44}, {-20, -44}}, color = {0, 127, 255}));

annotation(
    experiment(StartTime = 0, StopTime = 20));
end SimpleValveTank;

Looking for some advice

Thanks and Regards,
Joel


Problem solved´

Thanks

Hallo Michael

You are welcome.

Prost.. current/wink
Joel Jossy

Hi Ramiro,

Sorry if i confused you. i suggested inclusion of model-3 (as in previous message) thinking you need a simple model only. so that:

_It gives a known displacement input to spring-damper mass system upwards through flange_a
_at base it can be fixed (flange_b.s=0) and movable top flange (flange_a.s) through which displacement transfers to spring-damper model

But sorry for that, if we exclude that suspension in tire then tire would be rigid (like tire of bull cart). In reality it need

(1)Mass--->(2)car suspension(Spring&damper)---->(3)Tire Model(Spring&damper)----> (4) Model for giving displacement (y(t) ----->(4)Fixed model

Reactionary forces in the model are automatically computed. So it should normally give you result. Hope this helps you.

Best wishes,
Joel Jossy

Hi Ramiro,

Got full picture now. sorry that i asked you to make force model at base.  But you have the answer now and it is easy if you model it yourself. Four models should define the system

(1)Mass--->(2)Spring&damper---->(3)Model for giving shocks (y(t) and variable force)----->(4)Fixed

Modelling 3rd one is challenging (i am not aware of its existence in library) I usually make my own models with required variables and other features needed. So i suggest you to make one. Its not that difficult, its flanges will have relative motion. Flange_b.s connected to fixed model and flange_a.s connected to 2nd model. Equation may be written like

flange_a.s=y(t);
You can leave force (flange.f) as variable. Solver will compute these variables while simulation. But you must give some initial values like position, for successful simulation. Hope i could help you.

Best Regards,
Joel Jossy

Hi,

Still there are contradictions. You are telling that ".....model which is excited by the movement of the base" and still wand to fix it in space? Because if you use Modelica library model 'fixed' at the base then that flange will have:
d(fixed.flange_a.s)/dt=0. I think you are aware of that. Then still why you want to use this model at base?

It should be not complex unless if you want to use visualization. Also i have no expertise in animation. If you want a simple model and want to find the curve of y(t)/dt. Then just input a force exertion model (where force flows out intermittently at varying amplitudes) to the flange of spring-damper model. You can attach fixed model to base of Force model.This only works if you want to simulate how mass behaves vertically if the base of the Tyre is given with shocks (like gutter in road).

Best wishes,
Joel Jossy

Hallo,

Your question is unclear. That is the reason of no reply from others. Your Intension of using this posiiton model is not clear from description.  You need to describe more about your model if you still want help.

Regards
Joel Jossy

Hallo Michael,

The initial flow rate of pump cannot be given Zero as the equations having flow rate as divisor will collapse. Give some intial value for V and m_flow_start other than Zero.(0.001m^3). Simulation works and gives you outpút. But there is another error regarding usage of the Modelica.Fluid.Machines.ControlledPump as it does not support inital dp less than Zero. Because It violates the contraint

pump.delta_head_init>=0

I suggest you to make a new pump model and modify the intialization of dp.

Best wishes
Joel Jossy

Jul-06-18 09:09:47
Seeks advice for plotting on both sides of y-axis

Hallo,

I have a Basic question regarding plotting of results. Is it possible to use both sides of y-axis (2 different Parameters) across x-axis(time vaiable)? I am not asking about parametric plot. I want to plot Two variables across x-axis but since both have far different data range. One curve lies almost negligible/ lies over x-axis, while other variable Shows normal curve.

It would be a good feature to analyze variation of two variables together against time. Please find below an example graph which i meant.

https://www.mapleprimes.com/questions/2 … xes-[/img]

Image Source:www.mapleprimes.com

Looking forward for an advice.

Regards
Joel

Jul-01-18 12:08:41
Encountering problem with no flow and reverse flow conditions of a basic valve. Seeking advice...

Hi Rene,

That was very quick response with very relevant information. Looks like I need to invest some time for learning graphical annotations and their format. Claytex definitely would be helpful I think.

People like you make modelica a better place to model systems. Kudos.. Thanks again friend.

Regards,
Joel

Jun-29-18 11:46:44
Encountering problem with no flow and reverse flow conditions of a basic valve. Seeking advice...

Hi Rene,

Thanks for your kind help. Really it was helpful. Actually i was complete with full model System and i was tricking compiler by interchanging equation format to other forms thereby removing compilation errors. Now I changed the pressure drop equation format on all models as per you mentioned and this works finely. Valve works in forward, no flow and reverse flow conditions. Thanks again for the valuable Information.

Sorry if i am asking this, Now adays i am really ambitious about modelica current/smile. I tried some animation models from modelica.mechanics.multibody and Simulation with Animation is awesome. Is it possible to modify library model components to my valve component (moving parts only). So that i can view actual movement of parts after Simulation? The library models for animations seems too complex with too many equations and variables. Is there anywhere i can get more guidance like a tutorial/Manual?

Thanks and regards,
Joel

Jun-27-18 11:45:40
Encountering problem with no flow and reverse flow conditions of a basic valve. Seeking advice...

Hallo,

I am new to open modelica. I am trying to model an equation based model of a valve system and found this Software useful. Below is the code of the Throttle valve which is a Basic component in model System. Full model consists of many throttle valves in series and parallel connection. Even the Basic throttle valve model Fails when differential pressure(dp) less than zero or equal to Zero. Érror Analysis indicates that the Format of eqúation (Quadratic equation for flow rate) is causing the trouble. I tried to use if else Statement giving conditions of pressure it works fine. But the Simulation stucks in the middle when it id done on combined throttle models(after connecting 3/4 models in parallel/series). Also i remember about Problems with if else Statements in big models. Is there any way to describe conditions other than mentioned method.


model Throttle
  extends BasicValve;
  Real Hub(unit = "mm")"Stroke of valve cone relative to the position of cone in mm(Hub=0 when D1 closed)";
  Real Kv(unit = "m^3/h")"Flow coeffient of valve";
  Real Q2"Intermediate flow rate value used in inner calculations";
  parameter Real Turn(unit="Nos.") "No of turns on D1 spindle(From close to open state)";
  parameter Real Pitch(unit="mm") "Pitch of the screw thread of valve spindle";
equation
Hub=Turn*Pitch;
  Kv =  0.0319 * Hub;
  outlet.Q = -inlet.Q;
  outlet.P = inlet.P - (Q2 ^ 2 / Kv ^ 2);
  inlet.Q = Q2;

  annotation(
    Icon(graphics = {Line(origin = {0, 50}, points = {{0, 50}, {0, 50}, {0, -50}, {0, -50}}, thickness = 1), Rectangle(origin = {6, 99}, fillPattern = FillPattern.Solid, extent = {{-60, 3}, {48, -3}}), Text(origin = {-46, -25}, extent = {{110, -91}, {-14, 13}}, textString = "D2")}, coordinateSystem(initialScale = 0.1)));
end DrozzleD2;


partial model BasicValve
  Port inlet annotation(
    Placement(visible = true, transformation(origin = {-100, -2}, extent = {{-10, -10}, {10, 10}}, rotation = 0), iconTransformation(origin = {-100, -2}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Port outlet annotation(
    Placement(visible = true, transformation(origin = {100, -2}, extent = {{-10, -10}, {10, 10}}, rotation = 0), iconTransformation(origin = {100, -2}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  annotation(
    Diagram,
    Icon(graphics = {Polygon(origin = {-50, 1}, points = {{-50, 99}, {-50, -99}, {50, -1}, {50, -1}, {-50, 99}}), Polygon(origin = {50, 0}, points = {{50, 100}, {-50, 0}, {50, -100}, {50, 100}})}));
end BasicValve;



Port used to connect model between an Input and Output fluid source/sink (Pressure (P), Flow rate (Q) variables). I didn't use modelica library models as the equation i use are different. Sorry if the questions are too naive but i really seek advice from experts

Thanks in advance
Joel

  • Index
  • » Users
  • » PJJ3618
  • » Profile
You are here: