- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Can't get the simulation results, Non...
Can't get the simulation results, Non Linear programming
Can't get the simulation results, Non Linear programming
Hi Everyone,
I have a problem that I am trying to solve. When I try to simulate the following code:
model Test
parameter Real m(unit = "kg/s", min = 0) = 9.96720e-005;
parameter Real Pdown(unit = "bar", min = 0) = 2.048153 - 0.6209;
parameter Real Cd = 0.7;
parameter Real D(unit = "m") = 0.0005588;
parameter Real Tup(unit = "°C") = 20.5;
parameter Real g(unit = "Dimensionless") = 1.401;
parameter Real Rspecific(unit = "J/(kgK)") = 287.1;
constant Real PI = 3.14159265;
Real Pup ;
Real Aorifice(unit = "m2");
Real Pcr;
Real P;
equation
Aorifice = PI * (D / 2) ^ 2;
Pcr = (2 / (g + 1)) ^ (g / (g - 1));
P = Pdown / Pup;
if P > Pcr then
m = Cd * Aorifice * 100000 * Pup / sqrt(Tup + 273.15) * sqrt(g / Rspecific * 2 / (g - 1) * ((Pdown / Pup) ^ (2 / g) - (Pdown / Pup) ^ ((g + 1) / g)));
else
m = 1000 * Cd * Aorifice * 100000 * Pup / sqrt(Tup + 273.15) * sqrt(g / Rspecific * (2 / (g + 1)) ^ ((g + 1) / (g - 1)));
end if;
end Test;
I get the following error message that says:
record SimulationResult
resultFile = "Test_res.mat",
messages = "stdout | warning | While solving non-linear system an assertion failed.
| | | | | The non-linear solver tries to solve the problem that could take some time.
| | | | | It could help to provide better start-values for the iteration variables.
| | | | | For more information simulate with -lv LOG_NLS
stdout | warning | Non-Linear Solver try to handle a problem with a called assert.
"
end SimulationResult;
OMC-ERROR:
"Warning: Iteration variables with default zero start attribute in nonlinear equation system:
Pup:VARIABLE() .Test, .Real type: Real
P:VARIABLE() .Test, .Real type: Real
"
I was wondering if someone knew how to overcome the issue and how to set the start value for Pup
Thank you
Malen
Re: Can't get the simulation results, Non Linear programming
Real Pup(start=x, fixed=true) ;
- sjoelund.se
- 1700 Posts
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Can't get the simulation results, Non...