I'm trying to get used to the Modelica.Fluid.Dissipation
. I want to evaluate the heat transfer coefficient of a straight pipe using the function kc_overall
. I tried to followthe UsersGuide
example. I'm not sure I understood how to write it and which inputs I have to use. Here's my code:
model Heat_tranfer_calcul
Modelica.SIunits.MassFlowRate M_FLOW=0.3 "input mass flow rate";
Modelica.Fluid.Dissipation.HeatTransfer.StraightPipe.kc_overall_IN_con IN_con(d_hyd=13e-3,L=15);
Modelica.Fluid.Dissipation.HeatTransfer.StraightPipe.kc_overall_IN_var IN_var(cp=4184,eta=8.9e-4,lambda=0.6,rho=1000) ;
equation
Modelica.Fluid.Dissipation.HeatTransfer.StraightPipe.kc_overall(IN_con,IN_var,M_FLOW)
end Heat_tranfer_calcul;
I also tried to get the fluid properties directly from the Modelica.Media.Water.StandardWater
.
If someone could help me to uderstand how the function works that would be really helpful.
Maxime
The function kc_overall
only takes two arguments — the records IN_con
and IN_var
. The mass flow rate must be specified through IN_var
so your code should be:
model Heat_tranfer_calcul
Modelica.SIunits.MassFlowRate M_FLOW=0.3 "input mass flow rate";
Modelica.Fluid.Dissipation.HeatTransfer.StraightPipe.kc_overall_IN_con IN_con(d_hyd=13e-3,L=15);
Modelica.Fluid.Dissipation.HeatTransfer.StraightPipe.kc_overall_IN_var IN_var(cp=4184,eta=8.9e-4,lambda=0.6,rho=1000, m_flow=M_FLOW);
equation
Modelica.Fluid.Dissipation.HeatTransfer.StraightPipe.kc_overall(IN_con,IN_var);
end Heat_tranfer_calcul;
By the way, it is good Modelica coding practice to use lowercase letters for variable names, that is m_flow
instead of M_FLOW
.