Fluent and Gambit Tutorial
Fluent and Gambit Tutorial
FLUENT is feature rich Summary of features and capabilities Hosts, X forwarding, environment, startup Basic steps for success Web documentation: User Guides & tutorials Help is available: helpline & forums
Flow problems in 2D and 3D Compressible & Incompressible Steady state and time dependent Variety of material properties Complex physics & chemsitry Inviscid, viscous, and turbulence models Complex geometries & meshes Multiple and non-inertial reference frames Quantitative analysis & visualization
2D
3D
Low subsonic
Incompressible or weakly compressible Constant or variable density Equation of state Strong compressibility Shock waves Inviscid model Euler discontinuities Strong shocks
Transonic
Iterative convergence to steady state solutions Follow transient solutions Use steady state solution to initialize transient problems.
Material Properties
Porous media
Non-isotropic permeability Inertial resistance Solid heat conduction Porous-face pressure jump conditions
Porous media in a catalytic converter
Chemistry
Chemical Species
Mixing Reaction
Combustion models
Homogeneous Heterogeneous
Complex Physics
000
Volume sources of mass, momentum and energy Acoustic models: flow induced noise
Laminar (only for smooth flows) Viscous (Navier-Stokes) Large Eddy Simulations (LES) Detached Eddy Simulation Spalart-Allmaras (1 eqn) K-epsilon (standard & RNG) (2 eqn) K-omega (2 eqn) Reynolds Stress (7 eqn)
Turbulence models
Dynamic (deforming) meshes Free surfaces GAMBIT: mesh generation T-GRID: merge meshes
Reference Frames
Inertial
Stationary or moving
Non-inertial
Rotating Accelerating
Quantitative Analysis
Fluxes Averages
Flow Visualization
On surfaces
Contours Primitive and derived fields Particle paths Vector fields Colored with scalar fields Time dependent flows Moving viewpoint
In volumes
Animation
Computational resources at MSI MSI maintains academic licenses from ANSYS Run locally in MSI labs SSH & X forwarding Environmental settings & modules Tutorial files & run directories GUIs for GAMBIT & FLUENT
Getting Started
BMSDL SDVL
http://www.msi.umn.edu/labs/
Running Remotely
GUI driven GAMBIT & FLUENT From your graphics & X11 enabled desktop
X11 is standard with Linux shells On Mac use an xterm shell & ssh -Y ... On Windows, need X server & SSH client
Getting Started
Dream up a problem Draw a picture with labels for consistency Use GAMBIT to generate mesh
Specify geometry & boundaries Specify solver, mesh type & resolution Specify models, boundaries, material properties Specify solver approx, monitors, & iterate ... Adapt/refine mesh Examine/compare results
Example Problem
Channel flow with backward-facing step
Classic problem from turbulence Our example: 2D for simplicity & speed Will solve for steady state solution Compare results from different models
Re = (2/3)U(2h)/nu = 500
Lambros, Kaiktsis, Karniadakis, & Orszag, 1991 JFM vol. 231, pp. 501-528
Rani, Sheu, & Tsai, 2007, JFM vol. 588, pp. 4358
Define Geometry
Y vip=(-1,1) Wall Inflow vi0=(-1,0) vmm=(0,-1) Wall vm0=(0,0) Wall vop=(10,1) Outflow X
Wall vom=(10,-1)
2D problem: Z=0 Walls can be free slip or no slip Use default MKS units
Setup & start GAMBIT Specify FLUENT 5/6 solver 0D: Vertices from point coordinates 1D: Edges from pairs of vertexes 2D: Domain from edges Specify 1D meshes on Edges Interior mesh (on face) from 1D meshes Associate boundary types & labels with edges Save work & export mesh
Setup GAMBIT
Project Directory
Start GAMBIT
Specify solver
menu: solver -> FLUENT 5/6
Specify Vertices
Operation: GEOMETRY button Geometry: VETREX button Vertex: CREATE VERTEX button Enter coordinates with labels & APPLY for each pair (-1,1) (-1,0) (0,0) vmm vom vop (0,-1) (10,-1) (10,1)
Geometry: EDGE button Edge: CREATE EDGE button: strait edge (default) Select pairs of vertices, label, & Apply
in ibot step {vip, vim} {vim, vm0} {vm0, vmm} bot out top {vmm, vom} {vom, vop} {vop, vip}
Geometry: FACE button Face: FORM FACE button Select all edges, label domain, & Apply
Generate Mesh
Mesh: FACE button Face: MESH FACES button Mesh faces dialog:
Select all edges Retain defaults for quad mesh & Apply
Boundary Types
Operation: ZONES button Zones: SPECIFY BOUNDARY TYPES button Specify Boundary Types dialog:
Apply
Modify or fix mesh as needed Use as a starting point for another project
Menu: File -> Save As ...
Export mesh
Generates a mesh file: step.msh Will import this file into FLUENT
Menu: File -> Export -> Mesh ... Enable Export 2-D (X-Y) Mesh File name: step.msh Accept
Use FLUENT Import mesh Models: solver, viscous, source terms, ... Material properties Boundary conditions Operating conditions Solution controls & initialization Monitors Iterate ...
Setup FLUENT
Contains file: step.msh Only need to do once per shell Can put module load ... in file: .bashrc
Choose Model
Solver framework
Define -> Models -> Solver
Retain defaults
Energy equation?
Define -> Models -> Energy ...
Viscosity model
Define -> Models -> Viscous ...
Select fluid
Define -> Materials ...
Can select from Database Can define your own Will keep default: air
Select Inlet (Velocity Inlet) & Set... Set Velocity Magnitude: 0.002435 m/s (Re ~ 500) Retain default settings for outlet (Pressure Outlet) Retain defaults for all other boundaries (Wall)
Retain defaults
Set solver controls Solve -> Controls -> Solution Discretization: Momentum: 2nd order Upwind Retain other defaults
Select Plot under Options Increase Storage & Plotting iterations to 10000 Keep Continuity, X-, & Y-velocity monitors
Iterate
Solver -> Iterate ...
Set # of iterations to 1000 Iterate Low res. mesh Numerical Diff. Need Turb. Visc.
Laminar: unrealistic
Iterate ...
Examine Flow
Vector fields Contours Particle paths XY plots along lines or edges Quantitative reports Compare results from different models Hard copy output
File -> Hardcopy ...
Flow Visualization
In subsets of full domain Colored by ... Zoom with middle mouse button
Quantitative Results
X0=X1=0.6; Y0=-1; Y1=1 Name: x=0.6 Plot Direction: (X,Y,Z)=(0,1,0) Surfaces: x=0.6 & Plot
Quantitative reports
Report -> Fluxes ...
Switch cases
File -> Write -> Case & Date File -> Read -> Case & Data
Plot
Adapt/Refine Mesh
doubles mesh
Theory, Experiment, Computation Facilitate access to local resources & opportunities Share knowhow Address questions & concerns with MSI resources Brainstorm projects leveraged by MSI resources Forums will be user driven Your input is crucial Email: [email protected]