flow 3dv10 1 tutorial
DESCRIPTION
Flow 3D 10.1 Tutorialpart of user manualTRANSCRIPT
-
5/27/2018 FLOW 3Dv10 1 Tutorial
1/42
CHAPTER
THREE
TUTORIAL
3.1 Tutorial Overview
This chapter is intended to familiarize new users with major components of the FLOW-3DGraphical User Interface
(GUI) and to walk through the setup and running of various simulations. A brief section on the Philosophy for
Using CFDis followed by an introduction to theSimulation Filenamesand ways to run simulation files. After those
introductions follows a discussion of how to preprocess and postprocess simulations.
The problems in this chapter are intended to cover the basics of using FLOW-3D. New users are advised to work
through all of the problems and the variations. The tutorial problems were chosen to illustrate a variety of topics and
address a number of questions that might be encountered. This tutorial should be used while you are sitting at your
computer running FLOW-3D.
3.2 Philosophy for Using CFD
Computational Fluid Dynamics (CFD) is a method of simulating a flow process in which standard flow equations such
as the Navier-Stokes and continuity equation are discretized and solved for each computational cell.
Using CFD software is in many ways similar to setting up an experiment. If the experiment is not set up correctly to
simulate a real-life situation, then the results will not reflect the real-life situation. In the same way, if the numerical
model does not accurately represent the real-life situation, then the results will not reflect the real-life situation. The
user must decide what things are important and how they should be represented. It is essential to ask a series of
questions, including:
What do I want to learn from the calculation?
What is the scale and how should the mesh be designed to capture important phenomena?
What kinds of boundary conditions best represent the actual physical situation? What kinds of fluids should be used?
What fluid properties are important for this problem?
What other physical phenomena are important?
What should the initial fluid state be?
What system of units should be used?
It is important to ensure that the problem being modeled represents the actual physical situation as closely as possible.
We recommend that users try to break down their complex simulation efforts into digestible pieces. Start with a
relatively simple, easily understandable model of your process and work it through before moving on to add more
complicating physical effects on an incremental basis. Simple hand calculations (Bernoullis equation, energy balance,
37
-
5/27/2018 FLOW 3Dv10 1 Tutorial
2/42
Chapter 3. Tutorial FLOW-3D Documentation, Release 10.1.0
wave speed propagation, boundary layer growth, etc.) can give the user confidence that the model is set up correctly
and that the program is running accurately.
3.3 Simulation Filenames
The FLOW-3D input or simulation file is generally called prepin.ext where ext can be any character string
which allows you to easily identify the input file. Theprepin file contains all of the information necessary to describe
a unique FLOW-3D simulation.
The default name for the simulation input file is prepin.inp. When the prepin file has this default name, all
output files will have the suffix .dat. When you give the prepinfile an extension different than .inp,, as when
you name the simulation in the GUI, then all of the output files will have the same extension as the input file, allowing
you to keep track of which output files and input file go together.
The main output file that contains solution results that are saved at various times during the simulation is called
flsgrf. Users should be careful not to delete prepin and flsgrf files. Plots can be generated from any flsgrffile at any time during or after a simulation.
For a restart simulation, the flsgrffile from a previous run must be available for data initialization in the solver.
Note: Starting from a prepin file similar to the problem you intend to model can greatly simplify setup and
is recommended whenever possible. Just open an existing input file and then save it to another directory and start
working.
The prepin file for a simulation can be recovered from its flsgrf file. The prepin file is written at the end of the
fileg_flsgrfwhich is created after the flsgrfis processed by the postprocessor or opened in the GUIs Analyze
tab.
3.4 Setting up Simulations
There are two ways to create simulations: (1) using the graphical user interface (GUI) and (2) manually by editing
theprepinfile. If you are curious about the contents of the prepinfile, refer to the Input Variable Summary and
Units, which contains a general description of the prepin file and its variables. Most FLOW-3D variables have
default values, so not all variables used by the simulation need to be specified in the file. These tutorials will focus on
using the GUI to create and edit simulations.
3.5 Tutorial - Running an Example Problem
In this exercise, you will learn how to create a new workspace and add an existing project file from the Examples
directory. The example problem represents flow over a sharp-crested weir. You will learn how to view the setup,
run the simulation, and then visualize the simulation results. Finally you will create a simulation copy and perform a
restart. Along the way, other methods you can use to create simulations and view results will also be described.
Numbered items are instructions to follow to complete the tutorial.
3.5.1 Using the FLOW-3DGraphical User Interface
This section shows how to use the GUI to open a simulation file and execute FLOW-3D.
3.3. Simulation Filenames 38
-
5/27/2018 FLOW 3Dv10 1 Tutorial
3/42
Chapter 3. Tutorial FLOW-3D Documentation, Release 10.1.0
3.5.2 Starting theFLOW-3DGraphical User Interface
To start the GUI on a Windows machine, click on the FLOW-3D icon on the desktop or find FLOW-3D in the program
listing in the Startmenu. To start the GUI on a Linux machine, type, flow3d at the command prompt and hit theEnterkey. The picture below shows the opening screen ofFLOW-3D.
1. Launch FLOW-3D by double-clicking the FLOW-3D icon on your desktop.
At the very top of the GUI is a Menu Bar which includes the following menu headings: File, Diagnostics,
Preference, Physics, Utilities, Simulate, Materialsand Help. Below the menu bar is a row of tabs: Simulation
Manager, Model Setup,Analyze, and Display. Each of these tabs corresponds to specific steps in a FLOW-3D
simulation.
When FLOW-3Dis opened, the Simulation Manager tab is presented. This is where the user can create, save,
copy, delete, and queue simulations to run. This tab also displays useful information on simulations that arerunning or have been previously run.
Simulations are grouped intoWorkspaces, which are like folders and may represent individual projects or users
of the program. For example, simulations related to the same design project can be organized into one workspace
for ease of their setup. All simulations in a workspace can be run sequentially at a click of the mouse.
3.5.3 Create a Workspace and Add an Example Simulation
Create a New Workspace
When FLOW-3D is opened, a default workspace is automatically created.
3.5. Tutorial - Running an Example Problem 39
-
5/27/2018 FLOW 3Dv10 1 Tutorial
4/42
Chapter 3. Tutorial FLOW-3D Documentation, Release 10.1.0
1. On theSimulation Managertab, create a new workspace by selectingFile New Workspace.
2. Enter a name for your workspace. Type in Hydraulics Examples. It is recommended that the Create subdi-
rectory using workspace namecheckbox be selected so that all the files associated with this project are in their
own directory. ClickOKto create the workspace.
Add the Flow Over a WeirExample Simulation
1. Your FLOW-3D installation includes several dozen pre-built simulations, called Examples. Add one to this
workspace by selecting File Add Examplefrom the menu bar. The dialog below will appear. Select Flow
Over a Weir from the list. Select the Open button to import the project and click OK to accept the default
creation options.
More Ways to Manage Simulations in Workspaces
New or existing simulations can be added to a highlighted workspace containing other simulation using the Filemenu.
To start a simulation from scratch, go to File Add New Simulation. To work with an existing simulation (an already-
created prepin file and associated geometry files), selectAdd Existing Simulationinstead. A simulation can be removed
from the workspace by selecting the simulation and pressing the Deletekey or selecting Remove Simulationfrom the
Filemenu at the top or the pop-up menu that appears by right-clicking a simulation.
3.5. Tutorial - Running an Example Problem 40
-
5/27/2018 FLOW 3Dv10 1 Tutorial
5/42
Chapter 3. Tutorial FLOW-3D Documentation, Release 10.1.0
Note: Although it is possible to locate and open files located on other machines on the network, the user will not be
able to run them with FLOW-3D on their own machine. To run a simulation that has been set up on another machine,
the user must first copy the input file and any associated geometry files to the local hard disk.
3.5.4 Examine the Simulation
Whether starting a new simulation or modifying an existing one, all of the selections or entries the user needs to make
are executed in the Model Setup tab. The selections made in the Model Setup tab are recorded in an input file called
theprepinfile, which drives the FLOW-3D solver.
When a simulation is selected in Simulation Manager, theModel Setuptab becomes active. The Model Setuptab has
another row of tabs corresponding to various input sections for a FLOW-3D simulation.
1. SelectFlow Over A Weirby clicking on it.
2. SelectModel Setup Meshing & Geometrytab.
Mouse Modes and Display Functions in the Meshing & Geometry Tab
Mouse Modes
Familiarize yourself with the three functions of the mouse buttons:
1. Left-button Rotate: Click and hold the left-mouse button and move the mouse in the Meshing & Geometry
window. The model will rotate accordingly.
2. Middle-button Zoom: Click and hold the middle-mouse button while moving the mouse vertically in the
window. Moving the mouse toward the top of the screen zooms in and moving the mouse downward zooms out.
3. Right-button Move: Click and hold the right-mouse button and move the mouse in the window. The model
will move with the mouse.
Display Functions
Global Transparency
1. The Transparency slider in the toolbar controls the transparency of ALL objects in theMeshing & Geometry
display window. Move the slider from left to right and you will observe that the weir structure becomes more
transparent as you continue to move the slider to the right. Later you will learn how to select transparency for
individual objects in the display.
3.5. Tutorial - Running an Example Problem 41
-
5/27/2018 FLOW 3Dv10 1 Tutorial
6/42
Chapter 3. Tutorial FLOW-3D Documentation, Release 10.1.0
View Model Along Axes
1. Due to the complexity of three dimensional simulations, it is often necessary to view objects in 2-D. This can
be accomplished by selecting one of the axes from the toolbar: Select the +X icon to position the view so that
the geometry is viewed along the X-axis, looking toward the negative X pole. The icon now changes to -X.
2. Click the same icon (now -X) to change the view to the opposite pole, looking along the X-axis in the positive
direction.
Mesh Viewing Options
1. Click theMeshmenu item at the top of the display (above the simple geometric shapes toolbar).
2. Make sure theShowoption is checked so the mesh is displayed.
3. To display only the outline of the mesh (domain extents), selectMesh View Mode Outline. This view is
shown at lower right.
4. To display all user-specified gridlines (but not automatically generated gridlines), selectMesh View mode
Mesh Planes.
5. Finally, display all the gridlines in the mesh by selectingMesh View Mode Grid Lines.
Assessing Mesh Resolution
One of the most important aspects of simulation setup is choosing an appropriate computational mesh. If the mesh
is too coarse, portions of the geometry may not be resolved and the simulation will not represent the actual problem.
If the mesh is too fine, the runtime may be unnecessarily long. The goal of mesh setup is to use just enough cells to
resolve the geometry and the flow features of interest.
There are two ways of judging how well a computational mesh resolves the geometry. One way is to run the prepro-
cessor but this can be time-consuming. A quicker way is to FAVORizethe geometry. FAVORizeembeds the geometry
in the current computational mesh and displays the result in the Displaywindow. The resulting geometry is called the
FAVORized geometry.
3.5. Tutorial - Running an Example Problem 42
-
5/27/2018 FLOW 3Dv10 1 Tutorial
7/42
Chapter 3. Tutorial FLOW-3D Documentation, Release 10.1.0
1. Click theFAVORizeicon ( ) in theMeshing & Geometrywindow toolbar. TheFAVORdialog will appear.
2. To display the solid geometry, select theSolidradio button.
3. ClickRenderto display the solid geometry as in the image below.
The image above on the right shows the weir structure. The sharp crest of the weir is visible and it appears to be
adequately resolved. In later exercises you will use theFAVORizefunction to evaluate mesh resolution.
4. SelectReturn to Model Building.
Additional methods of checking the mesh resolution should also be used. In particular, the tri-directional aspect ratio
of individual cells and the uni-directional aspect ratio between neighboring cells should be examined, especially when
multiple mesh blocks are used. These checks are described in the application-specific tutorials.
3.5.5 Preprocess the Simulation
Portions of the geometry may be hidden from view in simulations with complex geometries and may require moreinformation than what is provided by FAVORize in order to be assessed. For example, if there were some internal
structure within the weir, 2-D plots would be required to assess mesh resolution. Preprocessing a simulation generates
more information than FAVORize and allows a user to determine essential information such as adequacy of mesh
resolution.
ThePreprocess Simulationcommand runs the preprocessor in the preview mode. It verifies the problem specifications,
creates the grid and geometry, and produces both printed and plotted output. Running the preprocessor helps to ensure
that the problem is set up correctly before the solver is run, which can save time. The user can examine the preprocessor
output files in theDiagnosticsmenu and visualize the geometry and initial conditions by loading the prpgrf file into
theAnalyzetab. These steps are described below.
1. SelectSimulate Preprocess Simulationfrom the menu bar.
3.5. Tutorial - Running an Example Problem 43
-
5/27/2018 FLOW 3Dv10 1 Tutorial
8/42
Chapter 3. Tutorial FLOW-3D Documentation, Release 10.1.0
2. If you are prompted toSave, selectYes.
3. Switch to the Simulation Manager tab. TheFlow Over A Weirsimulation has been added to the Simulation
Queues pane. It will have a clock-like icon: . Scroll over the icon to display a note indicating that it isrunning and connected. Once the solver begins to preprocess the simulation, a status bar will fill above the
dashboard and the clock icon will also fill. It should complete (100%) within a few seconds. The next step is to
display the preprocessor results.
3.5.6 Display the Preprocessed Results in 3-D and 2-D
The preprocessor generates a results file named prpgrf.***. In this case, the project extension is Flow Over A
Weir.
1. To display the results contained in theprpgrf.Flow_Over_A_Weirfile, select theAnalyzetab.
2. If another results file is already loaded, you will see theAnalyzetab. Select theOpen Results Filebutton. If no
other results file is loaded, FLOW-3D will take you directly to theFLOW-3D Resultsdialog described below.
3. Select the Customradio button to display the full output files generated by the solver and select how you want
to visualize the data.
4. Select prpgrf.Flow_Over_A_Weirfrom the dialog box, followed byOK. TheAnalyzetab is now displayed.
Although the full capabilities of the Analyzepanel are available, typically only 2-D and 3-D plots are necessary
to validate the model setup. First, you will generate the same display that was generated by the FAVORize
function.
5. Select theAnalyze 3-Dsub-tab.
3.5. Tutorial - Running an Example Problem 44
-
5/27/2018 FLOW 3Dv10 1 Tutorial
9/42
Chapter 3. Tutorial FLOW-3D Documentation, Release 10.1.0
6. On the3-D tab, select Complement of Volume Fractionin the Iso-surfacedropdown and select Nonefrom the
Color Variabledropdown.
7. SelectRender. You will see the same image in the Displaywindow as you saw in the FAVORizedisplay. A 3-D
display ofComplement of Volume Fractionshows the same image as you saw when you FAVORized.
The next step will be to generate 2-D plots with the mesh overlayed. The object will be to generate a 2-D display
of pressure in the X-Z plane at Y = 0.
8. Select theAnalyze 2-Dsub-tab.
9. Choose theX-Zradio button.
10. Move bothY-directionlimits sliders to the left-most position (J = 2, Y = 0.25).
11. Select theMeshcheckbox to overlay the mesh on the results.
12. ClickRenderto generate the graphics. You will see the image shown below.
3.5. Tutorial - Running an Example Problem 45
-
5/27/2018 FLOW 3Dv10 1 Tutorial
10/42
Chapter 3. Tutorial FLOW-3D Documentation, Release 10.1.0
This is the fluid and solid configuration at the first simulation time step, looking at the cell centers of the X-Z planeat Cartesian Y = 0 (this location is the the minimum Y-extent of the domain, which is the centerline of the weir). The
sharp crest of the weir can be seen indicating the mesh resolution is probably adequate for resolving the geometry
features of interest.
The initial fluid configuration is also shown. The initial velocity is shown, with the maximum vector value in the upper
right. The units of the vector are length/time in whatever consistent units the simulation is set up in. Pressure is shown
in this plot, also in units of mass/length/time2. In the next section, you will check which unit system is being used.
This plot, and others like it, allow the user to determine the correctness of the setup before running the simulation. If
other flow quantities such as density or scalar concentration were initialized, they could be checked here as well by
selecting them in the Contour Variabledropdown list.
3.5.7 Modify the SimulationBefore running the simulation, you want to:
Check theSimulation Units(to allow output unit labels)
RequestHydraulic Data(to record additional data of interest)
SpecifySelected Dataoutput (to record some data more frequently than by default)
Check the Simulation Units
1. Select theModel Setup General tab. On the right-hand side of theGeneral tab you will see a group box
namedUnits.
3.5. Tutorial - Running an Example Problem 46
-
5/27/2018 FLOW 3Dv10 1 Tutorial
11/42
Chapter 3. Tutorial FLOW-3D Documentation, Release 10.1.0
2. Note thatCGSis selected in the dropdown box. This means that the geometry and fluid unit of length is the cm,
the unit of mass is the gram, and the unit of time is the second.
Any unit system is acceptable, but the imported geometry must have matching units of length, and the
length/mass/time units must be the same for all geometric and fluid properties (such as density, dynamic vis-
cosity, etc.) Temperature is not selected because there is no thermal calculation in this model. Any temperature
units may be used, as long as they are also uniformly applied to all model parameters.
Request Hydraulic Data
1. Select theModel Setup Outputtab.
2. In theAdditional Outputsection, select the checkbox for Hydraulic Dataas shown below. This will cause the
fluid elevation, fluid depth, Froude number, and depth-averaged velocity to be computed and stored in the results
file.
Additional Outputdata will not be computed unless it is selected on the Outputtab before running the simulation
because it is secondary data (derived from other primary quantities).
Specify Selected Data Output
Selected datais data chosen by the user to be output more frequently than Restart data. Selected datais output at
default intervals of 1/100th of the simulation time and includes only variables of interest whereas Restart data is
output at default intervals of 1/10th of the simulation time and includes all variables necessary to solve the fluid flow
equations.Selected datais useful for creating smooth animations without making excessively large output files.
1. On theOutputtab, select the following data: Fluid Fraction,Fluid Velocities,Hydraulic data, andPressureas
shown below.
3.5. Tutorial - Running an Example Problem 47
-
5/27/2018 FLOW 3Dv10 1 Tutorial
12/42
Chapter 3. Tutorial FLOW-3D Documentation, Release 10.1.0
Selected data output should be chosen with care since only the specified variables will be written more frequently
to the results file during the simulation. If you determine later that you need a variable which was not specified
in theSelected Datalist, the simulation will need to be re-run with this output specified.
3.5.8 Run the Simulation
There are two ways to run FLOW-3D: (1) from the graphical user interface (GUI) and (2) from the command line.
Either option launches the solver program called hydr3d.exe. Launching the solver from the command line may
be useful during debugging and in other special cases. This example will launch the solver from the GUI, which is the
typical usage.
See Also:
Running FLOW-3D from the Command Line
The menu selections for running simulations are located in the Simulatemenu at the top of the GUI window:
1. Start the simulation by selectingSimulate Run Simulationfrom top menu bar.
2. The simulation must be saved before running, so selectYeswhen prompted to save.
3. Switch to theSimulation Managertab.
The right side of theSimulation Managertab can be thought of as a dashboard for the simulation. The efficiency
and accuracy of the simulation are indicated by the runtime diagnostics plots and the runtime messages. This
space also allows the user to interact with the solver while it runs.
TheTerminateicon: orSimulate Terminate Simulation...from the top menu will shut down the prepro-
cessor or solver. When the solver is terminated, it will write a final data plot to the output file before shutting
down.
4. SelectPreference Show Simulation Text in Navigatorfrom the top menu. The status of a FLOW-3D simula-
tion, as well as any warning or error messages generated, will appear in theRuntime Messageswindow below
the plot.
3.5. Tutorial - Running an Example Problem 48
-
5/27/2018 FLOW 3Dv10 1 Tutorial
13/42
Chapter 3. Tutorial FLOW-3D Documentation, Release 10.1.0
5. Familiarize yourself with the various runtime diagnostic plots available in the drop-down list above the plot.
Each selection shows a different graph.
Stability limit & dt: Provides a comparison of the time step stability limit (largest time step allowable) and dt, the
actual time step being used. Ideally the time step dt is the same as the stability limit but it may be smaller due to
various factors such as excessive pressure iteration or splashing.
Time-step size: The solver time step.
Epsi & max residual: Epsi represents the pressure iteration convergence criteria. The max residual represents the
actual value of the criteria after the pressure iteration has either converged or the iteration count has reached the
maximum allowable value. If a pressure iteration failure occurs, the max residual plot will be above the Epsi plot.
Pressure iteration count: The number of pressure iterations. Low values indicate good pressure convergence. Dif-ferent pressure solvers have different values that may be considered high.
Fill fraction: The total volume of fluid divided by the total open (non-solid) volume in the domain. A near-constant
value is one indication that the flow is nearly steady.
Conv. volume error (% lost): Represents the amount of fluid gained (negative value) or lost (positive value) due to
advection errors. Typically much less than 1%, values larger than 1%-3% may indicate problems with the simulation,
particularly with mesh aspect ratio, excessive fluid break-up, or rapid solid (moving object) motion.
Volume of fluid 1: The fluid volume within the domain over time. Indicates if the domain is filling or draining, and
can be used to estimate if a simulation has reached steady state.
Fluid 1 surface area: The free-surface area of Fluid #1 is the domain. Scattered values indicate sloshing, waves,
droplets, or filling/draining.
3.5. Tutorial - Running an Example Problem 49
-
5/27/2018 FLOW 3Dv10 1 Tutorial
14/42
Chapter 3. Tutorial FLOW-3D Documentation, Release 10.1.0
Mass-avg mean kinetic energy: Provides a measure of the average mean kinetic energy of flow. This is a good
indicator of the steadiness of the flow.
Particle count: The number of Lagrangian particles in the domain, if present. In this example, particles are used to
visualize flow paths, and are not re-generated at the inlet, so the total number of particles decreases over time.
3.5.9 Introduction to Results Analysis
The graphical results of a simulation can be viewed while the simulation is running or after the simulation is complete.
It is often useful to visualize the 2-D and 3-D results while a simulation is running to check that it is running correctly.
View Existing Plots
1. Click on theAnalyze tab. A message appears indicating that the prpgrffile no longer exists. Theprpgrf
file, which was generated during the Preprocess phase, is deleted when the simulation is run. SelectContinue
and theFLOW-3D Resultsdialog will be presented.
If no message appears (theAnalyzetab opens), select Load Results Fileto open the same dialog.
2. Select theExistingradio button. Two types of files will be shown in the data file path box, if they exist. Files
with the name prpplt.* contain plots created automatically by the preprocessor, while files with the name
flsplt.*contain plots automatically created by the postprocessor as well as plots pre-specified in the input
file.
3. Selectflsplt.Flow_Over_A_Weirand clickOK. This will cause theDisplaytab to open automatically.
4. A list of available plots appears at the right. A particular plot may be viewed by clicking on the name of that
plot in the list. Select plot26.
3.5. Tutorial - Running an Example Problem 50
-
5/27/2018 FLOW 3Dv10 1 Tutorial
15/42
Chapter 3. Tutorial FLOW-3D Documentation, Release 10.1.0
Viewing Custom Plots
1. Click on theAnalyze tab. A message appears indicating that the prpgrffile no longer exists. Theprpgrf
file, which was generated during the Preprocess phase, is deleted when the simulation is run. SelectContinue
and theFLOW-3D Resultsdialog will be presented.
If no message appears (theAnalyzetab opens), select Load Results Fileto open the same dialog.
2. Select theCustomradio button to see full output files. Full output files include prpgrf.* files and flsgrf.*files. Since the simulation has been run, the preprocessor output file has been deleted and incorporated into the
flsgrffile.
3. Select theflsgrf.Flow_Over_A_Weirfile in the dialog and clickOK.
3.5. Tutorial - Running an Example Problem 51
-
5/27/2018 FLOW 3Dv10 1 Tutorial
16/42
Chapter 3. Tutorial FLOW-3D Documentation, Release 10.1.0
TheAnalyzetab will now be displayed. There are many ways to visualize the results of the simulation. The available
plot types are:
Custom: Can be used to write an output file using the output codes in the Customized Postprocessingsection of this
manual.
Probe: Displays output data for individual computational cells, boundaries, components, and domain-wide (global)
parameters.
1-D: Cell data can be viewed along a line of cells in the X, Y, or Z direction. Plot limits can be applied both spatially
and in time.
2-D: Cell data can be viewed in X-Y, Y-Z, or X-Z planes. Plot limits can be applied both spatially and in time. Velocity
vectors and particles can be added.
3-D: Surface plots of both fluid and solid can be generated and colored by cell data. Additional information such as
velocity vectors, particles (if present), and streamlines can be added. Plot limits can be applied both spatially and in
time.
Text Output: Restart, Selected, and Solidification data can be written to text files.
Neutral File: Restart and Selected Data can be output for user-specified interpolation points.
FSI TSE: Output specific to the finite-element fluid/solid interaction and thermal-stress evolution physics package,
not used in this example.
Data Sources
Once a plot type has been selected, the next step is to choose the data source. There are six sources of data in FLOW-
3D:
Restart: All flow variables. Default output frequency = 1/10th of the simulation time.
Selected: Only user selected flow variables. Default output frequency = 1/100th of the simulation time.
General History: Time-dependent data such as time step and kinetic energy. Default output frequency = 1/100th of
the simulation time.
Mesh Dependent: Variables (such as flow rate) computed or specified at boundary conditions.
3.5. Tutorial - Running an Example Problem 52
-
5/27/2018 FLOW 3Dv10 1 Tutorial
17/42
Chapter 3. Tutorial FLOW-3D Documentation, Release 10.1.0
Solidification: Only available if the solidification model is active.
FSI TSE: Additional output options for deformable solids.
Examples of some of the available plot types will be generated in the next section.
3.5.10 Introduction to Custom 3-D Graphic Output
1. Select theAnalyze 3-Dtab.
2. SelectIso-surface = Fraction of fluid. This is the variable that is used to draw a surface. The surface is drawn
through all cells that meet the Contour Valuecriteria for the selected Iso-surfacevariable. Fraction of fluid is
the default, and will show the fluid surface.
3. SelectColor variable = pressure. This selection determines which variable is used to color the iso-surface (in
this case, the fluid surface will be drawn colored by pressure).
4. Select Component iso-surface overlay = Solid volume. Solid Volumewill display the solid components along
with the fluid. In a previous step, you did this by selecting Complement of volume fractionas the iso-surface,
but this option allows simultaneous plotting of both the fluid and solid surface.
5. Move theTime framesliders to the min and max positions (0 to 1.25 seconds).
6. Click theRenderbutton to switch to the Displaytab and generate a series of 11 plots between t = 0.0 and 1.25
seconds which show the weir structure along with fluid surfaces colored by pressure. There are 11 plots because
Restart datawas selected.
7. The available plots are listed in theAvailable Time Frameslist. ClickNextto step between the time frames, or
double-click a time frame to display it. The first and last time frames should look like the following:
3.5. Tutorial - Running an Example Problem 53
-
5/27/2018 FLOW 3Dv10 1 Tutorial
18/42
Chapter 3. Tutorial FLOW-3D Documentation, Release 10.1.0
8. Return to theAnalyze 3-D taband choose theSelected dataradio button from the Data Sourcegroup.
9. Notice that both sliders in theTime Frame selector are at the right now so that only the last time frame will be
generated. This is done automatically by the interface when Selected datais chosen since there are many time
frames available and it could take a long time to render them. Move the left-hand slider toTime Frame Min = 0
to render all available time frames.
10. Click theRenderbutton. Within a few seconds the view will switch to the Displaywindow and 101 plots will
be listed in theAvailable Time Frameslist. ClickNextrepeatedly to step between the time frames.
3.5.11 Show Symmetric Flow
Since the simulation was set up with a symmetry plane down the center of the weir, only half of the weir structure is
being simulated and displayed. For presentation purposes, it is often more useful to show both halves of a symmetricmodel.
1. Go back to theAnalyze 3-Dtab and select theOpen Symmetry Boundariescheckbox, as shown below.
3.5. Tutorial - Running an Example Problem 54
-
5/27/2018 FLOW 3Dv10 1 Tutorial
19/42
Chapter 3. Tutorial FLOW-3D Documentation, Release 10.1.0
2. ClickRender. The fluid surface should now appear open at the symmetry boundary on the Displaytab.
3. SelectTools Symmetryfrom the toolbar menu above the display.
4. Select theY directioncheckbox in the dialog to mirror the results across the Y = 0 plane.
5. SelectApplyand Close.
6. Select the final time frame. The display shows a full weir structure as shown below.
3.5. Tutorial - Running an Example Problem 55
-
5/27/2018 FLOW 3Dv10 1 Tutorial
20/42
Chapter 3. Tutorial FLOW-3D Documentation, Release 10.1.0
3.5.12 Create a 3-D Animation
The next step will be to create an animation of the 3-D fluid surface. Animations are movies created from the frames
in theAvailable Time Frameslist. To improve the visual effect of animations, it is recommended that a common colorscale be applied to all frames.
1. Return to theAnalyze 3-Dtab.
2. Select bothGlobalradio buttons in the Contour Limitsgroup box.
3. ClickRenderto re-draw and return to the Displaytab.
4. Repeat your selection ofTools Symmetry Y direction Applyto mirror the results across the Y = 0 plane.
5. SelectTools Animation Rubberband Captureas shown below, and select OKafter reading the message
that appears.
6. Click and hold the left mouse button while dragging to select the portion of the screen to animate. A selection
box will appear around the region you selected.
3.5. Tutorial - Running an Example Problem 56
-
5/27/2018 FLOW 3Dv10 1 Tutorial
21/42
Chapter 3. Tutorial FLOW-3D Documentation, Release 10.1.0
7. Select theCapturebutton. A dialog will appear to start the animation.
8. The default name for animations isout.avi. A more descriptive name is recommended as shown below.
9. The default frame rate is 10 frames per second. This simulation has a finish time of 1.25 seconds, and 100 plots
at regular time intervals, so the real-world rate is 80 frames/second. This might be too fast, so enter 5 instead
and pressOK.
Each time frame will be rendered to the Display window and bitmap files will be written in the simulation
directory. Once this process is complete, the following dialog will appear.
3.5. Tutorial - Running an Example Problem 57
-
5/27/2018 FLOW 3Dv10 1 Tutorial
22/42
Chapter 3. Tutorial FLOW-3D Documentation, Release 10.1.0
10. Click theOKbutton to begin the next step of the process.
11. The default compression for animations is uncompressed. This is not recommended for most animations since
the file size can be too large to load in a viewer. Select Microsoft Video 1 if using Windows, or Cinepak if
using Linux. The selection here depends on what video codecs your computer has available, and what will be
available on the machines you use to display the video.
12. Unselect theData Ratecheckbox so that the quality of animations is not limited by the data rate.
13. Click OK to begin the compression process. When the compression is complete, the following dialog will
appear.
14. ClickOK. The animation process is now complete.
15. The fasted way to find the .avi file inWindows Exploreris to select theSimulation Managertab and click on the
link labeledSimulation Input File.
16. Play the animation by double clicking on the .avi file.
3.5.13 Introduction to Custom 2-D Graphic Output
1. Select the theAnalyze 2-Dtab.
The most useful plane to view results for this simulation is the X-Z plane at the weir centerline, which is located
at the plane Y = 0.0.
2. Choose theX-Z planeradio button.
3. Drag bothY limit sliderstoY = 0.25(the cell center y-coordinate closest to Y = 0.0). You will also note that the
same location is identified as J = 2, indicating that the cell in question is the second in the domain. The first cell
is outside of the mesh, and is used for computing boundary condition properties.
The default selection for contour variable is pressure and plain velocity vectors are selected by default. The solid
geometry is displayed automatically with all 2-D plots, so it does not need to be activated like in 3-D plotting.
3.5. Tutorial - Running an Example Problem 58
-
5/27/2018 FLOW 3Dv10 1 Tutorial
23/42
Chapter 3. Tutorial FLOW-3D Documentation, Release 10.1.0
4. ClickVector Optionsand enter X = 2 and Z = 2. Vectors will now be plotted every other cell. SelectOK to
accept the vector options.
5. ClickRender to generate a time sequence of 2-D plots of pressure in the Y = 0 plane. Graphics similar to
following will appear, where T = 0.0 seconds (left); T = 0.125 seconds (middle); and T = 1.25 seconds (right).
6. Select theFormatbutton in the upper right-hand corner of theDisplayscreen.
7. Experiment with the various options such as changing line colors, vector lengths and arrowhead sizes. Select
Applyto see your changes. When you are done, select Resetand OKto return to the default settings and close
the dialog. If there is a set of options you prefer for all plots, you may save them by selecting the Savebutton.
3.5. Tutorial - Running an Example Problem 59
-
5/27/2018 FLOW 3Dv10 1 Tutorial
24/42
Chapter 3. Tutorial FLOW-3D Documentation, Release 10.1.0
3.5.14 Introduction to Custom 1-D Graphic Output
1. Select the the Analyze 1-D tab. This tab allows line-chart plots of calculated (spatially-varying) quantities
such as pressure, fluid depth, fluid elevation, and velocity along a row of cells at one or more plot times.
2. PickSelectedas the Data Source. The available variables now show only those selected for more frequent
plotting.
3. Selectfree surface elevationas theData Variable. Hydraulic datais available since it was selected on theOutput
tab.
4. SelectX-directionbecause the flow direction in this simulation is primarily parallel to the x-axis.
5. Move the Y-directionslider to 0.25 (J = 2) so that the cells nearest the flow centerline in the Y-direction are
displayed.
6. By default the entire X range will be displayed. You may move theX-directionsliders if you wish to limit the
extents of the plot. The location of the Z-directionslider will not matter since only one free-surface elevation
is recorded for each column of z-cells in a given x,y location. TheTime framesliders should be at0 and 1.25
seconds.
7. ClickRender. A series plots from t = 0.0 to t = 1.25s will be listed in the plot list on theDisplay tab. There
3.5. Tutorial - Running an Example Problem 60
-
5/27/2018 FLOW 3Dv10 1 Tutorial
25/42
Chapter 3. Tutorial FLOW-3D Documentation, Release 10.1.0
are a number of modes in which to view these plots. The default mode is the Single modeand is shown in the
dropdown box below theFormatbutton.
8. To compare plots of fluid surface elevation at various times, select theOverlay modefrom the dropdown box.
9. Click to select plots1, 13, and 101 in the right-hand pane. The plot names also show the times at which they
were recorded: (t = 0.0, 0.15s, and 1.25 s). The output appears as shown below.
10. To save this plot to a bitmap or Postscript file, select theOutputbutton.
11. Check thePlots on Screencheckbox to capture the overlay plot (and make only a single output file).
12. Select theWritebutton to create the image file.
13. The resulting image file will be located in the simulation directory (remember how to find this from the Simula-
tion Managertab) and will be named plots_on_screen.bmp.
3.5. Tutorial - Running an Example Problem 61
-
5/27/2018 FLOW 3Dv10 1 Tutorial
26/42
Chapter 3. Tutorial FLOW-3D Documentation, Release 10.1.0
3.5.15 Introduction to Custom Probe Plots1. Select theAnalyze Probetab.
Time history plots are created from this tab as line-graphs or text output of a variable vs. time. There are three
types of time-dependent data in FLOW-3D, which are selected from the Data Sourcegroup.
Spatial data:RestartandSelected datasources. Time-dependent values of a single x, y, z cell center coordinate
will be plotted. Values can be integrated with respect to time, differentiated with respect to time, or consolidated
with a moving average (in time).
General history data: Global quantities which vary only with time. Typical quantities are mean kinetic energy,
time step, and convective volume error. This data type also includes all data from specified measurement lo-
cations (baffles, sampling volumes, history probes) as well as integrated output for moving or stationary solids
and springs/ropes, when those options are selected on theModel Setup > Meshing and Geometrytab.
Mesh-dependent data: Time-dependent quantities (computed or user-specified) at mesh boundaries. Typical
quantities are flow rate at a boundary and specified fluid height at a boundary.
2. Select the General Historyradio button under Data Source. Notice that the X, Y, and Z Data pointsliders turn
gray. This is becauseGeneral historydata is not associated with any specific cell.
3. Selectmass-averaged fluid mean kinetic energyfrom the list.
3.5. Tutorial - Running an Example Problem 62
-
5/27/2018 FLOW 3Dv10 1 Tutorial
27/42
Chapter 3. Tutorial FLOW-3D Documentation, Release 10.1.0
4. SelectUnitsto open the Plotting Unitsdialog.
5. SelectShow units on plots.
6. SelectSI,CGS,slugs/feet/seconds, or pounds/inches/secondsto convert and output the results in the unit system
of your choice. Showing and converting units requires that a unit system was selected on the Model Setup
> Generaltab. You checked this in an earlier step; the geometry and fluid properties were specified in the
centimeters/grams/seconds system.
3.5. Tutorial - Running an Example Problem 63
-
5/27/2018 FLOW 3Dv10 1 Tutorial
28/42
Chapter 3. Tutorial FLOW-3D Documentation, Release 10.1.0
7. SelectOKto close thePlotting Unitsdialog.
8. SelectRenderto generate a graphical output of the data. The output shows mass-averaged mean kinetic energy
for all of the fluid in the domain over time. The plot will appear as shown, with unit labels based on your
selection in the previous step. The plot indicates that the total kinetic energy is oscillating around some mean
value. As the oscillations become smaller, the simulation approaches steady-state flow.
3.5. Tutorial - Running an Example Problem 64
-
5/27/2018 FLOW 3Dv10 1 Tutorial
29/42
Chapter 3. Tutorial FLOW-3D Documentation, Release 10.1.0
9. Return to theAnalyze Probetab.
10. Output the graph as text data by selectingTextin theOutput Formgroup and then re-select Render.
11. The output can be saved to a text file by selecting theSave Asbutton in the text dialog that appears.
12. SelectContinueto close the output window.
3.5.16 Introduction to Custom Text Output
1. Select theAnalyze Text Outputtab.
Text outputworks the same way as the Probetab, except that only cell-data (Restartor Selected) can be output
(no component, measurement-station, or global data), and more than one cell can be selected to output data for
each plot time. Cells are selected in 3-D blocks using the sliders. The default spatial extents are set to the entire
domain. Up to 10 quantities can be output at a time.
2. Experiment with outputting text data on your own.
3.6 Copy and Modify a Simulation
The next example problem shows how to copy the simulation just run and add an additional downstream structure.
3.6.1 Add Simulation Copy
1. Select theSimulation Managertab.
2. Select the simulationFlow Over a Weirin the workspace Hydraulics Examples. Right clickon the simulation
and choose the optionAdd Simulation Copyin the pop-up menu.
3. Enter the name Weir Structurein the dialog as shown below. It is recommended that theCreate subdirectory
using simulation namecheckbox be selected so that the simulation copy has its own folder in the same workspace
directory as the original simulation Flow Over a Weir. This helps keep simulations organized in separate
folders.
3.6. Copy and Modify a Simulation 65
-
5/27/2018 FLOW 3Dv10 1 Tutorial
30/42
Chapter 3. Tutorial FLOW-3D Documentation, Release 10.1.0
4. ClickOKto create a new folder on the computer and in the Portfolio.
The simulation copy has now been imported into the workspace Hydraulics Examples.
3.6.2 Add an Elliptical Downstream Structure
1. Select theModel Setup Meshing & Geometry tab. The weir is exactly the same as in the original simulation.
2. Click the menu bar headingSubcomponent(above the display pane) and select the optionCylinder. This opens
theCylinder subcomponentdialog box.
3.6. Copy and Modify a Simulation 66
-
5/27/2018 FLOW 3Dv10 1 Tutorial
31/42
Chapter 3. Tutorial FLOW-3D Documentation, Release 10.1.0
3. SelectAdd to component = New Component (2)as shown below.
4. Enter the dimensions of the cylinder: Radius = 2.0, Z low=-20.0 and Z high = 20.0, as shown in the figurebelow. The name is optional.
5. ClickTransformto open the dialog box shown below. By default, the cylinder object is created vertically around
the z-axis, so it must be rotated and moved (translated) to the desired position.
6. EnterRotate X = 90(degrees) so that the cylinder becomes parallel to the Y axis, Tranlsate X = 10so that the
cylinder is centered downstream at x = 10 cm, and then Magnification X = 2.5so that the cylinder is stretched
3.6. Copy and Modify a Simulation 67
-
5/27/2018 FLOW 3Dv10 1 Tutorial
32/42
Chapter 3. Tutorial FLOW-3D Documentation, Release 10.1.0
in the X direction and becomes elliptical. These transformations are applied in alphabetical order: first the
(m)agnification, then the (r)otation, and finally the (t)ranslation. The cylinder was defined with original center
at z=0 to eliminate the need for additional translations.
7. ClickOKto apply the transformation to the cylinder object, and then clickOKagain to accept the final subcom-
ponent definition. Finally, clickOKto accept the component type as a standard Solid.
A new elliptical structure should now be created at the downstream of the weir and displayed as below. Addi-
tional changes or corrections can be made in the Geometrywindow, which is accessible from the icon:
and appears as a window pane pinned to the left side of the GUI by default.
8. Use the menu optionFile Save Simulationto keep your changes.
9. Start the simulation by selecting Simulate Run Simulationfrom the menu bar. Switch to the Simulation
Managertab to view the running simulation progress.
3.6.3 Analyze Old and New Results Simultaneously
Displaying two sets of results in the same display window helps when comparing two similar cases.
1. Select the originalFlow Over a Weirsimulation.
2. Practicing what youve already learned, go to the Analyze tab, Open results file
flsgrf.Flow_Over_A_Weir, select the 3-D sub-tab, pick Selected data with Global contour limits,
select all theTime framesusing the sliders, and active Component iso-surface overlay = Solid volume.
3. Renderthe original simulation results.
By default, the display option in the above steps is Display 1, which will render the output to the first available
display.
4. Return to theSimulation Managertab and select the newWeir Structuresimulation.
5. Go to theAnalyze 3-D tab, Open results fileflsgrf.Weir_Structure, and repeat the setup steps in
item 2 above (do notRenderyet).
3.6. Copy and Modify a Simulation 68
-
5/27/2018 FLOW 3Dv10 1 Tutorial
33/42
Chapter 3. Tutorial FLOW-3D Documentation, Release 10.1.0
6. SelectDisplay 2underDisplay options.
7. ClickRender.
The view in the interface will automatically switch to the Displaytab. Only the pressure contour from the newcopy will now be shown in the graphic window, as Display 2, and the one from the original simulation is hidden.
8. SelectView Side by Side Layoutto show both results next to each other.
9. On the left, selectNearest time frameunderLock frames.
10. SelectNextto step through the simulation results simultaneously.
In this case, the most obvious consequence of the change is that more water is trapped downstream next to the
weir, due to the elliptical obstruction.
3.7 Perform a Restart Simulation
A restart is a continuation from a previous FLOW-3Dsimulation. A user might choose to run a restart to continue a
terminated simulation or to change certain parameters of the problem, such as the mesh, physical models, boundary
conditions, properties, or numerical options. A common example of when a restart simulation is useful is when a
detailed (high-resolution) solution of a steady-state problem is required. After the original simulation reaches steady
state, a restart simulation is created with a finer mesh. This gives the required detail while saving on runtime to reach
steady state.
The restart simulation uses the solution data from an existing flsgrfoutput file to generate the initial fluid config-
uration of the new simulation (and interpolate velocities at Grid Overlay boundaries). The available solution times
3.7. Perform a Restart Simulation 69
-
5/27/2018 FLOW 3Dv10 1 Tutorial
34/42
Chapter 3. Tutorial FLOW-3D Documentation, Release 10.1.0
are the restart data writes, shown as restart and spatial... data edits in the solver messages file hd3msg.*of the
original run and in the Restartoptions dialog in the GUI.
The example below demonstrates the use of a restart simulation to mimic the change of the boundary condition after a
certain time. It is based on the example simulation Flow Over A Weir and has a different type of upstream boundary
to mimic a gate closing after t = 1.25s.
3.7.1 Add Restart Simulation
To create a restart simulation from an existing simulation, you create a copy of the original simulation to restart from.
1. Select theSimulation Managertab.
2. Select the simulationFlow Over A Weir in the workspace Hydraulics Examples. Right clickthe simulation
and selectAdd Restart Simulationin the pop-up menu.
3. Name the simulationWeir Gate. Select the new simulation to begin setting up the problem.
Creating a restart simulation copies the original and activates the Restart dialogto define the restart parameters
and the results file to restart from. To perform a restart, the flsgrf file from the previous simulation must
be available to extract the solution data from. The name and location of this file is automatically defined in the
Restartdialog.
4. Select the Model Setup General Restartdialog (shown below) and examine the options. TheActivate
restart optionsbutton is checked to indicate that the initial configuration of the fluid will come from a previous
results file.
3.7. Perform a Restart Simulation 70
-
5/27/2018 FLOW 3Dv10 1 Tutorial
35/42
Chapter 3. Tutorial FLOW-3D Documentation, Release 10.1.0
5. SelectOKto close the dialog.
6. On Model Setup Generalset Finish Time = 2.5 seconds. This is because the new simulation will begin at
1.25 seconds, which was the last time step of the original.
7. Savethe change.
3.7.2 Change Upstream Boundary Condition and Run the Restart
1. Switch to theModel Setup Meshing & Geometrytab.
3.7. Perform a Restart Simulation 71
-
5/27/2018 FLOW 3Dv10 1 Tutorial
36/42
Chapter 3. Tutorial FLOW-3D Documentation, Release 10.1.0
2. Activate theShow Mesh Windowbutton: to open the mesh window. There are a number of windows that
can be shown or hidden. Each provides access to an element of model setup. Windows can be moved around
the screen.
3. Open theMesh Cartesian Mesh Block 1 Boundaries tree.
Previously a pressure boundary with a fluid height was applied at the x-min boundary, and it needs to be changed
to a wall boundary to represent the instantaneous closing of an upstream gate after t = 1.25s.
4. Click theP button next toX Min. This opens theX Min Boundarydialog box.
5. SelectWallas theBoundary typeand clickOKto close the dialog box.
3.7. Perform a Restart Simulation 72
-
5/27/2018 FLOW 3Dv10 1 Tutorial
37/42
Chapter 3. Tutorial FLOW-3D Documentation, Release 10.1.0
6. Saveand Run the simulation.
3.7.3 Concatenate and Analyze the Results
This section explains the steps to concatenate two results files to create continuous animations of both 2-D and 3-D
displays.
Concatenate 2-D Graphics
1. Go to theAnalyzeand click theOpen results filebutton. Select flsgrf.Weir_Gate from theResultsdialog.
2. Select the2-D sub-tab. Switch to X-Zplane view and slide both Y Limit slidersto the left. ClickRenderto plot
the pressure contours in the Y = 0.25 plane.
The pressure contours at all available restart time frames will be listed on the Displaytab.
3. Click theFilesbutton in the upper right of the Displaytab to open the File optionsdialog box.
4. Click theCreatebutton in the dialog box and give the namegate.pltin the nextCreate plot filedialog box. Click
the Write button to write the list of plots to the file gate.plt in the simulation directory. ClickOKwhen
prompted that the write is complete. Select Quit Createand thenCloseto close the dialog boxes.
3.7. Perform a Restart Simulation 73
-
5/27/2018 FLOW 3Dv10 1 Tutorial
38/42
Chapter 3. Tutorial FLOW-3D Documentation, Release 10.1.0
5. Go back to theAnalyze 2-D taband click theOpen Results Filebutton. Select[..] to move one directory up.Select the [Flow_Over_A_Weir]directory and open the original flsgrf.Flow_Over_A_Weirfile.
6. Again, switch toX-Zplane view and select only the Y = 0.25 plane. ClickRenderto plot the pressure contours.
7. Click theFilesbutton and thenOpen (append)in the nextFile optionsdialog box. Browse to the directory where
the restart simulationWeir_Gateis stored andOpenthe filegate.plt.
8. ClickCloseon theFile optionsdialog box. TheDisplaytab should now show a list of 22 time frames from 0.0s
to 2.5s, including the transitional moment t = 1.25s when the upstream gate is closed. Note that the frame for t
= 1.25 repeats twice.
Concatenate 3-D Graphics
To concatenate the results files for 3-D display purposes, it is required that both files are stored in the same directory.
1. Select theAnalyze 3-D tab Open results filebutton. Browse to the directory where the original simulation
Flow Over A Weir is stored, and select the file flsgrf.Flow_Over_A_Weir.
3.7. Perform a Restart Simulation 74
-
5/27/2018 FLOW 3Dv10 1 Tutorial
39/42
Chapter 3. Tutorial FLOW-3D Documentation, Release 10.1.0
2. Select the3-D sub-tab. Activate the component iso-surface overlay optionSolid volume, and make sure that the
Time framerange is0.0 to 1.25 seconds.
3. Activate the checkboxRender frames to diskand thenRender.
The pressure contours from the original simulation will now be shown on the Displaytab.
4. Select theAnalyze 3-D tab Open results file buttonand browse to open the file flsgrf.Weir_Gate.
5. Select the component iso-surface overlay optionSolid volume,Time framesfrom1.375 to 2.5seconds (to elim-
inate duplicate frames), and the checkbox Render frames to disk.
6. Select the checkboxAppend to existing output. In the dialog box that opens, back up one folder level and select
Flow Over A Weirand thenSelect Folder.
7. When prompted to over-write files, selectYes to All.
8. ClickRender.
The Displayshould now have the list of all available restart time frames from 0.0s to 2.5s, which includes a single
instance of the transitional moment t = 1.25s when the upstream gate is closed.
FLOW-3D andTruVOFare registered trademarks in the USA and other countries.
3.7. Perform a Restart Simulation 75
-
5/27/2018 FLOW 3Dv10 1 Tutorial
40/42
CHAPTER
FOUR
THEORY
4.1 Theory Overview
FLOW-3D is a general-purpose computational fluid dynamics (CFD) software. It employs specially developed numeri-
cal techniques to solve the equations of motion for fluids to obtain transient, three-dimensional solutions to multi-scale,
multi-physics flow problems. An array of physical and numerical options allows users to apply FLOW-3Dto a wide
variety of fluid flow and heat transfer phenomena.
Fluid motion is described with non-linear, transient, second-order differential equations. The fluid equations of mo-
tion must be employed to solve these equations. The science (and often art) of developing these methods is called
computational fluid dynamics. A numerical solution of these equations involves approximating the various terms with
algebraic expressions. The resulting equations are then solved to yield an approximate solution to the original prob-
lem. The process is called simulation. An outline of the numerical solution algorithms available in FLOW-3D follows
the section on the equations of motion.
Typically, a numerical model starts with a computational mesh, or grid. It consists of a number of interconnected
elements, or cells. These cells subdivide the physical space into small volumes with several nodes associated with
each such volume. The nodes are used to store values of the unknowns, such as pressure, temperature and velocity.
The mesh is effectively the numerical space that replaces the original physical one. It provides the means for defin-
ing the flow parameters at discrete locations, setting boundary conditions and, of course, for developing numerical
approximations of the fluid motion equations. The FLOW-3D approach is to subdivide the flow domain into a grid of
rectangular cells, sometimes called brick elements.
A computational mesh effectively discretizesthe physical space. Each fluid parameter is represented in a mesh by
an array of values at discrete points. Since the actual physical parameters vary continuously in space, a mesh with
a fine spacing between nodes provides a better representation to the reality than a coarser one. We arrive then at
a fundamental property of a numerical approximation: any valid numerical approximation approaches the original
equations as the grid spacing is reduced. If an approximation does not satisfy this condition, then it must be deemed
incorrect.
Reducing the grid spacing, or refining the mesh, for the same physical space results in more elements and nodes and,
therefore, increases the size of the numerical model. But apart from the physical reality of fluid flow and heat transfer,
there is also the reality of design cycles, computer hardware and deadlines, which combine in forcing the simulation
engineers to choose a reasonable size of the mesh. Reaching a compromise between satisfying these constraints and
obtaining accurate solutions by the user is a balancing act that is a no lesser art than the CFD model development
itself.
Rectangular grids are very easy to generate and store because of their regular, or structured, nature. A non-uniform grid
spacing adds flexibility when meshing complex flow domains. The computational cells are numbered in a consecutive
manner using three indices: iin the x-direction, j in the y-direction and kin the z-direction. This way each cell in a
three-dimensional mesh can be identified by a unique address (i,j,k), similar to coordinates of a point in the physical
space.
76
-
5/27/2018 FLOW 3Dv10 1 Tutorial
41/42
Chapter 4. Theory FLOW-3D Documentation, Release 10.1.0
Structured rectangular grids carry additional benefits of the relative ease of the development of numerical methods,
transparency of the latter with respect to their relationship to the original physical problem and, finally, accuracy and
stability of the numerical solutions. The oldest numerical algorithms based on thefinite differenceand finite volume
methods have been originally developed on such meshes. They form the core of the numerical approach in FLOW-3D.The finite difference method is based on the properties of the Taylor expansion and on the straightforward application
of the definition of derivatives. It is the oldest of the methods applied to obtain numerical solutions to differential
equations, and the first application is considered to have been developed by Euler in 1768. The finite volume method
derives directly from the integral form of the conservation laws for fluid motion and, therefore, naturally possesses the
conservation properties.
FLOW-3Dcan be operated in several modes corresponding to different limiting cases of the general fluid equations.
For instance, one mode is for compressible flows, while another is for purely incompressible flow situations. In the
latter case, the fluid density and energy may be assumed constant and do not need to be computed. Additionally, there
are one fluid and two fluid modes. Free surface can be included in the one-fluid incompressible mode. These modes
of operations correspond to different choices for the governing equations of motion.
Free surface exists in many simulations carried out with FLOW-3D. It is challenging to model free surfaces in any
computational environment because flow parameters and materials properties, such as density, velocity and pressureexperience a discontinuity at it. In FLOW-3D, the inertia of the gas adjacent to the liquid is neglected, and the
volume occupied by the gas is replaced with an empty space, void of mass, represented only by uniform pressure and
temperature. This approach has an advantage of reducing the computational effort since in most cases the details of the
gas motion are unimportant for the motion of much heavier liquid. Free surface becomes one of the liquids external
boundaries. A proper definition of the boundary conditions at the free surface is important for an accurate capture of
the free-surface dynamics.
TheVolume of Fluid (VOF)method is employed in FLOW-3D for this purpose. It consists of three main components:
the definition of the volume of fluid function, a method to solve the VOF transport equation and setting the boundary
conditions at the free surface.
Some physical and numerical models are described in more detail in Flow Sciences Technical Notes:
http://users.flow3d.com/tech-notes/default.asp, which also include examples.
4.2 Equations of Motion
4.2.1 Coordinate Systems
The differential equations to be solved are written in terms of Cartesian coordinates (x,y,z). For cylindrical coordi-nates (r,, z) the x-coordinate is interpreted as the radialdirection, the y-coordinate is transformed to the azimuthalcoordinate,, andz is the axial coordinate. For cylindrical geometry, additional terms must be added to the Cartesianequations of motion. These terms are included with a coefficient, such that= 0corresponds to Cartesian geometry,while= 1corresponds to cylindrical geometry.
All equations are formulated with area and volume porosity functions. This formulation, called FAVORTM for Frac-tional Area/Volume Obstacle Representation Method [Hirt-Sicilian-1985]is used to model complex geometric regions.
For example, zero-volume porosity regions are used to define obstacles, while area porosities may be used to model
thin porous baffles. Porosity functions also introduce some simplifications in the specification of free-surface and wall
boundary conditions.
Generally, in FLOW-3D, area and volume fractions are time independent. However, these quantities may vary with
time when the moving obstacle model is employed.
4.2. Equations of Motion 77
-
5/27/2018 FLOW 3Dv10 1 Tutorial
42/42
Chapter 4. Theory FLOW-3D Documentation, Release 10.1.0
4.2.2 Mass Continuity Equation and Its Variations
The general mass continuity equation is:
VF
t +
x(uAx) +R
y(vAy) +
z(wAz) +
uAxx
=RDIF+RSOR (4.1)
where:
V Fis the fractional volume open to flow,
is the fluid density,
RDIF is a turbulent diffusion term, and
RSOR is a mass source.
The velocity components (u,v,w) are in the coordinate directions (x,y,z) or (r,RSOR,z). Ax is the fractional areaopen to flow in the x-direction, Ay andAz are similar area fractions for flow in the y andz directions, respectively.
The coefficientRdepends on the choice of coordinate system in the following way. When cylindrical coordinates areused,y derivatives must be converted to azimuthal derivatives,
y
1
r
(4.2)
This transformation is accomplished by using the equivalent form
1
r
=
rmr
y (4.3)
where:
y= rmand
rmis a fixed reference radius.
The transformation given by Eq. (4.3) is particularly convenient because its implementation only requires the multi-
plierR = rm/ron eachy derivative in the original Cartesian coordinate equations. When Cartesian coordinates areto be used,Ris set to unity and is set to zero.
The first term on the right side of Eq. (4.1), is a turbulent diffusion term,
RDIF =
x
Ax
x
+R
y
AyR
y
+
z
Az
z
+
Axx
(4.4)
where:
the coefficient is equal to Sc /, in which is the coefficient of momentum diffusion (i.e., the viscosity)
and Scis a constant whose reciprocal is usually referred to as the turbulent Schmidt number.
This type of mass diffusion only makes sense for turbulent mixing processes in fluids having a non-uniform
density.
The last term, RSOR , on the right side of Eq. (4.1) is a density source term that can be used, for example, to modelmass injection through porous obstacle surfaces.
Compressible flow problems require solution of the full density transport equation as stated in Eq. (4.1). For incom-
pressible fluids,is a constant and Eq. (4.1) reduces to the incompressibility condition
x(uAx) +R
y(vAy) +
z(wAz) +
uAxx
=RSOR
(4.5)
4.2. Equations of Motion 78