Models Heat Buoyancy Air (Comsol)
Models Heat Buoyancy Air (Comsol)
Models Heat Buoyancy Air (Comsol)
This model is licensed under the COMSOL Software License Agreement 5.5.
All trademarks are the property of their respective owners. See www.comsol.com/trademarks.
Introduction
This example studies the stationary state of free convection in a cavity filled with air and
bounded by two vertical plates. To generate the buoyancy flow, the plates are heated at
different temperatures, in a range where the flow remains in a laminar regime.
This model is similar to the model Buoyancy Flow in Water, except that water is replaced
by air. The detailed model analysis for the estimation of the flow regime in the Model
Analysis section is still applicable here by replacing the water properties by the air
properties. Only the values of the indicators used to estimate the flow regime are given in
this document, in the Indicators of the Flow Regime section.
A first 2D model, representing a square cavity (see Figure 1), focuses on the convective
flow.
Thermal insulation
Pressure point
constraint (0 Pa)
Hot temperature (20 C)
on the right plate
Air
Figure 1: Domain geometry and boundary conditions for the 2D model (square cavity).
Pressure point
constraint (0 Pa)
Figure 2: Domain geometry and boundary conditions for the 3D model (cubic cavity).
Both models calculate and compare the velocity field and the temperature field. The
predefined Nonisothermal Flow interface available in the Heat Transfer Module provides
appropriate tools to fully couple the heat transfer and the fluid dynamics.
Model Definition
2D MODEL
Figure 1 illustrates the 2D model geometry. The fluid fills a square cavity with
impermeable walls, so the fluid flows freely within the cavity but cannot leak out. The right
and left edges of the cavity are maintained at high and low temperatures, respectively. The
upper and lower boundaries are insulated. The temperature differential produces the
density variation that drives the buoyant flow.
The compressible Navier-Stokes equation contains a buoyancy term on the right-hand side
to account for the lifting force due to thermal expansion that causes the density variations:
T 2
u u = – p + u + u – --- u + g
3
Because the model only contains information about the pressure gradient, it estimates the
pressure field up to a constant. To define this constant, you arbitrarily fix the pressure at a
point. No slip boundary conditions apply on all boundaries. The no slip condition results
in zero velocity at the wall but does not set any constraint on p.
At steady-state, the heat balance for a fluid reduces to the following equation:
C p u T – k T = 0
Here T represents the temperature, k denotes the thermal conductivity, and Cp is the
specific heat capacity of the fluid.
The boundary conditions for the heat transfer interface are the fixed high and low
temperatures on the vertical walls with insulation conditions elsewhere, as shown in
Figure 1.
3D MODEL
Figure 2 shows the geometry and boundary conditions of the 3D model. The cavity is now
a cube with high and low temperatures applied respectively at the right and left surfaces.
The remaining boundaries (top, bottom, front, and back) are thermally insulated.
See the model analysis in Buoyancy Flow in Water for more details about the definition of
these indicators.
The Grashof and Rayleigh numbers are about 106, and thus significantly below the critical
value of 109 for the flow to become turbulent between vertical plates (see Ref. 1). A
laminar regime is therefore expected.
U0 = g p TL
where p is the coefficient of thermal expansion and L the typical length. This estimate
gives U0 0.2 m/s when T 10 K.
The Prandtl number is lower than 1, which means that the viscous forces should not have
any significant limiting effect on buoyancy in this model (see Ref. 2). The estimate of the
typical velocity due to buoyancy, taking into account the limiting effect of the viscous
forces on buoyancy, gives U1 0.1 m/s, which is close to U0.
Since the Prandtl number is still close to 1, the thermal boundary layer thickness, T, and
the shear layer thickness, s, are of the same order of magnitude. They are expressed as
(Ref. 2):
L
T ------------------------
4 Ra Pr
-----s- Pr
T
For T 10 K, these estimates give T and s of about 3 mm, with s slightly smaller than
T. You can use these estimates to validate the model after computing the simulation.
The thermophysical properties of air used to compute these indicators are taken from the
Material Library. They are listed in Table 2.
TABLE 2: THERMOPHYSICAL PROPERTIES FOR AIR AT 288.15 K.
These properties are given at 288.15 K which corresponds to the average of the hot and
cold plates temperatures. In addition, the coefficient of thermal expansion p is computed
using the ideal gas approximation:
1
p = ----
T
2D MODEL
Figure 3 shows the velocity distribution in the square cavity.
The regions with faster velocities are located at the lateral boundaries. The maximum
velocity is 0.05 m/s which is a bit lower than the estimated typical velocity U0 0.2 m/s,
but still in the same order of magnitude. According to Figure 4, the shear layer thickness
is about 3 mm, as calculated previously.
Figure 5: Temperature field (surface plot) and velocity (arrows) for the 2D model.
A large convective cell occupies the whole square. The fluid flow follows the boundaries.
As seen in Figure 3, it is faster at the vertical plates where the highest variations of
Figure 7: Velocity magnitude field for the 3D model, slices parallel to the heated plates.
Figure 8: Velocity magnitude field for the 3D model, slices perpendicular to the heated plates.
Figure 9: Temperature (surface plot) and velocity (arrows) fields in the cubic cavity, for a
temperature difference of 10 K between the vertical plates.
New small convective cells appear on the vertical planes perpendicular to the plates at the
four corners.
At high Gr values, using a good initial condition becomes important in order to achieve
convergence. Moreover, a well-tuned mesh is needed to capture the solution, especially
the temperature and velocity changes near the walls. Use the Stationary study step’s
continuation option with T as the continuation parameter to get a solver sequence that
uses previous solutions to estimate the initial condition. For this tutorial, it is appropriate
to ramp up T from 102 K to 10 K, which corresponds to a Grashof number range of
103–106. At Gr 103, the model is easy to solve. The regime is dominated by conduction.
At Gr 106, the model becomes more difficult to solve. The regime is more influenced
by convection and buoyancy.
References
1. F.P. Incropera, D.P. DeWitt, T.L. Bergman, and A.S. Lavine, Fundamentals of Heat
and Mass Transfer, 6th ed., John Wiley & Sons, 2006.
Modeling Instructions
From the File menu, choose New.
NEW
In the New window, click Model Wizard.
MODEL WIZARD
1 In the Model Wizard window, click 2D.
2 In the Select Physics tree, select Fluid Flow>Nonisothermal Flow>Laminar Flow.
3 Click Add.
4 Click Study.
5 In the Select Study tree, select General Studies>Stationary.
6 Click Done.
GLOBAL DEFINITIONS
Parameters 1
1 In the Model Builder window, under Global Definitions click Parameters 1.
2 In the Settings window for Parameters, locate the Parameters section.
GEOMETRY 1
Square 1 (sq1)
1 In the Geometry toolbar, click Square.
2 In the Settings window for Square, locate the Size section.
3 In the Side length text field, type L.
4 In the Geometry toolbar, click Build All.
MATERIALS
In the Home toolbar, click Windows and choose Add Material from Library.
ADD MATERIAL
1 Go to the Add Material window.
2 In the tree, select Built-in>Air.
3 Click Add to Component in the window toolbar.
4 In the Home toolbar, click Add Material to close the Add Material window.
1 In the Model Builder window, under Component 1 (comp1) click Laminar Flow (spf).
2 In the Settings window for Laminar Flow, locate the Physical Model section.
3 From the Compressibility list, choose Incompressible flow.
0 x
L y
Initial Values 1
1 In the Model Builder window, under Component 1 (comp1)>Laminar Flow (spf) click
Initial Values 1.
2 In the Settings window for Initial Values, locate the Initial Values section.
3 In the p text field, type p0.
Fixing the pressure at an arbitrary point is necessary to define a well-posed model. Use a
Pressure Point Constraint that locks the pressure at top left corner.
This value along with the reference pressure determines the reference density used to
initialize the pressure pinit.
1 In the Model Builder window, under Component 1 (comp1)>Heat Transfer in Fluids (ht)
click Initial Values 1.
2 In the Settings window for Initial Values, locate the Initial Values section.
3 In the T text field, type T_avg.
Temperature 1
1 In the Physics toolbar, click Boundaries and choose Temperature.
2 Select Boundary 1 only.
3 In the Settings window for Temperature, locate the Temperature section.
4 In the T0 text field, type Tc.
Temperature 2
1 In the Physics toolbar, click Boundaries and choose Temperature.
2 Select Boundary 4 only.
3 In the Settings window for Temperature, locate the Temperature section.
4 In the T0 text field, type Th.
MULTIPHYSICS
MESH 1
Now, modify the default mesh size settings to ensure that the mesh satisfies the criterion
discussed in the Introduction section.
Step 1: Stationary
1 In the Model Builder window, under Study 1 click Step 1: Stationary.
2 In the Settings window for Stationary, click to expand the Study Extensions section.
3 Select the Auxiliary sweep check box.
4 Click Add.
5 In the table, enter the following settings:
6 Click Range.
7 In the Range dialog box, type dt_range_start in the Start text field.
8 In the Step text field, type 1.
9 In the Stop text field, type dt_range_stop.
10 From the Function to apply to all values list, choose exp10(x) –
Exponential function (base 10).
11 Click Replace.
12 In the Settings window for Stationary, locate the Study Extensions section.
13 In the table, enter the following settings:
1 In the Model Builder window, under Component 1 (comp1) click Laminar Flow (spf).
2 In the Settings window for Laminar Flow, click to expand the Advanced Settings section.
3 Find the Pseudo time stepping subsection. From the
Use pseudo time stepping for stationary equation form list, choose Off.
4 In the Home toolbar, click Compute.
RESULTS
Velocity (spf)
The first default plot group shows the velocity magnitude as in Figure 3. Notice the high
velocities near the lateral walls due to buoyancy effects.
Temperature (ht)
The third default plot shows the temperature distribution. Add arrows of the velocity field
to see the correlations between velocity and temperature, as in Figure 5.
Arrow Surface 1
1 In the Model Builder window, right-click Temperature (ht) and choose Arrow Surface.
2 In the Settings window for Arrow Surface, locate the Coloring and Style section.
3 From the Color list, choose Black.
4 In the Temperature (ht) toolbar, click Plot.
In the following steps, the temperature and velocity profiles are plotted near the left
boundary in order to estimate the boundary layer thicknesses of the solution.
Cut Line 2D 1
1 In the Results toolbar, click Cut Line 2D.
2 In the Settings window for Cut Line 2D, locate the Line Data section.
3 In row Point 2, set x to L/5.
4 In row Point 1, set y to L/2.
5 In row Point 2, set y to L/2.
1D Plot Group 5
1 In the Results toolbar, click 1D Plot Group.
2 In the Settings window for 1D Plot Group, type Temperature at Boundary Layer in
the Label text field.
Line Graph 1
1 Right-click Temperature at Boundary Layer and choose Line Graph.
2 In the Settings window for Line Graph, click Replace Expression in the upper-right corner
of the y-axis data section. From the menu, choose Component 1>Heat Transfer in Fluids>
Temperature>T - Temperature - K.
3 In the Temperature at Boundary Layer toolbar, click Plot.
The thermal boundary layer thickness is around 10 mm, which is in agreement with the
order of the estimated value.
1D Plot Group 6
1 In the Home toolbar, click Add Plot Group and choose 1D Plot Group.
2 In the Settings window for 1D Plot Group, type Velocity at Boundary Layer in the
Label text field.
3 Locate the Data section. From the Dataset list, choose Cut Line 2D 1.
4 From the Parameter selection (DeltaT) list, choose From list.
5 In the Parameter values (DeltaT (K)) list, select 10.
Line Graph 1
1 Right-click Velocity at Boundary Layer and choose Line Graph.
2 In the Velocity at Boundary Layer toolbar, click Plot.
The shear layer thickness is around 3 mm, which is in good agreement with the
estimated value.
ROOT
Now create the 3D version of the model.
ADD COMPONENT
In the Model Builder window, right-click the root node and choose Add Component>3D.
ADD PHYSICS
1 In the Home toolbar, click Add Physics to open the Add Physics window.
2 Go to the Add Physics window.
3 In the tree, select Fluid Flow>Nonisothermal Flow>Laminar Flow.
ADD STUDY
1 In the Home toolbar, click Add Study to open the Add Study window.
2 Go to the Add Study window.
3 Find the Studies subsection. In the Select Study tree, select General Studies>Stationary.
4 Find the Physics interfaces in study subsection. In the table, clear the Solve check box for
Laminar Flow (spf), Heat Transfer in Fluids (ht), and Nonisothermal Flow 1 (nitf1).
5 Find the Multiphysics couplings in study subsection. In the table, enter the following
settings:
GEOMETRY 2
In the Model Builder window, under Component 2 (comp2) click Geometry 2.
Block 1 (blk1)
1 In the Geometry toolbar, click Block.
2 In the Settings window for Block, locate the Size and Shape section.
3 In the Width text field, type L.
4 In the Depth text field, type L/2.
5 In the Height text field, type L.
6 In the Geometry toolbar, click Build All.
MATERIALS
1 In the Model Builder window, under Component 2 (comp2) click Materials.
2 In the Home toolbar, click Windows and choose Add Material from Library.
ADD MATERIAL
1 Go to the Add Material window.
0 x
0 y
L z
Initial Values 1
1 In the Model Builder window, under Component 2 (comp2)>Laminar Flow 2 (spf2) click
Initial Values 1.
2 In the Settings window for Initial Values, locate the Initial Values section.
3 In the p text field, type p0.
Symmetry 1
1 In the Physics toolbar, click Boundaries and choose Symmetry.
2 Select Boundary 2 only.
The solution will be evaluated for the geometry (here, a cube) with a symmetry plane
at the selected boundary.
Initial Values 1
1 In the Model Builder window, under Component 2 (comp2)>Heat Transfer in Fluids 2 (ht2)
click Initial Values 1.
2 In the Settings window for Initial Values, locate the Initial Values section.
3 In the T2 text field, type T_avg.
Temperature 1
1 In the Physics toolbar, click Boundaries and choose Temperature.
2 Select Boundary 1 only.
3 In the Settings window for Temperature, locate the Temperature section.
4 In the T0 text field, type Tc.
Temperature 2
1 In the Physics toolbar, click Boundaries and choose Temperature.
2 Select Boundary 6 only.
3 In the Settings window for Temperature, locate the Temperature section.
4 In the T0 text field, type Th.
Symmetry 1
1 In the Physics toolbar, click Boundaries and choose Symmetry.
2 Select Boundary 2 only.
MULTIPHYSICS
MESH 2
To obtain reliable results within a short computing time, create a structured mesh by
following the steps below.
Mapped 1
1 In the Model Builder window, under Component 2 (comp2) right-click Mesh 2 and choose
More Operations>Mapped.
Distribution 1
1 Right-click Mapped 1 and choose Distribution.
2 Select Edges 1, 3, 5, and 9 only.
3 In the Settings window for Distribution, locate the Distribution section.
4 From the Distribution type list, choose Predefined.
5 In the Number of elements text field, type 16.
6 In the Element ratio text field, type 3.
7 Select the Symmetric distribution check box.
Swept 1
In the Model Builder window, right-click Mesh 2 and choose Swept.
Distribution 1
1 In the Model Builder window, right-click Swept 1 and choose Distribution.
2 In the Settings window for Distribution, locate the Distribution section.
3 From the Distribution type list, choose Predefined.
4 In the Number of elements text field, type 8.
5 In the Element ratio text field, type 3.
6 Select the Reverse direction check box.
To resolve the boundary layers, use a Boundary Layers feature to generate smaller mesh
elements near the walls.
Use this value to define the thickness of the boundary layers, and divide the boundary layer
in 5 mesh layers of increasing size.
Boundary Layers 1
In the Model Builder window, right-click Mesh 2 and choose Boundary Layers.
STUDY 2
Step 1: Stationary
1 In the Model Builder window, under Study 2 click Step 1: Stationary.
2 In the Settings window for Stationary, locate the Study Extensions section.
3 Select the Auxiliary sweep check box.
4 Click Add.
5 In the table, enter the following settings:
6 Click Range.
7 In the Range dialog box, type dt_range_start in the Start text field.
8 In the Step text field, type 1.
9 In the Stop text field, type dt_range_stop.
10 From the Function to apply to all values list, choose exp10(x) –
Exponential function (base 10).
11 Click Replace.
12 In the Settings window for Stationary, locate the Study Extensions section.
13 In the table, enter the following settings:
The continuation solver works best for models with linear dependence on the parameter.
A more robust alternative for nonlinear applications is to start from the solution for the
previous parameter value.
RESULTS
Velocity (spf2)
The default plot group shows the fluid velocity magnitude in only half of the cube. To plot
the other half, proceed as follows.
Mirror 3D 1
1 In the Results toolbar, click More Datasets and choose Mirror 3D.
2 In the Settings window for Mirror 3D, locate the Plane Data section.
3 From the Plane list, choose zx-planes.
A new data set containing mirror values is now created. Go back to the velocity plot to
use this data set.
Slice
1 In the Model Builder window, expand the Results>Velocity (spf2) node, then click Slice.
2 In the Settings window for Slice, click to expand the Quality section.
3 From the Resolution list, choose Fine.
Velocity (spf2)
1 In the Model Builder window, click Velocity (spf2).
2 In the Settings window for 3D Plot Group, locate the Data section.
3 From the Dataset list, choose Mirror 3D 1.
4 In the Velocity (spf2) toolbar, click Plot.
5 Click Plot.
Pressure (spf2)
1 In the Model Builder window, click Pressure (spf2).
2 In the Settings window for 3D Plot Group, locate the Data section.
3 From the Dataset list, choose Mirror 3D 1.
4 In the Pressure (spf2) toolbar, click Plot.
Temperature (ht2)
This default plot group shows the temperature distribution. The mirror data set created
previously can be reused here to plot the entire cube.
3D Plot Group 11
1 In the Home toolbar, click Add Plot Group and choose 3D Plot Group.
2 In the Settings window for 3D Plot Group, type Velocity, Front Plane in the Label
text field.
3 Locate the Data section. From the Dataset list, choose Mirror 3D 1.
Slice 1
1 Right-click Velocity, Front Plane and choose Slice.
2 In the Settings window for Slice, locate the Plane Data section.
3 From the Plane list, choose zx-planes.
4 In the Velocity, Front Plane toolbar, click Plot.
This slice view shows the velocity magnitude in the same plane as in the 2D model
(Figure 8).
Next, plot arrows of the tangential velocity field in the vertical plane parallel to the plates
to reproduce Figure 9.
3D Plot Group 12
1 In the Home toolbar, click Add Plot Group and choose 3D Plot Group.
2 In the Settings window for 3D Plot Group, type Temperature, Velocity in the Label
text field.
3 Locate the Data section. From the Dataset list, choose Mirror 3D 1.
Slice 1
1 Right-click Temperature, Velocity and choose Slice.
2 In the Settings window for Slice, locate the Expression section.
3 In the Expression text field, type T2.
Arrow Volume 1
1 In the Model Builder window, right-click Temperature, Velocity and choose Arrow Volume.
2 In the Settings window for Arrow Volume, locate the Expression section.
3 In the x component text field, type 0.
4 Locate the Arrow Positioning section. Find the x grid points subsection. In the Points text
field, type 1.
5 Find the y grid points subsection. In the Points text field, type 15.
6 Find the z grid points subsection. In the Points text field, type 15.
7 Locate the Coloring and Style section. From the Color list, choose Black.
8 In the Temperature, Velocity toolbar, click Plot.
Finally, you can switch to the main flow representation by adding the graphs as follows.
Make sure to consider the arrow scale factor for any interpretation.
Slice 2
1 Right-click Temperature, Velocity and choose Slice.
2 In the Settings window for Slice, locate the Plane Data section.
3 From the Plane list, choose zx-planes.
4 From the Entry method list, choose Coordinates.
5 Locate the Expression section. In the Expression text field, type T2.
6 Locate the Coloring and Style section. From the Color table list, choose ThermalLight.
7 Click to expand the Inherit Style section. From the Plot list, choose Slice 1.
8 In the Temperature, Velocity toolbar, click Plot.
Arrow Volume 2
1 Right-click Temperature, Velocity and choose Arrow Volume.
2 In the Settings window for Arrow Volume, locate the Coloring and Style section.
3 From the Color list, choose Black.
4 In the Temperature, Velocity toolbar, click Plot.