- Index
- » Programming
- » Modelica Language
- » How to change assign heat transfer...
How to change assign heat transfer coefficient of dynamic pipe
How to change assign heat transfer coefficient of dynamic pipe
Hi,
i'm a new modelica user and need to work with dinamic pipes of standard fluid library.
With the dynamic pipe it is possible to assign heat transfer coefficient k as a parameter.
But i would like to change this value by a calculation.
Here is minimal example:
Code:
model Test
replaceable package Medium =
Modelica.Media.Water.ConstantPropertyLiquidWater;
Modelica.Fluid.Pipes.DynamicPipe pipe(
redeclare package Medium = Medium,
length=100,
diameter=0.1,
use_HeatTransfer=true,
redeclare model HeatTransfer =
Modelica.Fluid.Pipes.BaseClasses.HeatTransfer.IdealFlowHeatTransfer (
k=10)) ;
Modelica.Fluid.Sources.MassFlowSource_T boundary(nPorts=1, redeclare package
Medium = Medium) ;
Modelica.Fluid.Sources.Boundary_pT boundary1(nPorts=1, redeclare package
Medium = Medium) ;
inner Modelica.Fluid.System system ;
equation
pipe.heatTransfer.k = 300;
connect(pipe.port_b, boundary1.ports[1]);
connect(boundary.ports[1], pipe.port_a);
end Test;
The line with "pipe.heatTransfer.k = 300; " do not work.
So is it possible to caculate a value and assign it during a simulation?
Thank you
Re: How to change assign heat transfer coefficient of dynamic pipe
Modelica.Media and Modelica.Fluid do not work yet in OpenModelica, so I assume you use another tool.
You should ask this question to the tool vendor for the Modelica tool you are using.
Cheers,
Adrian Pop/
- adrpo
- 885 Posts
- Index
- » Programming
- » Modelica Language
- » How to change assign heat transfer...