modelSingleLayer

Model for single layer heat conductance

Extends from Buildings.HeatTransfer.Conduction.BaseClasses.PartialConductor (Partial model for heat conductor).

Information

This is a model of a heat conductor for a single layer of homogeneous material that computes transient or steady-state heat conduction.

Main equations

Transient heat conduction in materials without phase change

If the material is a record that extends Buildings.HeatTransfer.Data.Solids and its specific heat capacity (as defined by the record material.c) is non-zero, then this model computes transient heat conduction, i.e., it computes a numerical approximation to the solution of the heat equation

ρ c (∂ T(s,t) ⁄ ∂t) = k (∂² T(s,t) ⁄ ∂s²),

where ρ is the mass density, c is the specific heat capacity per unit mass, T is the temperature at location s and time t and k is the heat conductivity. At the locations s=0 and s=x, where x is the material thickness, the temperature and heat flow rate is equal to the temperature and heat flow rate of the heat ports.

Transient heat conduction in phase change materials

If the material is declared using a record of type Buildings.HeatTransfer.Data.SolidsPCM, the heat transfer in a phase change material is computed. The record Buildings.HeatTransfer.Data.SolidsPCM declares the solidus temperature TSol, the liquidus temperature TLiq and the latent heat of phase transformation LHea. For heat transfer with phase change, the specific internal energy u is the dependent variable, rather than the temperature. Therefore, the governing equation is

ρ (∂ u(s,t) ⁄ ∂t) = k (∂² T(s,t) ⁄ ∂s²).

The constitutive relation between specific internal energy u and temperature T is defined in Buildings.HeatTransfer.Conduction.BaseClasses.temperature_u by using cubic hermite spline interpolation with linear extrapolation.

Steady-state heat conduction

If material.c=0, or if the material extends Buildings.HeatTransfer.Data.Resistances, then steady-state heat conduction is computed. In this situation, the heat flow between its heat ports is

Q = A   k ⁄ x   (Ta-Tb),

where A is the cross sectional area, x is the layer thickness, Ta is the temperature at port a and Tb is the temperature at port b.

Spatial discretization

To spatially discretize the heat equation, the construction is divided into compartments (control volumes) with material.nSta ≥ 1 state variables. Each control volume has the same material properties. The state variables are connected to each other through thermal resistances. If stateAtSurface_a = true, a state is placed at the surface a, and similarly, if stateAtSurface_b = true, a state is placed at the surface b. Otherwise, these states are placed inside the material, away from the surface. Thus, to obtain the surface temperature, use port_a.T (or port_b.T) and not the variable T[1].

As an example, we assume a material with a length of x and a discretization with four state variables.
  • If stateAtSurface_a = false and stateAtSurface_b = false, then each of the four state variables is placed in the middle of a control volume with length l=x/material.nSta.

    image

  • If stateAtSurface_a = true or stateAtSurface_b = true, then one state is placed on the surface of the material. Each of the remaining three states is placed in the middle of a control volume with length l=x/(material.nSta-1).

    image

  • If stateAtSurface_a = true and stateAtSurface_b = true, then two states are placed on the surfaces of the material. Each of the remaining two states is placed in the middle of a control volume with length l=x/(material.nSta-2).

    image

To build multi-layer constructions, use Buildings.HeatTransfer.Conduction.MultiLayer instead of this model.

Important parameters

The parameters stateAtSurface_a and stateAtSurface_b determine whether there is a state variable at these surfaces, as described above. Note that if stateAtSurface_a = true, then there is temperature state on the surface a with prescribed value, as determined by the differential equation of the heat conduction. Hence, in this situation, it is not possible to connect a temperature boundary condition such as Buildings.HeatTransfer.Sources.FixedTemperature as this would yield to specifying the same temperature twice. To avoid this, either set stateAtSurface_a = false, or place a thermal resistance between the boundary condition and the surface of this model. The same applies for surface b. See the examples in Buildings.HeatTransfer.Examples.

Parameters

TypeNameDefaultDescription
Modelica.Units.SI.AreaA (from PartialConductor)Heat transfer area
Modelica.Units.SI.CoefficientOfHeatTransferU (from PartialConductor)UA/AU-value (without surface heat transfer coefficients)
Modelica.Units.SI.ThermalConductanceUA (from PartialConductor)1/RThermal conductance of construction (without surface heat transfer coefficients)
Modelica.Units.SI.ThermalResistanceR (from PartialConductor)Thermal resistance of construction
Data.BaseClasses.MaterialmaterialMaterial from Data.Solids, Data.SolidsPCM or Data.Resistances
Dynamics
BooleanstateAtSurface_atrue=true, a state will be at the surface a
BooleanstateAtSurface_btrue=true, a state will be at the surface b
Initialization
BooleansteadyStateInitialfalse=true initializes dT(0)/dt=0, false initializes T(0) at fixed temperature using T_a_start and T_b_start
Modelica.Units.SI.TemperatureT_a_start293.15Initial temperature at port_a, used if steadyStateInitial = false
Modelica.Units.SI.TemperatureT_b_start293.15Initial temperature at port_b, used if steadyStateInitial = false
Advanced
IntegernSta2material.nStaNumber of states in a material (do not overwrite, used to work around Dymola 2017 bug)

Connectors

TypeNameDefaultDescription
Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_aport_a (from PartialConductor)Heat port at surface a
Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_bport_b (from PartialConductor)Heat port at surface b

Components

TypeNameDefaultDescription
Modelica.Units.SI.TemperatureDifferencedT (from PartialConductor)port_a.T - port_b.T
Modelica.Units.SI.Temperature[nSta]TTemperature at the states
Modelica.Units.SI.HeatFlowRate[nSta + 1]Q_flowHeat flow rates to each state
Modelica.Units.SI.SpecificInternalEnergy[nSta]uDefinition of specific internal energy

Revisions

  • August 27, 2019, by Michael Wetter:
    Removed assertion on geometry.
    This is for issue 1529.
  • November 22, 2016, by Thierry S. Nouidui:
    Fix bug in mass balance.
  • November 17, 2016, by Thierry S. Nouidui:
    Added parameter nSta2 to avoid translation error in Dymola 2107. This is a work-around for a bug in Dymola which will be addressed in future releases.
  • November 11, 2016, by Thierry S. Nouidui:
    Revised the implementation for adding a state at the surface.
  • October 29, 2016, by Michael Wetter:
    Added option to place a state at the surface.
    This is for issue 565.
  • March 1, 2016, by Michael Wetter:
    Removed test for equality of Real variables. This is for issue 493.
  • May 21, 2015, by Michael Wetter:
    Reformulated function to reduce use of the division macro in Dymola. This is for issue 417.
  • October 17, 2014, by Michael Wetter:
    Changed the input argument for the function Buildings.HeatTransfer.Conduction.BaseClasses.der_temperature_u from type Buildings.HeatTransfer.Data.BaseClasses.Material to the elements of this type as OpenModelica fails to translate the model if the input to this function is a record.
  • May 30, 2014, by Michael Wetter:
    Removed undesirable annotation Evaluate=true.
  • January 22, 2013, by Armin Teskeredzic:
    Implementation of phase-change materials based on enthalpy-linearisation method. Phase-change properties defined in material record and relationship between enthalpy and temperature defined in the EnthalpyTemperature function.
  • March 9, 2012, by Michael Wetter:
    Removed protected variable der_T as it is not required.
  • March 6 2010, by Michael Wetter:
    Changed implementation to allow steady-state and transient heat conduction depending on the specific heat capacity of the material. This allows using the same model in composite constructions in which some layers are computed steady-state and other transient.
  • February 5 2009, by Michael Wetter:
    First implementation.