.Buildings.ThermalZones.Detailed.Examples.FFD.Tutorial.NaturalConvection

Information

This tutorial gives step by step instructions for building and simulating a natural convection model. The model tests the coupled simulation of Buildings.ThermalZones.Detailed.CFD with the FFD program by simulating the natural convection in an empty room with only surface boundary conditions.

Case Description

The Rayleigh number is a dimensionless number associated with natural convection, defined as

Ra = g β (Tw-Te)L3 ⁄ (ν α)

To get a Rayleigh number of 1E5, the flow properties are manually set as acceleration due to gravity gz=-0.01 m/s2, thermal expansion coefficient β=3e-3 K-1, kinematic viscosity ν=1.5e-5 m2/s, thermal diffusivity α=2e-5 m2/s, and characteristic length L=1 m.

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

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

Figure (b)

More details of the case description can be found in Zuo et al. (2012).

Step by Step Guide

This section describes step by step how to build and simulate the model.

  1. Add the following component models to the NaturalConvection model:

    Note that for the other four walls with adiabatic boundary conditions, we do not need to specify a zero heat flow boundary condition because the heat flow rate transferred through a heat port from the outside is zero if the heat port is not connected from the outside.
  2. In the textual editor mode, add the medium and the number of surfaces as shown below:

    Buildings.ThermalZones.Detailed.CFD roo(
      package MediumA = Buildings.Media.GasesConstantDensity.MoistAirUnsaturated(
        T_default=283.15);
      parameter Integer nConExtWin=0;
      parameter Integer nConBou=0;
      parameter Integer nSurBou=6;
      parameter Integer nConExt=0;
      parameter Integer nConPar=0;
    
    
  3. Edit roo as below:

     edeclare package Medium = MediumA,
    surBou(
      name={"East Wall","West Wall","North Wall","South Wall","Ceiling","Floor"},
      each A=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,
      boundaryCondition={
        Buildings.ThermalZones.Detailed.Types.CFDBoundaryConditions.Temperature,
        Buildings.ThermalZones.Detailed.Types.CFDBoundaryConditions.Temperature,
        Buildings.ThermalZones.Detailed.Types.CFDBoundaryConditions.HeatFlowRate,
        Buildings.ThermalZones.Detailed.Types.CFDBoundaryConditions.HeatFlowRate,
        Buildings.ThermalZones.Detailed.Types.CFDBoundaryConditions.HeatFlowRate,
        Buildings.ThermalZones.Detailed.Types.CFDBoundaryConditions.HeatFlowRate}),
      AFlo = 1*1,
      hRoo = 1,
      linearizeRadiation = false,
      useCFD = true,
      sensorName = {"Occupied zone air temperature", "Velocity"},
      cfdFilNam = "modelica://Buildings/Resources/Data/ThermalZones/Detailed/Examples/FFD/Tutorial/NaturalConvection.ffd",
      nConExt = nConExt,
      nConExtWin = nConExtWin,
      nConPar = nConPar,
      nConBou = nConBou,
      nSurBou = nSurBou,
      T_start=273.15,
      samplePeriod = 60);
    
  4. Connect the component as shown in the figure below.

    image

  5. Set the values for the following components:
  6. Use the Simplified CFD Interface (SCI) to generate the input file for FFD.
  7. Revise the FFD parameter input file NaturalConvection.ffd (an example file is provided in Buildings/Resources/Data/ThermalZones/Detailed/Examples/FFD/Tutorial/):
      inpu.parameter_file_format SCI
      inpu.parameter_file_name NaturalConvection.cfd
      inpu.block_file_name NaturalConvection.dat
      prob.nu 1.5e-5 // Kinematic viscosity
      prob.rho 1 // Density
      prob.gravx 0 // Gravity in x direction
      prob.gravy 0 // Gravity in y direction
      prob.gravz -0.01 // Gravity in z direction
      prob.cond 0.02 // Conductivity
      prob.Cp 1000.0 // Specific heat capacity
      prob.beta 3e-3 // Thermal expansion coefficient
      prob.diff 0.00001 // Diffusivity for contaminants
      prob.alpha 2e-5 // Thermal diffusivity
      prob.coeff_h 0.0004 // Convective heat transfer coefficient near the wall
      prob.Temp_Buoyancy 0.0 // Reference temperature for calculating buoyance force
      init.T 0.0 // Initial condition for Temperature
      init.u 0.0 // Initial condition for velocity u
      init.v 0.0 // Initial condition for velocity v
      init.w 0.0 // Initial condition for velocity w
    

    Please note that some of the physical properties were manipulated to obtain the desired Rayleigh Number of 105.

  8. Store NaturalConvection.ffd, NaturalConvection.dat, and NaturalConvection.cfd at Buildings/Resources/Data/ThermalZones/Detailed/Examples/FFD/Tutorial.
  9. Set simulation the stop time of the Modelica model 3600 seconds and choose for example the CVode solver.
  10. Translate the model and start the simulation.
  11. Post-process: click the Tecplot macro script Buildings/Resources/Image/Rooms/Examples/FFD/Tutorial/NaturalConvection.mcr that will generate the temperature contour and velocity vectors shown in the Figure (b). Note: Tecplot is needed for this.

Contents

NameDescription
MediumAMedium model

Revisions

References

Wangda Zuo, Mingang Jin, Qingyan Chen, 2012.
Reduction of numerical viscosity in FFD model.
Journal of Engineering Applications of Computational Fluid Mechanics, 6(2), p. 234-247.


Generated at 2024-04-28T18:16:21Z by OpenModelicaOpenModelica 1.22.3 using GenerateDoc.mos