LBL logo

Buildings.Rooms.Examples.FFD

Package that tests the models for coupled simulation between Modelica and Fast Fluid Dynamics

Information

This package tests the coupled simulation of the model Buildings.Rooms.CFD with the Fast Fluid Dynamics (FFD) program. Different cases with various boundary conditions are evaluated. The models in this package do not represent realistic buildings, but are rather designed to test the coupled simulation.

Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).

Package Content

Name Description
Buildings.Rooms.Examples.FFD.UsersGuide UsersGuide  
Buildings.Rooms.Examples.FFD.Tutorial Tutorial Tutorial with step by step instructions for how to do coupled simulation
Buildings.Rooms.Examples.FFD.ForcedConvection ForcedConvection Ventilation with forced convection in an empty room
Buildings.Rooms.Examples.FFD.NaturalConvectionWithControl NaturalConvectionWithControl A case of natural convection with feedback loop control
Buildings.Rooms.Examples.FFD.RoomOnlyConstructionBoundary RoomOnlyConstructionBoundary Test model for natural convection in an empty room with only construction boundary.
Buildings.Rooms.Examples.FFD.RoomOnlyExteriorWallNoWindow RoomOnlyExteriorWallNoWindow Natural convection in an empty room with only exterior walls without windows.
Buildings.Rooms.Examples.FFD.RoomOnlySurfaceBoundary RoomOnlySurfaceBoundary Natural convection in an empty room with only surface boundary
Buildings.Rooms.Examples.FFD.WindowWithShade WindowWithShade Natural convection in an empty room with exterior walls, windows and shades
Buildings.Rooms.Examples.FFD.WindowWithoutShade WindowWithoutShade Natural convection in an empty room with exterior walls, windows without shade
Buildings.Rooms.Examples.FFD.BaseClasses BaseClasses Package with base classes for Buildings.Rooms.Examples.FFD

Buildings.Rooms.Examples.FFD.ForcedConvection Buildings.Rooms.Examples.FFD.ForcedConvection

Ventilation with forced convection in an empty room

Buildings.Rooms.Examples.FFD.ForcedConvection

Information

This model tests the coupled simulation of Buildings.Rooms.CFD with the FFD program by simulating the ventilation with forced convection in an empty room. Figure (a) shows the schematic of the FFD simulation and Figure (b) shows streamlines and contours of the horizontal velocity U as simulated by the FFD.

image

Figure (a)

image

Figure (b)

Extends from Modelica.Icons.Example (Icon for runnable examples), Buildings.Rooms.Examples.FFD.BaseClasses.PartialRoom (Partial model for a room).

Parameters

TypeNameDefaultDescription
IntegernConExtWin0Number of constructions with a window
IntegernConBou0Number of surface that are connected to constructions that are modeled inside the room
IntegernSurBou6Number of surface that are connected to the room air volume
IntegernConExt0Number of exterior constructions withour a window
IntegernConPar0Number of partition constructions

Modelica definition

model ForcedConvection "Ventilation with forced convection in an empty room" extends Modelica.Icons.Example; extends Buildings.Rooms.Examples.FFD.BaseClasses.PartialRoom( roo( surBou( name={"East Wall","West Wall","North Wall","South Wall","Ceiling","Floor"}, A={0.9,0.9,1,1,1,1}, til={Buildings.Types.Tilt.Wall, Buildings.Types.Tilt.Wall, Buildings.Types.Tilt.Wall, Buildings.Types.Tilt.Wall, Buildings.Types.Tilt.Ceiling, Buildings.Types.Tilt.Floor}, each absIR=1e-5, each absSol=1e-5, each boundaryCondition= Buildings.Rooms.Types.CFDBoundaryConditions.Temperature), nPorts=2, portName={"Inlet","Outlet"}, cfdFilNam="modelica://Buildings/Resources/Data/Rooms/FFD/ForcedConvection.ffd", samplePeriod=6, linearizeRadiation=true, massDynamics=Modelica.Fluid.Types.Dynamics.DynamicFreeInitial), nSurBou=6); HeatTransfer.Sources.FixedTemperature TWal[nSurBou](each T=283.15) "Temperature of other walls"; Fluid.Sources.FixedBoundary bouOut(nPorts=1, redeclare package Medium = MediumA); Fluid.Sources.MassFlowSource_T bounIn( nPorts=1, redeclare package Medium = MediumA, m_flow=0.01, T=283.15); equation for i in 1:nSurBou loop connect(TWal[i].port, roo.surf_surBou[i]); end for; connect(bounIn.ports[1], roo.ports[1]); connect(bouOut.ports[1], roo.ports[2]); end ForcedConvection;

Buildings.Rooms.Examples.FFD.NaturalConvectionWithControl Buildings.Rooms.Examples.FFD.NaturalConvectionWithControl

A case of natural convection with feedback loop control

Buildings.Rooms.Examples.FFD.NaturalConvectionWithControl

Information

This model tests the coupled simulation of Buildings.Rooms.CFD with the FFD program by simulating natural convection in an empty room with a PI controller and a heater to maintain the temperature at room center to be 2ˆC.

The configuration of the simulation is the same as Buildings.Rooms.Examples.FFD.Tutorial.NaturalConvection, except that a heater with PI controller is added to maintain the desired room temperature.

The temperature at the central room is sent to the PI controller as measured temperature. Based on the difference of set temperature and measured temperaure PI controller sends signal to the heater to yield the heat flow. The heat flow is then injected into the room through the heat port as convective heat flow. After receving the heat flow from Modelica, the FFD uniformly distributes it into the space.

Figure (a) shows the velocity vectors and temperature contours in degree Celsius on the X-Z plane at Y = 0.5 m as simulated by the FFD.

image

Figure (a)

Extends from Buildings.Rooms.Examples.FFD.Tutorial.NaturalConvection (Tutorial for Natural Convection case).

Parameters

TypeNameDefaultDescription
IntegernConExtWin0Number of constructions with a window
IntegernConBou0Number of surface that are connected to constructions that are modeled inside the room
IntegernSurBou6Number of surface that are connected to the room air volume
IntegernConExt0Number of exterior constructions withour a window
IntegernConPar0Number of partition constructions

Modelica definition

model NaturalConvectionWithControl "A case of natural convection with feedback loop control" extends Buildings.Rooms.Examples.FFD.Tutorial.NaturalConvection( roo( nPorts=0, useCFD=true, samplePeriod=30, cfdFilNam = "modelica://Buildings/Resources/Data/Rooms/FFD/NaturalConvectionWithControl.ffd", massDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial)); HeatTransfer.Sources.PrescribedHeatFlow preHeatFlo; Controls.Continuous.LimPID conPID( yMin=0, controllerType=Modelica.Blocks.Types.SimpleController.PI, Ti=120, yMax=1, k=0.001); Modelica.Blocks.Sources.Constant TSet(k=275.15) "Temperature set point"; equation connect(roo.yCFD[1], conPID.u_m); connect(TSet.y, conPID.u_s); connect(preHeatFlo.port, roo.heaPorAir); connect(conPID.y, preHeatFlo.Q_flow); end NaturalConvectionWithControl;

Buildings.Rooms.Examples.FFD.RoomOnlyConstructionBoundary Buildings.Rooms.Examples.FFD.RoomOnlyConstructionBoundary

Test model for natural convection in an empty room with only construction boundary.

Buildings.Rooms.Examples.FFD.RoomOnlyConstructionBoundary

Information

This model tests the copuled simulation of Buildings.Rooms.CFD with the FFD program by simulating the natural convection in an empty room with only construction boundaries.

Figure (a) shows the schematic of the FFD simulation. The room is 1 meter in length, width and height. The temperature of the east wall is set to 40ˆC and the rest walls are at 10ˆC. The initial value for the temperature of the room air is 30ˆC. Two sensors are placed in the room center at (0.5 m, 0.5 m, 0.5 m) that measure the temperature and the velocity.

image

Figure (a)

Figure (b) shows the velocity vectors and temperature contours in degree Celsius on the X-Z plane at Y = 0.5 m as simulated by the FFD.

image

Figure (b)

Extends from Modelica.Icons.Example (Icon for runnable examples), Buildings.Rooms.Examples.FFD.BaseClasses.PartialRoom (Partial model for a room).

Parameters

TypeNameDefaultDescription
GenericmatLayWal Construction material for all the envelopes
IntegernConExtWin0Number of constructions with a window
IntegernConBou6Number of surface that are connected to constructions that are modeled inside the room
IntegernSurBou0Number of surface that are connected to the room air volume
IntegernConExt0Number of exterior constructions withour a window
IntegernConPar0Number of partition constructions

Modelica definition

model RoomOnlyConstructionBoundary "Test model for natural convection in an empty room with only construction boundary." extends Modelica.Icons.Example; parameter Buildings.HeatTransfer.Data.OpaqueConstructions.Generic matLayWal( final nLay=1, material={HeatTransfer.Data.Solids.Steel(x=0.001)}, roughness_a=Buildings.HeatTransfer.Types.SurfaceRoughness.Smooth) "Construction material for all the envelopes"; extends Buildings.Rooms.Examples.FFD.BaseClasses.PartialRoom( roo( datConBou( name={"East Wall","West Wall","North Wall","South Wall","Floor","Ceiling"}, layers={matLayWal,matLayWal,matLayWal,matLayWal,matLayWal,matLayWal}, each A=1*1, til={Buildings.Types.Tilt.Wall,Buildings.Types.Tilt.Wall, Buildings.Types.Tilt.Wall,Buildings.Types.Tilt.Wall, Buildings.Types.Tilt.Floor,Buildings.Types.Tilt.Ceiling}, boundaryCondition={Buildings.Rooms.Types.CFDBoundaryConditions.Temperature, Buildings.Rooms.Types.CFDBoundaryConditions.Temperature,Buildings.Rooms.Types.CFDBoundaryConditions.Temperature, Buildings.Rooms.Types.CFDBoundaryConditions.Temperature,Buildings.Rooms.Types.CFDBoundaryConditions.Temperature, Buildings.Rooms.Types.CFDBoundaryConditions.Temperature}), homotopyInitialization=false), nConBou=6); Buildings.HeatTransfer.Sources.FixedTemperature TWalRes[nConBou - 1]( each T=283.15) "Boundary condition for the other walls"; HeatTransfer.Sources.FixedTemperature TEasWal(each T=313.15) "Temperature of the east wall"; equation for i in 1:nConBou - 1 loop connect(TWalRes[i].port, roo.surf_conBou[i + 1]); end for; connect(TEasWal.port, roo.surf_conBou[1]); end RoomOnlyConstructionBoundary;

Buildings.Rooms.Examples.FFD.RoomOnlyExteriorWallNoWindow Buildings.Rooms.Examples.FFD.RoomOnlyExteriorWallNoWindow

Natural convection in an empty room with only exterior walls without windows.

Buildings.Rooms.Examples.FFD.RoomOnlyExteriorWallNoWindow

Information

This model tests the coupled simulation of Buildings.Rooms.CFD with the FFD program by simulating the natural convection in an empty room with only exterior walls and without windows.

Figure (a) shows the schematic of the FFD simulation. The room is 1 meter in length, width and height. The walls are exposed to the ambient environment (cold winter night in Chicago) and the insulation is very poor. The initial values are for the temperatures of the walls 20ˆC and for temperature of the air 30ˆC. All temperature drop quickly due to the heat loss. Two sensors are placed in the room center at (0.5 m, 0.5 m, 0.5 m) that measure the temperature and the velocity.

image

Figure (a)

Figure (b) shows the velocity vectors and temperature contours in degree Celsius on the X-Z plane at Y = 0.5 m as simulated by the FFD. In the cold mid-night of Chicago, the temperature of the ceiling is the lowest and the temperature of the ground floor is the highest.

image

Figure (b)

Extends from Modelica.Icons.Example (Icon for runnable examples), Buildings.Rooms.Examples.FFD.BaseClasses.PartialRoom (Partial model for a room).

Parameters

TypeNameDefaultDescription
GenericmatLayWal Construction material for all the envelopes
IntegernConExtWin0Number of constructions with a window
IntegernConBou0Number of surface that are connected to constructions that are modeled inside the room
IntegernSurBou0Number of surface that are connected to the room air volume
IntegernConExt6Number of exterior constructions withour a window
IntegernConPar0Number of partition constructions

Modelica definition

model RoomOnlyExteriorWallNoWindow "Natural convection in an empty room with only exterior walls without windows." extends Modelica.Icons.Example; parameter Buildings.HeatTransfer.Data.OpaqueConstructions.Generic matLayWal( final nLay=1, material={HeatTransfer.Data.Solids.Steel(x=0.001)}, roughness_a=Buildings.HeatTransfer.Types.SurfaceRoughness.Smooth) "Construction material for all the envelopes"; extends Buildings.Rooms.Examples.FFD.BaseClasses.PartialRoom( nConExt=6, nConExtWin=0, nConPar=0, nConBou=0, nSurBou=0, roo(nConExt=nConExt, datConExt( name={"East Wall","West Wall","North Wall","South Wall","Floor","Ceiling"}, layers={matLayWal,matLayWal,matLayWal,matLayWal,matLayWal,matLayWal}, each A=1*1, til={Buildings.Types.Tilt.Wall, Buildings.Types.Tilt.Wall, Buildings.Types.Tilt.Wall, Buildings.Types.Tilt.Wall, Buildings.Types.Tilt.Floor, Buildings.Types.Tilt.Ceiling}, boundaryCondition={ Buildings.Rooms.Types.CFDBoundaryConditions.Temperature, Buildings.Rooms.Types.CFDBoundaryConditions.Temperature, Buildings.Rooms.Types.CFDBoundaryConditions.Temperature, Buildings.Rooms.Types.CFDBoundaryConditions.Temperature, Buildings.Rooms.Types.CFDBoundaryConditions.Temperature, Buildings.Rooms.Types.CFDBoundaryConditions.Temperature}), samplePeriod=30)); end RoomOnlyExteriorWallNoWindow;

Buildings.Rooms.Examples.FFD.RoomOnlySurfaceBoundary Buildings.Rooms.Examples.FFD.RoomOnlySurfaceBoundary

Natural convection in an empty room with only surface boundary

Buildings.Rooms.Examples.FFD.RoomOnlySurfaceBoundary

Information

This model tests the coupled simulation of Buildings.Rooms.CFD with the FFD program by simulating the natural convection in an empty room with only surface boundaries. It is also used to test the adiabatic boundary conditon in the FFD code.

Figure (a) shows the schematic of the FFD simulation. The following conditions are applied in the Modelica model:

image

Figure (a)

Figure (b) shows the velocity vectors and temperature contours in degree Celsius on the X-Z plane at Y = 0.5 m as simulated by the FFD.

image

Figure (b)

Extends from Modelica.Icons.Example (Icon for runnable examples), Buildings.Rooms.Examples.FFD.BaseClasses.PartialRoom (Partial model for a room).

Parameters

TypeNameDefaultDescription
IntegernConExtWin0Number of constructions with a window
IntegernConBou0Number of surface that are connected to constructions that are modeled inside the room
IntegernSurBou6Number of surface that are connected to the room air volume
IntegernConExt0Number of exterior constructions withour a window
IntegernConPar0Number of partition constructions

Modelica definition

model RoomOnlySurfaceBoundary "Natural convection in an empty room with only surface boundary" extends Modelica.Icons.Example; extends Buildings.Rooms.Examples.FFD.BaseClasses.PartialRoom(roo( linearizeRadiation=false, samplePeriod=60, surBou( name={"East Wall","West Wall","North Wall","South Wall","Floor","Ceiling"}, each A=1*1, til={Buildings.Types.Tilt.Wall, Buildings.Types.Tilt.Wall, Buildings.Types.Tilt.Wall, Buildings.Types.Tilt.Wall, Buildings.Types.Tilt.Floor, Buildings.Types.Tilt.Ceiling}, each absIR=1e-5, each absSol=1e-5, boundaryCondition={ Buildings.Rooms.Types.CFDBoundaryConditions.Temperature, Buildings.Rooms.Types.CFDBoundaryConditions.Temperature, Buildings.Rooms.Types.CFDBoundaryConditions.HeatFlowRate, Buildings.Rooms.Types.CFDBoundaryConditions.HeatFlowRate, Buildings.Rooms.Types.CFDBoundaryConditions.HeatFlowRate, Buildings.Rooms.Types.CFDBoundaryConditions.HeatFlowRate})), nSurBou=6); Buildings.HeatTransfer.Sources.FixedTemperature TWesWal(each T=283.15) "Boundary condition for the west wall"; HeatTransfer.Sources.FixedHeatFlow fixedHeatFlow[nSurBou - 2](each Q_flow=0); HeatTransfer.Sources.FixedTemperature TEasWal(each T=313.15) "Temperature of the east wall"; equation for i in 1:nSurBou - 2 loop connect(fixedHeatFlow[i].port, roo.surf_surBou[i+2]); end for; connect(TEasWal.port, roo.surf_surBou[1]); connect(TWesWal.port, roo.surf_surBou[2]); end RoomOnlySurfaceBoundary;

Buildings.Rooms.Examples.FFD.WindowWithShade Buildings.Rooms.Examples.FFD.WindowWithShade

Natural convection in an empty room with exterior walls, windows and shades

Buildings.Rooms.Examples.FFD.WindowWithShade

Information

This model tests the cosimulation of Buildings.Rooms.CFD with the FFD program by simulating natural convection in a room with only exterior walls and windows with shades.

Figure (a) show the schematic of FFD simulation. The walls and the windows are exposed to the ambient environment. The wall is well insulated and the initial temperature is 20ˆC. The initial temperature for the room air is 17ˆC.

image

Figure (a)

Figure (b) shows the velocity vectors and temperature contours in degree Celsius on the X-Z plane at Y = 0.5 m, at t = 300 s as simulated by the FFD.

image

Figure (b)

Note: The current version of the FFD program does not support a moving boundary. Thus, the shade can only be at a fixed position as determined by the parameter uSha_fixed={0.5,0.5}.

Extends from Modelica.Icons.Example (Icon for runnable examples), Buildings.Rooms.Examples.FFD.BaseClasses.PartialRoom (Partial model for a room).

Parameters

TypeNameDefaultDescription
IntegernConExtWin2Number of constructions with a window
IntegernConBou0Number of surface that are connected to constructions that are modeled inside the room
IntegernSurBou0Number of surface that are connected to the room air volume
IntegernConExt4Number of exterior constructions withour a window
IntegernConPar0Number of partition constructions
Insulation100Concrete200matLayExt Construction material for exterior walls
DoubleClearAir13ClearglaSys Data record for the glazing system

Modelica definition

model WindowWithShade "Natural convection in an empty room with exterior walls, windows and shades" extends Modelica.Icons.Example; extends Buildings.Rooms.Examples.FFD.BaseClasses.PartialRoom( nConExt=4, nConExtWin=2, nConPar=0, nConBou=0, nSurBou=0, roo( nConExt=nConExt, nConExtWin=nConExtWin, datConExt( name={"North Wall","South Wall","Floor","Ceiling"}, each A=1, layers={matLayExt,matLayExt,matLayExt,matLayExt}, til={ Buildings.Types.Tilt.Wall, Buildings.Types.Tilt.Wall, Buildings.Types.Tilt.Floor, Buildings.Types.Tilt.Ceiling}, boundaryCondition={ Buildings.Rooms.Types.CFDBoundaryConditions.Temperature, Buildings.Rooms.Types.CFDBoundaryConditions.Temperature, Buildings.Rooms.Types.CFDBoundaryConditions.Temperature, Buildings.Rooms.Types.CFDBoundaryConditions.Temperature}), datConExtWin( name={"East Wall","West Wall"}, layers={matLayExt,matLayExt}, each A=1, glaSys={glaSys,glaSys}, each wWin=1, each hWin=0.5, each fFra=0.2, til={ Buildings.Types.Tilt.Wall, Buildings.Types.Tilt.Wall}, azi={ Buildings.Types.Azimuth.E, Buildings.Types.Azimuth.W}, boundaryCondition={ Buildings.Rooms.Types.CFDBoundaryConditions.Temperature, Buildings.Rooms.Types.CFDBoundaryConditions.Temperature}), uSha_fixed={0.5,0.5}, samplePeriod=10, linearizeRadiation=true, cfdFilNam="modelica://Buildings/Resources/Data/Rooms/FFD/WindowWithShade.ffd")); parameter HeatTransfer.Data.OpaqueConstructions.Insulation100Concrete200 matLayExt "Construction material for exterior walls"; parameter HeatTransfer.Data.GlazingSystems.DoubleClearAir13Clear glaSys(UFra=2, shade=Buildings.HeatTransfer.Data.Shades.Gray(), haveExteriorShade=false, haveInteriorShade=true) "Data record for the glazing system"; end WindowWithShade;

Buildings.Rooms.Examples.FFD.WindowWithoutShade Buildings.Rooms.Examples.FFD.WindowWithoutShade

Natural convection in an empty room with exterior walls, windows without shade

Buildings.Rooms.Examples.FFD.WindowWithoutShade

Information

This model tests the coupled simulation of Buildings.Rooms.CFD with the FFD program by simulating natural convection in a room with only exterior walls and windows.

Figure (a) shows the schematic of FFD simulation. The walls are exposed to the ambient environment. Both the wall and window are well insulated and the initial temperature of the walls and the window is 20ˆC.

image

Figure (a)

Figure (b) shows the velocity vectors and temperature contour in degree Celsius on the X-Z plane at Y = 0.5 m as simulated by the FFD.

image

Extends from Modelica.Icons.Example (Icon for runnable examples), Buildings.Rooms.Examples.FFD.BaseClasses.PartialRoom (Partial model for a room).

Parameters

TypeNameDefaultDescription
IntegernConExtWin2Number of constructions with a window
IntegernConBou0Number of surface that are connected to constructions that are modeled inside the room
IntegernSurBou0Number of surface that are connected to the room air volume
IntegernConExt4Number of exterior constructions withour a window
IntegernConPar0Number of partition constructions
Insulation100Concrete200matLayExt Construction material for exterior walls
DoubleClearAir13ClearglaSys Data record for the glazing system

Modelica definition

model WindowWithoutShade "Natural convection in an empty room with exterior walls, windows without shade" extends Modelica.Icons.Example; extends Buildings.Rooms.Examples.FFD.BaseClasses.PartialRoom( nConExt=4, nConExtWin=2, nConPar=0, nConBou=0, nSurBou=0, roo( nConExt=nConExt, nConExtWin=nConExtWin, datConExt( name={"North Wall","South Wall","Floor","Ceiling"}, each A=1, layers={matLayExt,matLayExt,matLayExt,matLayExt}, til={Buildings.Types.Tilt.Wall, Buildings.Types.Tilt.Wall, Buildings.Types.Tilt.Floor, Buildings.Types.Tilt.Ceiling}, boundaryCondition={ Buildings.Rooms.Types.CFDBoundaryConditions.Temperature, Buildings.Rooms.Types.CFDBoundaryConditions.Temperature, Buildings.Rooms.Types.CFDBoundaryConditions.Temperature, Buildings.Rooms.Types.CFDBoundaryConditions.Temperature}), datConExtWin( name={"East Wall","West Wall"}, layers={matLayExt,matLayExt}, each A=1, glaSys={glaSys,glaSys}, each wWin=1, each hWin=0.5, each fFra=0.2, til={ Buildings.Types.Tilt.Wall, Buildings.Types.Tilt.Wall}, azi={ Buildings.Types.Azimuth.E, Buildings.Types.Azimuth.W}, boundaryCondition={ Buildings.Rooms.Types.CFDBoundaryConditions.Temperature, Buildings.Rooms.Types.CFDBoundaryConditions.Temperature}), cfdFilNam="modelica://Buildings/Resources/Data/Rooms/FFD/WindowWithoutShade.ffd", uSha_fixed={0, 0})); parameter HeatTransfer.Data.OpaqueConstructions.Insulation100Concrete200 matLayExt "Construction material for exterior walls"; parameter HeatTransfer.Data.GlazingSystems.DoubleClearAir13Clear glaSys(UFra=2, shade=Buildings.HeatTransfer.Data.Shades.Gray(), haveExteriorShade=false, haveInteriorShade=false) "Data record for the glazing system"; end WindowWithoutShade;

Automatically generated Mon May 4 10:25:57 2015.