modelica-3rdparty / ExternalMedia

The ExternalMedia library provides a framework for interfacing external codes computing fluid properties to Modelica.Media-compatible component models.
53 stars 36 forks source link

Model fails to execute when using two different fluids #102

Open falis96 opened 7 months ago

falis96 commented 7 months ago

Simple model with two sinks and two sources fails to run if you use two differnt fluids in two different circuits. Two examples are attached: Test_sinkSource_MSL_Total.zip

  1. Test_HeN2_sinkSource_MSL_Total: this model fails to compile in Dymola with error message dsmodel.c(105): error C2084: function 'void TwoPhaseMedium_setState_pT_C_impl_wrap(double,double,ExternalThermodynamicState *,const char *,const char *,const char *)' already has a body dsmodel.c(85): note: see previous definition of 'TwoPhaseMedium_setState_pT_C_impl_wrap' dsmodel.c(114): error C2084: function 'void TwoPhaseMedium_setState_ph_C_impl_wrap(double,double,int,ExternalThermodynamicState *,const char *,const char *,const char *)' already has a body dsmodel.c(94): note: see previous definition of 'TwoPhaseMedium_setState_ph_C_impl_wrap'. In OpenModelica it compiles but fails immediately with no error message;

  2. Test_HeHe_sinkSource_MSL_Total: this is the save model as the one above but using the same fluid in the two circuits, which simulates on both compilers.