- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » BackendDAEOptimize.makeEquationToResi...
BackendDAEOptimize.makeEquationToResidualExp failed to transform equat
BackendDAEOptimize.makeEquationToResidualExp failed to transform equat
Hello
I currently have a problem when I try to run a calculation with this attached module.
I have a feeling that the problem is located on the if loop is not performing properly on initialization.
I get this error:
Internal error - BackendDAEOptimize.makeEquationToResidualExp failed to transform equation: tank1_4.mediumStream = test_model.Models.TestPressurelosses.tank1_4.Medium.setState_phX(tank1_4.p, tank1_4.h, {}, 0) to residual form!
Should I change the shape of the loop?
model-tank.zip
Thank you for your help
Steven
Re: BackendDAEOptimize.makeEquationToResidualExp failed to transform equat
I update this post.
The problem was with the if.
It is necessary to modify the structure of the if
if portA.m_flow> = 0 then
mediumA = Medium.setState_ph (portA.p, inStream (portA.h_outflow));
else
mediumA = Medium.setState_ph (portA.p, portA.h_outflow);
end if;
in :
mediumA = (if portA.m_flow> = 0 then Medium.setState_ph (portA.p, inStream (portA.h_outflow)) else Medium.setState_ph (portA.p, portA.h_outflow));
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » BackendDAEOptimize.makeEquationToResi...