Horizontal Film Boiling

Download as pdf or txt
Download as pdf or txt
You are on page 1of 20
At a glance
Powered by AI
This tutorial provides guidelines for setting up and solving film boiling problems using the volume of fluid (VOF) model in ANSYS Fluent.

The problem involves simulating horizontal film boiling over a heated wall using a temperature 10K above saturation.

The volume of fluid (VOF) multiphase model and energy equation are being used. User-defined functions are also written to specify source terms.

Tutorial: Horizontal Film Boiling

Introduction
This tutorial provides guidelines and recommendations for setting up and solving film 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 film boiling.
This tutorial demonstrates how to do the following:
Set up the volume of fluid (VOF) model.
Use user-defined 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 profile
(from Twall to Tsat in the positive Y direction) is patched on the liquid domain.

c ANSYS, Inc. January 17, 2011


Horizontal Film Boiling

Figure 1: Problem Schematic

Setup and Solution


Preparation
1. Copy the files (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 file 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 file (test-2d.msh.gz).
File Read Mesh...
As the mesh file is read, ANSYS FLUENT will report the progress in the console.
2

c ANSYS, Inc. January 17, 2011


Horizontal Film Boiling

Step 2: General Settings


1. Define the solver settings.
General

Transient

2. Check the mesh (see Figure 2).


General Check

Figure 2: Mesh Display

Step 3: Models
1. Define 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

c ANSYS, Inc. January 17, 2011


Energy Edit...

Horizontal Film Boiling

Step 4: Materials
1. Create a new material, liquid.
Materials Create/Edit...

(a) Enter liquid for Name.


(b) Enter 200 kg/m3 for Density.
(c) Enter 400 j/kg-k for Cp (Specific 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.

c ANSYS, Inc. January 17, 2011


Horizontal Film Boiling

2. Similarly, create the material, vapor.


(a) Enter the values given in the following table:
Parameter
Density
Cp (Specific Heat)
Thermal Conductivity
Viscosity

Value
5
200
1
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. Define 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, define 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 Coefficients 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. January 17, 2011


Horizontal Film Boiling

Step 6: User-Defined Function


In this problem, the UDF is used to specify the mass transfer between the phases. Using
UDF, you can define 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 specified as source terms in volume fraction equations and have units of kg-sec/m3 .
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.
Define User-Defined Functions Compiled...

Ensure that the UDF source file (boiling.c) is in the same folder that contains your
case and data files.
(a) Click Add... and select the source file, boiling.c.
(b) Click Build and then click Load to load the library.
2. Define function hooks.
Define User-Defined Function Hooks...

c ANSYS, Inc. January 17, 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-Defined Function Hooks dialog box.
3. Set the Number of User-Defined Memory Locations to 3.
Define User-Defined Memory...
This step is necessary because the UDF uses three UDMs.
Step 7: Cell Zone Conditions
Cell Zone Conditions

fluid

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 fluid 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. January 17, 2011


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.

c ANSYS, Inc. January 17, 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 Backflow Total Temperature.
This prevents gas from entering the outlet and also sets the saturation temperature for the liquid in case reverse flow occurs.
ii. Click OK to close the Pressure Outlet dialog box.
(b) Select fluid from the Phase drop-down list and click Edit....
i. Click Multiphase tab and enter 1 for Backflow 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/s2 .
3. Enable Specified Operating Density and set the Operating Density to 5 kg/m3 .
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. January 17, 2011


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. Define 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. January 17, 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 dropdown lists.
(g) Select heat from Surfaces list.
6. Define 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 fluid from Cell Zones list.
7. Initialize the solution.
Solution Initialization
(a) Initialize with pressure and velocity components at zero.
(b) Enter 1 for the fluid Volume Fraction.
(c) Enter 500 k for the Temperature.
(d) Click Initialize.

c ANSYS, Inc. January 17, 2011


11

Horizontal Film Boiling

8. Define a custom field function for initializing the temperature profile.


Define Custom Field Functions...
(a) Define the custom field 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 profile, 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 fluid 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. January 17, 2011


Horizontal Film Boiling

(c) Select fluid from the Zones to Patch list.


(d) Click Patch and close the Patch dialog box.
10. Enable autosaving of the data file 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 file 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. January 17, 2011


13

Horizontal Film Boiling

Figure 4: Convergence History of Volume Fraction

Step 11: Postprocessing


1. Display filled contours of volume fraction of gas after 900 time steps (t = 0.9s).
To display the contours at t = 0.9s, read the data file 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. January 17, 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 filled contours of volume fraction of gas after 1100 time steps (t = 1.1s). See
Figure 6.

c ANSYS, Inc. January 17, 2011


15

Horizontal Film Boiling

Figure 6: Contours of Gas Volume Fraction at t = 1.1s

3. Display filled contours of user-defined memory after 1000 time steps (t = 1.0s).
(a) Increase Levels to 9.
(b) Select User Defined Memory... and User Memory 1 in the Contours of drop-down
lists.
(c) Click Display (see Figure 7).

Figure 7: Contours of User-Defined Memory at t = 1.0s

16

c ANSYS, Inc. January 17, 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 fluid after 1000 time steps (t = 1.0s). See
Figure 9.

Figure 9: Contours of Fluid Volume Fraction at t = 1.0s

c ANSYS, Inc. January 17, 2011


17

Horizontal Film Boiling

Results
This problem requires a UDF for implementing mass exchange source terms in mass equations 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:
00

00

(qg ql ). 5 1
=
L

S s

(1)

00

Here, q is the heat flux 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 first order approximation, the heat flux difference is represented as:
00

00

(qg ql ) (l kl + g kg ) 5 T

(2)

In this approximation, Equation 1 becomes,


S g =

(kl l + kg g )(5T. 5 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:


SE = Sg .L

(5)

Interfacial properties include surface tension 0.1 N/m, latent heat 1e5 J/kg, saturation temperature Tsat = 500 K. The length scale of the problem is the most dangerous wavelength
of Taylor-Raleigh instability:
3
(l g )gy

0 = 2

!1/2

= 0.0787 m

(6)

The velocity scale of the problem is:


q

gy 0 = 0.878 m/s

(7)

(8)

Hence the time scale will be:


0 /gy = 0.09 s

18

c ANSYS, Inc. January 17, 2011


Horizontal Film Boiling

The domain horizontal width is 0 /2 and the vertical height is 30 /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 fills 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 defined as:
00

Nu =

| q | 0
kl (Twall Tsat )

(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 first
bubble emission.
Postprocessing the results will show void fraction and temperature profiles 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 film 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 film 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 Manual.
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 Manual.
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. January 17, 2011


19

Horizontal Film Boiling

DEFINE INIT (my init function) initializes the gas void fraction in accordance with
Equation 7.
For details, see Section 2.2.8, DEFINE INIT in ANSYS FLUENT 13.0 UDF Manual.

20

c ANSYS, Inc. January 17, 2011

You might also like