Buildings.RoomsBeta.BaseClasses

Package with base classes for room models

Information


This package contains base classes that are used to construct the models in 
Buildings.RoomsBeta.

Extends from Modelica.Fluid.Icons.BaseClassLibrary (Icon for library).

Package Content

NameDescription
Buildings.RoomsBeta.BaseClasses.ExteriorBoundaryConditions ExteriorBoundaryConditions Model for convection and radiation bounary condition of exterior constructions
Buildings.RoomsBeta.BaseClasses.ExteriorBoundaryConditionsWithWindow ExteriorBoundaryConditionsWithWindow Model for exterior boundary conditions for constructions with a window
Buildings.RoomsBeta.BaseClasses.HeatGain HeatGain Model to convert internal heat gain signals
Buildings.RoomsBeta.BaseClasses.LongWaveRadiationExchange LongWaveRadiationExchange Long-wave radiation heat exchange between the room facing surfaces
Buildings.RoomsBeta.BaseClasses.RadiationAdapter RadiationAdapter Model to connect between signals and heat port for radiative gains of the room
Buildings.RoomsBeta.BaseClasses.RadiationTemperature RadiationTemperature Radiative temperature of the room
Buildings.RoomsBeta.BaseClasses.LongWaveRadiationGainDistribution LongWaveRadiationGainDistribution Long-wave radiative heat gain distribution between the room facing surfaces
Buildings.RoomsBeta.BaseClasses.ShortWaveRadiationExchange ShortWaveRadiationExchange Short-wave radiation heat exchange between the room facing surfaces
Buildings.RoomsBeta.BaseClasses.MixedAir MixedAir Model for room air that is completely mixed
Buildings.RoomsBeta.BaseClasses.PartialSurfaceInterface PartialSurfaceInterface Partial model that is used for long-wave radiation balance
Buildings.RoomsBeta.BaseClasses.SkyRadiationExchange SkyRadiationExchange Radiative heat exchange with the sky and the ambient
Buildings.RoomsBeta.BaseClasses.ConstructionNumbers ConstructionNumbers Data records for construction data
Buildings.RoomsBeta.BaseClasses.ConstructionRecords ConstructionRecords Data records for construction data
Buildings.RoomsBeta.BaseClasses.ParameterConstructionWithWindow ParameterConstructionWithWindow Record for exterior constructions that have a window
Buildings.RoomsBeta.BaseClasses.ParameterConstruction ParameterConstruction Record for exterior constructions that have no window
Buildings.RoomsBeta.BaseClasses.ParameterFluid ParameterFluid Parameter declaration for fluid model
Buildings.RoomsBeta.BaseClasses.ParameterSurface ParameterSurface Record for surfaces that are used in the room model
Buildings.RoomsBeta.BaseClasses.PartialParameterConstruction PartialParameterConstruction Partial record for constructions
Buildings.RoomsBeta.BaseClasses.Examples Examples Collection of models that illustrate model use and test models


Buildings.RoomsBeta.BaseClasses.ExteriorBoundaryConditions Buildings.RoomsBeta.BaseClasses.ExteriorBoundaryConditions

Model for convection and radiation bounary condition of exterior constructions

Buildings.RoomsBeta.BaseClasses.ExteriorBoundaryConditions

Information


This model computes the boundary conditions for the outside-facing surface of
opaque constructions.

The model computes the long-wave, short-wave, and convective heat exchange between these surfaces and the exterior temperature and the sky temperature. Input into this model are weather data that may be obtained from Buildings.BoundaryConditions.WeatherData.

In this model, the solar radiation data are converted from horizontal irradiation to irradiation on tilted surfaces using models from the package Buildings.BoundaryConditions.SolarIrradiation. The convective heat transfer between the exterior surface of the opaque constructions is computed using Buildings.HeatTransfer.Convection.

The heat transfer of windows are not computed in this model. They are implemented in Buildings.RoomsBeta.BaseClasses.ExteriorBoundaryConditionsWithWindow.

Parameters

TypeNameDefaultDescription
Anglelat Latitude [rad]
Angletil[nCon] Surface tilt [rad]
Angleazi[nCon] Surface azimuth [rad]
AreaAOpa[nCon] Areas of exterior constructions (excluding the window area) [m2]
BooleanlinearizeRadiation Set to true to linearize emissive power
EmissivityepsLW[nCon] Long wave emissivity of building surface [1]
EmissivityepsSW[nCon] Short wave emissivity of building surface [1]
ConvectionModelconMod[nCon]{Buildings.RoomsBeta.Types.C...Convective heat transfer model
Exterior constructions
IntegernCon Number of exterior constructions

Connectors

TypeNameDescription
HeatPort_aopa_a[nCon]Heat port at surface a of opaque construction
BusweaBus 

Modelica definition

model ExteriorBoundaryConditions 
  "Model for convection and radiation bounary condition of exterior constructions"
  parameter Integer nCon(min=1) "Number of exterior constructions";
  parameter Modelica.SIunits.Angle lat "Latitude";
  parameter Modelica.SIunits.Angle til[nCon] "Surface tilt";
  parameter Modelica.SIunits.Angle azi[nCon] "Surface azimuth";

  parameter Modelica.SIunits.Area AOpa[nCon] 
    "Areas of exterior constructions (excluding the window area)";
  parameter Boolean linearizeRadiation 
    "Set to true to linearize emissive power";
  parameter Modelica.SIunits.Emissivity epsLW[nCon] 
    "Long wave emissivity of building surface";
  parameter Modelica.SIunits.Emissivity epsSW[nCon] 
    "Short wave emissivity of building surface";

  Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a opa_a[nCon] 
    "Heat port at surface a of opaque construction";
  parameter Types.ConvectionModel[nCon] conMod=
   {Buildings.RoomsBeta.Types.ConvectionModel.Fixed for i in 1:nCon} 
    "Convective heat transfer model";
  HeatTransfer.Convection conOpa[nCon](final A=AOpa,
    final conMod=conMod,
    final til=til) "Convection model for opaque part of the wall";

  SkyRadiationExchange skyRadExc(
    final n=nCon,
    each final A=AOpa,
    each final epsLW=epsLW,
    vieFacSky={(Modelica.Constants.pi - til[i])./Modelica.Constants.pi for i in 1:nCon}) 
    "Long-wave radiative heat exchange with sky";
  BoundaryConditions.WeatherData.Bus weaBus;
protected 
  Modelica.Thermal.HeatTransfer.Sources.PrescribedTemperature TAirConExt[
    nCon] "Outside air temperature for exterior constructions";
  Modelica.Blocks.Routing.Replicator repConExt(nout=nCon) "Signal replicator";

public 
  BoundaryConditions.SolarIrradiation.DirectTiltedSurface HDirTil[
            nCon](
    each final lat=lat,
    final til=til,
    final azi=azi) "Direct solar irradiation on the surface";
  BoundaryConditions.SolarIrradiation.DiffusePerez HDifTil[nCon](
    each final lat=lat,
    final til=til,
    final azi=azi) "Diffuse solar irradiation";
  Modelica.Blocks.Math.Add HTotConExt[nCon](
    final k1=epsSW .* AOpa,
    final k2=epsSW .* AOpa) "Total solar irradiation";
  Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow solHeaGaiConExt[nCon](
     each final alpha=0, each final T_ref=293.15) 
    "Total solar heat gain of the surface";

equation 
  connect(conOpa.solid, opa_a);
  connect(skyRadExc.port, opa_a);

  connect(TAirConExt.port, conOpa.fluid);
  connect(repConExt.y, TAirConExt.T);
  connect(repConExt.u, weaBus.TDryBul);
  connect(skyRadExc.TOut, weaBus.TDryBul);
  connect(skyRadExc.TBlaSky, weaBus.TBlaSky);
  for i in 1:nCon loop
  connect(weaBus, HDirTil[i].weaBus);
  connect(HDifTil[i].weaBus, weaBus);
   end for;
  connect(HTotConExt.y, solHeaGaiConExt.Q_flow);
  connect(solHeaGaiConExt.port, opa_a);
  connect(HDirTil.H, HTotConExt.u1);
  connect(HDifTil.H, HTotConExt.u2);
end ExteriorBoundaryConditions;

Buildings.RoomsBeta.BaseClasses.ExteriorBoundaryConditionsWithWindow Buildings.RoomsBeta.BaseClasses.ExteriorBoundaryConditionsWithWindow

Model for exterior boundary conditions for constructions with a window

Buildings.RoomsBeta.BaseClasses.ExteriorBoundaryConditionsWithWindow

Information


This model computes the boundary conditions for the outside-facing surface of
opaque constructions and of windows.

The model computes the long-wave, short-wave, and convective heat exchange between these surfaces and the exterior temperature and the sky temperature. Input into this model are weather data that may be obtained from Buildings.BoundaryConditions.WeatherData.

This model extends Buildings.RoomsBeta.BaseClasses.ExteriorBoundaryConditions, which models the boundary conditions for the opaque constructions, and then implements the boundary condition for windows by using the model Buildings.HeatTransfer.WindowsBeta.ExteriorHeatTransfer.

Extends from Buildings.RoomsBeta.BaseClasses.ExteriorBoundaryConditions (Model for convection and radiation bounary condition of exterior constructions).

Parameters

TypeNameDefaultDescription
Anglelat Latitude [rad]
Angletil[nCon] Surface tilt [rad]
Angleazi[nCon] Surface azimuth [rad]
AreaAOpa[nCon] Areas of exterior constructions (excluding the window area) [m2]
BooleanlinearizeRadiation Set to true to linearize emissive power
EmissivityepsLW[nCon] Long wave emissivity of building surface [1]
EmissivityepsSW[nCon] Short wave emissivity of building surface [1]
ConvectionModelconMod[nCon]{Buildings.RoomsBeta.Types.C...Convective heat transfer model
AreaAWin[nCon] Areas of window glass and frame [m2]
RealfFra[nCon] Fraction of window frame divided by total window area
EmissivityepsSWFra[nCon] Short wave emissivity of window frame [1]
Exterior constructions
IntegernCon Number of exterior constructions
Shading
EmissivityepsLWSha_air[nCon] Long wave emissivity of shade surface that faces air [1]
EmissivityepsLWSha_glass[nCon] Long wave emissivity of shade surface that faces glass [1]
TransmissionCoefficienttauLWSha_air[nCon] Long wave transmissivity of shade for radiation coming from the exterior or the room [1]
TransmissionCoefficienttauLWSha_glass[nCon] Long wave transmissivity of shade for radiation coming from the glass [1]
BooleanhaveExteriorShade[nCon] Set to true if window has exterior shade (at surface a)
BooleanhaveInteriorShade[nCon] Set to true if window has interior shade (at surface b)

Connectors

TypeNameDescription
HeatPort_aopa_a[nCon]Heat port at surface a of opaque construction
BusweaBus 
input RealInputuSha[nCon]Control signal for the shading device, 0: unshaded; 1: fully shaded
output RadiosityOutflowJOutUns[nCon]Outgoing radiosity that connects to unshaded part of glass at exterior side [W]
input RadiosityInflowJInUns[nCon]Incoming radiosity that connects to unshaded part of glass at exterior side [W]
output RadiosityOutflowJOutSha[nCon]Outgoing radiosity that connects to shaded part of glass at exterior side [W]
input RadiosityInflowJInSha[nCon]Incoming radiosity that connects to shaded part of glass at exterior side [W]
HeatPort_aglaUns[nCon]Heat port at unshaded glass of exterior-facing surface
HeatPort_aglaSha[nCon]Heat port at shaded glass of exterior-facing surface
HeatPort_afra[nCon]Heat port at frame of exterior-facing surface
output RealOutputHDir[nCon]Direct solar irradition on tilted surface [W/m2]
output RealOutputHDif[nCon]Diffuse solar irradiation on tilted surface [W/m2]
output RealOutputinc[nCon]Incidence angle [rad]
input RealInputQAbsSWSha_flow[nCon]Solar radiation absorbed by shade [W]

Modelica definition

model ExteriorBoundaryConditionsWithWindow 
  "Model for exterior boundary conditions for constructions with a window"
  extends Buildings.RoomsBeta.BaseClasses.ExteriorBoundaryConditions;
  parameter Modelica.SIunits.Area AWin[nCon] "Areas of window glass and frame";
  parameter Real fFra[nCon](each min=0, each max=1) 
    "Fraction of window frame divided by total window area";
  HeatTransfer.WindowsBeta.ExteriorHeatTransfer conExtWin[nCon](
    final A=AWin,
    final fFra=fFra,
    each final linearizeRadiation = linearizeRadiation,
    final F_sky={(Modelica.Constants.pi - til[i]) ./ Modelica.Constants.pi for i in 1:nCon},
    final epsLWSha_air=epsLWSha_air,
    final epsLWSha_glass=epsLWSha_glass,
    final tauLWSha_air=tauLWSha_air,
    final tauLWSha_glass=tauLWSha_glass,
    final haveExteriorShade=haveExteriorShade,
    final haveInteriorShade=haveInteriorShade) 
    "Exterior convection of the window";
  parameter Modelica.SIunits.Emissivity epsSWFra[nCon] 
    "Short wave emissivity of window frame";

  parameter Modelica.SIunits.Emissivity epsLWSha_air[nCon] 
    "Long wave emissivity of shade surface that faces air";
  parameter Modelica.SIunits.Emissivity epsLWSha_glass[nCon] 
    "Long wave emissivity of shade surface that faces glass";

  parameter Modelica.SIunits.TransmissionCoefficient tauLWSha_air[nCon] 
    "Long wave transmissivity of shade for radiation coming from the exterior or the room";
  parameter Modelica.SIunits.TransmissionCoefficient tauLWSha_glass[nCon] 
    "Long wave transmissivity of shade for radiation coming from the glass";

  parameter Boolean haveExteriorShade[nCon] 
    "Set to true if window has exterior shade (at surface a)";
  parameter Boolean haveInteriorShade[nCon] 
    "Set to true if window has interior shade (at surface b)";

  final parameter Boolean windowHasShade=
    haveExteriorShade[1] or haveInteriorShade[1] 
    "Set to true if window system has a shade";

  Modelica.Blocks.Interfaces.RealInput uSha[nCon](min=0, max=1) if 
       windowHasShade 
    "Control signal for the shading device, 0: unshaded; 1: fully shaded";
  HeatTransfer.Interfaces.RadiosityOutflow JOutUns[nCon] 
    "Outgoing radiosity that connects to unshaded part of glass at exterior side";
  HeatTransfer.Interfaces.RadiosityInflow JInUns[nCon] 
    "Incoming radiosity that connects to unshaded part of glass at exterior side";
  HeatTransfer.Interfaces.RadiosityOutflow JOutSha[nCon] if 
       windowHasShade 
    "Outgoing radiosity that connects to shaded part of glass at exterior side";
  HeatTransfer.Interfaces.RadiosityInflow JInSha[nCon] if 
       windowHasShade 
    "Incoming radiosity that connects to shaded part of glass at exterior side";
  Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a glaUns[nCon] 
    "Heat port at unshaded glass of exterior-facing surface";
  Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a glaSha[nCon] if 
       windowHasShade "Heat port at shaded glass of exterior-facing surface";
  Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a fra[nCon] 
    "Heat port at frame of exterior-facing surface";
  Modelica.Blocks.Math.Add HTotConExtWinFra[nCon](
     final k1=fFra .* epsSWFra .* AWin,
     final k2=fFra .* epsSWFra .* AWin) 
    "Total solar irradiation on window frame";
  Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow solHeaGaiConWin[nCon](
     each final alpha=0, each final T_ref=293.15) 
    "Total solar heat gain of the window frame";
  Modelica.Blocks.Interfaces.RealOutput HDir[nCon](
     each final quantity="RadiantEnergyFluenceRate",
     each final unit="W/m2") "Direct solar irradition on tilted surface";
  Modelica.Blocks.Interfaces.RealOutput HDif[nCon](
     each final quantity="RadiantEnergyFluenceRate",
     each final unit="W/m2") "Diffuse solar irradiation on tilted surface";
  Modelica.Blocks.Interfaces.RealOutput inc[nCon](
    each final quantity="Angle",
    each final unit="rad",
    each displayUnit="deg") "Incidence angle";

protected 
  Modelica.Thermal.HeatTransfer.Sources.PrescribedTemperature TAirConExtWin[
    nCon] "Outside air temperature for window constructions";
  Modelica.Blocks.Routing.Replicator repConExtWin(final nout=nCon) 
    "Signal replicator";
  Modelica.Blocks.Routing.Replicator repConExtWinF_clr(final nout=nCon) 
    "Signal replicator";
  Modelica.Blocks.Routing.Replicator repConExtWinVWin(final nout=nCon) 
    "Signal replicator";

public 
  Modelica.Blocks.Interfaces.RealInput QAbsSWSha_flow[nCon](
    final unit="W", quantity="Power") "Solar radiation absorbed by shade";
equation 
  connect(uSha, conExtWin.uSha);
  connect(JInUns,conExtWin. JInUns);
  connect(conExtWin.JOutUns,JOutUns);
  connect(conExtWin.glaUns,glaUns);
  connect(conExtWin.glaSha,glaSha);
  connect(conExtWin.JOutSha,JOutSha);
  connect(conExtWin.JInSha,JInSha);
  connect(conExtWin.frame,fra);
  connect(TAirConExtWin.port,conExtWin. air);
  connect(TAirConExtWin.T,repConExtWin. y);
  connect(repConExtWin.u, weaBus.TDryBul);
  connect(repConExtWinF_clr.y,conExtWin. f_clr);
  connect(repConExtWinVWin.y,conExtWin. vWin);
  connect(repConExtWinVWin.u, weaBus.winSpe);
  connect(repConExtWinF_clr.u, weaBus.nTot);
  connect(HTotConExtWinFra.y, solHeaGaiConWin.Q_flow);
  connect(solHeaGaiConWin.port, fra);
  connect(HDirTil.H, HDir);
  connect(HDifTil.H, HDif);
  connect(HDirTil.inc, inc);
  connect(HTotConExtWinFra.u2, HDifTil.H);
  connect(HTotConExtWinFra.u1, HDirTil.H);
  connect(conExtWin.QAbs_flow, QAbsSWSha_flow);
end ExteriorBoundaryConditionsWithWindow;

Buildings.RoomsBeta.BaseClasses.HeatGain Buildings.RoomsBeta.BaseClasses.HeatGain

Model to convert internal heat gain signals

Buildings.RoomsBeta.BaseClasses.HeatGain

Information


This model computes the radiant, convective and latent heat flow.
Input into this model are these three components in units of [W/m2].
Output are 

If the medium model does not contain water vapor, then
the water vapor released into the air is zero, i.e., 
the mass flow rate at the fluid port is equal to zero.

Extends from Buildings.BaseClasses.BaseIcon (Base icon).

Parameters

TypeNameDefaultDescription
AreaAFlo Floor area [m2]
TemperatureTWat273.15 + 34Temperature at which water vapor is released [K]

Connectors

TypeNameDescription
HeatPort_aQCon_flowConvective heat gain
input RealInputqGai_flow[3]Radiant, convective and latent heat input into room (positive if heat gain)
output RealOutputQRad_flowRadiative heat gain
FluidPort_bQLat_flowLatent heat gain

Modelica definition

model HeatGain "Model to convert internal heat gain signals"
  extends Buildings.BaseClasses.BaseIcon;

  replaceable package Medium =
     Modelica.Media.Interfaces.PartialCondensingGases "Medium in the component";

  parameter Modelica.SIunits.Area AFlo "Floor area";
  parameter Modelica.SIunits.Temperature TWat=273.15+34 
    "Temperature at which water vapor is released";

  Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a QCon_flow 
    "Convective heat gain";

public 
  Modelica.Blocks.Interfaces.RealInput qGai_flow[3] 
    "Radiant, convective and latent heat input into room (positive if heat gain)";
  Modelica.Blocks.Interfaces.RealOutput QRad_flow "Radiative heat gain";
  Modelica.Fluid.Interfaces.FluidPort_b QLat_flow(redeclare final package
      Medium =
        Medium) "Latent heat gain";
protected 
  Modelica.SIunits.MassFlowRate mWat_flow 
    "Water vapor flow rate released by latent gain";

  parameter Modelica.SIunits.SpecificEnergy h_fg = Medium.enthalpyOfCondensingGas(TWat) 
    "Latent heat of water vapor";
 // constant Medium.MassFraction Xi[Medium.nXi] = {1}
 //   "Species concentration (water vapor only)";

protected 
  parameter Real s[Medium.nX](fixed=false) 
    "Vector with zero everywhere except where water vapor is";
initial algorithm 
  for i in 1:Medium.nX loop
    if ( Modelica.Utilities.Strings.isEqual(string1=Medium.substanceNames[i],
                                            string2="water",
                                            caseSensitive=false)) then
      s[i] :=1;
    else
      s[i] :=0;
    end if;
   end for;
   assert(abs(1-sum(s)) < 1E-4, "Substance 'water' is not present in medium '"
                  + Medium.mediumName + "'.\n"
                  + "Change medium model to one that has 'water' as a substance.");
equation 
  QRad_flow = qGai_flow[1]*AFlo;
  QCon_flow.Q_flow = qGai_flow[2]*AFlo;

  // Interface to fluid port
  // If a medium does not contain water vapor, then h_fg is equal to zero.
  if Medium.nXi == 0 or (h_fg == 0) then
    mWat_flow = 0;
  else
    mWat_flow = qGai_flow[3]*AFlo/h_fg;
  end if;

  QLat_flow.C_outflow  = fill(0, Medium.nC);
  QLat_flow.h_outflow  = h_fg;
  QLat_flow.Xi_outflow = s[1:Medium.nXi];
  QLat_flow.m_flow     = if (h_fg > 0) then 
                           -qGai_flow[3]*AFlo/h_fg else 
                            0;

end HeatGain;

Buildings.RoomsBeta.BaseClasses.LongWaveRadiationExchange Buildings.RoomsBeta.BaseClasses.LongWaveRadiationExchange

Long-wave radiation heat exchange between the room facing surfaces

Buildings.RoomsBeta.BaseClasses.LongWaveRadiationExchange

Information


This model computes the long-wave radiative heat transfer between the interior surfaces of a room. Each opaque surface emits radiation according to

Ei = σ   Ai   εi   (Ti)4,

where σ is the Stefan-Boltzmann constant, Ai is the surface area, εi is the emissivity in the infrared spectrum, and Ti is the surface temperature. If the parameter linearizeRadidation is set to true, then the term (Ti)4 is replaced with T03 Ti where T0 = 20°C is a parameter.

The incoming radiation at surface i is

Gi = -∑i ≠ j   Fj,i   Jj

where Fj,i is the view factor from surface j to surface i, Jj is the radiosity leaving surface j and the sum is over all surfaces with i ≠ j. For opaque surfaces, it follows from the first law that the radiosity Ji is

Ji = -Ei - (1-εi)   Gi.

For windows, the outgoing radiosity is an input into this model because the window model computes this quantity directly.

For each surface i, the heat balance is

0 = Qi + Ji + Gi.

For opaque surfaces, the heat flow rate Qi is set to be equal to the heat flow rate at the heat port. For the glass of the windows, the radiosity outflow at the connector is set to the radiosity Gi that is leaving the surface.

The model computes the view factors between each surface using the following assumptions:

  1. The view factor from surface i to j is simplified as Fi,j = Aj / ∑k ≠ j Ak, that is, only the surface areas are taken into account, but not their orientation and location.
  2. For interior partitions (instances conPar), the surfaces a and b cannot see each other.
  3. Glass, frame and opaque construction of the same element in conExtWin cannot see each other.

Extends from Buildings.RoomsBeta.BaseClasses.PartialSurfaceInterface (Partial model that is used for long-wave radiation balance).

Parameters

TypeNameDefaultDescription
ParameterConstructiondatConExt[NConExt] Data for exterior construction
ParameterConstructionWithWindowdatConExtWin[NConExtWin] Data for exterior construction with window
ParameterConstructiondatConPar[NConPar] Data for partition construction
ParameterConstructiondatConBou[NConBou] Data for construction boundary
ParameterSurfacesurBou[NSurBou] Record for data of surfaces whose heat conduction is modeled outside of this room
BooleanlinearizeRadiation Set to true to linearize emissive power
Exterior constructions
IntegernConExt Number of exterior constructions
IntegernConExtWin Number of window constructions
Partition constructions
IntegernConPar Number of partition constructions
Boundary constructions
IntegernConBou Number of constructions that have their outside surface exposed to the boundary of this room
IntegernSurBou Number of surface heat transfer models that connect to constructions that are modeled outside of this room

Connectors

TypeNameDescription
HeatPort_aconExt[NConExt]Heat port that connects to room-side surface of exterior constructions
HeatPort_aconExtWin[NConExtWin]Heat port that connects to room-side surface of exterior constructions that contain a window
HeatPort_aconExtWinFra[NConExtWin]Heat port that connects to room-side surface of window frame
HeatPort_aconPar_a[NConPar]Heat port that connects to room-side surface a of partition constructions
HeatPort_aconPar_b[NConPar]Heat port that connects to room-side surface b of partition constructions
HeatPort_aconBou[NConBou]Heat port that connects to room-side surface of constructions that expose their other surface to the outside
HeatPort_aconSurBou[NSurBou]Heat port to surfaces of models that compute the heat conduction outside of this room
input RadiosityInflowJInConExtWin[NConExtWin]Incoming radiosity that connects to non-frame part of the window [W]
output RadiosityOutflowJOutConExtWin[NConExtWin]Outgoing radiosity that connects to non-frame part of the window [W]

Modelica definition

model LongWaveRadiationExchange 
  "Long-wave radiation heat exchange between the room facing surfaces"
  extends Buildings.RoomsBeta.BaseClasses.PartialSurfaceInterface;

  parameter Boolean linearizeRadiation 
    "Set to true to linearize emissive power";
  HeatTransfer.Interfaces.RadiosityInflow JInConExtWin[NConExtWin] 
    "Incoming radiosity that connects to non-frame part of the window";
  HeatTransfer.Interfaces.RadiosityOutflow JOutConExtWin[NConExtWin] 
    "Outgoing radiosity that connects to non-frame part of the window";

protected 
  final parameter Integer NOpa = NConExt+2*NConExtWin+2*NConPar+NConBou+NSurBou 
    "Number of opaque surfaces, including the window frame";
  final parameter Integer NWin = NConExtWin "Number of window surfaces";
  final parameter Integer NTot = NOpa + NWin "Total number of surfaces";
  final parameter Real epsOpa[NOpa](min=0, max=1, fixed=false) 
    "Emissivity of opaque surfaces";
  final parameter Real rhoOpa[NOpa](min=0, max=1, fixed=false) 
    "Reflectivity of opaque surfaces";
  final parameter Modelica.SIunits.Area AOpa[NOpa](fixed=false) 
    "Surface area of opaque surfaces";
  final parameter Modelica.SIunits.Area A[NTot](fixed=false) "Surface areas";
  final parameter Real kOpa[NOpa](unit="W/K4", fixed=false) 
    "Product sigma*epsilon*A for opaque surfaces";
  final parameter Real F[NTot,NTot](min=0, max=1, fixed=false) 
    "View factor from surface i to j";
  final parameter Real M[NTot,NTot](min=0, max=1, fixed=false) 
    "Incidence matrix, with elements of 1 if surfaces can see each other, or zero otherwise";

  Modelica.SIunits.HeatFlowRate J[NTot](max=0, start=A.*0.8*Modelica.Constants.sigma*293.15^4,
     each nominal=10*0.8*Modelica.Constants.sigma*293.15^4) 
    "Radiosity leaving the surface";
  Modelica.SIunits.HeatFlowRate G[NTot](min=0, start=A.*0.8*Modelica.Constants.sigma*293.15^4,
     each nominal=10*0.8*Modelica.Constants.sigma*293.15^4) 
    "Radiosity entering the surface";
  constant Real T40(unit="K4") = 293.15^4 "Nominal temperature";
  Modelica.SIunits.Temperature TOpa[NOpa](each start=293.15, each nominal=293.15) 
    "Temperature of opaque surfaces";
  Real T4Opa[NOpa](each unit="K4", each start=T40, each nominal=293.15^4) 
    "Forth power of temperature of opaque surfaces";
  Modelica.SIunits.HeatFlowRate Q_flow[NTot] "Heat flow rate at surfaces";

  parameter Modelica.SIunits.Temperature T0=293.15 
    "Temperature used to linearize radiative heat transfer";
  final parameter Real T03(min=0, unit="K3")=T0^3 "3rd power of temperature T0";
  Modelica.SIunits.HeatFlowRate sumEBal "Sum of energy balance, should be zero";
initial equation 
  // The next loops build the array epsOpa, AOpa and kOpa that simplify
  // the model equations.
  // These arrays store the values of the constructios in the following order
  // [x[1:NConExt] x[1:NConPar] x[1: NConPar] x[1: NConBou] x[1: NSurBou] x[1: NConExtWin] x[1: NConExtWin]]
  // where x is epsOpa, AOpa or kOpa.
  // The last two entries are for the opaque wall that contains a window, and for the window frame.
  for i in 1:NConExt loop
    epsOpa[i] = epsConExt[i];
    AOpa[i]   = AConExt[i];
    kOpa[i]   = Modelica.Constants.sigma * epsConExt[i] *AConExt[i];
  end for;
  for i in 1:NConPar loop
    epsOpa[i+NConExt]         = epsConPar_a[i];
    AOpa[i+NConExt]           = AConPar[i];
    kOpa[i+NConExt]           = Modelica.Constants.sigma * epsConPar_a[i] *AConPar[i];
    epsOpa[i+NConExt+NConPar] = epsConPar_b[i];
    AOpa[i+NConExt+NConPar]   = AConPar[i];
    kOpa[i+NConExt+NConPar]   = Modelica.Constants.sigma * epsConPar_b[i] *AConPar[i];
  end for;
  for i in 1:NConBou loop
    epsOpa[i+NConExt+2*NConPar] = epsConBou[i];
    AOpa[i+NConExt+2*NConPar]   = AConBou[i];
    kOpa[i+NConExt+2*NConPar]   = Modelica.Constants.sigma * epsConBou[i] *AConBou[i];
  end for;
  for i in 1:NSurBou loop
    epsOpa[i+NConExt+2*NConPar+NConBou] = epsSurBou[i];
    AOpa[i+NConExt+2*NConPar+NConBou]   = ASurBou[i];
    kOpa[i+NConExt+2*NConPar+NConBou]   = Modelica.Constants.sigma * epsSurBou[i] *ASurBou[i];
  end for;

  for i in 1:NConExtWin loop
    // Opaque part of construction that has a window embedded
    epsOpa[i+NConExt+2*NConPar+NConBou+NSurBou] = epsConExtWinOpa[i];
    AOpa[i+NConExt+2*NConPar+NConBou+NSurBou]   = AConExtWinOpa[i];
    kOpa[i+NConExt+2*NConPar+NConBou+NSurBou]   = Modelica.Constants.sigma * epsConExtWinOpa[i] *AConExtWinOpa[i];
    // Window frame
    epsOpa[i+NConExt+2*NConPar+NConBou+NSurBou+NConExtWin] = epsConExtWinFra[i];
    AOpa[i+NConExt+2*NConPar+NConBou+NSurBou+NConExtWin]   = AConExtWinFra[i];
    kOpa[i+NConExt+2*NConPar+NConBou+NSurBou+NConExtWin]   = Modelica.Constants.sigma * epsConExtWinFra[i] *AConExtWinFra[i];
  end for;
  // Vector with all surface areas.
  // The next loops build the array A that simplifies
  // the model equations.
  // These array stores the values of the constructios in the following order
  // [AOpa[1:NConExt] AOpa[1:NConPar] AOpa[1: NConPar] AOpa[1: NConBou] AOpa[1: NSurBou]
  //  AOpa[1: NConExtWin] AOpa[1: NConExtWin] AGla[1: NConExtWin]]
  // since NWin=NConExtWin.
  for i in 1:NOpa loop
    A[i] = AOpa[i];
  end for;
  for i in 1:NWin loop
    A[i+NOpa] = AConExtWinGla[i];
  end for;
  // Reflectivity for opaque surfaces
  rhoOpa = 1 .- epsOpa;
  // View factors for surface i to j.
  // We approximate the view factors in such a way that
  // they are proportional to the area of the receiving surface.
  // We make the following assumptions:
  //   - Surfaces cannot see themselve,
  //   - for conPar, surfaces a and b cannot see each other, and
  //   - glass, frame and opaque constructions that are in the same construction
  //     cannot see each other.
  for j in 1:NTot loop
      // Surfaces that can see conExt.
      // Assume all can see it, except that a surface cannot see itself
      for i in 1:NConExt loop
        M[i,j] = if (i == j) then 0 else 1;
     end for;
     // Surfaces that can see conPar_a.
     // Assume that surface a of conPar cannot see surface b, and vice versa
     for i in NConExt+1 : NConExt+NConPar loop
       M[i,j] = if (i == j or j == i+NConPar) then 0 else 1;
    end for;
     for i in NConExt+NConPar+1 : NConExt+2*NConPar loop
       M[i,j] = if (i == j or j == i-NConPar) then 0 else 1;
     end for;
     // NConBou and NSurBou can see all other surfaces
     for i in NConExt+2*NConPar+1 : NConExt+2*NConPar+NConBou+NSurBou loop
       M[i,j] = if (i == j) then 0 else 1;
     end for;
     // NConExtWin cannot see themselve, nor can they see their frame or their window
     for i in NConExt+2*NConPar+NConBou+NSurBou+1 : NConExt+2*NConPar+NConBou+NSurBou+NConExtWin loop
       M[i,j] = if (i == j or j == i+NConExtWin or j == i+2*NConExtWin) then 0 else 1;
     end for;
     for i in NConExt+2*NConPar+NConBou+NSurBou+NConExtWin+1 : NConExt+2*NConPar+NConBou+NSurBou+2*NConExtWin loop
       M[i,j] = if (i == j or j == i-NConExtWin or j == i+NConExtWin) then 0 else 1;
     end for;
     for i in NConExt+2*NConPar+NConBou+NSurBou+2*NConExtWin+1 : NConExt+2*NConPar+NConBou+NSurBou+3*NConExtWin loop
       M[i,j] = if (i == j or j == i-NConExtWin or j == i-2*NConExtWin) then 0 else 1;
     end for;
  end for;
 // View factors from surface i to surface j
  for i in 1:NTot loop
    if ( sum((M[i,k] * A[k]) for k in 1:NTot) < 10E-20) then
      // This is the special case where only one construction is in the room
       for j in 1:NTot loop
         F[i,j] = if (i==j) then 1 else 0;
       end for;
    else
      // This is the usual situation
       for j in 1:NTot loop
         F[i,j] = (M[i,j] * A[j]) /sum((M[i,k] * A[k]) for k in 1:NTot);
       end for;
    end if;
  end for;

  // Test whether the view factors add up to one, or the sum is zero in case there
  // is only one construction
  for i in 1:NTot loop
    assert((abs(1-sum(F[i,j] for j in 1:NTot))) < 1E-10 or (abs(sum(F[i,j] for j in 1:NTot)) < 1E-10),
           "Program error: Sum of view factors is " + realString(sum(F[i,j] for j in 1:NTot)));
  end for;
////////////////////////////////////////////////////////////////////
equation 
  // If the room has no window, then the incoming radiosity from the window
  // is not connected. In this situation, we set it to zero.
  // This approach is easier than using a conditional connector, since
  // this port carries a flow variable, and hence the sign of the radiosity
  // would change in a connect statement.
  if (cardinality(JInConExtWin) == 0) then
    JInConExtWin = fill(0, NConExtWin);
  end if;
  // Assign temperature of opaque surfaces
  for i in 1:NConExt loop
    TOpa[i] = conExt[i].T;
  end for;
  for i in 1:NConPar loop
    TOpa[i+NConExt]         = conPar_a[i].T;
    TOpa[i+NConExt+NConPar] = conPar_b[i].T;
  end for;
  for i in 1:NConBou loop
    TOpa[i+NConExt+2*NConPar] = conBou[i].T;
  end for;
  for i in 1:NSurBou loop
    TOpa[i+NConExt+2*NConPar+NConBou] = conSurBou[i].T;
  end for;
  for i in 1:NConExtWin loop
    TOpa[i+NConExt+2*NConPar+NConBou+NSurBou]            = conExtWin[i].T;
    TOpa[i+NConExt+2*NConPar+NConBou+NConExtWin+NSurBou] = conExtWinFra[i].T;
  end for;
  // Incoming radiosity at each surface
  // is equal to the negative of the outgoing radiosity of
  // all other surfaces times the view factor
  G = -transpose(F)*J;
  // Outgoing radiosity
  // Opaque surfaces.
  // If kOpa[j]=epsLW[j]*A[j] < 1E-28, then A < 1E-20 and the surface is
  // from a dummy construction. In this situation, we set T40=293.15^4 to
  // avoid a singularity.
  for j in 1:NOpa loop
    T4Opa[j] = if (kOpa[j] > 1E-28) then (-J[j]-rhoOpa[j] * G[j])/kOpa[j] else T40;
  end for;

  // 4th power of temperature
  if linearizeRadiation then
    TOpa = T4Opa./T03;
  else
    TOpa = Buildings.Utilities.Math.Functions.powerLinearized(x=T4Opa, x0=243.15^4, n=0.25);
  end if;
  // Assign radiosity that comes from window
  // and that leaves window.
  // J < 0 because it leaves the surface
  // G > 0 because it strikes the surface
  // JIn > 0 because it enters the model
  // JOut < 0 because it leaves the model
  for j in 1:NWin loop
    J[j+NOpa] = -JInConExtWin[j];
    G[j+NOpa] = -JOutConExtWin[j];
  end for;
  // Net heat exchange
  Q_flow = -J-G;

  // Assign heat exchange to connectors
  for i in 1:NConExt loop
    Q_flow[i] = conExt[i].Q_flow;
  end for;
  for i in 1:NConPar loop
    Q_flow[i+NConExt]         = conPar_a[i].Q_flow;
    Q_flow[i+NConExt+NConPar] = conPar_b[i].Q_flow;
  end for;
  for i in 1:NConBou loop
    Q_flow[i+NConExt+2*NConPar] = conBou[i].Q_flow;
  end for;
  for i in 1:NSurBou loop
    Q_flow[i+NConExt+2*NConPar+NConBou] = conSurBou[i].Q_flow;
  end for;
  for i in 1:NConExtWin loop
    Q_flow[i+NConExt+2*NConPar+NConBou+NSurBou]            = conExtWin[i].Q_flow;
    Q_flow[i+NConExt+2*NConPar+NConBou+NSurBou+NConExtWin] = conExtWinFra[i].Q_flow;
  end for;
  // Sum of energy balance
  // Remove sumEBal and assert statement for final release
  sumEBal = sum(conExt.Q_flow)+sum(conPar_a.Q_flow)+sum(conPar_b.Q_flow)
    +sum(conBou.Q_flow)+sum(conSurBou.Q_flow)+sum(conExtWin.Q_flow)+sum(conExtWinFra.Q_flow)
    +(sum(JInConExtWin)+sum(JOutConExtWin));
  assert(abs(sumEBal) < 1E-1, "Program error: Energy is not conserved in LongWaveRadiationExchange."
   + "\n  Sum of all energy is " + realString(sumEBal));
end LongWaveRadiationExchange;

Buildings.RoomsBeta.BaseClasses.RadiationAdapter Buildings.RoomsBeta.BaseClasses.RadiationAdapter

Model to connect between signals and heat port for radiative gains of the room

Buildings.RoomsBeta.BaseClasses.RadiationAdapter

Information


This model can be used as a thermal adapter in situations where the temperature
and the heat flow rate are computed in separate models. 
For example, this thermal adapter is used in the room model, which computes
the distribution of radiative heat gains (such as due to a radiator) in

Buildings.RoomsBeta.BaseClasses.LongWaveRadiationGainDistribution
and computes the the radiative temperature in

Buildings.RoomsBeta.BaseClasses.RadiationTemperature.
This adapter combines the heat flow rate and the temperatures that are computed in these
separate models, and exposes these two quantities at its heat port.

Extends from Buildings.BaseClasses.BaseIcon (Base icon).

Connectors

TypeNameDescription
HeatPort_aradPort for radiative heat gain and radiation temperature
input RealInputTRadRadiation temperature of room
output RealOutputQRad_flowRadiative heat gain

Modelica definition

model RadiationAdapter 
  "Model to connect between signals and heat port for radiative gains of the room"
  extends Buildings.BaseClasses.BaseIcon;

  Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a rad 
    "Port for radiative heat gain and radiation temperature";
public 
  Modelica.Blocks.Interfaces.RealInput TRad "Radiation temperature of room";
  Modelica.Blocks.Interfaces.RealOutput QRad_flow "Radiative heat gain";
equation 
  QRad_flow = rad.Q_flow;
  rad.T = TRad;
end RadiationAdapter;

Buildings.RoomsBeta.BaseClasses.RadiationTemperature Buildings.RoomsBeta.BaseClasses.RadiationTemperature

Radiative temperature of the room

Buildings.RoomsBeta.BaseClasses.RadiationTemperature

Information


This model computes the radiative temperature in the room. For a room with windows but no shade, the radiative temperature is computed as

Trad = ∑i   (Ai   εi   Ti) ⁄ ∑i   (Ai   εi)

where Trad is the radiative temperature of the room, Ai are the surface areas of the room, εi are the long-wave emissivities of the surfaces, and Ti are the surface temperatures.

If a the windows have a shade, then the equation is modified to take the actual shaded and non-shaded surface area into account. In this situation, the shaded part of a window has a long-wave radiative power of

E = A   ( u   εs   Ts + (1-u)   εg τs   Tgs)

where A is the surface area of the glass, u is the control signal of the shade, εs is the long-wave emissivity of the shade, Ts is the temperature of the shade, εg is the long-wave emissivity of the glass, τs is the long-wave transmittance of the shade, and Tgs is the glass temperature behind the shade.
For the unshaded part of the window, the radiative power is

E = A   (1-u)   εg   Tgn

where Tgn is the glass temperature of the non-shaded part of the window.

Extends from Buildings.RoomsBeta.BaseClasses.PartialSurfaceInterface (Partial model that is used for long-wave radiation balance).

Parameters

TypeNameDefaultDescription
ParameterConstructiondatConExt[NConExt] Data for exterior construction
ParameterConstructionWithWindowdatConExtWin[NConExtWin] Data for exterior construction with window
ParameterConstructiondatConPar[NConPar] Data for partition construction
ParameterConstructiondatConBou[NConBou] Data for construction boundary
ParameterSurfacesurBou[NSurBou] Record for data of surfaces whose heat conduction is modeled outside of this room
BooleanhaveShade Set to true if the windows have a shade
Exterior constructions
IntegernConExt Number of exterior constructions
IntegernConExtWin Number of window constructions
Partition constructions
IntegernConPar Number of partition constructions
Boundary constructions
IntegernConBou Number of constructions that have their outside surface exposed to the boundary of this room
IntegernSurBou Number of surface heat transfer models that connect to constructions that are modeled outside of this room

Connectors

TypeNameDescription
HeatPort_aconExt[NConExt]Heat port that connects to room-side surface of exterior constructions
HeatPort_aconExtWin[NConExtWin]Heat port that connects to room-side surface of exterior constructions that contain a window
HeatPort_aconExtWinFra[NConExtWin]Heat port that connects to room-side surface of window frame
HeatPort_aconPar_a[NConPar]Heat port that connects to room-side surface a of partition constructions
HeatPort_aconPar_b[NConPar]Heat port that connects to room-side surface b of partition constructions
HeatPort_aconBou[NConBou]Heat port that connects to room-side surface of constructions that expose their other surface to the outside
HeatPort_aconSurBou[NSurBou]Heat port to surfaces of models that compute the heat conduction outside of this room
HeatPort_aglaUns[NConExtWin]Heat port that connects to room-side surface of unshaded glass
HeatPort_aglaSha[NConExtWin]Heat port that connects to room-side surface of shaded glass
HeatPort_asha[NConExtWin]Heat port that connects to shade
input RealInputuSha[NConExtWin]Control signal for the shading device (removed if no shade is present)
output RealOutputTRadRadiative temperature [K]

Modelica definition

model RadiationTemperature "Radiative temperature of the room"
  extends Buildings.RoomsBeta.BaseClasses.PartialSurfaceInterface;

  Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a glaUns[NConExtWin] if 
     haveConExtWin 
    "Heat port that connects to room-side surface of unshaded glass";
  Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a glaSha[NConExtWin] if 
    haveShade "Heat port that connects to room-side surface of shaded glass";
  Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a sha[NConExtWin] if 
    haveShade "Heat port that connects to shade";
  parameter Boolean haveShade "Set to true if the windows have a shade";

  Modelica.Blocks.Interfaces.RealInput uSha[NConExtWin](each min=0, each max=1) if 
       haveShade 
    "Control signal for the shading device (removed if no shade is present)";

  Modelica.Blocks.Interfaces.RealOutput TRad(min=0, unit="K", displayUnit="degC") 
    "Radiative temperature";

protected 
  final parameter Integer NOpa = NConExt+2*NConExtWin+2*NConPar+NConBou+NSurBou 
    "Number of opaque surfaces, including the window frame";
  final parameter Integer NWin = NConExtWin "Number of window surfaces";
  final parameter Integer NTot = NOpa + NWin "Total number of surfaces";

  final parameter Modelica.SIunits.Area AGla[NWin] = datConExtWin.AGla 
    "Surface area of opaque surfaces";
  final parameter Real epsGla[NWin](min=0, max=1)=
    {datConExtWin[i].glaSys.glass[datConExtWin[i].glaSys.nLay].epsLW_b for i in 1:NWin} 
    "Emissivity of glass";
  final parameter Real epsSha[NWin](min=0, max=1)=
    {datConExtWin[i].glaSys.shade.epsLW_a for i in 1:NWin} 
    "Emissivity of shade";
  final parameter Real tauSha[NWin](min=0, max=1)=
    {(if datConExtWin[i].glaSys.haveInteriorShade then 
      datConExtWin[i].glaSys.shade.tauLW_a else 1) for i in 1:NWin} 
    "Transmissivity of shade";
  final parameter Modelica.SIunits.Area epsAOpa[NOpa](fixed=false) 
    "Product of area times emissivity of opaque surfaces";
  final parameter Modelica.SIunits.Area epsAGla[NWin](fixed=false) 
    "Product of area times emissivity of window surfaces";
  final parameter Modelica.SIunits.Area epsASha[NWin](fixed=false) 
    "Product of area times emissivity of window shade";
  final parameter Modelica.SIunits.Area epsTauASha[NWin](fixed=false) 
    "Product of area times glass emissivity times shade transmittance";
  Modelica.SIunits.Temperature TOpa[NOpa](each start=293.15, each nominal=293.15) 
    "Temperature of opaque surfaces";
  Modelica.SIunits.Temperature TGlaUns[NWin](each start=293.15, each nominal=293.15) 
    "Temperature of unshaded part of glass";
  Modelica.SIunits.Temperature TGlaSha[NWin](each start=293.15, each nominal=293.15) 
    "Temperature of shaded part of glass";
  Modelica.SIunits.Temperature TSha[NWin](each start=293.15, each nominal=293.15) 
    "Temperature of shade";
  // Internal connectors, used because of the conditionally removed connectors
  Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a glaUns_internal[NConExtWin] 
    "Heat port that connects to room-side surface of unshaded glass";
  Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a glaSha_internal[NConExtWin] 
    "Heat port that connects to room-side surface of shaded glass";
  Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a sha_internal[NConExtWin] 
    "Heat port that connects to shade";
  Modelica.Blocks.Interfaces.RealInput uSha_internal[NConExtWin](each min=0, each max=1) 
    "Control signal for the shading device";

initial equation 
  // The next loops build the array epsAOpa that simplifies
  // the model equations.
  // The arrays stores the values of the constructios in the following order
  // [x[1:NConExt] x[1:NConPar] x[1: NConPar] x[1: NConBou] x[1: NSurBou] x[1: NConExtWin] x[1: NConExtWin]]
  // where x is epsOpa, AOpa or kOpa.
  // The last two entries are for the opaque wall that contains a window, and for the window frame.
  for i in 1:NConExt loop
    epsAOpa[i] = epsConExt[i] * AConExt[i];
  end for;
  for i in 1:NConPar loop
    epsAOpa[i+NConExt]         = epsConPar_a[i] * AConPar[i];
    epsAOpa[i+NConExt+NConPar] = epsConPar_b[i] * AConPar[i];
  end for;
  for i in 1:NConBou loop
    epsAOpa[i+NConExt+2*NConPar] = epsConBou[i] * AConBou[i];
  end for;
  for i in 1:NSurBou loop
    epsAOpa[i+NConExt+2*NConPar+NConBou] = epsSurBou[i] * ASurBou[i];
  end for;
  for i in 1:NConExtWin loop
    // Opaque part of construction that has a window embedded
    epsAOpa[i+NConExt+2*NConPar+NConBou+NSurBou] = epsConExtWinOpa[i] * AConExtWinOpa[i];
    // Window frame
    epsAOpa[i+NConExt+2*NConPar+NConBou+NSurBou+NConExtWin] = epsConExtWinFra[i] * AConExtWinFra[i];
  end for;
  // Window glass
  for i in 1:NConExtWin loop
    // Window glass
    epsAGla[i] = AGla[i] * epsGla[i];
    // Window shade
    epsASha[i]    = AGla[i] * epsSha[i];
    // Emitted from glas and transmitted through window shade
    epsTauASha[i] = AGla[i] * epsGla[i] * tauSha[i];
  end for;
////////////////////////////////////////////////////////////////////
equation 
  // Conditional connnector
  connect(glaUns, glaUns_internal);
  connect(glaSha, glaSha_internal);
  connect(sha, sha_internal);
  connect(uSha, uSha_internal);
  if not haveConExtWin then
    glaUns_internal.T = fill(293.15, NConExtWin);
  end if;
  if not haveShade then
    glaSha_internal.T = fill(293.15, NConExtWin);
    sha_internal.T = fill(293.15, NConExtWin);
    uSha_internal = fill(0, NConExtWin);
  end if;

  // Assign temperature of opaque surfaces
  for i in 1:NConExt loop
    TOpa[i] = conExt[i].T;
  end for;
  for i in 1:NConPar loop
    TOpa[i+NConExt]         = conPar_a[i].T;
    TOpa[i+NConExt+NConPar] = conPar_b[i].T;
  end for;
  for i in 1:NConBou loop
    TOpa[i+NConExt+2*NConPar] = conBou[i].T;
  end for;
  for i in 1:NSurBou loop
    TOpa[i+NConExt+2*NConPar+NConBou] = conSurBou[i].T;
  end for;
  for i in 1:NConExtWin loop
    TOpa[i+NConExt+2*NConPar+NConBou+NSurBou]            = conExtWin[i].T;
    TOpa[i+NConExt+2*NConPar+NConBou+NConExtWin+NSurBou] = conExtWinFra[i].T;
  end for;
  // Assign temperature of glass and shade
  for i in 1:NConExtWin loop
    TGlaUns[i] = glaUns_internal[i].T;
    TGlaSha[i] = glaSha_internal[i].T;
    TSha[i]    = sha_internal[i].T;
  end for;
  // Compute radiative temperature
  if haveShade then
    TRad = (epsAOpa * TOpa
        + sum(
      ( uSha_internal[i] * (epsASha[i] * TSha[i] + epsTauASha[i] * TGlaSha[i]) +
      (1-uSha_internal[i]) * epsAGla[i] * TGlaUns[i])
        for i in 1:NConExtWin))  /
        (sum(epsAOpa) + sum(
      ( uSha_internal[i] * (epsASha[i] + epsTauASha[i]) + (1-uSha_internal[i]) * epsAGla[i])
        for i in 1:NConExtWin));
      else
    TRad = (sum(epsAOpa * TOpa) + sum(epsAGla * TGlaUns)) / (sum(epsAOpa) + sum(epsAGla));
  end if;

  // Assign heat exchange to connectors
  for i in 1:NConExt loop
    0 = conExt[i].Q_flow;
  end for;
  for i in 1:NConPar loop
    0 = conPar_a[i].Q_flow;
    0 = conPar_b[i].Q_flow;
  end for;
  for i in 1:NConBou loop
    0 = conBou[i].Q_flow;
  end for;
  for i in 1:NSurBou loop
    0 = conSurBou[i].Q_flow;
  end for;
  for i in 1:NConExtWin loop
    0 = conExtWin[i].Q_flow;
    0 = conExtWinFra[i].Q_flow;
  end for;

 /*
  for i in 1:NConExtWin loop
    0 = glaUns_internal[i].Q_flow;
    0 = glaSha_internal[i].Q_flow;
    0 = sha_internal[i].Q_flow;
  end for;
*/

end RadiationTemperature;

Buildings.RoomsBeta.BaseClasses.LongWaveRadiationGainDistribution Buildings.RoomsBeta.BaseClasses.LongWaveRadiationGainDistribution

Long-wave radiative heat gain distribution between the room facing surfaces

Buildings.RoomsBeta.BaseClasses.LongWaveRadiationGainDistribution

Information


This model computes the distribution of the long-wave radiant heat gain
to the room surfaces. 
The long-wave radiant heat gain Q is an input to this model.
It is distributed to the individual surfaces according to

Qi = Q   Ai   εi ⁄ ∑k Ak   εk.

For opaque surfaces, the heat flow rate Qi is set to be equal to the heat flow rate at the heat port. For the glass of the windows, the heat flow rate Qi is set to the radiosity Ji that will strike the glass or the window shade.

Extends from Buildings.RoomsBeta.BaseClasses.PartialSurfaceInterface (Partial model that is used for long-wave radiation balance).

Parameters

TypeNameDefaultDescription
ParameterConstructiondatConExt[NConExt] Data for exterior construction
ParameterConstructionWithWindowdatConExtWin[NConExtWin] Data for exterior construction with window
ParameterConstructiondatConPar[NConPar] Data for partition construction
ParameterConstructiondatConBou[NConBou] Data for construction boundary
ParameterSurfacesurBou[NSurBou] Record for data of surfaces whose heat conduction is modeled outside of this room
BooleanhaveShade Set to true if a shade is present
Exterior constructions
IntegernConExt Number of exterior constructions
IntegernConExtWin Number of window constructions
Partition constructions
IntegernConPar Number of partition constructions
Boundary constructions
IntegernConBou Number of constructions that have their outside surface exposed to the boundary of this room
IntegernSurBou Number of surface heat transfer models that connect to constructions that are modeled outside of this room

Connectors

TypeNameDescription
HeatPort_aconExt[NConExt]Heat port that connects to room-side surface of exterior constructions
HeatPort_aconExtWin[NConExtWin]Heat port that connects to room-side surface of exterior constructions that contain a window
HeatPort_aconExtWinFra[NConExtWin]Heat port that connects to room-side surface of window frame
HeatPort_aconPar_a[NConPar]Heat port that connects to room-side surface a of partition constructions
HeatPort_aconPar_b[NConPar]Heat port that connects to room-side surface b of partition constructions
HeatPort_aconBou[NConBou]Heat port that connects to room-side surface of constructions that expose their other surface to the outside
HeatPort_aconSurBou[NSurBou]Heat port to surfaces of models that compute the heat conduction outside of this room
input RealInputuSha[NConExtWin]Control signal for the shading device (removed if no shade is present)
input RealInputQ_flowRadiative heat input into room (positive if heat gain)
output RadiosityOutflowJOutConExtWin[NConExtWin]Outgoing radiosity that connects to shaded and unshaded part of glass [W]

Modelica definition

model LongWaveRadiationGainDistribution 
  "Long-wave radiative heat gain distribution between the room facing surfaces"
  extends Buildings.RoomsBeta.BaseClasses.PartialSurfaceInterface;
  parameter Boolean haveShade "Set to true if a shade is present";

  Modelica.Blocks.Interfaces.RealInput uSha[NConExtWin](each min=0, each max=1) if 
       haveShade 
    "Control signal for the shading device (removed if no shade is present)";

  Modelica.Blocks.Interfaces.RealInput Q_flow 
    "Radiative heat input into room (positive if heat gain)";
  HeatTransfer.Interfaces.RadiosityOutflow[NConExtWin] JOutConExtWin 
    "Outgoing radiosity that connects to shaded and unshaded part of glass";
protected 
  Real fraConExt[NConExt] = AEpsConExt/sumAEps 
    "Fraction of long wave radiant heat gain absorbed by exterior constructions";
  Real fraConExtWinOpa[NConExtWin] = AEpsConExtWinOpa/sumAEps 
    "Fraction of long wave radiant heat gain absorbed by opaque part of exterior constructions that have a window";
  Real fraConExtWinGla[NConExtWin] = (AEpsConExtWinSha + AEpsConExtWinUns)/sumAEps 
    "Fraction of long wave radiant heat gain absorbed by opaque part of glass constructions that have a window";
  Real fraConExtWinFra[NConExtWin] = AEpsConExtWinFra/sumAEps 
    "Fraction of long wave radiant heat gain absorbed by window frame of exterior constructions that have a window";

  Real fraConPar_a[NConPar] = AEpsConPar_a/sumAEps 
    "Fraction of long wave radiant heat gain absorbed by partition constructions surface a";
  Real fraConPar_b[NConPar] = AEpsConPar_b/sumAEps 
    "Fraction of long wave radiant heat gain absorbed by partition constructions surface b";
  Real fraConBou[NConBou] = AEpsConBou/sumAEps 
    "Fraction of long wave radiant heat gain absorbed by constructions with exterior boundary conditions exposed to outside of room model";
  Real fraSurBou[NSurBou] = AEpsSurBou/sumAEps 
    "Fraction of long wave radiant heat gain absorbed by surface models of constructions that are modeled outside of this room";

 parameter Real AEpsConExt[NConExt] = {AConExt[i]*epsConExt[i] for i in 1:NConExt} 
    "Emissivity times area of exterior constructions";
 parameter Real AEpsConExtWinOpa[NConExtWin] = {AConExtWinOpa[i]*epsConExtWinOpa[i] for i in 1:NConExtWin} 
    "Emissivity times area of opaque part of exterior constructions that contain a window";
 Real AEpsConExtWinUns[NConExtWin] = {shaSig[i].yCom * AConExtWinGla[i]*epsConExtWinUns[i]
     for i in 1:NConExtWin} 
    "Emissivity times area of unshaded window constructions";
 Real AEpsConExtWinSha[NConExtWin] = {shaSig[i].y    * AConExtWinGla[i]*epsConExtWinSha[i]
    for i in 1:NConExtWin} 
    "Emissivity times area of shaded window constructions";
 parameter Real AEpsConExtWinFra[NConExtWin] = {AConExtWinFra[i]*epsConExtWinFra[i] for i in 1:NConExtWin} 
    "Emissivity times area of window frame";
 parameter Real AEpsConPar_a[NConPar] = {AConPar[i]*epsConPar_a[i] for i in 1:NConPar} 
    "Emissivity times area of partition constructions surface a";
 parameter Real AEpsConPar_b[NConPar] = {AConPar[i]*epsConPar_b[i] for i in 1:NConPar} 
    "Emissivity times area of partition constructions surface b";
 parameter Real AEpsConBou[NConBou] = {AConBou[i]*epsConBou[i] for i in 1:NConBou} 
    "Emissivity times area of constructions with exterior boundary conditions exposed to outside of room model";
 parameter Real AEpsSurBou[NSurBou] = {ASurBou[i]*epsSurBou[i] for i in 1:NSurBou} 
    "Emissivity times area of surface models of constructions that are modeled outside of this room";

 parameter Real sumAEpsNoWin(fixed=false) 
    "Sum of emissivity times area of all constructions except for windows";
 Real sumAEps 
    "Sum of emissivity times area of all constructions including windows";

 Buildings.HeatTransfer.WindowsBeta.BaseClasses.ShadingSignal shaSig[NConExtWin](
      each final haveShade=haveShade) 
    "Block to constrain the shading control signal to be strictly within (0, 1) if a shade is present";
initial equation 
  sumAEpsNoWin = sum(AEpsConExt)+sum(AEpsConExtWinOpa)+sum(AEpsConExtWinFra)
                +sum(AEpsConPar_a)+sum(AEpsConPar_b)+sum(AEpsConBou)+sum(AEpsSurBou);
equation 
  connect(uSha, shaSig.u);

  sumAEps      = sumAEpsNoWin + sum(AEpsConExtWinUns) + sum(AEpsConExtWinSha);

  // Long-wave radiative heat flow
  conExt.Q_flow    = -fraConExt*Q_flow;
  conExtWin.Q_flow = -fraConExtWinOpa*Q_flow;
  conPar_a.Q_flow  = -fraConPar_a*Q_flow;
  conPar_b.Q_flow  = -fraConPar_b*Q_flow;
  conBou.Q_flow    = -fraConBou*Q_flow;
  conSurBou.Q_flow    = -fraSurBou*Q_flow;
  // This model makes the simplification that the shade, the glass and the frame have
  // the same emissivity in the infrared region
  JOutConExtWin        = -fraConExtWinGla*Q_flow;
  conExtWinFra.Q_flow  = -fraConExtWinFra*Q_flow;
  // Check for conservation of energy
  assert(abs(1 - sum(fraConExt) - sum(fraConExtWinOpa)- sum(fraConExtWinGla) - sum(fraConExtWinFra)
           - sum(fraConPar_a) - sum(fraConPar_b)
           - sum(fraConBou) - sum(fraSurBou))  < 1E-5,
           "Programming error: Radiation balance is wrong. Check equations.");
end LongWaveRadiationGainDistribution;

Buildings.RoomsBeta.BaseClasses.ShortWaveRadiationExchange Buildings.RoomsBeta.BaseClasses.ShortWaveRadiationExchange

Short-wave radiation heat exchange between the room facing surfaces

Buildings.RoomsBeta.BaseClasses.ShortWaveRadiationExchange

Information


This model computes the distribution of the short-wave radiation gain to the room surfaces. Let Nw denote the number of windows, Nf the number of floor elements and Nn the number of non-floor elements such as ceiling, wall and window elements. Input to the model are the short-wave radiosities Ji, i ∈ {1, … , Nw}, that were transmitted through the window. The total incoming solar radiation is therefore

H = ∑i=1Nw Jini

It is assumed that H first hits the floor where some of it is absorbed, and some of it is diffusely reflected to all other surfaces. Only the first reflection is taken into account and the location of the floor patch relative to the window is neglected.

Hence, the radiation that is absorbed by each floor patch i ∈ {1, …, Nf}, and may be partially transmitted in the unusual case that the floor contains a window, is

Qi = H   (εii)   Ai ⁄ ∑j=1Nf   Aj.

The sum of the radiation that is reflected by the floor is therefore

Jf = H   ∑i=1Nf (1-εii)   Ai ⁄ ∑j=1Nf   Aj.

This reflected radiosity is then distributed to all non-floor areas i ∈ {1, …, Nn} using

Qi = Jf   Ai   (εii) ⁄ ∑k=1Nn Ak   (εkk)

For opaque surfaces, the heat flow rate Qi is set to be equal to the heat flow rate at the heat port. For the glass of the windows, the heat flow rate Qi is set to the radiosity Jouti that will strike the glass or the window shade as diffuse short-wave radiation.

Extends from Buildings.RoomsBeta.BaseClasses.PartialSurfaceInterface (Partial model that is used for long-wave radiation balance).

Parameters

TypeNameDefaultDescription
ParameterConstructiondatConExt[NConExt] Data for exterior construction
ParameterConstructionWithWindowdatConExtWin[NConExtWin] Data for exterior construction with window
ParameterConstructiondatConPar[NConPar] Data for partition construction
ParameterConstructiondatConBou[NConBou] Data for construction boundary
ParameterSurfacesurBou[NSurBou] Record for data of surfaces whose heat conduction is modeled outside of this room
BooleanisFloorConExt[NConExt] Flag to indicate if floor for exterior constructions
BooleanisFloorConExtWin[NConExtWin] Flag to indicate if floor for constructions
BooleanisFloorConPar_a[NConPar] Flag to indicate if floor for constructions
BooleanisFloorConPar_b[NConPar] Flag to indicate if floor for constructions
BooleanisFloorConBou[NConBou] Flag to indicate if floor for constructions with exterior boundary conditions exposed to outside of room model
BooleanisFloorSurBou[NSurBou] Flag to indicate if floor for constructions that are modeled outside of this room
EmissivitytauGla[NConExtWin] Transmissivity of window [1]
Exterior constructions
IntegernConExt Number of exterior constructions
IntegernConExtWin Number of window constructions
Partition constructions
IntegernConPar Number of partition constructions
Boundary constructions
IntegernConBou Number of constructions that have their outside surface exposed to the boundary of this room
IntegernSurBou Number of surface heat transfer models that connect to constructions that are modeled outside of this room

Connectors

TypeNameDescription
HeatPort_aconExt[NConExt]Heat port that connects to room-side surface of exterior constructions
HeatPort_aconExtWin[NConExtWin]Heat port that connects to room-side surface of exterior constructions that contain a window
HeatPort_aconExtWinFra[NConExtWin]Heat port that connects to room-side surface of window frame
HeatPort_aconPar_a[NConPar]Heat port that connects to room-side surface a of partition constructions
HeatPort_aconPar_b[NConPar]Heat port that connects to room-side surface b of partition constructions
HeatPort_aconBou[NConBou]Heat port that connects to room-side surface of constructions that expose their other surface to the outside
HeatPort_aconSurBou[NSurBou]Heat port to surfaces of models that compute the heat conduction outside of this room
output RealOutputHOutConExtWin[NConExtWin]Outgoing short wave radiation that strikes window per unit area [W/m2]
input RealInputJInConExtWin[NConExtWin]Short-wave radiation transmitted by window per unit area [W]

Modelica definition

model ShortWaveRadiationExchange 
  "Short-wave radiation heat exchange between the room facing surfaces"
  extends Buildings.RoomsBeta.BaseClasses.PartialSurfaceInterface;
  parameter Boolean isFloorConExt[NConExt] 
    "Flag to indicate if floor for exterior constructions";
  parameter Boolean isFloorConExtWin[NConExtWin] 
    "Flag to indicate if floor for constructions";
  parameter Boolean isFloorConPar_a[NConPar] 
    "Flag to indicate if floor for constructions";
  parameter Boolean isFloorConPar_b[NConPar] 
    "Flag to indicate if floor for constructions";
  parameter Boolean isFloorConBou[NConBou] 
    "Flag to indicate if floor for constructions with exterior boundary conditions exposed to outside of room model";
  parameter Boolean isFloorSurBou[NSurBou] 
    "Flag to indicate if floor for constructions that are modeled outside of this room";

  parameter Modelica.SIunits.Emissivity tauGla[NConExtWin] 
    "Transmissivity of window";

  Modelica.Blocks.Interfaces.RealOutput HOutConExtWin[NConExtWin](unit="W/m2") 
    "Outgoing short wave radiation that strikes window per unit area";
  Modelica.Blocks.Interfaces.RealInput JInConExtWin[NConExtWin](unit="W") 
    "Short-wave radiation transmitted by window per unit area";
  Modelica.SIunits.HeatFlowRate JOutConExtWin[NConExtWin] 
    "Outgoing Short-wave radiation that strikes the window";

  Modelica.SIunits.HeatFlowRate HTot 
    "Total solar radiation that enters the room";

protected 
  final parameter Real k1(unit="1", fixed=false) 
    "Intermediate variable for gain for short wave radiation distribution";
  final parameter Real k2(fixed=false) 
    "Intermediate variable for gain for short wave radiation distribution";
  Modelica.SIunits.HeatFlowRate Q_flow[NTot] 
    "Total solar radiation that is absorbed by the surfaces (or transmitted back through the glass)";
  final parameter Integer NOpa = NConExt+2*NConExtWin+2*NConPar+NConBou+NSurBou 
    "Number of opaque surfaces, including the window frame";
  final parameter Integer NWin = NConExtWin "Number of window surfaces";
  final parameter Integer NTot = NOpa + NWin "Total number of surfaces";
  final parameter Boolean isFlo[NTot](fixed=false) 
    "Flag, true if a surface is a floor";
  final parameter Real eps[NTot](min=0, max=1, fixed=false) 
    "Short wave emissivity";
  final parameter Real tau[NTot](min=0, max=1, fixed=false) 
    "Short wave transmissivity";
  final parameter Modelica.SIunits.Area AFlo(fixed=false) "Total floor area";
  final parameter Modelica.SIunits.Area A[NTot](fixed=false) "Surface areas";
  final parameter Real k[NTot](unit="1", fixed=false) 
    "Gain for short wave radiation distribution";

initial equation 
  // The next loops builds arrays that simplify
  // the model equations.
  // These arrays store the values of the constructios in the following order
  // [x[1:NConExt] x[1:NConPar] x[1: NConPar] x[1: NConBou] x[1: NSurBou] x[1: NConExtWin] x[1: NConExtWin]]
  // where x is epsOpa, AOpa or kOpa.
  // The last two entries are for the opaque wall that contains a window, and for the window frame.
  for i in 1:NConExt loop
    eps[i] = epsConExt[i];
    A[i]      = AConExt[i];
    isFlo[i]  = isFloorConExt[i];
  end for;
  for i in 1:NConPar loop
    eps[i+NConExt]           = epsConPar_a[i];
    A[i+NConExt]             = AConPar[i];
    isFlo[i+NConExt]         = isFloorConPar_a[i];
    eps[i+NConExt+NConPar]   = epsConPar_b[i];
    A[i+NConExt+NConPar]     = AConPar[i];
    isFlo[i+NConExt+NConPar] = isFloorConPar_b[i];
  end for;
  for i in 1:NConBou loop
    eps[i+NConExt+2*NConPar]   = epsConBou[i];
    A[i+NConExt+2*NConPar]     = AConBou[i];
    isFlo[i+NConExt+2*NConPar] = isFloorConBou[i];
  end for;
  for i in 1:NSurBou loop
    eps[i+NConExt+2*NConPar+NConBou]   = epsSurBou[i];
    A[i+NConExt+2*NConPar+NConBou]     = ASurBou[i];
    isFlo[i+NConExt+2*NConPar+NConBou] = isFloorSurBou[i];
  end for;

  for i in 1:NConExtWin loop
    // Opaque part of construction that has a window embedded
    eps[i+NConExt+2*NConPar+NConBou+NSurBou]   = epsConExtWinOpa[i];
    A[i+NConExt+2*NConPar+NConBou+NSurBou]     = AConExtWinOpa[i];
    isFlo[i+NConExt+2*NConPar+NConBou+NSurBou] = isFloorConExtWin[i];
    // Window frame
    eps[i+NConExt+2*NConPar+NConBou+NSurBou+NConExtWin]   = epsConExtWinFra[i];
    A[i+NConExt+2*NConPar+NConBou+NSurBou+NConExtWin]     = AConExtWinFra[i];
    isFlo[i+NConExt+2*NConPar+NConBou+NSurBou+NConExtWin] = isFloorConExtWin[i];
  end for;
  // Window glass
  for i in 1:NConExtWin loop
    // We simplify and assume that the shaded and unshaded part of the window
    // have the same short wave absorbtance.
    // This simplification allows lumping the short-wave distribution into
    // a parameter.
    eps[i+NConExt+2*NConPar+NConBou+NSurBou+2*NConExtWin] = epsConExtWinUns[i];
    isFlo[i+NConExt+2*NConPar+NConBou+NSurBou+2*NConExtWin] = isFloorConExtWin[i];
    A[i+NConExt+2*NConPar+NConBou+NSurBou+2*NConExtWin] = AConExtWinGla[i];
  end for;
  // Vector with all surface areas.
  // The next loops build the array A that simplifies
  // the model equations.
  // These array stores the values of the constructios in the following order
  // [AOpa[1:NConExt] AOpa[1:NConPar] AOpa[1: NConPar] AOpa[1: NConBou] AOpa[1: NSurBou]
  //  AOpa[1: NConExtWin] AOpa[1: NConExtWin] AGla[1: NConExtWin]]
  // since NWin=NConExtWin.

  // Short wave transmissivity
  for i in 1:NOpa loop
    tau[i] = 0;
  end for;
  for i in 1:NWin loop
    tau[NOpa+i] = tauGla[i];
  end for;

  // Sum of surface areas
  AFlo = sum( (if isFlo[i] then A[i] else 0) for i in 1:NTot);

  // Coefficient that is used for non-floor areas.
  // The expression  max(1E-20, AFlo) is used to prevent a division by zero in case AFlo=0.
  // The situation for AFlo=0 is caught by the assert statement.
  k1 = sum( ( if isFlo[i] then (A[i] * (1-eps[i]-tau[i])) else 0)  for i in 1:NTot) / max(1E-20, AFlo);

  k2 = sum( ( if isFlo[i] then 0 else (A[i] * (eps[i]+tau[i])))  for i in 1:NTot);

  if ( k2 > 1E-10) then
    for i in 1:NTot loop
      if isFlo[i] then
         k[i] = (eps[i]+tau[i]) * A[i] / AFlo;
      else
         k[i] = k1/k2*(eps[i]+tau[i]) * A[i];
      end if;
     end for;
  else
        // This branch only happens if k2=0, i.e., there is no surface other than floors
    for i in 1:NTot loop
      if isFlo[i] then
        k[i] = A[i] / AFlo;
      else
        k[i] = 0;
      end if;
    end for;
  end if;

  // Test whether there is a floor inside this room
  assert( AFlo > 1E-10,
     "Error in parameters of the room model: The geometry is incorrect:\n" +
     "    The room model must have a construction that is a floor,\n" +
     "    and this construction must not have a window.\n" +
     "    The parameters for the room model are such that there is no such construction.\n" +
     "    Revise the model parameters.");
  // Test whether the distribution factors add up to one
  assert(abs(1-sum(k)) < 1E-5,
     "Program error: Sum of short-wave distribution factors in room is not equal to one. k=" + realString(sum(k)));

////////////////////////////////////////////////////////////////////
equation 
  // Incoming radiation
  HTot = sum(JInConExtWin);
  // Radiation that is absorbed by the surfaces
  Q_flow = -k .* HTot;
  // Assign heat exchange to connectors
  for i in 1:NConExt loop
    Q_flow[i] = conExt[i].Q_flow;
  end for;
  for i in 1:NConPar loop
    Q_flow[i+NConExt]         = conPar_a[i].Q_flow;
    Q_flow[i+NConExt+NConPar] = conPar_b[i].Q_flow;
  end for;
  for i in 1:NConBou loop
    Q_flow[i+NConExt+2*NConPar] = conBou[i].Q_flow;
  end for;
  for i in 1:NSurBou loop
    Q_flow[i+NConExt+2*NConPar+NConBou] = conSurBou[i].Q_flow;
  end for;
  for i in 1:NConExtWin loop
    Q_flow[i+NConExt+2*NConPar+NConBou+NSurBou]            = conExtWin[i].Q_flow;
    Q_flow[i+NConExt+2*NConPar+NConBou+NSurBou+NConExtWin] = conExtWinFra[i].Q_flow;
  end for;
  // WindowsBeta
  for j in 1:NWin loop
    Q_flow[j+NOpa] = JOutConExtWin[j];
    HOutConExtWin[j] = if (AConExtWinGla[j] > 1E-10) then JOutConExtWin[j] / AConExtWinGla[j] else 0;
  end for;

end ShortWaveRadiationExchange;

Buildings.RoomsBeta.BaseClasses.MixedAir Buildings.RoomsBeta.BaseClasses.MixedAir

Model for room air that is completely mixed

Buildings.RoomsBeta.BaseClasses.MixedAir

Information


Model for the heat exchange inside a room.
This model integrates various components that model
heat exchange between the room-facing surfaces of constructions
and the room air, the internal heat gains, and the fluid port that
can be used to connect models of HVAC systems to the room model.

The main components that are used in this model are as follows:

  1. The model Buildings.HeatTransfer.Convection is used to compute heat convection between the room air and the surface of opaque constructions.
  2. The model Buildings.HeatTransfer.WindowsBeta.InteriorHeatTransfer is used to compute heat convection between the room air and the surfaces of the window glass, frame and shade.
  3. The thermodynamics of the room air is modeled using Buildings.Fluid.MixingVolumes.MixingVolume which assumes the room air to be completely mixed. Depending on the medium model, moisture and species concentrations, such as CO2, can be modeled transiently.
  4. The latent heat gain of the room, which is a user-input, is converted to a moisture source using the model Buildings.RoomsBeta.BaseClasses.HeatGain.
  5. The radiant heat gains in the long-wave spectrum are also a user input. They are distributed to the room enclosing surfaces using the model Buildings.RoomsBeta.BaseClasses.LongWaveRadiationGainDistribution.
  6. The long-wave radiative heat exchange between the room enclosing surfaces is modeled in Buildings.RoomsBeta.BaseClasses.LongWaveRadiationExchange. This model takes into account the emissivity of the surfaces and the surface area. However, the view factors are assumed to be proportional to the area of the receiving surface, without taking into account the location of the surfaces.
  7. The short wave radiation exchange is modeled in Buildings.RoomsBeta.BaseClasses.ShortWaveRadiationExchange. The assumptions in this model is that all solar radiation first hits the floor, and is then partially absorbed and partially reflected by the floor. The reflectance are diffuse, and the reflected radiation is distributed in proportion to the product of the receiving areas times their short wave emissivity.

Extends from Buildings.RoomsBeta.BaseClasses.ParameterFluid (Parameter declaration for fluid model), Buildings.RoomsBeta.BaseClasses.PartialSurfaceInterface (Partial model that is used for long-wave radiation balance).

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialCondensingGasesMedium in the component
ParameterConstructiondatConExt[NConExt] Data for exterior construction
ParameterConstructionWithWindowdatConExtWin[NConExtWin] Data for exterior construction with window
ParameterConstructiondatConPar[NConPar] Data for partition construction
ParameterConstructiondatConBou[NConBou] Data for construction boundary
ParameterSurfacesurBou[NSurBou] Record for data of surfaces whose heat conduction is modeled outside of this room
VolumeV Volume [m3]
AreaAFlo Floor area [m2]
LengthhRoo Average room height [m]
BooleanisFloorSurBou[NSurBou]surBou.isFloorFlag to indicate if floor for constructions that are modeled outside of this room
EmissivitytauGlaSW[NConExtWin] Transmissivity of window [1]
BooleanlinearizeRadiation Set to true to linearize emissive power
Exterior constructions
IntegernConExt Number of exterior constructions
IntegernConExtWin Number of window constructions
Partition constructions
IntegernConPar Number of partition constructions
Boundary constructions
IntegernConBou Number of constructions that have their outside surface exposed to the boundary of this room
IntegernSurBou Number of surface heat transfer models that connect to constructions that are modeled outside of this room
Assumptions
Dynamics
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Formulation of energy balance
DynamicsmassDynamicsenergyDynamicsFormulation of mass balance
DynamicssubstanceDynamicsenergyDynamicsFormulation of substance balance
DynamicstraceDynamicsenergyDynamicsFormulation of trace substance balance
Initialization
AbsolutePressurep_startMedium.p_defaultStart value of pressure [Pa]
Booleanuse_T_starttrue= true, use T_start, otherwise h_start
TemperatureT_startif use_T_start then 293.15 e...Start value of temperature [K]
SpecificEnthalpyh_startif use_T_start then Medium.s...Start value of specific enthalpy [J/kg]
MassFractionX_start[Medium.nX]Medium.X_defaultStart value of mass fractions m_i/m [kg/kg]
ExtraPropertyC_start[Medium.nC]fill(0, Medium.nC)Start value of trace substances
ExtraPropertyC_nominal[Medium.nC]fill(1E-2, Medium.nC)Nominal value of trace substances. (Set to typical order of magnitude.)

Connectors

TypeNameDescription
HeatPort_aconExt[NConExt]Heat port that connects to room-side surface of exterior constructions
HeatPort_aconExtWin[NConExtWin]Heat port that connects to room-side surface of exterior constructions that contain a window
HeatPort_aconExtWinFra[NConExtWin]Heat port that connects to room-side surface of window frame
HeatPort_aconPar_a[NConPar]Heat port that connects to room-side surface a of partition constructions
HeatPort_aconPar_b[NConPar]Heat port that connects to room-side surface b of partition constructions
HeatPort_aconBou[NConBou]Heat port that connects to room-side surface of constructions that expose their other surface to the outside
HeatPort_aconSurBou[NSurBou]Heat port to surfaces of models that compute the heat conduction outside of this room
HeatPort_aglaUns[NConExtWin]Heat port that connects to room-side surface of unshaded glass
HeatPort_aglaSha[NConExtWin]Heat port that connects to room-side surface of shaded glass
VesselFluidPorts_bports[nPorts]Fluid inlets and outlets
HeatPort_aheaPorAirHeat port to air volume
input RadiosityInflowJInSha[NConExtWin]Incoming radiosity that connects to shaded part of glass [W]
output RadiosityOutflowJOutSha[NConExtWin]Outgoing radiosity that connects to shaded part of glass [W]
input RadiosityInflowJInUns[NConExtWin]Incoming radiosity that connects to unshaded part of glass [W]
output RadiosityOutflowJOutUns[NConExtWin]Outgoing radiosity that connects to unshaded part of glass [W]
input RealInputqGai_flow[3]Radiant, convective and latent heat input into room (positive if heat gain)
input RealInputuSha[NConExtWin]Control signal for the shading device (removed if no shade is present)
input RealInputQAbsSWSha_flow[NConExtWin]Solar radiation absorbed by shade [W]
input RealInputJInConExtWin[NConExtWin]Solar radiation transmitted from the outside through the glazing system [W]
output RealOutputHOutConExtWin[NConExtWin]Outgoing short wave radiation that strikes window [W/m2]
HeatPort_aheaPorRadHeat port for radiative heat gain and radiative temperature

Modelica definition

model MixedAir "Model for room air that is completely mixed"
  extends Buildings.RoomsBeta.BaseClasses.ParameterFluid;
  extends Buildings.RoomsBeta.BaseClasses.PartialSurfaceInterface;

  parameter Modelica.SIunits.Volume V "Volume";

  // Port definitions
  parameter Integer nPorts=0 "Number of fluid ports of this model";
  parameter Modelica.SIunits.Area AFlo "Floor area";
  parameter Modelica.SIunits.Length hRoo "Average room height";

  final parameter Boolean isFloorConExt[NConExt]=
    datConExt.isFloor "Flag to indicate if floor for exterior constructions";
  final parameter Boolean isFloorConExtWin[NConExtWin]=
    datConExtWin.isFloor "Flag to indicate if floor for constructions";
  final parameter Boolean isFloorConPar_a[NConPar]=
    datConPar.isFloor "Flag to indicate if floor for constructions";
  final parameter Boolean isFloorConPar_b[NConPar]=
    datConPar.isCeiling "Flag to indicate if floor for constructions";
  final parameter Boolean isFloorConBou[NConBou]=
    datConBou.isFloor 
    "Flag to indicate if floor for constructions with exterior boundary conditions exposed to outside of room model";
  parameter Boolean isFloorSurBou[NSurBou]=
    surBou.isFloor 
    "Flag to indicate if floor for constructions that are modeled outside of this room";

  parameter Modelica.SIunits.Emissivity tauGlaSW[NConExtWin] 
    "Transmissivity of window";

  Fluid.MixingVolumes.MixingVolume vol(V=AFlo*hRoo,
    redeclare package Medium = Medium,
    final energyDynamics=energyDynamics,
    final massDynamics=massDynamics,
    final substanceDynamics=substanceDynamics,
    final traceDynamics=traceDynamics,
    final p_start=p_start,
    final use_T_start=use_T_start,
    final T_start=T_start,
    final h_start=h_start,
    final X_start=X_start,
    final C_start=C_start,
    final C_nominal=C_nominal,
    final use_HeatTransfer=true,
    redeclare final model HeatTransfer =
        Modelica.Fluid.Vessels.BaseClasses.HeatTransfer.IdealHeatTransfer,
    final nPorts=nPorts+1) "Room air volume";
  // Heat ports that are needed to connect to the window glass
  Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a glaUns[NConExtWin] if 
     haveConExtWin 
    "Heat port that connects to room-side surface of unshaded glass";
  Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a glaSha[NConExtWin] if 
       haveShade "Heat port that connects to room-side surface of shaded glass";
  Modelica.Fluid.Vessels.BaseClasses.VesselFluidPorts_b ports[nPorts](
      redeclare each final package Medium = Medium) "Fluid inlets and outlets";
protected 
  HeatTransfer.Convection convConExt[NConExt](
    final A=AConExt,
    final til =  datConExt.til,
    final conMod=datConExt.conMod,
    final hFixed=datConExt.hFixed) if 
       haveConExt "Convective heat transfer";
  HeatTransfer.Convection convConExtWin[NConExtWin](
    final A=AConExtWinOpa,
    final til =  datConExtWin.til,
    final conMod=datConExtWin.conMod,
    final hFixed=datConExtWin.hFixed) if 
       haveConExtWin "Convective heat transfer";
  HeatTransfer.WindowsBeta.InteriorHeatTransfer convConWin[NConExtWin](
    final fFra=fFra,
    each final linearizeRadiation = linearizeRadiation,
    final haveExteriorShade=haveExteriorShade,
    final haveInteriorShade=haveInteriorShade,
    final A=AConExtWinGla + AConExtWinFra,
    final epsLWSha_air=epsConExtWinSha,
    final epsLWSha_glass=epsConExtWinUns,
    final tauLWSha_air=tauLWSha_air,
    final tauLWSha_glass=tauLWSha_glass) if 
       haveConExtWin "Model for convective heat transfer at window";
  // For conPar_a, we use for the tilt pi-tilt since it is the
  // surface that is on the other side of the construction
  // This is similar as in Buildings.HeatTransfer.ConstructionOpaque
  HeatTransfer.Convection convConPar_a[nConPar](
    final A=AConPar,
    final til=Modelica.Constants.pi .- datConPar.til,
    final conMod=datConPar.conMod,
    final hFixed=datConPar.hFixed) if 
       haveConPar "Convective heat transfer";
  HeatTransfer.Convection convConPar_b[nConPar](
    final A=AConPar,
    final til =  datConPar.til,
    final conMod=datConPar.conMod,
    final hFixed=datConPar.hFixed) if 
       haveConPar "Convective heat transfer";
  HeatTransfer.Convection convConBou[nConBou](
    final A=AConBou,
    final til =  datConBou.til,
    final conMod=datConBou.conMod,
    final hFixed=datConBou.hFixed) if 
       haveConBou "Convective heat transfer";
  HeatTransfer.Convection convSurBou[nSurBou](
    final A=ASurBou,
    final til =  surBou.til,
    final conMod=surBou.conMod,
    final hFixed=surBou.hFixed) if 
       haveSurBou "Convective heat transfer";
  Modelica.Thermal.HeatTransfer.Components.ThermalCollector theConConExt(final m=
        nConExt) if 
       haveConExt 
    "Thermal collector to convert from vector to scalar connector";
  Modelica.Thermal.HeatTransfer.Components.ThermalCollector theConConExtWin(
      final m=nConExtWin) if 
       haveConExtWin 
    "Thermal collector to convert from vector to scalar connector";
  Modelica.Thermal.HeatTransfer.Components.ThermalCollector theConConWin(final m=
        nConExtWin) if 
       haveConExtWin 
    "Thermal collector to convert from vector to scalar connector";
  Modelica.Thermal.HeatTransfer.Components.ThermalCollector theConConPar_a(final m=
        nConPar) if 
       haveConPar 
    "Thermal collector to convert from vector to scalar connector";
  Modelica.Thermal.HeatTransfer.Components.ThermalCollector theConConPar_b(final m=
        nConPar) if 
       haveConPar 
    "Thermal collector to convert from vector to scalar connector";
  Modelica.Thermal.HeatTransfer.Components.ThermalCollector theConConBou(final m=
        nConBou) if 
       haveConBou 
    "Thermal collector to convert from vector to scalar connector";
  Modelica.Thermal.HeatTransfer.Components.ThermalCollector theConSurBou(final m=
        nSurBou) if 
       haveSurBou 
    "Thermal collector to convert from vector to scalar connector";
public 
  Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a heaPorAir 
    "Heat port to air volume";

  final parameter Modelica.SIunits.TransmissionCoefficient tauLWSha_air[NConExtWin]=
    datConExtWin.glaSys.shade.tauLW_a 
    "Long wave transmissivity of shade for radiation coming from the exterior or the room";
        final parameter Modelica.SIunits.TransmissionCoefficient tauLWSha_glass[
                                                                          NConExtWin]=
    datConExtWin.glaSys.shade.tauLW_b 
    "Long wave transmissivity of shade for radiation coming from the glass";

  final parameter Boolean haveExteriorShade[NConExtWin]=
    {datConExtWin[i].glaSys.haveExteriorShade for i in 1:NConExtWin} 
    "Set to true if window has exterior shade (at surface a)";
  final parameter Boolean haveInteriorShade[NConExtWin]=
    {datConExtWin[i].glaSys.haveInteriorShade for i in 1:NConExtWin} 
    "Set to true if window has interior shade (at surface b)";
  final parameter Boolean haveShade = haveExteriorShade[1] or haveInteriorShade[1] 
    "Set to true if the windows have a shade";
  final parameter Real fFra[NConExtWin](each min=0, each max=1) = datConExtWin.fFra 
    "Fraction of window frame divided by total window area";
  parameter Boolean linearizeRadiation 
    "Set to true to linearize emissive power";
  HeatTransfer.Interfaces.RadiosityInflow JInSha[NConExtWin] if 
                                       haveShade 
    "Incoming radiosity that connects to shaded part of glass";

  HeatTransfer.Interfaces.RadiosityOutflow JOutSha[NConExtWin] if 
                                         haveShade 
    "Outgoing radiosity that connects to shaded part of glass";
  HeatTransfer.Interfaces.RadiosityInflow JInUns[NConExtWin] if 
     haveConExtWin "Incoming radiosity that connects to unshaded part of glass";
  HeatTransfer.Interfaces.RadiosityOutflow JOutUns[NConExtWin] if 
     haveConExtWin "Outgoing radiosity that connects to unshaded part of glass";

  ShortWaveRadiationExchange shoWavRadExc(
    final nConExt=nConExt,
    final nConExtWin=nConExtWin,
    final nConPar=nConPar,
    final nConBou=nConBou,
    final nSurBou=nSurBou,
    final datConExt = datConExt,
    final datConExtWin = datConExtWin,
    final datConPar = datConPar,
    final datConBou = datConBou,
    final surBou = surBou,
    final isFloorConExt=isFloorConExt,
    final isFloorConExtWin=isFloorConExtWin,
    final isFloorConPar_a=isFloorConPar_a,
    final isFloorConPar_b=isFloorConPar_b,
    final isFloorConBou=isFloorConBou,
    final isFloorSurBou=isFloorSurBou,
    final tauGla=tauGlaSW) if 
       haveConExtWin "Short wave radiative heat exchange";

  LongWaveRadiationGainDistribution lonWavRadGai(
    final nConExt=nConExt,
    final nConExtWin=nConExtWin,
    final nConPar=nConPar,
    final nConBou=nConBou,
    final nSurBou=nSurBou,
    final datConExt = datConExt,
    final datConExtWin = datConExtWin,
    final datConPar = datConPar,
    final datConBou = datConBou,
    final surBou = surBou,
    final haveShade=haveShade) 
    "Distribution for long wave radiative heat gains (e.g., due to equipment and people)";
  LongWaveRadiationExchange lonWavRadExc(
    final nConExt=nConExt,
    final nConExtWin=nConExtWin,
    final nConPar=nConPar,
    final nConBou=nConBou,
    final nSurBou=nSurBou,
    final datConExt = datConExt,
    final datConExtWin = datConExtWin,
    final datConPar = datConPar,
    final datConBou = datConBou,
    final surBou = surBou,
    final linearizeRadiation = linearizeRadiation) 
    "Long wave radiative heat exchange";

  Modelica.Blocks.Interfaces.RealInput qGai_flow[3] 
    "Radiant, convective and latent heat input into room (positive if heat gain)";

  Modelica.Blocks.Interfaces.RealInput uSha[NConExtWin](each min=0, each max=1) if 
       haveShade 
    "Control signal for the shading device (removed if no shade is present)";

  Modelica.Blocks.Interfaces.RealInput QAbsSWSha_flow[NConExtWin](
    final unit="W", quantity="Power") if 
       haveConExtWin "Solar radiation absorbed by shade";
  Modelica.Blocks.Interfaces.RealInput JInConExtWin[NConExtWin](final unit="W",
      quantity="Power") if haveConExtWin 
    "Solar radiation transmitted from the outside through the glazing system";

  Modelica.Blocks.Interfaces.RealOutput HOutConExtWin[NConExtWin](unit="W/m2") if 
       haveConExtWin "Outgoing short wave radiation that strikes window";

  HeatGain heaGai(redeclare package Medium = Medium, final AFlo=AFlo) 
    "Model to convert internal heat gains";
protected 
  RadiationAdapter radiationAdapter;
  Modelica.Blocks.Math.Add add;
public 
  RadiationTemperature radTem(
    final nConExt=nConExt,
    final nConExtWin=nConExtWin,
    final nConPar=nConPar,
    final nConBou=nConBou,
    final nSurBou=nSurBou,
    final datConExt=datConExt,
    final datConExtWin=datConExtWin,
    final datConPar=datConPar,
    final datConBou=datConBou,
    final surBou=surBou,
    final haveShade=haveShade) "Radiative temperature of the room";
  Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a heaPorRad 
    "Heat port for radiative heat gain and radiative temperature";
equation 
  connect(convConExt.solid, conExt);
  connect(convConPar_a.solid, conPar_a);
  connect(convConPar_b.solid, conPar_b);
  connect(convConBou.solid, conBou);
  connect(convSurBou.solid, conSurBou);
  connect(convConExt.fluid, theConConExt.port_a);
  connect(convConPar_a.fluid, theConConPar_a.port_a);
  connect(convConPar_b.fluid, theConConPar_b.port_a);
  connect(convConBou.fluid, theConConBou.port_a);
  connect(convSurBou.fluid, theConSurBou.port_a);
  connect(theConConExt.port_b,vol. heatPort);
  connect(theConConExtWin.port_b,vol. heatPort);
  connect(theConConPar_a.port_b,vol. heatPort);
  connect(theConConPar_b.port_b,vol. heatPort);
  connect(theConConBou.port_b,vol. heatPort);
  connect(theConSurBou.port_b,vol. heatPort);
  connect(vol.heatPort, heaPorAir);
  connect(convConWin.JOutUns, JOutUns);
  connect(JInUns, convConWin.JInUns);
  connect(convConWin.JOutSha, JOutSha);
  connect(convConWin.JInSha, JInSha);
  connect(uSha, convConWin.uSha);
  connect(conExt, lonWavRadExc.conExt);
  connect(conExtWinFra, lonWavRadExc.conExtWinFra);
  connect(conPar_a, lonWavRadExc.conPar_a);
  connect(conPar_b, lonWavRadExc.conPar_b);

  connect(conBou, lonWavRadExc.conBou);

  connect(conSurBou, lonWavRadExc.conSurBou);
  connect(lonWavRadExc.JOutConExtWin, convConWin.JInRoo);
  connect(convConWin.JOutRoo, lonWavRadExc.JInConExtWin);
  connect(lonWavRadGai.JOutConExtWin, convConWin.JInRoo);
  connect(lonWavRadGai.conExt, lonWavRadExc.conExt);
  connect(lonWavRadGai.conExtWinFra, lonWavRadExc.conExtWinFra);
  connect(lonWavRadGai.conPar_a, lonWavRadExc.conPar_a);
  connect(lonWavRadGai.conPar_b, lonWavRadExc.conPar_b);
  connect(lonWavRadGai.conBou, lonWavRadExc.conBou);
  connect(lonWavRadGai.conSurBou, lonWavRadExc.conSurBou);

  connect(lonWavRadGai.uSha, uSha);
  connect(heaGai.QCon_flow,vol. heatPort);
  connect(heaGai.qGai_flow, qGai_flow);
  connect(convConExtWin.fluid, theConConExtWin.port_a);
  connect(convConExtWin.solid, conExtWin);
  connect(conExtWin, lonWavRadExc.conExtWin);
  connect(lonWavRadExc.conExtWin, lonWavRadGai.conExtWin);
  connect(heaGai.QLat_flow,vol. ports[nPorts+1]);
  for i in 1:nPorts loop
  connect(ports[i],vol. ports[i]);
  end for;
  connect(convConWin.air, theConConWin.port_a);
  connect(theConConWin.port_b,vol. heatPort);
  connect(glaUns, convConWin.glaUns);
  connect(convConWin.glaSha, glaSha);

  connect(conExt, shoWavRadExc.conExt);
  connect(conExtWinFra, shoWavRadExc.conExtWinFra);
  connect(conPar_a, shoWavRadExc.conPar_a);
  connect(conPar_b, shoWavRadExc.conPar_b);
  connect(conBou, shoWavRadExc.conBou);
  connect(conSurBou, shoWavRadExc.conSurBou);
  connect(conExtWin, shoWavRadExc.conExtWin);
  connect(QAbsSWSha_flow, convConWin.QAbs_flow);
  connect(shoWavRadExc.JInConExtWin, JInConExtWin);
  connect(shoWavRadExc.HOutConExtWin,HOutConExtWin);
  connect(uSha, radTem.uSha);
  connect(lonWavRadExc.conExt, radTem.conExt);
  connect(lonWavRadExc.conExtWin, radTem.conExtWin);
  connect(lonWavRadExc.conExtWinFra, radTem.conExtWinFra);
  connect(lonWavRadExc.conPar_a, radTem.conPar_a);
  connect(lonWavRadExc.conPar_b, radTem.conPar_b);

  connect(lonWavRadExc.conBou, radTem.conBou);

  connect(lonWavRadExc.conSurBou, radTem.conSurBou);

  connect(radTem.glaUns, glaUns);
  connect(radTem.glaSha, glaSha);
  connect(convConWin.sha, radTem.sha);

  connect(radTem.TRad, radiationAdapter.TRad);
  connect(radiationAdapter.rad, heaPorRad);

  connect(radiationAdapter.QRad_flow, add.u1);
  connect(heaGai.QRad_flow, add.u2);
  connect(add.y, lonWavRadGai.Q_flow);
end MixedAir;

Buildings.RoomsBeta.BaseClasses.PartialSurfaceInterface Buildings.RoomsBeta.BaseClasses.PartialSurfaceInterface

Partial model that is used for long-wave radiation balance

Buildings.RoomsBeta.BaseClasses.PartialSurfaceInterface

Information


This partial model is used as a base class for models that need to exchange
heat with room-facing surfaces. It defines parameters for the surface area,
the emissivity, and the products of area times emissivity.

There are also parameters that contain the number of constructions, such as the number of exterior constructions nConExt. This parameter may take on the value 0. If this parameter were to be used to declare the size of vectors of component models, then there may be vectors with zero components. This can cause problems in Dymola 7.4. We therefore also introduced the parameter

  NConExt = max(1, nConExt)

which can be used to set the size of the vector of component models.

There are also parameters that can be used to conditionally remove components, such as haveConExt, which is set to

  haveConExt = nConExt > 0;

Extends from Buildings.RoomsBeta.BaseClasses.ConstructionRecords (Data records for construction data).

Parameters

TypeNameDefaultDescription
ParameterConstructiondatConExt[NConExt] Data for exterior construction
ParameterConstructionWithWindowdatConExtWin[NConExtWin] Data for exterior construction with window
ParameterConstructiondatConPar[NConPar] Data for partition construction
ParameterConstructiondatConBou[NConBou] Data for construction boundary
ParameterSurfacesurBou[NSurBou] Record for data of surfaces whose heat conduction is modeled outside of this room
Exterior constructions
IntegernConExt Number of exterior constructions
IntegernConExtWin Number of window constructions
Partition constructions
IntegernConPar Number of partition constructions
Boundary constructions
IntegernConBou Number of constructions that have their outside surface exposed to the boundary of this room
IntegernSurBou Number of surface heat transfer models that connect to constructions that are modeled outside of this room

Connectors

TypeNameDescription
HeatPort_aconExt[NConExt]Heat port that connects to room-side surface of exterior constructions
HeatPort_aconExtWin[NConExtWin]Heat port that connects to room-side surface of exterior constructions that contain a window
HeatPort_aconExtWinFra[NConExtWin]Heat port that connects to room-side surface of window frame
HeatPort_aconPar_a[NConPar]Heat port that connects to room-side surface a of partition constructions
HeatPort_aconPar_b[NConPar]Heat port that connects to room-side surface b of partition constructions
HeatPort_aconBou[NConBou]Heat port that connects to room-side surface of constructions that expose their other surface to the outside
HeatPort_aconSurBou[NSurBou]Heat port to surfaces of models that compute the heat conduction outside of this room

Modelica definition

partial model PartialSurfaceInterface 
  "Partial model that is used for long-wave radiation balance"
  import Buildings;
  extends Buildings.RoomsBeta.BaseClasses.ConstructionRecords;

  Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a conExt[NConExt] 
    "Heat port that connects to room-side surface of exterior constructions";

  Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a conExtWin[NConExtWin] 
    "Heat port that connects to room-side surface of exterior constructions that contain a window";
    

  Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a conExtWinFra[NConExtWin] 
    "Heat port that connects to room-side surface of window frame";
  Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a conPar_a[NConPar] 
    "Heat port that connects to room-side surface a of partition constructions";
  Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a conPar_b[NConPar] 
    "Heat port that connects to room-side surface b of partition constructions";

  Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a conBou[NConBou] 
    "Heat port that connects to room-side surface of constructions that expose their other surface to the outside";
  Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a conSurBou[NSurBou] 
    "Heat port to surfaces of models that compute the heat conduction outside of this room";
    
protected 
  final parameter Modelica.SIunits.Area AConExt[NConExt] = datConExt.A 
    "Areas of exterior constructions";
  final parameter Modelica.SIunits.Area AConExtWinOpa[NConExtWin] = datConExtWin.AOpa 
    "Opaque areas of exterior construction that have a window";
  final parameter Modelica.SIunits.Area AConExtWinGla[NConExtWin] = (1 .- datConExtWin.fFra) .* datConExtWin.AWin 
    "Glass areas of exterior construction that have a window";
  final parameter Modelica.SIunits.Area AConExtWinFra[NConExtWin] = datConExtWin.fFra .* datConExtWin.AWin 
    "Frame areas of exterior construction that have a window";
  final parameter Modelica.SIunits.Area AConPar[NConPar] = datConPar.A 
    "Areas of partition constructions";
  final parameter Modelica.SIunits.Area AConBou[NConBou] = datConBou.A 
    "Areas of constructions with exterior boundary conditions exposed to outside of room model";
  final parameter Modelica.SIunits.Area ASurBou[NSurBou] = surBou.A 
    "Area of surface models of constructions that are modeled outside of this room";

  final parameter Modelica.SIunits.Emissivity epsConExt[NConExt] = datConExt.layers.epsLW_b 
    "Emissivity of exterior constructions";
  final parameter Modelica.SIunits.Emissivity epsConExtWinOpa[NConExtWin] = datConExtWin.layers.epsLW_b 
    "Emissivity of opaque part of exterior constructions that contain a window";
  final parameter Modelica.SIunits.Emissivity epsConExtWinUns[NConExtWin]=
    {(datConExtWin[i].glaSys.glass[datConExtWin[i].glaSys.nLay].epsLW_b) for i in 1:NConExtWin} 
    "Emissivity of unshaded part of window constructions";
  final parameter Modelica.SIunits.Emissivity epsConExtWinSha[NConExtWin] = datConExtWin.glaSys.shade.epsLW_a 
    "Emissivity of shaded part of window constructions";
  final parameter Modelica.SIunits.Emissivity epsConExtWinFra[NConExtWin] = datConExtWin.glaSys.epsLWFra 
    "Emissivity of window frame";
  final parameter Modelica.SIunits.Emissivity epsConPar_a[NConPar] = datConPar.layers.epsLW_a 
    "Emissivity of partition constructions surface a";
  final parameter Modelica.SIunits.Emissivity epsConPar_b[NConPar] = datConPar.layers.epsLW_b 
    "Emissivity of partition constructions surface b";
  final parameter Modelica.SIunits.Emissivity epsConBou[NConBou] = datConBou.layers.epsLW_b 
    "Emissivity of constructions with exterior boundary conditions exposed to outside of room model";
  final parameter Modelica.SIunits.Emissivity epsSurBou[NSurBou] = surBou.epsLW 
    "Emissivity of surface models of constructions that are modeled outside of this room";
end PartialSurfaceInterface;

Buildings.RoomsBeta.BaseClasses.SkyRadiationExchange Buildings.RoomsBeta.BaseClasses.SkyRadiationExchange

Radiative heat exchange with the sky and the ambient

Buildings.RoomsBeta.BaseClasses.SkyRadiationExchange

Information


This model computes the long-wave radiative heat flow 
between exterior building surfaces and the ambient. The ambient consists
of the sky black-body radiation and the outdoor temperature 
(which is used as an approximation to the surface temperature of
the ground and neighboring buildings).

Extends from Buildings.BaseClasses.BaseIcon (Base icon).

Parameters

TypeNameDefaultDescription
Integern Number of constructions
AreaA[n] Area of exterior constructions [m2]
RealvieFacSky[n] View factor to sky (=1 for roofs)
EmissivityepsLW[n] Long wave emissivity of building surface [1]

Connectors

TypeNameDescription
HeatPort_aport[n]Heat port
input RealInputTOutOutside air temperature [K]
input RealInputTBlaSkyBlack body sky temperature [K]

Modelica definition

model SkyRadiationExchange 
  "Radiative heat exchange with the sky and the ambient"
  import Buildings;
  extends Buildings.BaseClasses.BaseIcon;
  parameter Integer n(min=1) "Number of constructions";
   parameter Modelica.SIunits.Area A[n] "Area of exterior constructions";
  parameter Real vieFacSky[n](min=0, max=1) "View factor to sky (=1 for roofs)";
  parameter Modelica.SIunits.Emissivity epsLW[n] 
    "Long wave emissivity of building surface";
  Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a port[n] "Heat port";
  Modelica.Blocks.Interfaces.RealInput TOut(final quantity="ThermodynamicTemperature",
                                            final unit = "K", min=0) 
    "Outside air temperature";
  Modelica.Blocks.Interfaces.RealInput TBlaSky(
    final quantity="ThermodynamicTemperature",
    final unit="K",
    min=0) "Black body sky temperature";
protected 
  parameter Real k[n](unit="W/K4") = {4*A[i]*Modelica.Constants.sigma*epsLW[i] for i in 1:n} 
    "Constant for radiative heat exchange";
  Modelica.SIunits.Temperature TEnv[n] "Environment temperature";
  Real TBlaSky4(unit="K4") "Auxiliary variable for radiative heat exchange";
  Real TOut4(unit="K4") "Auxiliary variable for radiative heat exchange";
  Modelica.SIunits.CoefficientOfHeatTransfer h[n] 
    "Radiative heat transfer coefficient";

equation 
  TBlaSky4 = TBlaSky^4;
  TOut4 = TOut^4;
  for i in 1:n loop
    TEnv[i] = (vieFacSky[i] * TBlaSky4 + (1-vieFacSky[i]) * TOut4)^(0.25);
    // h[i] uses TEnv[i] instead of (port[i].T+TEnv[i])/2 to avoid
    // a nonlinear equation system
    h[i]  = k[i] * TEnv[i]^3;
    port[i].Q_flow = h[i] * (port[i].T-TEnv[i]);
  end for;
end SkyRadiationExchange;

Buildings.RoomsBeta.BaseClasses.ConstructionNumbers

Data records for construction data

Information


Record that defines the number of constructions that are used in the room model.

Parameters

TypeNameDefaultDescription
Exterior constructions
IntegernConExt Number of exterior constructions
IntegernConExtWin Number of window constructions
Partition constructions
IntegernConPar Number of partition constructions
Boundary constructions
IntegernConBou Number of constructions that have their outside surface exposed to the boundary of this room
IntegernSurBou Number of surface heat transfer models that connect to constructions that are modeled outside of this room

Modelica definition

record ConstructionNumbers "Data records for construction data"

  ////////////////////////////////////////////////////////////////////////
  // Number of constructions and surface areas
  parameter Integer nConExt(min=0) "Number of exterior constructions";
  parameter Integer nConExtWin(min=0) "Number of window constructions";

  parameter Integer nConPar(min=0) "Number of partition constructions";

  parameter Integer nConBou(min=0) 
    "Number of constructions that have their outside surface exposed to the boundary of this room";

  parameter Integer nSurBou(min=0) 
    "Number of surface heat transfer models that connect to constructions that are modeled outside of this room";

  // Dimensions of components and connectors
protected 
  parameter Integer NConExt(min=1)=max(1, nConExt) 
    "Number of elements for exterior constructions";

  parameter Integer NConExtWin(min=1)=max(1, nConExtWin) 
    "Number of elements for exterior constructions with windows";

  parameter Integer NConPar(min=1)=max(1, nConPar) 
    "Number of elements for partition constructions";

  parameter Integer NConBou(min=1)=max(1, nConBou) 
    "Number of elements for constructions that have their outside surface exposed to the boundary of this room";

  parameter Integer NSurBou(min=1)=max(1, nSurBou) 
    "Number of elements for surface heat transfer models that connect to constructions that are modeled outside of this room";

  // Flags to conditionally remove components
  final parameter Boolean haveConExt = nConExt > 0 
    "Flag to conditionally remove components";
  final parameter Boolean haveConExtWin = nConExtWin > 0 
    "Flag to conditionally remove components";
  final parameter Boolean haveConPar = nConPar > 0 
    "Flag to conditionally remove components";
  final parameter Boolean haveConBou = nConBou > 0 
    "Flag to conditionally remove components";
  final parameter Boolean haveSurBou = nSurBou > 0 
    "Flag to conditionally remove components";

end ConstructionNumbers;

Buildings.RoomsBeta.BaseClasses.ConstructionRecords

Data records for construction data

Buildings.RoomsBeta.BaseClasses.ConstructionRecords

Information


Record that defines the number of constructions that are used in the room model.

Extends from Buildings.RoomsBeta.BaseClasses.ConstructionNumbers (Data records for construction data).

Parameters

TypeNameDefaultDescription
ParameterConstructiondatConExt[NConExt] Data for exterior construction
ParameterConstructionWithWindowdatConExtWin[NConExtWin] Data for exterior construction with window
ParameterConstructiondatConPar[NConPar] Data for partition construction
ParameterConstructiondatConBou[NConBou] Data for construction boundary
ParameterSurfacesurBou[NSurBou] Record for data of surfaces whose heat conduction is modeled outside of this room
Exterior constructions
IntegernConExt Number of exterior constructions
IntegernConExtWin Number of window constructions
Partition constructions
IntegernConPar Number of partition constructions
Boundary constructions
IntegernConBou Number of constructions that have their outside surface exposed to the boundary of this room
IntegernSurBou Number of surface heat transfer models that connect to constructions that are modeled outside of this room

Modelica definition

record ConstructionRecords "Data records for construction data"
  extends Buildings.RoomsBeta.BaseClasses.ConstructionNumbers;

  parameter ParameterConstruction datConExt[NConExt](
    each A=0,
    redeclare Buildings.HeatTransfer.Data.OpaqueConstructions.Brick120 layers,
    each til=0,
    each azi=0) "Data for exterior construction";
  parameter Buildings.RoomsBeta.BaseClasses.ParameterConstructionWithWindow
    datConExtWin[NConExtWin](
    each A=0,
    redeclare Buildings.HeatTransfer.Data.OpaqueConstructions.Brick120 layers,
    each til=0,
    each azi=0,
    each AWin=0,
    redeclare Buildings.HeatTransfer.Data.GlazingSystems.SingleClear3 glaSys) 
    "Data for exterior construction with window";
  parameter Buildings.RoomsBeta.BaseClasses.ParameterConstruction datConPar[
              NConPar](
    each A=0,
    redeclare Buildings.HeatTransfer.Data.OpaqueConstructions.Brick120 layers,
    each til=0,
    each azi=0) "Data for partition construction";
  parameter Buildings.RoomsBeta.BaseClasses.ParameterConstruction datConBou[NConBou](
    each A=0,
    redeclare Buildings.HeatTransfer.Data.OpaqueConstructions.Brick120 layers,
    each til=0,
    each azi=0) "Data for construction boundary";
  parameter ParameterSurface surBou[NSurBou](each A=0, each til=0) 
    "Record for data of surfaces whose heat conduction is modeled outside of this room";


end ConstructionRecords;

Buildings.RoomsBeta.BaseClasses.ParameterConstructionWithWindow Buildings.RoomsBeta.BaseClasses.ParameterConstructionWithWindow

Record for exterior constructions that have a window

Buildings.RoomsBeta.BaseClasses.ParameterConstructionWithWindow

Information


This data record is used to set the parameters of constructions that do have a window.

The surface azimuth is defined in Buildings.RoomsBeta.Types.Azimuth and the surface tilt is defined in Buildings.RoomsBeta.Types.Tilt

Extends from Buildings.RoomsBeta.BaseClasses.PartialParameterConstruction (Partial record for constructions).

Parameters

TypeNameDefaultDescription
ConvectionModelconModBuildings.RoomsBeta.Types.Co...Convective heat transfer model
CoefficientOfHeatTransferhFixed3Constant convection coefficient [W/(m2.K)]
Angletil Surface tilt [rad]
Angleazi Surface azimuth [rad]
AreaA Heat transfer area of opaque construction and window combined [m2]
Opaque construction
Genericlayersredeclare parameter Building...Material properties of opaque construction
Initialization
BooleansteadyStateInitialfalse=true initializes dT(0)/dt=0, false initializes T(0) at fixed temperature using T_a_start and T_b_start
TemperatureT_a_start293.15Initial temperature at port_a, used if steadyStateInitial = false [K]
TemperatureT_b_start293.15Initial temperature at port_b, used if steadyStateInitial = false [K]
Glazing system
AreaAWin Heat transfer area of window [m2]
RealfFra0.1Fraction of window frame divided by total window area
BooleanlinearizeRadiationtrueSet to true to linearize emissive power
GenericglaSysredeclare parameter HeatTran...Material properties of glazing system

Modelica definition

record ParameterConstructionWithWindow 
  "Record for exterior constructions that have a window"
  extends Buildings.RoomsBeta.BaseClasses.PartialParameterConstruction;

  parameter Modelica.SIunits.Area A 
    "Heat transfer area of opaque construction and window combined";
  parameter Modelica.SIunits.Area AWin "Heat transfer area of window";

  final parameter Modelica.SIunits.Area AOpa = A-AWin 
    "Heat transfer area of opaque construction";

  parameter Real fFra(
    min=0,
    max=1) = 0.1 "Fraction of window frame divided by total window area";
  final parameter Modelica.SIunits.Area AFra = fFra*AWin "Frame area";
  final parameter Modelica.SIunits.Area AGla=AWin - AFra "Glass area";
  parameter Boolean linearizeRadiation = true 
    "Set to true to linearize emissive power";

 replaceable parameter HeatTransfer.Data.GlazingSystems.Generic glaSys 
    "Material properties of glazing system";

end ParameterConstructionWithWindow;

Buildings.RoomsBeta.BaseClasses.ParameterConstruction Buildings.RoomsBeta.BaseClasses.ParameterConstruction

Record for exterior constructions that have no window

Information


This data record is used to set the parameters of constructions that do not have a window.

The surface azimuth is defined in Buildings.RoomsBeta.Types.Azimuth and the surface tilt is defined in Buildings.RoomsBeta.Types.Tilt

Extends from Buildings.RoomsBeta.BaseClasses.PartialParameterConstruction (Partial record for constructions).

Parameters

TypeNameDefaultDescription
ConvectionModelconModBuildings.RoomsBeta.Types.Co...Convective heat transfer model
CoefficientOfHeatTransferhFixed3Constant convection coefficient [W/(m2.K)]
Angletil Surface tilt [rad]
Angleazi Surface azimuth [rad]
AreaA Heat transfer area [m2]
Opaque construction
Genericlayersredeclare parameter Building...Material properties of opaque construction
Initialization
BooleansteadyStateInitialfalse=true initializes dT(0)/dt=0, false initializes T(0) at fixed temperature using T_a_start and T_b_start
TemperatureT_a_start293.15Initial temperature at port_a, used if steadyStateInitial = false [K]
TemperatureT_b_start293.15Initial temperature at port_b, used if steadyStateInitial = false [K]

Modelica definition

record ParameterConstruction 
  "Record for exterior constructions that have no window"
  extends Buildings.RoomsBeta.BaseClasses.PartialParameterConstruction;
  parameter Modelica.SIunits.Area A "Heat transfer area";


end ParameterConstruction;

Buildings.RoomsBeta.BaseClasses.ParameterFluid

Parameter declaration for fluid model

Information


Base class that defines the parameters that are needed to model fluid systems inside the room model.

Parameters

TypeNameDefaultDescription
Assumptions
Dynamics
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Formulation of energy balance
DynamicsmassDynamicsenergyDynamicsFormulation of mass balance
DynamicssubstanceDynamicsenergyDynamicsFormulation of substance balance
DynamicstraceDynamicsenergyDynamicsFormulation of trace substance balance
Initialization
AbsolutePressurep_startMedium.p_defaultStart value of pressure [Pa]
Booleanuse_T_starttrue= true, use T_start, otherwise h_start
TemperatureT_startif use_T_start then 293.15 e...Start value of temperature [K]
SpecificEnthalpyh_startif use_T_start then Medium.s...Start value of specific enthalpy [J/kg]
MassFractionX_start[Medium.nX]Medium.X_defaultStart value of mass fractions m_i/m [kg/kg]
ExtraPropertyC_start[Medium.nC]fill(0, Medium.nC)Start value of trace substances
ExtraPropertyC_nominal[Medium.nC]fill(1E-2, Medium.nC)Nominal value of trace substances. (Set to typical order of magnitude.)

Modelica definition

record ParameterFluid "Parameter declaration for fluid model"
  import Modelica.Fluid.Types;
  import Modelica.Fluid.Types.Dynamics;

  replaceable package Medium =
    Modelica.Media.Interfaces.PartialCondensingGases "Medium in the component";

  // Assumptions
  parameter Types.Dynamics energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial 
    "Formulation of energy balance";
  parameter Types.Dynamics massDynamics=energyDynamics 
    "Formulation of mass balance";
  parameter Types.Dynamics substanceDynamics=energyDynamics 
    "Formulation of substance balance";
  parameter Types.Dynamics traceDynamics=energyDynamics 
    "Formulation of trace substance balance";

  // Initialization
  parameter Medium.AbsolutePressure p_start = Medium.p_default 
    "Start value of pressure";
  parameter Boolean use_T_start = true "= true, use T_start, otherwise h_start";
  parameter Medium.Temperature T_start=
    if use_T_start then 293.15 else Medium.temperature_phX(p_start,h_start,X_start) 
    "Start value of temperature";
  parameter Medium.SpecificEnthalpy h_start=
    if use_T_start then Medium.specificEnthalpy_pTX(p_start, T_start, X_start) else Medium.h_default 
    "Start value of specific enthalpy";
  parameter Medium.MassFraction X_start[Medium.nX] = Medium.X_default 
    "Start value of mass fractions m_i/m";
  parameter Medium.ExtraProperty C_start[Medium.nC](
       quantity=Medium.extraPropertiesNames)=fill(0, Medium.nC) 
    "Start value of trace substances";
  parameter Medium.ExtraProperty C_nominal[Medium.nC](
       quantity=Medium.extraPropertiesNames) = fill(1E-2, Medium.nC) 
    "Nominal value of trace substances. (Set to typical order of magnitude.)";

end ParameterFluid;

Buildings.RoomsBeta.BaseClasses.ParameterSurface Buildings.RoomsBeta.BaseClasses.ParameterSurface

Record for surfaces that are used in the room model

Information


This data record is used to set the parameters of surfaces that are used in the room model.

The surface tilt is defined in Buildings.RoomsBeta.Types.Tilt

Extends from Buildings.HeatTransfer.Data.OpaqueSurfaces.Generic (Thermal properties of opaque surfaces).

Parameters

TypeNameDefaultDescription
AreaA Area [m2]
Angletil Surface tilt (0: ceiling, pi/2: wall, pi: floor [rad]
EmissivityepsLW0.84Long wave emissivity [1]
EmissivityepsSW0.84Short wave emissivity [1]
ConvectionModelconModBuildings.RoomsBeta.Types.Co...Convective heat transfer model
CoefficientOfHeatTransferhFixed3Constant convection coefficient [W/(m2.K)]

Modelica definition

record ParameterSurface 
  "Record for surfaces that are used in the room model"
  extends Buildings.HeatTransfer.Data.OpaqueSurfaces.Generic;

  parameter Buildings.RoomsBeta.Types.ConvectionModel conMod=
    Buildings.RoomsBeta.Types.ConvectionModel.Fixed 
    "Convective heat transfer model";
  parameter Modelica.SIunits.CoefficientOfHeatTransfer hFixed=3 
    "Constant convection coefficient";


end ParameterSurface;

Buildings.RoomsBeta.BaseClasses.PartialParameterConstruction Buildings.RoomsBeta.BaseClasses.PartialParameterConstruction

Partial record for constructions

Information


This data record is used to set the parameters of constructions that do not have a window.

The surface azimuth is defined in Buildings.RoomsBeta.Types.Azimuth and the surface tilt is defined in Buildings.RoomsBeta.Types.Tilt

Extends from Modelica.Icons.Record (Icon for a record).

Parameters

TypeNameDefaultDescription
ConvectionModelconModBuildings.RoomsBeta.Types.Co...Convective heat transfer model
CoefficientOfHeatTransferhFixed3Constant convection coefficient [W/(m2.K)]
Angletil Surface tilt [rad]
Angleazi Surface azimuth [rad]
Opaque construction
Genericlayersredeclare parameter Building...Material properties of opaque construction
Initialization
BooleansteadyStateInitialfalse=true initializes dT(0)/dt=0, false initializes T(0) at fixed temperature using T_a_start and T_b_start
TemperatureT_a_start293.15Initial temperature at port_a, used if steadyStateInitial = false [K]
TemperatureT_b_start293.15Initial temperature at port_b, used if steadyStateInitial = false [K]

Modelica definition

record PartialParameterConstruction 
  "Partial record for constructions"
  extends Modelica.Icons.Record;
  replaceable parameter Buildings.HeatTransfer.Data.OpaqueConstructions.Generic
    layers "Material properties of opaque construction";
  parameter Buildings.RoomsBeta.Types.ConvectionModel conMod=
    Buildings.RoomsBeta.Types.ConvectionModel.Fixed 
    "Convective heat transfer model";
  parameter Modelica.SIunits.CoefficientOfHeatTransfer hFixed=3 
    "Constant convection coefficient";
  parameter Modelica.SIunits.Angle til "Surface tilt";
  parameter Modelica.SIunits.Angle azi "Surface azimuth";
  final parameter Boolean isFloor=til > 2.74889125 and til < 3.53428875 
    "Flag, true if construction is a floor";
  final parameter Boolean isCeiling=til > -0.392699 and til < 0.392699 
    "Flag, true if construction is a floor";
  final parameter Integer nLay(min=1, fixed=true) = layers.nLay 
    "Number of layers";
  final parameter Integer nSta[nLay](min=1)={layers.material[i].nSta for i in 1:nLay} 
    "Number of states";
  parameter Boolean steadyStateInitial=false 
    "=true initializes dT(0)/dt=0, false initializes T(0) at fixed temperature using T_a_start and T_b_start";
  parameter Modelica.SIunits.Temperature T_a_start=293.15 
    "Initial temperature at port_a, used if steadyStateInitial = false";
  parameter Modelica.SIunits.Temperature T_b_start=293.15 
    "Initial temperature at port_b, used if steadyStateInitial = false";


end PartialParameterConstruction;

HTML-documentation generated by Dymola Thu Mar 17 10:17:15 2011.