- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » starting with OpenModelica
starting with OpenModelica
starting with OpenModelica
Hi,
I try to use OpenModelica to simulate a part (the approch system) of a papermachine.
But I meet problems when I try to use examples of Fluid package (see below the error messages).
Furthermore, I have not found good readings about the modelisation of water system (how to manage connections, tanks, pumps and so on).If you have suggestion ?
If somebody can help me...
Thanks in advance
Best Regards
Raphaël
<<<
Example of trying to use PulpingSystem => messages occuring after clicking the "simulation" button
in Message Broswer
[1] 08:08:59 Scripting Notification
Linear iteration variables with predefined start attributes that are unrelevant in NLSJac28. (2)
========================================
1: userValve.m_flow:VARIABLE(min = max(-100000.0, max(-1e+060, max(0.0, max(0.0, 0.0)))) max = min(100000.0, min(1e+060, min(100000.0, min(100000.0, 100000.0)))) start = 0.0 unit = "kg/s" ) "Mass flow rate in design flow direction" type: Real
2: userValve.dp:VARIABLE(start = userValve.dp_start unit = "Pa" ) "Pressure difference between port_a and port_b (= port_a.p - port_b.p)" type: Real
Info: Only non-linear iteration variables in non-linear eqation systems require start values. All other start values have no influence on convergence and are ignored. Use "-d=dumpLoops" to show all loops. In OMEdit Tools->Options->Simulation->OMCFlags, in OMNotebook call setCommandLineOptions("-d=dumpLoops")
Linear iteration variables with predefined start attributes that are unrelevant in NLSJac29. (2)
========================================
1: pipe.flowModel.m_flows[1]:VARIABLE(min = max(0.0, max(-100000.0, max(-1e+060, max(-1e+060, -1e+060)))) max = min(100000.0, min(100000.0, min(100000.0, min(100000.0, 100000.0)))) start = 0.0 unit = "kg/s" ) "mass flow rates between states" type: Real [1]
2: pipe.flowModel.dps_fg[1]:VARIABLE(start = pipe.flowModel.p_a_start - pipe.flowModel.p_b_start unit = "Pa" ) "pressure drop between states" type: Real [1]
Info: Only non-linear iteration variables in non-linear eqation systems require start values. All other start values have no influence on convergence and are ignored. Use "-d=dumpLoops" to show all loops. In OMEdit Tools->Options->Simulation->OMCFlags, in OMNotebook call setCommandLineOptions("-d=dumpLoops")
[2] 08:08:59 Scripting Warning
Requested package Modelica of version 3.2.2, but this package was already loaded with version 3.2.3. You might experience problems if these versions are incompatible.
[3] 08:08:59 Symbolic Warning
The model contains alias variables with conflicting start and/or nominal values. It is recommended to resolve the conflicts, because otherwise the system could be hard to solve. To print the conflicting alias sets and the chosen candidates please use -d=aliasConflicts.
Message in the window which open during the simulation
C:/Users/passasr/AppData/Local/Temp/OpenModelica/OMEdit/Modelica.Fluid.Examples.PumpingSystem/Modelica.Fluid.Examples.PumpingSystem.exe -port=58194 -logFormat=xmltcp -override=startTime=0,stopTime=2000,stepSize=0.4,tolerance=1e-06,solver=dassl,outputFormat=mat,variableFilter=.* -r=C:/Users/passasr/AppData/Local/Temp/OpenModelica/OMEdit/Modelica.Fluid.Examples.PumpingSystem/Modelica.Fluid.Examples.PumpingSystem_res.mat -w -lv=LOG_STATS -inputPath=C:/Users/passasr/AppData/Local/Temp/OpenModelica/OMEdit/Modelica.Fluid.Examples.PumpingSystem -outputPath=C:/Users/passasr/AppData/Local/Temp/OpenModelica/OMEdit/Modelica.Fluid.Examples.PumpingSystem
The simulation finished successfully.
The following assertion has been violated at time 0.000000
pipe.flowModel.m_flows[1] >= 0.0 and pipe.flowModel.m_flows[1] <= 100000.0
Variable violating min/max constraint: 0.0 <= pipe.flowModel.m_flows[1] <= 100000.0, has value: -141.424
The initialization finished successfully without homotopy method.
The following assertion has been violated at time 200.000000
valveOpening.y >= 0.0 and valveOpening.y <= 1.0
Variable violating min/max constraint: 0.0 <= valveOpening.y <= 1.0, has value: 1
Warning: maximal number of iteration reached but no root found
Warning: maximal number of iteration reached but no root found
### STATISTICS ###
Re: starting with OpenModelica
I try to simulate the draining of a tank through a valve.
So the system is as mentioned below :
The error messages are :
[1] 08:50:32 Scripting Warning
Requested package Modelica of version 3.2.2, but this package was already loaded with version 3.2.3. You might experience problems if these versions are incompatible.
[2] 08:50:32 Translation Notification
[Modelica.Fluid.Interfaces: 508:19-510:49]: From here:
[3] 08:50:32 Translation Error
[test: 4:3-5:114]: component tank contains the definition of a partial class Medium.
Please redeclare it to any package compatible with Modelica.Media.Interfaces.PartialMedium.
[4] 08:50:32 Translation Error
Error occurred while flattening model test
I have not found where and how to change the "class.Medium"
Thanks for your help.
Raphaêl
model test
Modelica.Fluid.Sources.FixedBoundary sink(T = system.T_ambient,nPorts = 1, p = system.p_ambient) annotation(
Placement(visible = true, transformation(origin = {74, -44}, extent = {{-10, -10}, {10, 10}}, rotation = 180)));
Modelica.Fluid.Vessels.OpenTank tank(crossArea = 1, height = 2, level(fixed = true, start = 2), use_portsData = true) annotation(
Placement(visible = true, transformation(origin = {-64, 62}, extent = {{-20, -20}, {20, 20}}, rotation = 0)));
Modelica.Fluid.Valves.ValveLinear UserValve annotation(
Placement(visible = true, transformation(origin = {32, 14}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Modelica.Blocks.Sources.Constant OuvertureVanne(k = 0.5) annotation(
Placement(visible = true, transformation(origin = {12, 80}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
inner Modelica.Fluid.System system annotation(
Placement(visible = true, transformation(origin = {-86, -82}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
equation
connect(tank.ports[1], UserValve.port_a) annotation(
Line(points = {{-64, 42}, {22, 42}, {22, 14}}, color = {0, 127, 255}));
connect(UserValve.port_b, sink.ports[1]) annotation(
Line(points = {{42, 14}, {61, 14}, {61, -12}, {88, -12}, {88, -24}, {64, -24}, {64, -44}}, color = {0, 127, 255}));
connect(OuvertureVanne.y, UserValve.opening) annotation(
Line(points = {{23, 80}, {23, 56.5}, {41, 56.5}, {41, 59}, {32, 59}, {32, 22}}, color = {0, 0, 127}));
annotation(
uses(Modelica(version = "3.2.3")));
end test;
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » starting with OpenModelica