Upload
shaheen-s-ratnani
View
239
Download
3
Embed Size (px)
Citation preview
8/13/2019 CFX-Intro 14.5 WS09 Tank-Flush
1/20
2012 ANSYS, Inc. December 17, 2012 1 Release 14.5
14.5 Release
Introduction to ANSYS
CFX
Workshop 09
Tank Flush
8/13/2019 CFX-Intro 14.5 WS09 Tank-Flush
2/20
2012 ANSYS, Inc. December 17, 2012 2 Release 14.5
Workshop Description:
This workshop models a water tank filling and then
emptying through a siphon. The problem is transient and
solved as a two-fluid, multiphase case (air + water).
An initial water level is set in the tank. The water supply is
turned on for the first second of the simulation and then
shut off for the rest of the simulation. The water level rises
until water flows out the U-tube generating a siphoning
effect which effectively empties the tank.
Learning Aims:
This workshop introduces several new skills:
Setting up and post-processing a transient
simulation
Setting up a multiphase simulation
Using ifstatements to initialize physics
Introduction
Introduction Setup Solution Results Summary
8/13/2019 CFX-Intro 14.5 WS09 Tank-Flush
3/20
2012 ANSYS, Inc. December 17, 2012 3 Release 14.5
Mesh Import
1. Start Workbench, add a CFX Component Systemand edit Setup to
start CFX-Pre
2. Right-click on Mesh> Import Mesh > ICEM CFD
3. Set the Mesh Unitsto cm
For some mesh formats it is important to know the units used to generatethe mesh
4. Import the mesh calledflush.cfx5
Introduction Setup Solution Results Summary
8/13/2019 CFX-Intro 14.5 WS09 Tank-Flush
4/20
2012 ANSYS, Inc. December 17, 2012 4 Release 14.5
Define Simulation Type
1. Edit theAnalysis Type object in the Outline tree
2. Set the OptionforAnalysis Type to Transient
3. Set the Total Timeto 2.5 [s]
4. Set the Timestepsto 0.01 [s]and click OK
The simulation will have 250 timesteps
The first step is to change theAnalysis Typeto Transient:
Introduction Setup Solution Results Summary
8/13/2019 CFX-Intro 14.5 WS09 Tank-Flush
5/20
2012 ANSYS, Inc. December 17, 2012 5 Release 14.5
Edit Default Domain
1. Edit Default Domainfrom the Outlinetree
2. Delete Fluid 1 under Fluid and Particle
Definition
3. Click on the New icon
4. Name the new fluidAir
5. Set the MaterialtoAir at 25Cand the
Morphology to Continuous Fluid
6. Create another fluid namedWater
7. Set the Materialto Waterand the Morphology
to Continuous Fluid
Introduction Setup Solution Results Summary
8/13/2019 CFX-Intro 14.5 WS09 Tank-Flush
6/20
2012 ANSYS, Inc. December 17, 2012 6 Release 14.5
Edit Default Domain8. Turn on Buoyancyand set the (X, Y, Z) gravity
components to (0, -g, 0)
Use the expression icon to enter -g( gis a built-in
constant )
9. Set the Buoy. Ref. Densityto 1.185 [kg m^-3]
This is the density ofAir at 25 C. In this simulationthere is a distinct interface between the two fluids,
rather than one being dispersed in the other. For a
free-surface model such as this, the buoyancy
reference density is set to that of the less dense fluid.
The hydrostatic head then appears in the pressure field
of the more dense fluid, which is more natural. Also themomentum source is added to the fluid with the
greater inertia, making the solution more stable.
Search the help for Buoyancy in Multiphase Flow
(including the quotes in the search) for more details.
Introduction Setup Solution Results Summary
8/13/2019 CFX-Intro 14.5 WS09 Tank-Flush
7/20 2012 ANSYS, Inc. December 17, 2012 7 Release 14.5
Edit Default Domain
10. Switch to the Fluid Models tab
11. Under Multiphase enable the HomogeneousModel
This makes the simplifying assumption that bothphases share the same velocity field
12. Set the Free Surface ModelOptionto
Standard
This changes some solver numerics to resolve the freesurface interface better
13. Under Heat Transferenable theHomogeneous Modeltoggle and set theOption to None
14. Set the Turbulence Model Optionto k-Epsilon
Introduction Setup Solution Results Summary
8/13/2019 CFX-Intro 14.5 WS09 Tank-Flush
8/20 2012 ANSYS, Inc. December 17, 2012 8 Release 14.5
Edit Default Domain
15. Switch to the Fluid Pair Models tab
16. Enable the Surface Tension Coefficienttoggle
and set the coefficient to 0.072 [N m^1]
17. Under Surface Tension Forceset the Optionto
Continuum Surface Force
18. Set the Primary Fluidto Water For liquid-gas, free-surface flows the primary
fluid should be the liquid
19. Under Interphase Transferset the Optionto
Free Surface
20. Click OKto complete the changes to the
domain
Introduction Setup Solution Results Summary
8/13/2019 CFX-Intro 14.5 WS09 Tank-Flush
9/20 2012 ANSYS, Inc. December 17, 2012 9 Release 14.5
Create Boundary Conditions
1. Insert a new boundary namedAmbient
2. Set the Boundary Type to Openingand the LocationtoAMBIENT
3. On the Boundary Details tab set the Mass and Momentum Optionto Opening Pres. And Dirnwith a Relative Pressureof 0 [Pa]
4. On the Fluid Values tab set the Volume FractionofAir to 1and the
Volume Fractionof Waterto 0
5. Click OKto create the boundary
Start by creating an Openingboundary at the top of the tank to allow
air to escape as the tank is filled:
Introduction Setup Solution Results Summary
8/13/2019 CFX-Intro 14.5 WS09 Tank-Flush
10/20 2012 ANSYS, Inc. December 17, 2012 10 Release 14.5
Create Boundary Conditions
1. Insert a new boundary named Outletof the Boundary Type,Opening,and
the Locationset to OUTLET
2. In the Boundary Detailsuse Opening Pres. And Dirnwith a RelativePressureof 0 [Pa]
3. In the Fluid Valuesset the Volume FractionofAir to 1and the Volume
Fractionof Waterto 0
4. Click OKto create the boundary
5. Insert a Symmetryboundary named Sym1on the Location SYM1
6. Insert a Symmetryboundary named Sym2on the Location SYM2
Now create the outlet and symmetry boundaries. Since recirculation may occur at
the outlet this boundary will be specified as an Openingto allow flow both into andout of the domain:
Introduction Setup Solution Results Summary
8/13/2019 CFX-Intro 14.5 WS09 Tank-Flush
11/20
2012 ANSYS, Inc. December 17, 2012 11 Release 14.5
Inlet Water Flow Function
1. Right-click on Expressionsin the Outlinetree and select Insert > Expression
2. Enter the NameasflowProfile
3. Enter the Definitionas: if(t
8/13/2019 CFX-Intro 14.5 WS09 Tank-Flush
12/20
2012 ANSYS, Inc. December 17, 2012 12 Release 14.5
Define Expressions
1. Insert the following expressions:
waterHt = 6 [cm] waterVF= if(y-0.01 [m],1,0)* if(x>-0.028 [m],1,0)
waterDen = 998 [kg m^-3]
HydroP = waterDen * g * (waterHt - y) * waterVF
Next you will create expressions to define the initial water height and
hydrostatic pressure field. These expressions must define the correct initialflow field because the transient simulation is started cold (it is not started
from a converged steady-state simulation).
waterHtis the initial height of the water in the tank. waterVFprovides theinitial volume fraction distribution in the tank (see next slide). waterDenis the
density of water. HydroPprovides the initial pressure distribution due to the
hydrostatic pressure of water.
Introduction Setup Solution Results Summary
8/13/2019 CFX-Intro 14.5 WS09 Tank-Flush
13/20
2012 ANSYS, Inc. December 17, 2012 13 Release 14.5
Define Expressions
The expression for waterVFcontains three if()function terms multiplied together. The first
function, if(y -
0.01[m]. The third function returns 1 whenx > -
0.028 [m].
The result is that the volume fraction of water is
equal to 1 only in the shaded area shown to the
right. This defines the initial water volume
fraction.
x = - 0.028
y = waterHt
y = - 0.01
Introduction Setup Solution Results Summary
8/13/2019 CFX-Intro 14.5 WS09 Tank-Flush
14/20
2012 ANSYS, Inc. December 17, 2012 14 Release 14.5
Define Initial Conditions
1. Right-click on Flow Analysis 1in the Outlinetree and select Insert > Global
Initialisation
2. Set all Cartesian Velocities Componentsto 0 [m s^-1]
3. Set the Relative Pressureto the expression HydroP
4. On the Fluid Settingstab set the Volume Fractionfor Waterto the
expression waterVF. Set the Volume FractionforAir to the expression 1 -
waterVF
5. Click OKto set the initial conditions
Now set the initial conditions using these expressions:
Introduction Setup Solution Results Summary
8/13/2019 CFX-Intro 14.5 WS09 Tank-Flush
15/20
2012 ANSYS, Inc. December 17, 2012 15 Release 14.5
Define Transient Results
1. Edit the Output Control object in the Outline tree
2. On the Trn Resultstab create a new Transient Results object, accepting thedefault Name
3. Set the Optionto Selected Variables
This reduces the file size by only writing out selected variables
4. In the Output Variables List, use the icon and the Ctrlkey to pickAir.Volume Fraction, Velocity,and Water.Volume Fraction
5. Under Output Frequency, set the Timestep Intervalto 2and click OK Transient results will be written every second timestep, thus creating a total of
125 Transient Results files
By default results are only written at the end of the simulation. You must
define transient results to view the intermediate solution:
Introduction Setup Solution Results Summary
8/13/2019 CFX-Intro 14.5 WS09 Tank-Flush
16/20
2012 ANSYS, Inc. December 17, 2012 16 Release 14.5
Create Monitor Point
1. Insert a new expression named waterVolwith the Definition set to:volumeInt(Water.Volume Fraction)@Default Domain
This is the volume integral the water volume fraction in the domain
2. Edit the Output Control object in the Outline tree3. On the Monitortab, toggle Monitor Options,insert a new Monitor Point
named Water Volume
4. Set the Optionto Expressionand enter the Expression Valueas waterVol,then click OK
Next create a monitor point to track the volume of water in the domain during
the solution:
Introduction Setup Solution Results Summary
8/13/2019 CFX-Intro 14.5 WS09 Tank-Flush
17/20
2012 ANSYS, Inc. December 17, 2012 17 Release 14.5
Run Solver
1. Close CFX-Pre and save the project as TankFlush.wbpj
2. In the Project Schematic, Editthe Solutionobject to start the CFX-SolverManager
3. Start the run from the CFX-Solver Manager
You can monitor the volume of water in the domain during the simulation on the
User Points tab
The simulation will take about 30 minutes to complete. Therefore results files
have been provided with this workshop
4. After a few timesteps stop your run from the Project Schematic by right-
clicking on the Solutioncell and selecting Interrupt Update
5. Select File > Monitor Finished Runin the CFX-Solver Manager6. Browse to the results file provided with the workshop
Note the shape of the Water Volume curve (User Points) and see that less water is in the
domain at the end of the run than at the beginning
Introduction Setup Solution Results Summary
8/13/2019 CFX-Intro 14.5 WS09 Tank-Flush
18/20
2012 ANSYS, Inc. December 17, 2012 18 Release 14.5
Post-Process Results
1. Using Windows Explorer, locate the
results file supplied, TankFlush_001.res,
and drag it into an empty region of the
Project Schematic
2. A new CFX Solutionand Resultscell will
appear. Double-click on the Results
object to open the file in CFD-Post
Introduction Setup Solution Results Summary
8/13/2019 CFX-Intro 14.5 WS09 Tank-Flush
19/20
2012 ANSYS, Inc. December 17, 2012 19 Release 14.5
Post-Process Results
1. Click on Z-axis to align view and turn on Visibility for
Sym1
2. On the Colortab set the Variable to Water.Volume
Fractionand the Color Mapto White to Blue
3. Use the Timestep Selector to load results from
different points in the simulation
4. With the first Timesteploaded open theAnimationtool
5. Select the Quick Animationtoggle and select
Timestepsas the object to animate
6. Turn off the Repeat Foreverbutton
7. Enable the Save Movie toggle and then click the
Playicon to animate the results and generate an
MPEG
Introduction Setup Solution Results Summary
Note thatAir(white) becomes
entrained in Water(blue)
8/13/2019 CFX-Intro 14.5 WS09 Tank-Flush
20/20
2012 ANSYS, Inc. December 17, 2012 20 Release 14.5
Summary
A tank flush has been simulated using a transient simulation with multiphaseflow. Due to the nature of transient simulations, they tend to take longer to
solve and post-process.
The results show that a significant amount of air became entrained in the water.
As the Homogeneousmultiphase model was used and the fluids shared the
same velocity field, it was not possible for the air to separate out from the water
as a result of buoyancy. In order for this to have happened, the Inhomogeneousmultiphase model would have been required. Each phase would then have had
its own velocity field and the entrained air bubble could have risen relative to the
water.
When running the Inhomogeneousmodel the entrained phase should be set as
a Dispersed Phase in CFX-Pre.
Introduction Setup Solution Results Summary