Description: "Package with base classes for Buildings.Fluid.HeatExchangers.RadiantSlabs"

- Home > Modelica

## Buildings.Fluid.HeatExchangers.RadiantSlabs.BaseClasses

Package with base classes for Buildings.Fluid.HeatExchangers.RadiantSlabs

### Information

This package contains base classes that are used to construct the models in Buildings.Fluid.HeatExchangers.RadiantSlabs.

Extends from Modelica.Icons.BasesPackage (Icon for packages containing base classes).

### Package Content

Name | Description
--- | ---
HeatFlowRateMultiplier | Multiplies the heat flow rate
MassFlowRateMultiplier | Model that multiplies the mass flow rate
PipeToSlabConductance | Convective heat transfer in pipes and fictitious resistance to average slab temperature
Slab | Base class for radiant slab
Functions | Functions for convective heat transfer

## Buildings.Fluid.HeatExchangers.RadiantSlabs.BaseClasses.HeatFlowRateMultiplier

Multiplies the heat flow rate

### Information

This model multiplies the heat flow rate so that `0 = port_b.Q_flow + k * port_Q.m_flow`.

The temperature remains unchanged. Therefore, this model does not conserve energy. It is used in Buildings.Fluid.HeatExchangers.RadiantSlabs.ParallelCircuitsSlab to avoid having to instanciate multiple slab models in parallel, with each having the same mass flow rate and temperatures.

### Parameters

Type | Name | Default | Description
--- | --- | --- | ---
Real | k |  | Gain for mass flow rate

### Connectors

Type | Name | Description
--- | --- | ---
HeatPort_a | port_a |
HeatPort_b | port_b |

### Modelica definition

model HeatFlowRateMultiplier "Multiplies the heat flow rate" Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a port_a; Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_b port_b; parameter Real k "Gain for mass flow rate"; initial equation assert( k > Modelica.Constants.small or -k < -Modelica.Constants.small, "Gain must not be zero. Received k = " + String(k)); equation // Energy balance. (Energy is not conserved by this model!) port_b.Q_flow = -k*port_a.Q_flow; port_a.T = port_b.T; end HeatFlowRateMultiplier;

## Buildings.Fluid.HeatExchangers.RadiantSlabs.BaseClasses.MassFlowRateMultiplier

Model that multiplies the mass flow rate

### Information

This model multiplies the mass flow rate so that `0 = port_b.m_flow + k * port_a.m_flow`.

The specific enthalpy, the species concentration and the trace substance concentration remains unchanged. Therefore, this model does not conserve mass or energy. It is used in Buildings.Fluid.HeatExchangers.RadiantSlabs.ParallelCircuitsSlab to avoid having to instanciate multiple slab models in parallel, with each having the same mass flow rate and temperatures.

Extends from Modelica.Fluid.Interfaces.PartialTwoPort (Partial component with two ports).

### Parameters

Type | Name | Default | Description
--- | --- | --- | ---
replaceable package Medium | PartialMedium | Medium in the component
Real | k |  | Gain for mass flow rate
Assumptions
Boolean | allowFlowReversal | system.allowFlowReversal | = true to allow flow reversal, false restricts to design direction (port_a -> port_b)

### Connectors

Type | Name | Description
--- | --- | ---
FluidPort_a | port_a | Fluid connector a (positive design flow direction is from port_a to port_b)
FluidPort_b | port_b | Fluid connector b (positive design flow direction is from port_a to port_b)

### Modelica definition

model MassFlowRateMultiplier "Model that multiplies the mass flow rate" extends Modelica.Fluid.Interfaces.PartialTwoPort; parameter Real k "Gain for mass flow rate"; initial equation assert( k > Modelica.Constants.small or -k < -Modelica.Constants.small, "Gain must not be zero. Received k = " + String(k)); equation // Pressure drop in design flow direction port_a.p = port_b.p; // Mass balance (mass is not conserved by this model!) port_b.m_flow = -k*port_a.m_flow; // Specific enthalpy flow rate port_a.h_outflow = inStream(port_b.h_outflow); port_b.h_outflow = inStream(port_a.h_outflow); // Transport of substances port_a.Xi_outflow = inStream(port_b.Xi_outflow); port_b.Xi_outflow = inStream(port_a.Xi_outflow); port_a.C_outflow = inStream(port_b.C_outflow); port_b.C_outflow = inStream(port_a.C_outflow); end MassFlowRateMultiplier;

## Buildings.Fluid.HeatExchangers.RadiantSlabs.BaseClasses.PipeToSlabConductance

Convective heat transfer in pipes and fictitious resistance to average slab temperature

### Information

Model to compute the convective heat transfer inside a straight pipe. The convective heat transfer coefficient is computed as a function of the mass flow rate using the function Modelica.Fluid.Dissipation.HeatTransfer.StraightPipe.kc_overall_KC.

### Parameters

Type | Name | Default | Description
--- | --- | --- | ---
replaceable package Medium | Modelica.Media.Interfaces.Pa... | Medium in the component
HeatTransfer | heatTransfer | Buildings.Fluid.HeatExchange... | Model for heat transfer between fluid and slab
Area | APip |  | Pipe inside surface area [m2]
kc_overall_IN_con | kc_IN_con |  | Parameters for convective heat transfer calculation
ThermalResistance | RFic |  | Average fictitious thermal resistance between pipe surface and plane that contains pipe [K/W]
ThermalResistance | RWal |  | Thermal resistance through the pipe wall [K/W]
MassFlowRate | m_flow_nominal |  | Nominal mass flow rate [kg/s]

### Connectors

Type | Name | Description
--- | --- | ---
replaceable package Medium | Medium in the component
input RealInput | m_flow | Fluid mass flow rate from port_a to port_b [kg/s]
input RealInput | T_a | Temperature at fluid port_a [K]
input RealInput | T_b | Temperature at fluid port_b [K]
HeatPort_a | solid | Heat port at solid interface
HeatPort_b | fluid | Heat port at fluid interface

### Modelica definition

model PipeToSlabConductance "Convective heat transfer in pipes and fictitious resistance to average slab temperature" replaceable package Medium = Modelica.Media.Interfaces.PartialMedium "Medium in the component"; parameter Buildings.Fluid.HeatExchangers.RadiantSlabs.Types.HeatTransfer heatTransfer= Buildings.Fluid.HeatExchangers.RadiantSlabs.Types.HeatTransfer.EpsilonNTU "Model for heat transfer between fluid and slab"; parameter Modelica.SIunits.Area APip "Pipe inside surface area"; parameter Modelica.Fluid.Dissipation.HeatTransfer.StraightPipe.kc_overall_IN_con kc_IN_con "Parameters for convective heat transfer calculation"; Modelica.Fluid.Dissipation.HeatTransfer.StraightPipe.kc_overall_IN_var kc_IN_var( cp=Medium.specificHeatCapacityCp(fluSta), eta=Medium.dynamicViscosity(fluSta), lambda=Medium.thermalConductivity(fluSta), rho=Medium.density(fluSta), m_flow=m_flow) "Variables for convective heat transfer calculation"; parameter Modelica.SIunits.ThermalResistance RFic "Average fictitious thermal resistance between pipe surface and plane that contains pipe"; parameter Modelica.SIunits.ThermalResistance RWal "Thermal resistance through the pipe wall"; parameter Modelica.SIunits.MassFlowRate m_flow_nominal "Nominal mass flow rate"; Modelica.Blocks.Interfaces.RealInput m_flow(unit="kg/s") "Fluid mass flow rate from port_a to port_b"; Modelica.Blocks.Interfaces.RealInput T_a(unit="K") "Temperature at fluid port_a"; Modelica.Blocks.Interfaces.RealInput T_b(unit="K") "Temperature at fluid port_b"; Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a solid "Heat port at solid interface"; Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_b fluid "Heat port at fluid interface"; Modelica.SIunits.TemperatureDifference dT "= solid.T - fluid.T"; Modelica.SIunits.CoefficientOfHeatTransfer hCon "Convective heat transfer coefficient"; Modelica.SIunits.ThermalResistance RTot "Thermal resistance between the fluid and the fictious plane of heat transfer"; Modelica.SIunits.HeatFlowRate Q_flow "Heat flow rate from solid -> fluid"; protected Medium.ThermodynamicState fluSta = Medium.setState_pTX(p=Medium.p_default, T=fluid.T, X=Medium.X_default) "State of the medium"; Modelica.SIunits.SpecificHeatCapacity c_p = Medium.specificHeatCapacityCp(fluSta) "Specific heat capacity of the fluid"; equation hCon = Modelica.Fluid.Dissipation.HeatTransfer.StraightPipe.kc_overall_KC( IN_con=kc_IN_con, IN_var=kc_IN_var); RTot = 1/hCon/APip + RFic + RWal; if heatTransfer == Buildings.Fluid.HeatExchangers.RadiantSlabs.Types.HeatTransfer.EpsilonNTU then Q_flow = Functions.heatFlowRate(T_a=T_a, T_b=T_b, T_s=solid.T, T_f=fluid.T, c_p=c_p, UA=1/RTot, m_flow=m_flow, m_flow_nominal=m_flow_nominal); else Q_flow = dT/RTot; end if; dT = solid.T - fluid.T; solid.Q_flow = Q_flow; fluid.Q_flow = -Q_flow; end PipeToSlabConductance;

## Buildings.Fluid.HeatExchangers.RadiantSlabs.BaseClasses.Slab

Base class for radiant slab

### Information

This partial model is used to construct radiant slab models with one circuit or with multiple parallel circuits.

### Parameters

Type | Name | Default | Description
--- | --- | --- | ---
SystemType | sysTyp |  | Radiant system type
Distance | disPip |  | Pipe distance [m]
Generic | pipe |  | Record for pipe geometry and material
Construction
Generic | layers |  | Definition of the construction, which must have at least two material layers
Integer | iLayPip |  | Number of the interface layer in which the pipes are located
Initialization
Construction
Boolean | steadyStateInitial | false | =true initializes dT(0)/dt=0, false initializes T(0) at fixed temperature using T_a_start, T_c_start and T_b_start
Temperature | T_a_start | 293.15 | Initial temperature at surf_a, used if steadyStateInitial = false [K]
Temperature | T_b_start | 293.15 | Initial temperature at surf_b, used if steadyStateInitial = false [K]

### Connectors

Type | Name | Description
--- | --- | ---
HeatPort_a | surf_a | Heat port at construction surface
HeatPort_a | surf_b | Heat port at construction surface

### Modelica definition

partial model Slab "Base class for radiant slab" parameter Buildings.Fluid.HeatExchangers.RadiantSlabs.Types.SystemType sysTyp "Radiant system type"; parameter Modelica.SIunits.Distance disPip "Pipe distance"; parameter Buildings.Fluid.Data.Pipes.Generic pipe "Record for pipe geometry and material"; parameter HeatTransfer.Data.OpaqueConstructions.Generic layers(nLay(min=2)) "Definition of the construction, which must have at least two material layers"; parameter Boolean steadyStateInitial=false "=true initializes dT(0)/dt=0, false initializes T(0) at fixed temperature using T_a_start, T_c_start and T_b_start"; parameter Integer iLayPip(min=1) "Number of the interface layer in which the pipes are located"; parameter Modelica.SIunits.Temperature T_a_start=293.15 "Initial temperature at surf_a, used if steadyStateInitial = false"; parameter Modelica.SIunits.Temperature T_b_start=293.15 "Initial temperature at surf_b, used if steadyStateInitial = false"; Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a surf_a "Heat port at construction surface"; Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a surf_b "Heat port at construction surface"; end Slab;