- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » OMEdit:I cannot get the simulation...
OMEdit:I cannot get the simulation result .
OMEdit:I cannot get the simulation result .
The message of error is as follows :
Scripting 16:08:19 0:0-0:0 Failed to open simulation result C:/Users/sxf/AppData/Local/Temp/OpenModelica/OMEdit/wojiubx_res.mat: Too few rows in data_2 matrix
I cannot understand "Too few rows in data_2 matrix" .Can someone tell me what possible reasons for this situation? Thank you!
Re: OMEdit:I cannot get the simulation result .
I can give you more information. I have tried to simulate this simple example:
model daadd
Real x;
equation
1 = x - 1 - (x - 1) ^ 2 / 2 + (x - 1) ^ 3 / 3 - (x - 1) ^ 4 / 4;
end daadd;
And then I get this message:"Too few rows in data_2 matrix".
Re: OMEdit:I cannot get the simulation result .
Look closer. You also got another error-message:
Code:
LOG_NLS | warning | nonlinear system 2 fails: at t=0 Debug more
| | | | | proper start-values for some of the following iteration variables might help
| | | | | [1] Real x(start=0, nominal=1)
assert | debug | Solving non-linear system failed at time=0.
For more information please use -lv LOG_NLS. Debug more
Simulation process exited with code 255
- sjoelund.se
- 1700 Posts
Re: OMEdit:I cannot get the simulation result .
(Note that complex solutions are not solutions in Modelica; the equation should not be possible to solve)
- sjoelund.se
- 1700 Posts
Re: OMEdit:I cannot get the simulation result .
No. I have another code:
Code:
LOG_NLS | warning | Error solving nonlinear system Nonlinear function (residualFunc5, size 1) at time 0 Debug more
stdout | warning | Error in initialization. Storing results and exiting.
Use -lv=LOG_INIT -w for more information.
Process crashed
Simulation process exited with code -1
Re: OMEdit:I cannot get the simulation result .
Same thing. Just an older omc version. Exit code -1 is the same as 255 (because on Linux the exit code is an unsigned char).
- sjoelund.se
- 1700 Posts
Re: OMEdit:I cannot get the simulation result .
Ascold wrote:
sjoelund.se wrote:
(Note that complex solutions are not solutions in Modelica; the equation should not be possible to solve)I didn't understand what do you want to say me.
Your equation has four solutions; for example:
x = 0.5389-1.4934 i
Modelica Real numbers are not imaginary. So your model should be unsolvable. And OpenModelica says it was unable to find a solution; so it did the right thing telling you that.
- sjoelund.se
- 1700 Posts
Re: OMEdit:I cannot get the simulation result .
sjoelund.se wrote:
Ascold wrote:
sjoelund.se wrote:
(Note that complex solutions are not solutions in Modelica; the equation should not be possible to solve)I didn't understand what do you want to say me.
Your equation has four solutions; for example:
x = 0.5389-1.4934 i
Modelica Real numbers are not imaginary. So your model should be unsolvable. And OpenModelica says it was unable to find a solution; so it did the right thing telling you that.
Thanks for answer. It is correct. Please tell me more. If its true so why I cannot calculate this code ?
model sjoelund.se
parameter Real tw1=32.1;
parameter Real tw2=36.4;
Real tk2;
equation
1=(tw2-tw1)/(2.3*log10((tk2-tw1)/(tk2-tw2)));
end sjoelund.se;
I have same errors..Dymola solves that code perfect and has no errors.
Re: OMEdit:I cannot get the simulation result .
Probably because OpenModelica does not know the inverse of log10. If you give tk2 a start-value of 36.4, it finds the solution using a non-linear solver.
- sjoelund.se
- 1700 Posts
Re: OMEdit:I cannot get the simulation result .
sjoelund.se wrote:
Probably because OpenModelica does not know the inverse of log10. If you give tk2 a start-value of 36.4, it finds the solution using a non-linear solver.
You are smart. Thanks for answer .Can I distract you, if I will have some question?
Re: OMEdit:I cannot get the simulation result .
Usually someone will answer questions. I get email notification for all posts to these forums.
- sjoelund.se
- 1700 Posts
Re: OMEdit:I cannot get the simulation result .
Hi Guys,
Saw your conversation and thought to jump in as I have the same issues. Basically I am trying to solve the following equation :
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");
equation
Aorifice = PI * (D / 2) ^ 2;
m = Cd * Aorifice * 100000 * Pup / sqrt(Tup + 273.15) * sqrt(g / Rspecific * 2 / (g - 1) * ((Pdown / Pup) ^ (2 / g) - (Pdown / Pup) ^ ((g + 1) / g)));
end Test;
However when I try to solve I get the following error message:
record SimulationResult
resultFile = "",
messages = "Simulation execution failed for model: Test
stdout | warning | Non-Linear Solver try to handle a problem with a called assert.
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.
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 | Error in initialization. Storing results and exiting.
| | | | Use -lv=LOG_INIT -w for more information.
"
end SimulationResult;
Could you please help me how to overcome this issue? I do not understand how to use the -lv=LOG_INIT -w command and what initial start values should I allocate to Pup
Thank you for the help
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » OMEdit:I cannot get the simulation...