
| Name | Description |
|---|---|
| Sieder-Tate correlation (for turbulent flow in pipes). | |
| Partial model - Thermal resistor of variable resistance. The resistance dependens on the mass and temperature of the control volumes. | |
| Thermal resistor of variable resistance, dependent of the mass and temperature of a control volume and of the mass flow and temperature of the other control volume. | |
| Thermal resistor. The resistence value is r = r0*(r1/abs(T))**r2. | |
| Thermal resistor. The resistence value is constant. | |
| Thermal resistor. The resistence value depends exponentially of the temperature. | |
| Model of a solid control volume. The thermal dynamic of this solid is very fast. Its heat capacity (i.e., eps) is small. | |
| Dynamic energy balance applied to a control volume containing a solid. This class inherits from solidCB. This class has to be completed with an equation defining the heat capacity of the solid. | |
| Partial model - Dynamic energy balance applied to a control volume containing a solid. This partial model must be completed with an expression for the solid heat capacity. | |
| Heat flow source. | |
| Partial model - Temperature source. |
JARA2i.heat.convecSiederTateB
| pipeDiameter | Internal diameter of the pipe. |
| pipeSection | Pipe cross-section. |
| pipeSurfaceArea | Pipe-wall surface. |
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | nCompI | 1 | Number of components of inHeat |
| Integer | nCompO | 1 | Number of components of outHeat |
| Boolean | Ejs | false | Global parameter - Runtime interactivity |
| Boolean | Sysquake | false | Global parameter - Batch interactivity |
| Real | eps | 1.E-10 | Small parameter to avoid by-zero division [T.M-1.L-2.t3] |
| Real | pipeDiameterInitial | Internal diameter of the pipe [L] | |
| Real | pipeSectionInitial | Pipe cross-section [L2] | |
| Real | pipeSurfaceAreaInitial | Pipe-wall surface [L2] | |
| Real | CpCoefM[nCompO, 7] | Heat-capacity coefficients of the fluid components | |
| Real | STcoef[4] | Coefficients of the Sieder-Tate correlation | |
| Real | visc[4] | Coefficients of the viscosity | |
| Real | thermCondCoef[2] | Coefficients of the thermal conductivity |
| Type | Name | Description |
|---|---|---|
| cutHeatMR | inHeat | Heat flow |
| cutHeatFR | outHeat | Heat flow |
model convecSiederTateB
" Sieder-Tate correlation (for turbulent flow in pipes)."
extends resistThermFB;
// Interactive parameters
parameter Real pipeDiameterInitial( unit="L")
"Internal diameter of the pipe";
parameter Real pipeSectionInitial( unit="L2") "Pipe cross-section";
parameter Real pipeSurfaceAreaInitial( unit="L2") "Pipe-wall surface";
Real pipeDiameter( unit="L", start=pipeDiameterInitial)
"Internal diameter of the pipe. Interactive parameter";
Real pipeSection( unit="L2", start=pipeSectionInitial)
"Pipe cross-section. Interactive parameter";
Real pipeSurfaceArea( unit="L2", start=pipeSurfaceAreaInitial)
"Pipe-wall surface. Interactive parameter";
parameter Real CpCoefM[ nCompO,7]
"Heat-capacity coefficients of the fluid components";
parameter Real STcoef[ 4] "Coefficients of the Sieder-Tate correlation";
parameter Real visc[ 4] "Coefficients of the viscosity";
parameter Real thermCondCoef[ 2] "Coefficients of the thermal conductivity";
protected
Real convecHeatCoef( unit="M.t-3.T-1")
"Coefficient of conventive heat-transfer";
Real viscTfluid( unit="M.L-1.t-1")
"Viscosity, calculated at the mean temperature of the fluid";
Real viscTwall( unit="M.L-1.t-1")
"Viscosity, calculated at the wall temperature";
Real CpMass[ nCompO]( unit="L2.t-2.T-1")
"Specific (per mass) heat capacity of the fluid components";
Real CpMassMean( unit="L2.t-2.T-1")
"Mean value of the specific (per mass) heat capacity of the fluid";
Real thermCond( unit="M.L.t-3.T-1")
"Thermal conductivity of the fluid";
Real Nu( unit="") "Nusselt number";
Real Re( unit="") "Reynolds number";
Real Pr( unit="") "Prantdtl number";
equation
// Ejs
if Ejs then
der(pipeDiameter) = 0;
der(pipeSection) = 0;
der(pipeSurfaceArea) = 0;
end if;
// Sysquake
if Sysquake then
pipeDiameter = pipeDiameterInitial;
pipeSection = pipeSectionInitial;
pipeSurfaceArea = pipeSurfaceAreaInitial;
end if;
// Nusselt number
Nu = convecHeatCoef * pipeDiameter / thermCond;
// Reynolds number
Re = pipeDiameter * noEvent( abs( sum(outHeat.matterF[i] for i in 1:nCompO))) / (pipeSection * viscTfluid + eps);
// Specific (per mass) heat capacity of the fluid components
for i in 1:nCompO loop
CpMass[i] = CpCoefM[i,1] +
CpCoefM[i,2] * outHeat.tempF +
CpCoefM[i,3] * outHeat.tempF^ 2 +
CpCoefM[i,4] * outHeat.tempF^ 3 +
CpCoefM[i,5] * outHeat.tempF^ 4 +
CpCoefM[i,6] * outHeat.tempF^ 5 +
CpCoefM[i,7] * outHeat.tempF^ 6;
end for;
// Specific (per mass) heat capacity of the fluid mixture
CpMassMean = noEvent( abs( sum(CpMass[i] * outHeat.matterF[i] for i in 1:nCompO))) /
( noEvent( abs( sum(outHeat.matterF[i] for i in 1:nCompO))) + eps);
// CpMassMean = abs( trans(CpMass) * outHeat.matterF ) / ( abs( sum(outHeat.matterF[i] for i in 1:nCompO) ) + eps );
// Prantdtl number
Pr = CpMassMean * viscTfluid / thermCond;
// Sieder-Tate correlation (turbulent flow in pipes)
Nu = STcoef[1] * Re^ STcoef[2] * Pr^ STcoef[3] * (viscTfluid / viscTwall)^ STcoef[4];
// Thermal resistance
Rtherm = 1 / ( pipeSurfaceArea * convecHeatCoef + eps);
// Fluid viscosity, calculated at the fluid mean temperature
viscTfluid = visc[1] * exp( visc[2] + visc[3] / ( outHeat.tempF - visc[4]));
// Fluid viscosity, calculated at the wall temperature
viscTwall = visc[1] * exp( visc[2] + visc[3] / ( inHeat.temp - visc[4]));
// Thermal conductivity if the fluid
thermCond = thermCondCoef[1] * ( outHeat.tempF + eps)^ thermCondCoef[2];
end convecSiederTateB;
JARA2i.heat.resistThermB
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | nCompI | 1 | Number of components of inHeat |
| Integer | nCompO | 1 | Number of components of outHeat |
| Boolean | Ejs | false | Global parameter - Runtime interactivity |
| Boolean | Sysquake | false | Global parameter - Batch interactivity |
| Real | eps | 1.E-10 | Small parameter to avoid by-zero division [T.M-1.L-2.t3] |
| Type | Name | Description |
|---|---|---|
| cutHeatMR | inHeat | Heat flow |
| cutHeatMR | outHeat | Heat flow |
partial model resistThermB "Partial model - Thermal resistor of variable resistance. The resistance dependens on the mass and temperature of the
control volumes."
extends interf.heatFlow2I;
// Interactivity
outer parameter Boolean Ejs = false
"Global parameter - Runtime interactivity";
outer parameter Boolean Sysquake = false
"Global parameter - Batch interactivity";
parameter Real eps( unit="T.M-1.L-2.t3") = 1.E-10
"Small parameter to avoid by-zero division";
protected
Boolean emptyI( start = true) "True while the control volume is empty";
Boolean emptyO( start = true) "True while the control volume is empty";
Real Rtherm( unit="T.M-1.L-2.t3") "Thermal resistor";
equation
// Relationship between the interface variables
inHeat.heatF + outHeat.heatF = 0;
// Are the control volumes empty?
emptyI = not sum(inHeat.matter[i] for i in 1:nCompI) > 0;
emptyO = not sum(outHeat.matter[i] for i in 1:nCompO) > 0;
// Constitutive relation of the thermal resistor
inHeat.heatF = if emptyI or emptyO then
0 else
( inHeat.temp - outHeat.temp) / ( Rtherm + eps);
end resistThermB;
JARA2i.heat.resistThermFB
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | nCompI | 1 | Number of components of inHeat |
| Integer | nCompO | 1 | Number of components of outHeat |
| Boolean | Ejs | false | Global parameter - Runtime interactivity |
| Boolean | Sysquake | false | Global parameter - Batch interactivity |
| Real | eps | 1.E-10 | Small parameter to avoid by-zero division [T.M-1.L-2.t3] |
| Type | Name | Description |
|---|---|---|
| cutHeatMR | inHeat | Heat flow |
| cutHeatFR | outHeat | Heat flow |
model resistThermFB "Thermal resistor of variable resistance, dependent of the mass and temperature of a
control volume and of the mass flow and temperature of the other control volume."
extends interf.heatFlowF2I;
// Interactivity
outer parameter Boolean Ejs = false
"Global parameter - Runtime interactivity";
outer parameter Boolean Sysquake = false
"Global parameter - Batch interactivity";
parameter Real eps( unit="T.M-1.L-2.t3") = 1.E-10
"Small parameter to avoid by-zero division";
protected
Boolean emptyI "True while the control volume is empty";
Real Rtherm( unit="T.M-1.L-2.t3") "Thermal resistance";
equation
// Relationship between the interface variables
inHeat.heatF + outHeat.heatF = 0;
// Is the control volume empty?
emptyI = not sum(inHeat.matter[i] for i in 1:nCompI) > 0;
// Constitutive relation of the thermal resistor
inHeat.heatF = if emptyI then 0 else ( inHeat.temp - outHeat.tempF) / ( Rtherm + eps);
end resistThermFB;
JARA2i.heat.RthAbsTB
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | nCompI | 1 | Number of components of inHeat |
| Integer | nCompO | 1 | Number of components of outHeat |
| Boolean | Ejs | false | Global parameter - Runtime interactivity |
| Boolean | Sysquake | false | Global parameter - Batch interactivity |
| Real | eps | 1.E-10 | Small parameter to avoid by-zero division [T.M-1.L-2.t3] |
| Real | R0 | Parameter of the thermal resistance [T.M-1.L-2.t3] | |
| Real | R1 | Parameter of the thermal resistance [T] | |
| Real | R2 | Parameter of the thermal resistance |
| Type | Name | Description |
|---|---|---|
| cutHeatMR | inHeat | Heat flow |
| cutHeatMR | outHeat | Heat flow |
model RthAbsTB
"Thermal resistor. The resistence value is r = r0*(r1/abs(T))**r2."
extends resistThermB;
parameter Real R0( unit="T.M-1.L-2.t3")
"Parameter of the thermal resistance";
parameter Real R1( unit="T") "Parameter of the thermal resistance";
parameter Real R2( unit="") "Parameter of the thermal resistance";
equation
Rtherm = R0 * ( R1 / ( abs(inHeat.temp - outHeat.temp) + eps))^ R2;
end RthAbsTB;
JARA2i.heat.RthConstB
| Rth | Thermal resistor. |
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | nCompI | 1 | Number of components of inHeat |
| Integer | nCompO | 1 | Number of components of outHeat |
| Boolean | Ejs | false | Global parameter - Runtime interactivity |
| Boolean | Sysquake | false | Global parameter - Batch interactivity |
| Real | eps | 1.E-10 | Small parameter to avoid by-zero division [T.M-1.L-2.t3] |
| Real | RthInitial | Thermal resistor - Initial value [T.M-1.L-2.t3] |
| Type | Name | Description |
|---|---|---|
| cutHeatMR | inHeat | Heat flow |
| cutHeatMR | outHeat | Heat flow |
model RthConstB "Thermal resistor. The resistence value is constant."
extends resistThermB;
parameter Real RthInitial( unit="T.M-1.L-2.t3")
"Thermal resistor - Initial value";
Real Rth( start = RthInitial) "Thermal resistor";
equation
// Ejs
if Ejs then
der( Rth) = 0;
end if;
// Sysquake
if Sysquake then
Rth = RthInitial;
end if;
Rtherm = Rth;
end RthConstB;
JARA2i.heat.RthExpTB
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | nCompI | 1 | Number of components of inHeat |
| Integer | nCompO | 1 | Number of components of outHeat |
| Boolean | Ejs | false | Global parameter - Runtime interactivity |
| Boolean | Sysquake | false | Global parameter - Batch interactivity |
| Real | eps | 1.E-10 | Small parameter to avoid by-zero division [T.M-1.L-2.t3] |
| Real | R0 | Parameter of the thermal resistance [T.M-1.L-2.t3] | |
| Real | R1 | Parameter of the thermal resistance [T] |
| Type | Name | Description |
|---|---|---|
| cutHeatMR | inHeat | Heat flow |
| cutHeatMR | outHeat | Heat flow |
model RthExpTB "Thermal resistor.
The resistence value depends exponentially of the temperature."
extends resistThermB;
parameter Real R0( unit="T.M-1.L-2.t3")
"Parameter of the thermal resistance";
parameter Real R1( unit="T") "Parameter of the thermal resistance";
equation
Rtherm = R0 * exp( R1 / (0.5 * (inHeat.temp + outHeat.temp) + eps));
end RthExpTB;
JARA2i.heat.solidB
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | nComp | 1 | Number of components |
| Real | eps | 1E-4 | Heat capacity of the solid [M.L2.T-1.t-2] |
| Real | tempInitial | Initial temperature [T] |
| Type | Name | Description |
|---|---|---|
| cutHeatMC | inHeat | Connector for the heat conduction. |
model solidB
"Model of a solid control volume. The thermal dynamic of this solid is very fast. Its heat capacity (i.e., eps) is small."
extends interf.heat1I(nComp=1);
parameter Real eps( unit="M.L2.T-1.t-2") = 1E-4
"Heat capacity of the solid";
parameter Real tempInitial( unit="T") "Initial temperature";
Real temp( unit="T", start=tempInitial) "Temperature";
equation
// The solid mass is constant. The mass value does not care, but it must be different from zero
inHeat.matter = { 1};
// Energy balance
eps * der(temp) = inHeat.heatF;
inHeat.temp = temp;
end solidB;
JARA2i.heat.solidC6B
| mass | Mass of the solid. |
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | nComp | 1 | Number of components |
| Boolean | Ejs | false | Global parameter - Runtime interactivity |
| Boolean | Sysquake | false | Global parameter - Batch interactivity |
| Real | massInitial | Mass of the solid [M] | |
| Real | tempInitial | Initial temperature [T] | |
| Real | CpCoefM[7] | Coefficients of the specific (per mass) heat capacity CpMass = CpCoefM[1] + CpCoefM[2]*T + ... + CpCoefM[7]*T**6 |
| Type | Name | Description |
|---|---|---|
| cutHeatMC | inHeat | Connector for the heat conduction. |
model solidC6B " Dynamic energy balance applied to a control volume containing a solid.
This class inherits from solidCB.
This class has to be completed with an equation defining the heat capacity of the solid."
extends solidCB;
parameter Real CpCoefM[7] "Coefficients of the specific (per mass) heat capacity
CpMass = CpCoefM[1] + CpCoefM[2]*T + ... + CpCoefM[7]*T**6";
equation
CpMass = sum( inHeat.temp^ (i-1) * CpCoefM[i] for i in 1:7);
end solidC6B;
JARA2i.heat.solidCB
| mass | Mass of the solid. |
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | nComp | 1 | Number of components |
| Boolean | Ejs | false | Global parameter - Runtime interactivity |
| Boolean | Sysquake | false | Global parameter - Batch interactivity |
| Real | massInitial | Mass of the solid [M] | |
| Real | tempInitial | Initial temperature [T] |
| Type | Name | Description |
|---|---|---|
| cutHeatMC | inHeat | Connector for the heat conduction. |
partial model solidCB "Partial model - Dynamic energy balance applied to a control volume containing a solid.
This partial model must be completed with an expression for the solid heat capacity."
extends interf.heat1I( nComp=1);
// Interactivity
outer parameter Boolean Ejs = false
"Global parameter - Runtime interactivity";
outer parameter Boolean Sysquake = false
"Global parameter - Batch interactivity";
parameter Real massInitial( unit="M") "Mass of the solid";
Real mass( start=massInitial) "Interactive variable";
parameter Real tempInitial( unit="T") "Initial temperature";
Real temp( unit="T", start=tempInitial) "Temperature ";
protected
Real CpMass( unit="L2.t-2.T-1") "Specific heat capacity";
equation
// Ejs
if Ejs then
der(mass) = 0;
end if;
// Sysquake
if Sysquake then
mass = massInitial;
end if;
// Energy balance
mass * CpMass * der(temp) = inHeat.heatF;
inHeat.temp = temp;
// The mass of the solid is constant
inHeat.matter = { mass};
end solidCB;
JARA2i.heat.sourceHeatFB
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | nComp | 1 | Number of components |
| Type | Name | Description |
|---|---|---|
| cutHeatMR | inHeat | Heat flow source |
| cutReceiver | setPointSignal | SP for the heat flow |
model sourceHeatFB "Heat flow source."
extends interf.heatFlow1I;
Real heatFSP "Heat flow SP";
cutsB.cutReceiver setPointSignal( dim=1, signal={heatFSP})
"SP for the heat flow";
protected
Boolean empty( start = true)
"True while the mass inside the control volume is zero";
equation
// Is the control volume empty?
empty = not sum(inHeat.matter[i] for i in 1:nComp) > 0;
// Relationship between the heat flow and its setpoint
inHeat.heatF = if empty then 0 else -heatFSP;
//The heat flow is equal to its setpoint provided that the system connected to the source has a mass different from zero.
end sourceHeatFB;
JARA2i.heat.sourceTempB
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | nComp | 1 | Number of components |
| Type | Name | Description |
|---|---|---|
| cutHeatMC | inHeat | Connector for the heat conduction. |
partial model sourceTempB "Partial model - Temperature source."
extends interf.heat1I(nComp=1);
Real sourceTemp( unit="T") "Source temperature";
equation
inHeat.temp = sourceTemp;
inHeat.matter = { 1};
end sourceTempB;