So I'm new to the tool openmodelica and I'm trying to simulate the flow of a fluid in a pipe with heat transfer.
Here's the configuration: a fluid with an inlet pressure and temperature flow through a pipe, the outside temperature is higher than the inlet fluid temperature. The pressure in the outlet of the pipe is inferior to the inlet pressure to allow the flow of the fluid.
I assigned a material to the wall of pipe using WallConstProps
. I want to simulate the convection heat transfer between the wall and the ambient so I used the convection component of the thermal library. I have attached a picture of my current system.
My question is : to simulate the convection heat transfert between the wall and the fluid, do I have to just connect the Wall to the heatport
of the dynamic pipe and set the use_HeatTransfer to "true"?
Moreover, I don't really understand how the heatports
of the Wallconstprops
and the dynamic pipe. When I connect them, I have to select which heatport
to use, so does the heat transfer apply to the whole component or just to the segment of the component corresponding to that heatport
?
Thanks in advance and have a great day, Maxime
The convective heat transfer of the fluid inside the pipe can be specified with the parameter HeatTransfer
in the Assumptions
tab of the DynamicPipe
model. The drop-down menu gives you different heat transfer correlations to choose from. The default IdealHeatTransfer
has no (convective) thermal resistance — that is the temperatures of the fluid volumes are equal to the heatPort
temperatures. You might want to use LocalPipeFlowHeatTransfer
which models the fluid convective heat transfer under both laminar and turbulent conditions.
As for your second question: Since the DynamicPipe
model is discretized in nNodes
segments, when you connect the pipe to the wall model (discretized in n
segments) you are asked which segments to connect. Accepting the default [:]
pipe segments 1:nNodes
are connected to wall segments 1:n
. Obviously, the number of wall and pipe segments should be equal. In the wall model you could set n=pipe.nNodes
.
The default value of nNodes
is 2. If you want to use only one segment you also need to change the model structure of the pipe with the parameter modelStructure
to one different from av_vb
. This parameter can be found in the Advanced
tab.