You are on page 1of 26

Workshop:

Fluid Sloshing in a Tank

14.5 Release

Introduction to ANSYS
Fluent
© 2012 ANSYS, Inc. July 15, 2013 1 Release 14.5
I Introduction
Workshop Description:
The purpose of this tutorial is to provide guidelines for solving fluid
sloshing due to lateral oscillation of the tank.

Learning Objectives:
• Use the VOF multiphase model.
• Use an UDF to specify time-dependent gravity.
• Set up and solve the case using appropriate solver settings.
• Postprocess the resulting data.

Introduction Model Setup Solving Post-Processing Summary


© 2012 ANSYS, Inc. July 15, 2013 2 Release 14.5
Background and Problem Description
• Liquids inside the fuel tank are prone to sloshing due to a range of internal and
gravitational forces that the fluid may experience during acceleration and vehicle
or aircraft movement.
• It is necessary to understand sloshing because it can alter the motion direction in
launch vehicles, cause net force imbalance in fuel storage devices of an aircraft,
and amplify liquid propellant sloshing at microgravity conditions, etc.
• In this workshop, a rectangular tank is 60% filled with liquid water. The tank has
periodic swaying in the x direction, specified by the following time-dependent
gravity.

Introduction Model Setup Solving Post-Processing Summary


3 © 2011 ANSYS, Inc. July 15, 2013 Release 14.0
Computational Domain
The computational domain was created in ANSYS Design Modeler and has the
following dimensions.

Introduction Model Setup Solving Post-Processing Summary


© 2012 ANSYS, Inc. July 15, 2013 4 Release 14.5
Start a Fluent Project (Standalone)
• Launch Fluent from the Start Menu
Start Menu > ANSYS 14.5 > Fluid Dynamics >
Fluent
- Select ‘3D’, Double Precision, Display Mesh After
Reading
- Select the working directory you are using on your
machine (may be different to that shown here)

Introduction Model Setup Solving Post-Processing Summary


© 2012 ANSYS, Inc. July 15, 2013 5 Release 14.5
Mesh
• Read the Fluent mesh file : sloshing.msh (File > Read > Mesh)
• The mesh will be read in and displayed, and the zone names will be shown in the TUI window.

Introduction Model Setup Solving Post-Processing Summary


© 2012 ANSYS, Inc. July 15, 2013 6 Release 14.5
Solver and Models
• Select “General” in the navigation pane and select the transient pressure-based
solver.
• Check "Gravity" box and enter 0, 0, and -9.81 for "Gravitational Acceleration" in
x, y, and z directions.
• Define multiphase model
• Select “Volume of Fluid” from the “Model” list.
• Check “Implicit Body Force” for “Body Force Formulation”
• Click “OK” to close the “Multiphase Model” dialog box.

Introduction Model Setup Solving Post-Processing Summary


© 2012 ANSYS, Inc. July 15, 2013 7 Release 14.5
Materials / Phases
• Materials
• Retain the default settings for air.
• Copy “water-liquid (h2o<l>)” from the database.
• Click “Change/Create” and close the “Create/Edit Materials” dialog box.

• Phases
• Select “air” for primary phase and enter “air” for the “Name”.
• Select “water-liquid” for secondary phase and enter “water-liquid” for the
“Name”.

Introduction Model Setup Solving Post-Processing Summary


© 2012 ANSYS, Inc. July 15, 2013 8 Release 14.5
User Defined Functions
• Add variable-gravity.c in your working folder to “Source Files”.
• Click “Build” to compile the UDF.
• Click “Load” to load the libraries.
• In “User-Defined Functions Hooks” dialog box, add function “gravity-
variable-3d::libudf” for “Adjust” item.

Introduction Model Setup Solving Post-Processing Summary


© 2012 ANSYS, Inc. July 15, 2013 9 Release 14.5
Boundary Conditions / Operating Conditions
• Retain the default setup for “Boundary Conditions”.
• In “Operating Conditions”, enter 504 mm for X, 98 mm for Y, and 300 mm for Z
in the “Reference Pressure Location” group box.
 Set the “Reference Pressure Location” at a point where the fluid will always
be 100% air.
• Check the “Specified Operating Density” box, and enter 1.225 for “Operating
Density”.
• Click “OK” to close the “Operating Conditions” dialog box.

Introduction Model Setup Solving Post-Processing Summary


© 2012 ANSYS, Inc. July 15, 2013 10 Release 14.5
Solution Methods / Solution Controls
• Select “PISO” from the “Scheme” drop-
down list.
• Specify “Neighbor Correction” as 1.
• Select “PRESTO!”, “First Order Upwind”
and “Geo-Reconstruct” from the
“Pressure”, “Momentum”, and “Volume
Fraction” drop-down lists, respectively.
• Check the “Non-Iterative Time
Advancement” box.
• Retain the default solution control
parameters.

Introduction Model Setup Solving Post-Processing Summary


© 2012 ANSYS, Inc. July 15, 2013 11 Release 14.5
Monitors

• Enable the plotting of residuals during the calculation.

Introduction Model Setup Solving Post-Processing Summary


© 2012 ANSYS, Inc. July 15, 2013 12 Release 14.5
Create a Probe Point

• Go to Surface  Point…
• Enter 1008, 98, and 128 mm for x0, y0 and z0, respectively.
• Enter point-pr for the “New Surface” Name.
• Click “Create” and then close the “Point Surface” dialog box.

Introduction Model Setup Solving Post-Processing Summary


© 2012 ANSYS, Inc. July 15, 2013 13 Release 14.5
Create a Surface Monitor
• Go to Monitors  Surface Monitors  Create…
• Select “Area-Weighted Average”, “Pressure…” and “Total Pressure”, and
“mixture” from “Report Type”, “Field Variable”, and “Phase” drop-down lists,
respectively.
• Select point-pr under “Surfaces”.
• Check “Print to Console” and “Plot” boxes under “Options”.
• Check “Write” box and input pressure.out for “File Name”.
• Select “Flow Time”, 1, and “Time Step” from “X Axis” and “Get Date Every” drop
down lists, respectively.

Introduction Model Setup Solving Post-Processing Summary


© 2012 ANSYS, Inc. July 15, 2013 14 Release 14.5
Solution Initialization / Patch
• Select Standard Initialization.
• Retain 0 for Gauge Pressure, X Velocity, Y Velocity, Z Velocity, and Water Volume
Fraction.
• Click Initialize.
• Define a register for the initial liquid region: go to Adapt/Region…, enter 0 for X
Min and 1008 mm for X Max, 0 for Y Min and 196 mm for Y Max, 0 for Z Min and
180 mm for Z Max, and then click “Mark”.
• Patch the initial distribution of water-liquid.
- Click “Patch…” in “Solution Initialzation” panel.
- Select water-liquid from the “Phase” drop-down
list.
- Select “Volume Fraction” from the “Variable” list.
- Select hexahedron-r0 from the “Registers to
Patch” list.
- Enter 1 for the “Value”.
- Click “Patch”.

Introduction Model Setup Solving Post-Processing Summary


© 2012 ANSYS, Inc. July 15, 2013 15 Release 14.5
Calculation Activities
• Autosave the data files every 100 time steps.
• Create a command to ensure the change of gravity in UDF is transferred to the
solver.
- Click “Create/Edit…” under “Execute Commands”.
- Increase “Defined Commands” to 1.
- Specify 1 and “Time Step” from “Every” and “When” drop-down lists,
respectively. Under “Command”, enter (%models-changed).
- Check the “Active” box and click “OK” to exit the “Execute Commands”
dialog box.

Introduction Model Setup Solving Post-Processing Summary


© 2012 ANSYS, Inc. July 15, 2013 16 Release 14.5
Save the Case & Data Files
• Save the initial case and data files (sloshing.cas/dat.gz)
- File > Write Case and Data

Introduction Model Setup Solving Post-Processing Summary


© 2012 ANSYS, Inc. July 15, 2013 17 Release 14.5
Run Calculation

• Enter 2.0e-4 s for “Time Step Size”.


• Enter 400 for “Number of Time Steps”.
• Retain the default selection of “Fixed” in the “Time Stepping Method” list.
• Click “Calculate”.

Introduction Model Setup Solving Post-Processing Summary


© 2012 ANSYS, Inc. July 15, 2013 18 Release 14.5
Post-Processing [Fluent]
• Plot the time-varying total pressure at the probe point.
- Plots  File  Set Up…
- Add pressure.out to “Files”.
- Click “Axes…”, specify the labels for X and Y Axis and “Number Format”.
- Click “Apply”, and then “Close” to exit the “Axes…” dialog box.
- Click “Plot” in the “File XY Plot” dialog box.
- Click the camera icon under the top main menu, and save the plot to a
hardcopy file.

Introduction Model Setup Solving Post-Processing Summary


© 2012 ANSYS, Inc. July 15, 2013 19 Release 14.5
Post-Processing [Fluent]
• Create two iso-surfaces.
- Surface  Iso-Surface
- Select “Phases…” and “Volume fraction”, and “water-liquid” from “Surface of Constant”
and “Phase” drop-drown list, respectively.
- Enter 0 for “Iso-Values”.
- Enter volume-fraction-water-0 for “New Surface Name”.
- Click “Create”.
- Follow the same procedure to create volume-fraction-water-1 (with “Iso-Values” of 1).

Introduction Model Setup Solving Post-Processing Summary


© 2012 ANSYS, Inc. July 15, 2013 20 Release 14.5
Post-Processing [Fluent]
• Read the data file, sloshing-1-00100.dat.
• Go to Graphics and Animations  Mesh  Set Up…
• Check “Faces” under “Options”.
• Select bottom_wall, side_wall, top_wall, volume-fraction-water-0, and volume-fraction-
water-1 under “Surfaces”.
• Click “Display”.

Mesh surface at 20 milliseconds

Introduction Model Setup Solving Post-Processing Summary


© 2012 ANSYS, Inc. July 15, 2013 21 Release 14.5
Post-Processing [Fluent]
• Similarly, display the mesh surfaces after 40, 60, and 80 milliseconds using the
corresponding data files: sloshing-1-00200.dat, sloshing-1-00300.dat, and sloshing-1-
00400, respectively.

Mesh surface at 40 milliseconds

Introduction Model Setup Solving Post-Processing Summary


© 2012 ANSYS, Inc. July 15, 2013 22 Release 14.5
Post-Processing [Fluent]

Mesh surface at 60 milliseconds

Introduction Model Setup Solving Post-Processing Summary


© 2012 ANSYS, Inc. July 15, 2013 23 Release 14.5
Post-Processing [Fluent]

Mesh surface at 80 milliseconds

Introduction Model Setup Solving Post-Processing Summary


© 2012 ANSYS, Inc. July 15, 2013 24 Release 14.5
Summary

• This workshop demonstrated the application of the VOF model for


sloshing simulation.
• The ANSYS FLUENT calculation agreed well with the results published in
the literature [1] using the same scenario.
• Therefore, ANSYS-FLUENT is able to accurately predict the behavior of
fluid sloshing in a tank.

Introduction Model Setup Solving Post-Processing Summary


© 2012 ANSYS, Inc. July 15, 2013 25 Release 14.5
References
1. Vesenjak, Matej, Heiner Müllerschön, Alexander Hummel, and
Zoran Ren. Simulation of fuel sloshing: comparative study. 2004.

© 2012 ANSYS, Inc. July 15, 2013 26 Release 14.5

You might also like