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

Temperature dependant material properties

Temperature dependant material properties

Hello,

I'd like to use the standard library Modelica.Thermal and extend the model with material properties for conductivity (basically conductivity as a function of temperature, which is i.e. relevant for thermal insulation problems). When I use the standard elements, e.g. Modelica.Thermal.HeatTransfer.Components.ThermalConductor, the thermal conductance is defined as parameter, hence a constant value.

Now I try to link it to a function as following:

model test2

  Modelica.SIunits.Temperature Tave;

  Modelica.Thermal.HeatTransfer.Components.ThermalConductor thermalConductor1(G = Thermo.Materials.S355f.G_funct(Tave))  annotation(
    Placement(visible = true, transformation(origin = {0, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Thermal.HeatTransfer.Sources.FixedTemperature fixedTemperature1(T = 573.15)  annotation(
    Placement(visible = true, transformation(origin = {-64, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Thermal.HeatTransfer.Sources.FixedTemperature fixedTemperature2(T = 473.15)  annotation(
 
    Placement(visible = true, transformation(origin = {40, 44}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));

equation
  connect(thermalConductor1.port_b, fixedTemperature2.port) annotation(
    Line(points = {{10, 0}, {72, 0}, {72, 44}, {50, 44}, {50, 44}, {50, 44}}, color = {191, 0, 0}));
  connect(fixedTemperature1.port, thermalConductor1.port_a) annotation(
    Line(points = {{-54, 0}, {-10, 0}, {-10, 0}, {-10, 0}}, color = {191, 0, 0}));

  Tave = (thermalConductor1.port_b.T + thermalConductor1.port_a.T)/2;

  annotation(
    uses(Modelica(version = "3.2.2")));
end test2;


where the fucntion is defined as:

function G_funct
  input Real T "Temperature [K]";
  output Real G "thermal conductivity [W/(mK)]";
algorithm
  G := 1;
end G_funct;



With this I get following error message:


Component thermalConductor1.G of variability PARAM has binding Thermo.Materials.S355f.G_funct(Tave) of higher variability VAR.


So the question for me is, if and how it is possible to link the fixed parameter of an existing element with a function (or a table), which can show a dependancy on a variable like Temperature?

Edited by: peste - Apr-24-17 11:54:17

Re: Temperature dependant material properties

As I don't know how to delete the entries here the solution that I found:


In the standard library the conductivity of the component Modelica.Thermal.HeatTransfer.Components.ThermalConductor is defined as parameter. if i duplicate this copmonent in my own model and remove the parameter definition, I can refer to my own conductivity component and everything works fine. However, downturn is, that i cannot map my addons in a simple way into the standard library :-(

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