- Index
- » Users
- » Yoann
- » Profile
Posts
Posts
Hello,
I am new to OM. I am trying to set up a piping network with the Fluid library, which compiles properly and gives the expected result. However when I add a curved bend in the network I get the following error:
Piping_XXX_02nls.c: In function 'residualFunc281':
Piping_XXX_02nls.c:663:98: error: incompatible type for argument 2 of 'omc_Modelica_Fluid_Dissipation_PressureLoss_Bend_dp__curvedOverall__MFLOW'
res[3] = omc_Modelica_Fluid_Dissipation_PressureLoss_Bend_dp__curvedOverall__MFLOW(threadData, omc_Modelica_Fluid_Fittings_BaseClasses_Bends_CurvedBend_Geometry(threadData, data->simulationInfo->realParameter[20] /* curvedBend1.geometry.d_hyd PARAM */, data->simulationInfo->realParameter[19] /* curvedBend1.geometry.R_0 PARAM */, data->simulationInfo->realParameter[21] /* curvedBend1.geometry.delta PARAM */, data->simulationInfo->realParameter[18] /* curvedBend1.geometry.K PARAM */), tmp0, data->localData[0]->realVars[253] /* curvedBend1.dp variable */) - data->localData[0]->realVars[70] /* $cse14 variable */;
^
In file included from Piping_XXX_model.h:24:0,
from Piping_XXX_02nls.c:2:
Piping_XXX_functions.h:708:15: note: expected 'Modelica_Fluid_Dissipation_PressureLoss_Bend_dp__curvedOverall__IN__con {aka struct <anonymous>}' but argument is of type 'Modelica_Fluid_Fittings_BaseClasses_Bends_CurvedBend_Geometry {aka struct <anonymous>}'
modelica_real omc_Modelica_Fluid_Dissipation_PressureLoss_Bend_dp__curvedOverall__MFLOW(threadData_t *threadData, Modelica_Fluid_Dissipation_PressureLoss_Bend_dp__curvedOverall__IN__con _IN_con, Modelica_Fluid_Dissipation_PressureLoss_Bend_dp__curvedOverall__IN__var _IN_var, modelica_real _dp);
^
Piping_XXX_02nls.c: In function 'residualFunc178':
Piping_XXX_02nls.c:1005:98: error: incompatible type for argument 2 of 'omc_Modelica_Fluid_Dissipation_PressureLoss_Bend_dp__curvedOverall__MFLOW'
res[3] = omc_Modelica_Fluid_Dissipation_PressureLoss_Bend_dp__curvedOverall__MFLOW(threadData, omc_Modelica_Fluid_Fittings_BaseClasses_Bends_CurvedBend_Geometry(threadData, data->simulationInfo->realParameter[20] /* curvedBend1.geometry.d_hyd PARAM */, data->simulationInfo->realParameter[19] /* curvedBend1.geometry.R_0 PARAM */, data->simulationInfo->realParameter[21] /* curvedBend1.geometry.delta PARAM */, data->simulationInfo->realParameter[18] /* curvedBend1.geometry.K PARAM */), tmp0, data->localData[0]->realVars[253] /* curvedBend1.dp variable */) + data->simulationInfo->realParameter[114] /* sink2.m_flow PARAM */;
^
In file included from Piping_XXX_model.h:24:0,
from Piping_XXX_02nls.c:2:
Piping_XXX_functions.h:708:15: note: expected 'Modelica_Fluid_Dissipation_PressureLoss_Bend_dp__curvedOverall__IN__con {aka struct <anonymous>}' but argument is of type 'Modelica_Fluid_Fittings_BaseClasses_Bends_CurvedBend_Geometry {aka struct <anonymous>}'
modelica_real omc_Modelica_Fluid_Dissipation_PressureLoss_Bend_dp__curvedOverall__MFLOW(threadData_t *threadData, Modelica_Fluid_Dissipation_PressureLoss_Bend_dp__curvedOverall__IN__con _IN_con, Modelica_Fluid_Dissipation_PressureLoss_Bend_dp__curvedOverall__IN__var _IN_var, modelica_real _dp);
^
Piping_XXX_02nls.c: In function 'residualFunc63':
Piping_XXX_02nls.c:1464:98: error: incompatible type for argument 2 of 'omc_Modelica_Fluid_Dissipation_PressureLoss_Bend_dp__curvedOverall__MFLOW'
res[1] = omc_Modelica_Fluid_Dissipation_PressureLoss_Bend_dp__curvedOverall__MFLOW(threadData, omc_Modelica_Fluid_Fittings_BaseClasses_Bends_CurvedBend_Geometry(threadData, data->simulationInfo->realParameter[20] /* curvedBend1.geometry.d_hyd PARAM */, data->simulationInfo->realParameter[19] /* curvedBend1.geometry.R_0 PARAM */, data->simulationInfo->realParameter[21] /* curvedBend1.geometry.delta PARAM */, data->simulationInfo->realParameter[18] /* curvedBend1.geometry.K PARAM */), tmp0, data->localData[0]->realVars[253] /* curvedBend1.dp variable */) + data->simulationInfo->realParameter[114] /* sink2.m_flow PARAM */;
^
In file included from Piping_XXX_model.h:24:0,
from Piping_XXX_02nls.c:2:
Piping_XXX_functions.h:708:15: note: expected 'Modelica_Fluid_Dissipation_PressureLoss_Bend_dp__curvedOverall__IN__con {aka struct <anonymous>}' but argument is of type 'Modelica_Fluid_Fittings_BaseClasses_Bends_CurvedBend_Geometry {aka struct <anonymous>}'
modelica_real omc_Modelica_Fluid_Dissipation_PressureLoss_Bend_dp__curvedOverall__MFLOW(threadData_t *threadData, Modelica_Fluid_Dissipation_PressureLoss_Bend_dp__curvedOverall__IN__con _IN_con, Modelica_Fluid_Dissipation_PressureLoss_Bend_dp__curvedOverall__IN__var _IN_var, modelica_real _dp);
^
<builtin>: recipe for target 'Piping_XXX_02nls.o' failed
mingw32-make: *** [Piping_XXX_02nls.o] Error 1
mingw32-make: *** Waiting for unfinished jobs....
Piping_XXX_08bnd.c: In function 'Piping_XXX_eqFunction_414':
Piping_XXX_08bnd.c:817:161: error: incompatible type for argument 2 of 'omc_Modelica_Fluid_Dissipation_PressureLoss_Bend_dp__curvedOverall__DP'
data->simulationInfo->realParameter[16] /* curvedBend1.dp_small PARAM */ = omc_Modelica_Fluid_Dissipation_PressureLoss_Bend_dp__curvedOverall__DP(threadData, omc_Modelica_Fluid_Fittings_BaseClasses_Bends_CurvedBend_Geometry(threadData, data->simulationInfo->realParameter[20] /* curvedBend1.geometry.d_hyd PARAM */, data->simulationInfo->realParameter[19] /* curvedBend1.geometry.R_0 PARAM */, data->simulationInfo->realParameter[21] /* curvedBend1.geometry.delta PARAM */, data->simulationInfo->realParameter[18] /* curvedBend1.geometry.K PARAM */), tmp4, data->simulationInfo->realParameter[23] /* curvedBend1.m_flow_small PARAM */);
^
In file included from Piping_XXX_model.h:24:0,
from Piping_XXX_08bnd.c:2:
Piping_XXX_functions.h:682:15: note: expected 'Modelica_Fluid_Dissipation_PressureLoss_Bend_dp__curvedOverall__IN__con {aka struct <anonymous>}' but argument is of type 'Modelica_Fluid_Fittings_BaseClasses_Bends_CurvedBend_Geometry {aka struct <anonymous>}'
modelica_real omc_Modelica_Fluid_Dissipation_PressureLoss_Bend_dp__curvedOverall__DP(threadData_t *threadData, Modelica_Fluid_Dissipation_PressureLoss_Bend_dp__curvedOverall__IN__con _IN_con, Modelica_Fluid_Dissipation_PressureLoss_Bend_dp__curvedOverall__IN__var _IN_var, modelica_real _m_flow);
^
<builtin>: recipe for target 'Piping_XXX_08bnd.o' failed
mingw32-make: *** [Piping_XXX_08bnd.o] Error 1
mingw32-make: Leaving directory 'C:/Users/XXXXX/AppData/Local/Temp/OPENMO~1/OMEdit/PIPING~1'
Compilation process failed. Exited with code 2.
Here is my bend:
Modelica.Fluid.Fittings.Bends.CurvedBend curvedBend1(redeclare package Medium = Medium, geometry = Modelica.Fluid.Fittings.BaseClasses.Bends.CurvedBend.Geometry(d_hyd= 0.022, R_0=1) ) annotation(Placement(visible = true, transformation(origin = {-2, -36}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Any help would be greatly appreciated!
Thanks!
- Index
- » Users
- » Yoann
- » Profile