Open albertoleva opened 10 months ago
I'm not sure why you write the model like this. Using M and E as states is not a good idea, you should use p and h as states. The simplest way to do that is to write explicit equations such as
dM_dt = dM_dp*der(p) + dM_dh*der(h);
dM_dt = w_in - w_out;
dM_dp = V*Medium.density_derp_h;
dM_dh = V*Medium.densty_derh_p;
there are also way to get the change of variables done automatically, but it's a bit involved, not sure it's worth it. and then compu
SETUP
OpenModelica 1.21.0 OMSimulator 2.1.1~188-gaf996ad-linux MSL 3.2.3 ExternalMedia 3.3.2
MODEL
EXPECTED BEHAVIOUR
Simulate.
ACTUAL BEHAVIOUR --- see note at end
The model translates but then the C code compilation fails with
NOTE
The reason might reside in the following translation issue
I cannot figure out a reason why the model cannot be torn --- apologies if missing something relevant.