Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

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

Edited by: satart - Aug-30-10 17:52:00

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/

There are 0 guests and 0 other users also viewing this topic
You are here: