You are on page 1of 20

Tutorial: Horizontal Film Boiling

Introduction
This tutorial provides guidelines and recommendations for setting up and solving lm boiling
problems and suggests mesh resolution and solver settings. In such problems, the wall
temperature is much higher than the saturation temperature of the liquid in contact with
the wall, and the entire wall surface is immersed in vapor. Due to the boiling mass exchange
occurring at the vapor-liquid interface, bubbles of gas are periodically produced and emitted
upward. Such a regime is known as lm boiling.
This tutorial demonstrates how to do the following:
Set up the volume of uid (VOF) model.
Use user-dened functions (UDFs) to specify a model which is not available with
ANSYS FLUENT.
Solve the case using appropriate solver settings and solution monitors.
Postprocess the resulting data.
Prerequisites
This tutorial is written with the assumption that you have completed Tutorial 1 from ANSYS
FLUENT13.0 Tutorial Guide, and that you are familiar with the ANSYS FLUENTnavigation
pane and menu structure. Some steps in the setup and solution procedure will not be shown
explicitly.
In this tutorial, you will use VOF multiphase model. If you have not used this model before,
refer to Section 26.3, Setting Up the VOF Model in ANSYS FLUENT13.0 Users Guide.
For more information about UDFs, see ANSYS FLUENT13.0 UDF Manual.
Problem Description
The problem to be solved in this tutorial is shown in Figure 1.
The wall has a temperature 10 K above saturation. Initially, the linear temperature prole
(from T
wall
to T
sat
in the positive Y direction) is patched on the liquid domain.
c ANSYS, Inc. March 1, 2011 1
Horizontal Film Boiling
Figure 1: Problem Schematic
Setup and Solution
Preparation
1. Copy the les (test-2d.msh.gz, boiling.c) to your working folder.
2. Use FLUENT Launcher to start the 2D version of ANSYS FLUENT.
For more information about FLUENT Launcher see Section 1.1.2, Starting
ANSYS FLUENT Using FLUENT Launcher in ANSYS FLUENT 13.0 Users Guide.
3. Enable Double-Precision in the Options list.
4. Click the UDF Compiler tab and ensure that the Setup Compilation Environment for
UDF is enabled.
The path to the .bat le which is required to compile the UDF will be displayed as soon
as you enable Setup Compilation Environment for UDF.
If the UDF Compiler tab does not appear in the FLUENT Launcher dialog box by default,
click the Show Additional Options >> button to view the additional settings.
The Display Options are enabled by default. Therefore, after you read in the mesh, it
will be displayed in the embedded graphics window.
Step 1: Mesh
1. Read the mesh le (test-2d.msh.gz).
File Read Mesh...
As the mesh le is read, ANSYS FLUENT will report the progress in the console.
2 c ANSYS, Inc. March 1, 2011
Horizontal Film Boiling
Step 2: General Settings
1. Dene the solver settings.
General Transient
2. Check the mesh (see Figure 2).
General Check
Figure 2: Mesh Display
Step 3: Models
1. Dene the multiphase model.
Models Multiphase Edit...
(a) Select the Volume of Fluid multiphase model.
(b) Enable the Implicit Body Force formulation.
(c) Click OK to close the Multiphase Model dialog box.
2. Enable the Energy Equation.
Models Energy Edit...
c ANSYS, Inc. March 1, 2011 3
Horizontal Film Boiling
Step 4: Materials
1. Create a new material, liquid.
Materials Create/Edit...
(a) Enter liquid for Name.
(b) Enter 200 kg/m
3
for Density.
(c) Enter 400 j/kg-k for Cp (Specic Heat).
(d) Enter 40 w/m-k for Thermal Conductivity.
(e) Enter 0.1 kg/m-s for Viscosity.
(f) Click Change/Create and close the Create/Edit Materials dialog box.
4 c ANSYS, Inc. March 1, 2011
Horizontal Film Boiling
2. Similarly, create the material, vapor.
(a) Enter the values given in the following table:
Parameter Value
Density 5
Cp (Specic Heat) 200
Thermal Conductivity 1
Viscosity 0.005
(b) Click Change/Create and close the Create/Edit Materials dialog box.
A Question dialog box will appear asking whether to overwrite liquid, click NO.
Step 5: Phases
1. Dene the primary phase (vapor).
Phases phase-1-Primary Phase Edit...
(a) Enter gas for Name.
(b) Select vapor from the Phase Material drop-down list.
(c) Click OK to close the Primary Phase dialog box.
2. Similarly, dene the secondary phase (liquid).
Phases phase-2-Secondary Phase Edit...
3. Specify the interphase interaction.
Phases Interaction...
(a) Click the Surface Tension tab.
(b) Select constant from the Surface Tension Coecients drop-down list and enter a
value of 0.1 N/m.
(c) Click OK to close the Phase Interaction dialog box.
c ANSYS, Inc. March 1, 2011 5
Horizontal Film Boiling
Step 6: User-Dened Function
In this problem, the UDF is used to specify the mass transfer between the phases. Using
UDF, you can dene mass transfer model which is not available in ANSYS FLUENT. The
mass transfer terms for each phase (vapor and liquid) are equal and have opposite signs.
They are specied as source terms in volume fraction equations and have units of kg-sec/m
3
.
Also, there is an energy source term to consider the latent heat absorbed/released, which has
units of W/m3 and is prescribed for mixture energy equation.
1. Compile the UDF.
Dene User-Dened Functions Compiled...
Ensure that the UDF source le (boiling.c) is in the same folder that contains your
case and data les.
(a) Click Add... and select the source le, boiling.c.
(b) Click Build and then click Load to load the library.
2. Dene function hooks.
Dene User-Dened Function Hooks...
6 c ANSYS, Inc. March 1, 2011
Horizontal Film Boiling
(a) Click Edit... for the Initialization to open Initialization Functions dialog box.
i. Select my init function::libudf from the Available Initializations Functions list.
ii. Click Add and OK to close the Initialization Functions dialog box.
(b) Click Edit... for the Adjust to open Adjust Functions dialog box.
i. Select area density::libudf from the Available Adjust Functions list.
ii. Click Add and OK to close the Adjust Functions dialog box.
(c) Click OK to close the User-Dened Function Hooks dialog box.
3. Set the Number of User-Dened Memory Locations to 3.
Dene User-Dened Memory...
This step is necessary because the UDF uses three UDMs.
Step 7: Cell Zone Conditions
Cell Zone Conditions uid
1. Retain the selection of mixture from the Phase drop-down list and click Edit....
(a) Enable Source Terms and click the Source Terms tab.
(b) Click the Edit... for the Energy to open the Energy sources dialog box.
i. Set the Number of Energy sources to 1.
ii. Select udf energy::libudf from the drop-down list below Number of Energy
sources.
iii. Click OK to close the Energy sources dialog box.
(c) Click OK to close the Fluid dialog box.
2. Select uid from the Phase drop-down list and click Edit... to open the Fluid dialog
box.
(a) Enable Source Terms and click the Source Terms tab.
c ANSYS, Inc. March 1, 2011 7
Horizontal Film Boiling
(b) Click the Edit... for the Mass to open the Mass sources dialog box.
i. Set the Number of Mass sources to 1.
ii. Select udf liquid::libudf from the drop-down list below Number of Mass sources.
iii. Click OK to close the Mass sources dialog box.
(c) Click OK to close the Fluid dialog box.
3. Select gas from the Phase drop-down list and click Edit... to open the Fluid dialog box.
(a) Enable Source Terms.
(b) Click the Edit... for the Mass to open the Mass sources dialog box.
i. Set the Number of Mass sources to 1.
ii. Select udf gas::libudf from the drop-down list below Number of Mass sources.
iii. Click OK to close the Mass sources dialog box.
(c) Click OK to close the Fluid dialog box.
Step 8: Boundary Conditions
1. Set the boundary conditions for heat.
Boundary Conditions heat
(a) Select mixture from the Phase drop-down list and click Edit....
i. Click the Thermal tab.
ii. Select Temperature from the Thermal Conditions list and enter a value of
510 k.
This indicates 10 K superheat with respect to the saturation temperature
500 K.
iii. Click OK to close the Wall dialog box.
8 c ANSYS, Inc. March 1, 2011
Horizontal Film Boiling
2. Set the boundary conditions for the outlet.
Boundary Conditions outlet
(a) Retain mixture from the Phase drop-down list and click Edit....
i. Click the Thermal tab and enter 500 k for Backow Total Temperature.
This prevents gas from entering the outlet and also sets the saturation tem-
perature for the liquid in case reverse ow occurs.
ii. Click OK to close the Pressure Outlet dialog box.
(b) Select uid from the Phase drop-down list and click Edit....
i. Click Multiphase tab and enter 1 for Backow Volume Fraction.
ii. Click OK to close the Pressure Outlet dialog box.
Step 9: Operating Conditions
Boundary Conditions Operating Conditions...
1. Enable Gravity.
2. Set the Gravitational Acceleration in the Y direction to -9.81 m/s
2
.
3. Enable Specied Operating Density and set the Operating Density to 5 kg/m
3
.
Step 10: Solution
1. Set the surface tension calculation options using the following TUI commands:
You may need to press the <Enter> key to get the > prompt.
> solve/set/st
Use node based smoothing
[no]
Number of smoothings
[1]
Smoothing relaxation Factor
[1]
use vof gradients at the nodes for curvature calculation? [yes] no
c ANSYS, Inc. March 1, 2011 9
Horizontal Film Boiling
2. Set the reference values.
Reference Values
(a) Enter 0.0778 m for the Length.
(b) Enter 500 k for the Temperature.
3. Set the solution method parameters.
Solution Methods
(a) Select PISO from the Scheme drop-down list in the Pressure-Velocity Coupling
group box.
(b) Select PRESTO! for Pressure, QUICK for Momentum and Energy in the Spatial
Discretization group box.
4. Set the solution control parameters.
Solution Controls
(a) Set the Under-Relaxation Factors for Pressure and Momentum to 0.5.
5. Dene a surface monitor.
Monitors (Surface Monitors) Create...
(a) Enable Plot and Write.
(b) Enter nusselt-1.out for File Name.
(c) Select Flow Time from the X Axis drop-down list.
(d) Select Time Step from Every drop-down list.
10 c ANSYS, Inc. March 1, 2011
Horizontal Film Boiling
(e) Select Area-Weighted Average in the Report Type drop-down list.
(f) Select Wall Fluxes... and Surface Nusselt Number from the Field Variable drop-
down lists.
(g) Select heat from Surfaces list.
6. Dene a volume monitor.
Monitors (Volume Monitors) Create...
(a) Enable Plot and Write.
(b) Retain vol-mon-1.out for the File Name.
(c) Select Flow Time from the X Axis drop-down list.
(d) Select Time Step from Every drop-down list.
(e) Select Volume-Average from the Report Type drop-down list.
(f) Select Phases... and Volume fraction from the Field Variable drop-down lists.
(g) Select gas from the Phase drop-down list.
(h) Select uid from Cell Zones list.
7. Initialize the solution.
Solution Initialization
(a) Initialize with pressure and velocity components at zero.
(b) Enter 1 for the uid Volume Fraction.
(c) Enter 500 k for the Temperature.
(d) Click Initialize.
c ANSYS, Inc. March 1, 2011 11
Horizontal Film Boiling
8. Dene a custom eld function for initializing the temperature prole.
Dene Custom Field Functions...
(a) Dene the custom eld function, 510-y*10/0.1168.
Select y by selecting Mesh... and Y-Coordinate in the Field Functions drop-down
lists.
This function initializes the temperature prole, ranging from 510 K at y=0 (for
heat wall) to 500 K at y=0.1168 m (for outlet).
9. Patch a temperature using custom-function-0 for the uid zone.
Solution Initialization Patch...
(a) Select Temperature from the Variable list.
(b) Enable Use Field Function and select custom-function-0 from the Field Function
list.
12 c ANSYS, Inc. March 1, 2011
Horizontal Film Boiling
(c) Select uid from the Zones to Patch list.
(d) Click Patch and close the Patch dialog box.
10. Enable autosaving of the data le after every 100 time steps.
Calculation Activities
(a) Enter 100 for Autosave Every (Time Steps).
(b) Click Edit... to open Autosave dialog box.
i. Enter an appropriate le name (test-2d0100.dat.gz).
ii. Click OK to close the Autosave dialog box.
11. Start the calculation.
Run Calculation
(a) Set Time Step Size to 0.001.
(b) Set the Number of Time Steps to 4000.
(c) Click Calculate.
The plots of convergence history of surface Nusselt number and volume fraction
are shown in Figures 3 and 4, respectively.
Figure 3: Convergence History of Surface Nusselt Number
c ANSYS, Inc. March 1, 2011 13
Horizontal Film Boiling
Figure 4: Convergence History of Volume Fraction
Step 11: Postprocessing
1. Display lled contours of volume fraction of gas after 900 time steps (t = 0.9s).
To display the contours at t = 0.9s, read the data le corresponding to 900 time steps.
Graphics and Animations Contours Set Up...
(a) Select Filled in the Options group box.
(b) Decrease Levels to 2.
(c) Select Phases... and Volume fraction in the Contours of drop-down lists.
(d) Select gas in the Phase drop-down list.
(e) Click Display (see Figure 5).
Figure 5 shows a mirrored view across the symmetry boundary. To obtain such
a view, separate the single symmetry zone into two symmetry zones and use one
of these zones to mirror the display.
(f) Separate the symmetry zone into two symmetry zones.
Mesh Separate Faces...
14 c ANSYS, Inc. March 1, 2011
Horizontal Film Boiling
i. Select Region from the Options list.
ii. Select symmetry from the Zones list.
iii. Click Separate and close the separate Separate Face Zones dialog box.
(g) Mirror the view about the symmetry zone.
Graphics and Animations Views...
i. Select symmetry:007 from the Mirror Planes list.
ii. Click Apply and close the Views dialog box.
Figure 5: Contours of Gas Volume Fraction at t = 0.9s
2. Display lled contours of volume fraction of gas after 1100 time steps (t = 1.1s). See
Figure 6.
c ANSYS, Inc. March 1, 2011 15
Horizontal Film Boiling
Figure 6: Contours of Gas Volume Fraction at t = 1.1s
3. Display lled contours of user-dened memory after 1000 time steps (t = 1.0s).
(a) Increase Levels to 9.
(b) Select User Dened Memory... and User Memory 1 in the Contours of drop-down
lists.
(c) Click Display (see Figure 7).
Figure 7: Contours of User-Dened Memory at t = 1.0s
16 c ANSYS, Inc. March 1, 2011
Horizontal Film Boiling
4. Display contours of static temperature after 1000 time steps (t = 1.0s).
(a) Deselect Filled from the Options group box.
(b) Select Temperature... and Static Temperature in the Contours of drop-down lists.
(c) Click Display (see Figure 8).
Figure 8: Contours of Static Temperature at t = 1.0s
5. Display contours of volume fraction of uid after 1000 time steps (t = 1.0s). See
Figure 9.
Figure 9: Contours of Fluid Volume Fraction at t = 1.0s
c ANSYS, Inc. March 1, 2011 17
Horizontal Film Boiling
Results
This problem requires a UDF for implementing mass exchange source terms in mass equa-
tions for each phase (liquid and vapor). It also requires a source term in the energy equation
to account for latent heat transfer.
The general form of the mass source in the vapor phase is:
S
g
=
(q

g
q

l
).
l
L
(1)
Here, q

is the heat ux across the interface per unit area of the interface, the subscripts g
and l refer to vapor and liquid, respectively, and L is the latent heat.
As a rst order approximation, the heat ux dierence is represented as:
(q

g
q

l
) (
l
k
l
+
g
k
g
) T (2)
In this approximation, Equation 1 becomes,
S
g
=
(k
l

l
+ k
g

g
)(T.
l
)
L
(3)
Since there is no internal mass source, mass source for liquid phase becomes:
S

l
= S
g
(4)
Latent heat source for the energy equation becomes:
S
E
= S
g
.L (5)
Interfacial properties include surface tension 0.1 N/m, latent heat 1e
5
J/kg, saturation tem-
perature T
sat
= 500 K. The length scale of the problem is the most dangerous wavelength
of Taylor-Raleigh instability:

0
= 2

3
(
l

g
)g
y

1/2
= 0.0787 m (6)
The velocity scale of the problem is:

g
y

0
= 0.878 m/s (7)
Hence the time scale will be:

0
/g
y
= 0.09 s (8)
18 c ANSYS, Inc. March 1, 2011
Horizontal Film Boiling
The domain horizontal width is
0
/2 and the vertical height is 3
0
/2. The mesh resolution
is 64(hor)x192(ver). The initial shape of the vapor-liquid interface must be perturbed to
initiate bubble growth. Therefore, there is another initialization UDF which lls with gas
all the cells satisfying the following condition:
y 0.00292 + 0.0006 cos(2x/
0
) (9)
Here x(y) is horizontal (vertical) coordinate in meters.
Nusselt number is an important dimensionless group characterizing boiling heat transfer
and is dened as:
Nu =
| q

|
0
k
l
(T
wall
T
sat
)
(10)
Since the time scale of this problem is 0.1s, the time step is 0.001, i.e., 100 time steps
resolution. In all, the problem should run for about 1200 time steps to capture the rst
bubble emission.
Postprocessing the results will show void fraction and temperature proles at 900th and
1100th time steps, corresponding to 0.9 and 1.1 seconds. These times correspond to the
minimum and maximum thickness of the boiling lm at the heated wall. They correspond
to minimum and maximum values of Nusselt number, respectively.
Summary
This tutorial demonstrated the application of the VOF model in a lm boiling regime. Also,
UDFs were used to enhance the standard features of ANSYS FLUENT.
DEFINE ADJUST (area density) is a general purpose macro that can be used to adjust
or modify ANSYS FLUENT variables. In this tutorial, it calculated the dot product
and stored the value in accordance with Equation 3.
For details, see Section 2.2.1, DEFINE ADJUST in ANSYS FLUENT 13.0 UDF Man-
ual.
DEFINE SOURCE (gas) uses UDMI(0) and the user input for L to compute the mass
source term (refer Equation 3) for the gas phase and stores it in UDMI(1). This macro
also computes the energy source (refer Equation 5) and stores it in UDMI(2).
For details, see Section 2.3.22, DEFINE SOURCE in ANSYS FLUENT 13.0 UDF Man-
ual.
DEFINE SOURCE (liquid) assigns UDMI(1) with a negative sign as a liquid mass source
in accordance with Equation 4.
DEFINE SOURCE (energy) assigns UDMI(2) as a latent heat source.
c ANSYS, Inc. March 1, 2011 19
Horizontal Film Boiling
DEFINE INIT (my init function) initializes the gas void fraction in accordance with
Equation 9.
For details, see Section 2.2.8, DEFINE INIT in ANSYS FLUENT 13.0 UDF Manual.
20 c ANSYS, Inc. March 1, 2011

You might also like