Open marcusfuchs opened 7 years ago
@GersHub I added the static model to the branch pipe_issue76_static
. Please raise any issues or questions you may encounter.
@bramvdh91 @GersHub
I'm playing around with JModelica, and in the current implementation of HeatLossPipeStatic
I get a type error on
Tin_a = Medium.temperature_phX(
port_a.p,
inStream(port_a.h_outflow),
inStream(port_a.Xi_outflow));
Any objections to changing this to
Tin_a = Medium.temperature_phX(
port_a.p,
inStream(port_a.h_outflow),
Medium.X_default);
?
No if it works on both platform. Any idea for the origin of the error?
-----Message d'origine----- De : "marcusfuchs" notifications@github.com Envoyé : 04-07-17 21:55 À : "bramvdh91/modelica-ibpsa" modelica-ibpsa@noreply.github.com Cc : "Subscribed" subscribed@noreply.github.com Objet : Re: [bramvdh91/modelica-ibpsa] Add a static pipe model for comparison(#76)
@bramvdh91 @GersHub I'm playing around with JModelica, and in the current implementation of HeatLossPipeStatic I get a type error on Tin_a = Medium.temperature_phX( port_a.p, inStream(port_a.h_outflow), inStream(port_a.Xi_outflow));Any objections to changing this to Tin_a = Medium.temperature_phX( port_a.p, inStream(port_a.h_outflow), Medium.X_default);? — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
Haven't looked too deep into this, but I guess it has something to do with how JModelica and Dymola handle the mass fractions of a medium. Modelica.Media.UsersGuide.MediumUsage.BasicUsage
gives a bit of information on this, including
If a fluid consists of a single substance, nXi = 0 and the vector of mass fractions Xi is not present.
Therefore, JModelica could be correct in returning an empty value of type Real[0]
for inStream(port_a.Xi_outflow)
with a single-substance water medium, raising an error as Medium.temperature_phX
expects an input of type Real[1]
for X
. Dymola on the other hand seems to tolerate this.
As discussed in the past, it is possible to model static pipe behavior within a model structure similar to the newly developed pipe model. This needs 2 changes
I'll add such a model for comparison and reference.
@GersHub sorry for the long delay in getting to this.