Sie sind auf Seite 1von 342

CFD Basics - Outline

CFD Basics

Introduction CAD to Solution overview Governing Equations Initial and Boundary Conditions Turbulence Modeling Solution of Governing Equations Convergence Monitoring Errors in CFD Analysis Non-Dimensional Numbers Mesh Generation Post-Processing Divergence

Ensuring Quality of a CFD analysis CD-adapco solvers

Which Solver Do I Choose for my Application

CD-adapco, Americas Agency Training Document

CFD Basics - 1

CFD Basics

Introduction to CFD Governing equations of fluid flow and heat transfer Boundary Conditions Meshing Guidelines Solution best practices STAR Workflow overview

CD-adapco, Americas Agency Training Document

CFD Basics - 2

CFD Basics
What is CFD? CFD is Computational Fluid Dynamics

Computational numerical methods

PC, workstation, cluster gas or liquid: Material that deforms continuously under application of a shear stress Moving (as opposed to static)

Fluid

Dynamics

CD-adapco, Americas Agency Training Document

CFD Basics - 3

CFD Basics Need For CFD


Why do we need CFD? Very few fluid mechanics problems have analytical solutions (e.g. Laminar flow between parallel plates, laminar flow between rotating cylinders). Most real world problems do not have a closed form solution, and require a numerical solution.

CD-adapco, Americas Agency Training Document

CFD Basics - 4

CFD Basics Applications where CFD is used


What are some of the areas in which CFD is used? Aerospace Automotive Biomedical Building Civil Engineering Chemical Process Environmental Marine Power Generation Sport Equipment Turbomachinery

CD-adapco, Americas Agency Training Document

CFD Basics - 5

CFD Basics - ELEMENTS OF 3D CFD SIMULATION

turbulence model

combustion model

finite volume discretisation

moving mesh*

solution controls*

postprocessing*

conservation equations

mathematical model (differential)

finite volume model

CFD cpde STAR-CD

computer

RESULTS

spray model

wall film model

solution algorithm

initial/boundary conditions*

operating conditions*

optimisation

CAD geometry*

*via STAR-CD or STAR-CCM+


CD-adapco, Americas Agency Training Document CFD Basics - 6

CFD Basics CAD to Solution Overview


Discipline CFD SOFTWARE COMPONENT FUNCTION

CAD
Meshing

1.

CAD Modeler CAD Importer

Geometry Building

2.

Geometry Import and Mesh Generation

CFD
Pre/Post/Solution

3.

Pre-Processor

Physics and Boundary Conditions

4.

Solver Post-Processor

Run Analysis

5.

Solution Revealed to User

CD-adapco, Americas Agency Training Document

CFD Basics - 7

CFD Basics CAD to Solution

4h
CAD Geometry

1h

1h
Surface Meshing Surface Clean-up Volume Meshing

2h

Post-processing

8h
CFD Solution
CD-adapco, Americas Agency Training Document CFD Basics - 8

CFD Basics Governing Equations Conservation Laws

The following equations are fundamental to CFD:


Conservation of Mass (continuity) Conservation of Momentum (F=ma) Conservation of Energy (1st Law of Thermodynamics) In addition, depending on complexity of the problem (e.g. if turbulent), additional transport equations are solved.

CD-adapco, Americas Agency Training Document

CFD Basics - 9

CFD Basics Governing Equations Constitutive Relationships


In order to close the system of equations (laws of conservation), we need the response of materials to external effects (i.e. surface forces, heat or mass fluxes). These are described by constitutive relationships. Stokes Law Expresses relationship between stresses and rate of deformation for fluids:

rr r = 2 D 2. V I P I

( )

r T 1 r D = V + V 2

( )]

is the dynamic viscosity, P is the pressure, V is the velocity vector and I is the identity tensor. Fouriers Law Expresses relationship between heat flux and temperature gradient
q =-kT

Where k is the thermal conductivity

CD-adapco, Americas Agency Training Document

CFD Basics - 10

CFD Basics Governing Equations Equation of State Additional requirement for closure of governing equations. The equation of state links density and internal energy to the basic thermodynamic variables p (pressure) and T (temperature) = (p,T); e = e(p,T)

CD-adapco, Americas Agency Training Document

CFD Basics - 11

CFD Basics Governing Equations General Form

r dV + u d A = d A + S dV S S V t V
V S S V

CONSERVATION:

=1 =u,v,w = e
A is the surface area V is the volume S is the source term

mass momentum energy

CD-adapco, Americas Agency Training Document

CFD Basics - 12

CFD Basics Governing Equations

/t dV + u dA = dA + S dV
V S S V

Convective Flux

Rate of change of quantity in Control Volume

Diffusion Flux

Volumetric Source

CD-adapco, Americas Agency Training Document

CFD Basics - 13

CFD Basics Convection and Diffusion


CONVECTION DIFFUSION

u dA
CD-adapco, Americas Agency Training Document

dA
CFD Basics - 14

CFD Basics Initial and Boundary Conditions


To complete our mathematical model, conditions on the solution domain boundaries have to be specified. Conditions related to start time are called Initial Conditions. Conditions related to space are called Boundary Conditions.

CD-adapco, Americas Agency Training Document

CFD Basics - 15

CFD Basics Boundary Conditions - Types


Dirichlet Boundary Conditions are BCs where value of the dependent variable at the boundary is given (e.g. inlet velocity of fluid). Neumann Boundary Conditions are BCs where gradient of the dependent variable at the boundary is specified. It is possible that for the same boundary, Dirichlet BCs are applied for some dependent variables, and Neumann BCs are applied for other dependent variables.

CD-adapco, Americas Agency Training Document

CFD Basics - 16

CFD Basics Boundary Conditions (External flow)

CD-adapco, Americas Agency Training Document

CFD Basics - 17

CFD Basics Boundary Conditions External Flow Examples - Flow over an aircraft or automobile - Flow over a cylinder - Flow around buildings

CD-adapco, Americas Agency Training Document

CFD Basics - 18

CFD Basics Boundary Conditions (External Flow)

Free Stream

Inlet

Outlet

No slip Wall

CD-adapco, Americas Agency Training Document

CFD Basics - 19

CFD Basics Boundary Conditions Free Stream

CD-adapco, Americas Agency Training Document

CFD Basics - 20

CFD Basics Boundary Conditions


Inlet Boundaries can be specified at portions of boundary where the fluid enters the solution domain, and where the velocity and scalar (temperature, species concentration, turbulence quantities) distributions is known. Outlet Boundaries can be specified at that portion of the solution domain, where flow leaves the domain. It assumes zero gradient of all dependent variables in the flow direction. No-Slip Wall requires prescription of velocity at the wall (e.g. zero velocity for a stationary wall). Free Stream boundary represents the conditions at a far-field location (i.e. At the periphery of a bubble of fluid surrounding a moving object)
CD-adapco, Americas Agency Training Document CFD Basics - 21

CFD Basics Boundary Conditions Pressure Boundaries


Pressure boundary conditions can be specified at boundaries where the pressure distribution is known. Boundary velocities are obtained from Neumann Boundary condition for velocity. All dependent variables are either specified or extrapolated from the inside using zero gradient assumption. At outflow, all variables are extrapolated. Note: The velocity at the pressure boundary where the flow comes in has to be sub-sonic, or else the upstream velocity needs to be specified, thus violating the Neumann boundary condition.

CD-adapco, Americas Agency Training Document

CFD Basics - 22

Day 1 : CFD Basics Boundary Conditions - Internal Flow

CD-adapco, Americas Agency Training Document

CFD Basics - 23

CFD Basics Boundary Conditions Internal Flow Examples


-

Flow inside ducts Flow inside Intake/Exhaust manifolds Flow inside coolant jackets Flow inside human blood vessels In-Cylinder flow of IC engines

CD-adapco, Americas Agency Training Document

CFD Basics - 24

CFD Basics Boundary Conditions Internal Flow

Inlet

Outlet

No slip wall (u = 0) Adiabatic, fixed temperature, or fixed heat flux.

CD-adapco, Americas Agency Training Document

CFD Basics - 25

CFD Basics Boundary Conditions - Inlets


Velocity and Scalars can be specified for an inlet.
w

CD-adapco, Americas Agency Training Document

CFD Basics - 26

CFD Basics Boundary Conditions - Outlet

n is the unit normal. Gradients of all variables along flow direction is taken to be zero. Mass flow is fixed from overall continuity.

FLOW SPLIT or MASS FLOW RATE


CD-adapco, Americas Agency Training Document CFD Basics - 27

CFD Basics - Outlet Boundary Conditions


Zone of Recirculation: Area is inaccurate Developing Zone: Area has little accuracy Developed Zone: Area is accurate

Flow direction

3L-8L
CD-adapco, Americas Agency Training Document

10L

CFD Basics - 28

CFD Basics Boundary Conditions - Symmetry


normal mal Symmetry plane indicates a surface where normal velocity and nor velocity gradients are all zero. (n indicates the unit normal)

CD-adapco, Americas Agency Training Document

CFD Basics - 29

CFD Basics Boundary Conditions - Periodic

A periodic boundary condition refers to a pair of boundaries where the flow repeats itself.

CD-adapco, Americas Agency Training Document

CFD Basics - 30

CFD Basics Gallery of Turbulence

CD-adapco, Americas Agency Training Document

CFD Basics - 31

CFD Basics - Turbulence


Most of the commonly occurring flows are turbulent in nature (e.g. Jet streams, combustion, boundary layers on wings of aircraft etc.). Turbulence by itself is difficult to define, but typically has the following characteristics: - Irregular (hence requires statistical methods) - Diffusive (causes rapid mixing) - Large Reynolds numbers - Three dimensional vorticity fluctuations - Dissipative (exhibits viscous losses, and needs a continuous supply of energy to make up for losses)

CD-adapco, Americas Agency Training Document

CFD Basics - 32

CFD Basics - Why do we need turbulence models? Turbulence is influenced by structures having large length scales, and small length scales (down to the molecular level). To resolve all scales, the number of computational cells is approximately (Re3), which is beyond the computing resources currently available. In order to model scales smaller than the computational cell size, turbulence models are required.

CD-adapco, Americas Agency Training Document

CFD Basics - 33

CFD Basics - Turbulence


u(t) U u'(t)

==

1 t

t (t) dt

(t)=+ (t)

High Reynolds Number u(t) = U + u(t)

CD-adapco, Americas Agency Training Document

CFD Basics - 34

CFD Basics - TURBULENCE MODELLING OPTIONS


Eddy Viscosity Models 1. Linear k- models: standard, RNG, Chen low- and high-Re variants of k- 2. V2F model 3. Non-linear models: quadratic and cubic k-, several variants low- and high-Re Suga Speziale quadratic 4. Other k-: standard and SST, low- and high-Re Spalart-Almaras

Reynolds Stress Transport models


1. Gibson and Launder 2. Craft 3. Speziale, Sarker and Gatski
CD-adapco, Americas Agency Training Document CFD Basics - 35

CFD Basics - TURBULENCE MODELING OPTIONS


Detached Eddy Simulation - In regions of irrotational flow, RANS is used - In regions of detached eddies, LES is used - Accurate for capturing eddies created by bluff bodies - Excellent compromise between RANS and LES Large Eddy Simulation - Resolves the large scale eddies - Uses a sub-grid scale model for small eddies - Requires very fine mesh DNS - Models all eddies from large scale to small scale - Not practical for industrial applications

CD-adapco, Americas Agency Training Document

CFD Basics - 36

CFD Basics Inlet Turbulence


Turbulence conditions at inlet are seldom known. If inlet is sufficiently upstream of region of interest, results are insensitive to inlet turbulence. If inlet is close to region of interest, need to perform a sensitivity study of inlet turbulence on results.

CD-adapco, Americas Agency Training Document

CFD Basics - 37

CFD Basics Inlet Turbulence

Estimation of Inlet Turbulence:


Intensity of turbulence I Length of turbulence scale L

Common Practice
I 0.03 - 0.10 L Dh/10 Dh is hydraulic diameter C = 0.09

3 2 2 k= I V 2 3/2 C3/4 k = L

CD-adapco, Americas Agency Training Document

CFD Basics - 38

CFD Basics Turbulence Wall Treatment


Near wall treatment for turbulence models is typically chosen based on the local non-dimensional distance of the cell centroid of the near wall cell from the wall (y+).

y = C k y/

1/4

1/2

Where y is the distance of the near wall cell centroid from the wall, k is the local turbulence kinetic energy, and C is a constant having a value of 0.09.

CD-adapco, Americas Agency Training Document

CFD Basics - 39

CFD Basics Turbulence Wall Treatment

Wall Functions Computationally efficient Uses logarithmic law of the wall Requires y+ to be in the 30 200 range Applies only to attached flows and fails in recirculating flows Low Reynolds number approach Computationally expensive Integrates down to the wall and uses no-slip Requires near wall y+ less than 5 Hybrid Treatment If y+ < 5, use Low Re approach If y+ > 30 use Wall Function approach If 5 < y+ < 30 blend smoothly between two approaches

CD-adapco, Americas Agency Training Document

CFD Basics - 40

CFD Basics - Estimation of Near Wall Cell Thickness How can I get an approximate estimate of the near wall cell thickness? y+ = C1/4 k1/2 y /
1.

2.

Estimate k from free stream velocity and an assumed turbulence intensity (1.5 * I2 U2) Substitute the required y+ value in the equation, and get an estimate of y. Note: C=0.09
CD-adapco, Americas Agency Training Document CFD Basics - 41

CFD Basics - Choosing a turbulence Model


Spallart Almaras Turbulence Model Recommended when flow is primarily attached with no separation, or mild separation. e.g. For flow over a wing or a fueslage. k- or k- Turbulence Model Common industrial applications, with flow separation and recirculation. Reynolds Stress Model When the turbulence is highly anisotropic. e.g. In a Cyclone separator. Detached Eddy Simulation Recommended for aeroacoustic applications

CD-adapco, Americas Agency Training Document

CFD Basics - 42

CFD Basics - Choosing a Turbulence Model

CD-adapco, Americas Agency Training Document

CFD Basics - 43

CFD Basics - Choosing a Turbulence Model


What is our recommendation on choosing a turbulence model? Choose the simplest model which gives acceptable engineering results for your application. Typically start with the k- turbulence model. If wall effects are important, use either the hybrid wall functions, or a low Reynolds number turbulence model, making sure to have a fine mesh resolution in the wall region. If anisotropic effects are important, then use Reynolds Stress Models. What factors other than a turbulence model affect accuracy of a simulation? Inlet values of turbulence chosen Size and quality of the computational grid

CD-adapco, Americas Agency Training Document

CFD Basics - 44

CFD Basics - Discretization


In order to obtain a solution for the governing equations, the mathematical model (equations and constitutive relationships) is transformed into a system of algebraic equations. Special techniques are used for the transient, convection, diffusion and source terms in this process. The discretized equations have the form expressed in the equation below. C denotes cell center value, and k denotes values in neighboring cells.

A cc + k A kk = Q c

CD-adapco, Americas Agency Training Document

CFD Basics - 45

CFD Basics Solution of Discretized Equations


The discretized equations are coupled and non-linear. The discretized equations are then solved using iterative methods. Steady State problems typically use the SIMPLE algorithm, and transient problems either use SIMPLE or PISO algorithms.

CD-adapco, Americas Agency Training Document

CFD Basics - 46

CFD Basics SIMPLE Algorithm


What does SIMPLE stand for? Semi-Implicit Method for Pressure Linked Equations A variation of the SIMPLE algorithm is used in all CDadapco solvers for solving the equations of fluid flow and heat transfer. (Note that STAR V3.26 uses the PISO algorithm (Pressure Implicit Split Operator) for transient analysis)

CD-adapco, Americas Agency Training Document

CFD Basics - 47

CFD Basics SIMPLE Algorithm


Main Steps in SIMPLE:
1.

2.

3.

4.

5.

6.

7.

Variables are assigned initial values at startup, and time is advanced by dt (time step). With the initially guessed pressure field, the momentum equations are solved, to obtain an approximate velocity field. The velocity field computed in step 2 along with the prevailing density is used to compute new mass fluxes, and then solve the mass conservation (pressure correction equation). This results in corrections for velocities, density and pressure being computed and applied. If applicable, additional transport equations (turbulence, energy, species concentration) are solved. If necessary, fluid properties (e.g. density, viscosity, Prandtl number are updated). Steps 2 through 5 constitute an outer iteration. These steps are repeated until the residual level before the first inner iteration in each equation becomes sufficiently small. When the non-linear coupled equations are satisfied to a desired tolerance, time is advanced by dt, and the process is repeated.
CD-adapco, Americas Agency Training Document CFD Basics - 48

CFD Basics Under-relaxation


In order to promote stability of the solution method, an underrelaxation is done for all variables (other than the pressure correction). In the equations below, k+1 refers to the most recent iteration or time step, and k refers to the prior iteration or time step. Omega is the under-relaxation factor, having a value between 0 and 1.

CD-adapco, Americas Agency Training Document

CFD Basics - 49

CFD Basics Convergence Monitoring


There are two main criteria for convergence monitoring: 1. Make sure that the global residuals reduce by 2-3 orders of magnitude (applies only if starting with a zero solution in the domain, or a simple initial guess). 2. Monitor of engineering quantities of interest (e.g. drag coefficient, pressure rise across a fan, pressure drop across a heat exchanger) and make sure that they do not change with iteration. We need to make sure that both of the above criteria are met before we declare our solution to be converged.

CD-adapco, Americas Agency Training Document

CFD Basics - 50

CFD Basics Convergence Monitoring


Residuals Outlet Temperature

CD-adapco, Americas Agency Training Document

CFD Basics - 51

CFD Basics Errors in CFD


The following are the main types of errors in a CFD analysis: Modeling Errors This is the difference between the actual flow and the exact solution of the model equations (Navier stokes or RANS equations) Discretization Errors This is the difference between the exact solution of the differential equation, and the exact solution of the algebraic system of equations obtained by discretizing them. Iteration Errors This is the difference between the iterative and exact solution of the algebraic equation systems.

CD-adapco, Americas Agency Training Document

CFD Basics - 52

CFD Basics Modeling Errors


In case of turbulent flows in complex geometries, modeling errors are mainly due to imperfections in the turbulence model and to simplifications in the geometry or boundary conditions. How can modeling errors be estimated? Compare solutions in which discretization and iteration errors are negligible, with accurate experimental data, or data obtained by more accurate models (e.g. Direct Numerical Simulation).

CD-adapco, Americas Agency Training Document

CFD Basics - 53

CFD Basics Discretization Errors


Discretization errors can be estimated by performing a systematic grid refinement and comparing the solutions obtained on a sequence of grids. The errors are proportional to the difference in solution obtained on consecutive grids.

CD-adapco, Americas Agency Training Document

CFD Basics - 54

CFD Basics Iterative Errors


The level of iterative errors can be reliably controlled by monitoring the residual norms (either sum of absolute values, or the square root of the sum of squares of residuals in all Control Volumes). It is not the level of the residual itself, but the amount of reduction compared to initial levels that is important.

CD-adapco, Americas Agency Training Document

CFD Basics - 55

CFD Basics Non Dimensional Numbers


Next we briefly overview some important non-dimensional numbers that are used in CFD.

CD-adapco, Americas Agency Training Document

CFD Basics - 56

CFD Basics Laminar vs Turbulent


Reynolds Number = Inertia Force / Viscous force Reynolds Number = ( * U * L)/ ( is the density, U is a characteristic velocity, L is a characteristic length scale, and is the laminar viscosity)

If Reynolds number is low, flow is laminar (viscous forces dominate) If Reynolds number is high, flow is turbulent e.g. For pipe flows: Re > 2300 implies turbulent flow For flat plate: Re > 5e5 implies turbulent flow
CD-adapco, Americas Agency Training Document CFD Basics - 57

CFD Basics Compressible vs Incompressible


Mach Number = speed of flow / speed of sound If Mach Number is above 0.3, need to model as compressible. In low speed flows, if temperature change causes a change in density, then flow should be modeled as compressible.

CD-adapco, Americas Agency Training Document

CFD Basics - 58

CFD Basics Natural vs Force Convection


Gr/Re2 = Buoyancy Force / Inertia Force Grashof Number / Reynolds Number2 = g * * T / (U2) Where g is gravity, is the coefficient of volume expansion, T is the difference in temperature between the surface and the free stream, U is the free stream velocity. If Gr/Re2 >> 1, then effect of buoyancy is important If Gr/Re2 << 1 buoyancy effects are unimportant
CD-adapco, Americas Agency Training Document CFD Basics - 59

CFD Basics Conduction vs Convection


Biot Number = Resistance of conduction / Resistance of convection Biot Number = (L/k) / (1/h) Where L is the thickness of the body, k is the thermal conductivity, and h is the heat transfer coefficient. If Bi >> 1, wall side resistance is large, and wall conduction should be included If Bi << 1, wall side resistance is small and wall can be treated as a constant temperature boundary condition.
CD-adapco, Americas Agency Training Document CFD Basics - 60

CFD Basics Mesh Generation

...of the Surface

Meshing: ...

CAD

MESHER

...of the Volume (calculation)

Solid

Fluid
CD-adapco, Americas Agency Training Document CFD Basics - 61

CFD Basics Mesh Generation


The quality of a CFD solution is dependent on the quality of the underlying volume mesh. Hence it is important to ensure a good quality volume mesh (which requires a good quality surface mesh)

CD-adapco, Americas Agency Training Document

CFD Basics - 62

CFD Basics - Elements of Surface Meshing

Arbitrary Polygon quad

triangle
CD-adapco, Americas Agency Training Document CFD Basics - 63

CFD Basics - Surface Mesh Quality

LOW QUALITY
Equilateral triangles imply good quality. quality

HIGH QUALITY
CFD Basics - 64

CD-adapco, Americas Agency Training Document

CFD Basics - Surface Mesh Quality

LOW QUALITY

HIGH QUALITY
CFD Basics - 65

If the angle between the face normal and the vector joining adjacent adjacent cell centroids is small, the triangle quality is high.
CD-adapco, Americas Agency Training Document

CFD Basics Surface Mesh


What are the requirements of a surface mesh, in order to get a valid volume mesh using CD-adapco auto mesh tools? Surface is closed (water tight) Triangles are connected one to one Surface is manifold (Only two cells connected to an edge)

CD-adapco, Americas Agency Training Document

CFD Basics - 66

CFD Basics Basic Volume Mesh Elements

Prismatic Hexahedral

Arbitrary Polyhedral

Tetrahedral Pyramid

CD-adapco, Americas Agency Training Document

CFD Basics - 67

Day 1 CFD Basics Volume Mesh Types


Generally mesh generation is done either using manual techniques (e.g. in pro-STAR) or using an auto-mesher (e.g. ammbatch) When do we need manual meshing? - If we need a structured mesh (for cell layer addition and deletion) - If we have very tight gaps (e.g. nominal cell size is 2mm, but gaps are of the order of 0.05 mm)

CD-adapco, Americas Agency Training Document

CFD Basics - 68

CFD Basics Volume Mesh Types


What are the mesh types that can be generated by CDadapco auto meshers? Trim Mesh

Least demanding on surface quality As automated as a tetrahedral mesher Numerically more stable, less diffusive, and more accurate than an equivalent tetrahedral mesh

Polyhedral Mesh

Hybrid Mesh Tetrahedral mesh

CD-adapco, Americas Agency Training Document

CFD Basics - 69

CFD Basics Volume Mesh Types


Trim Mesh

CD-adapco, Americas Agency Training Document

CFD Basics - 70

CFD Basics Volume Mesh Types

1.

2.

When is a trim mesh recommended? If an underlying custom mesh needs to be used (e.g. for turbo machinery applications, a basic bodyfitted structured mesh can be used as a template for creating a volume mesh with additional details.) If surface quality is not good enough for a polyhedral mesh.

CD-adapco, Americas Agency Training Document

CFD Basics - 71

CFD Basics Volume Mesh Types


Polyhedral Mesh

CD-adapco, Americas Agency Training Document

CFD Basics - 72

CFD Basics Volume Mesh Types

1. 2.

When is a polyhedral mesh recommended? If the quality of surface mesh is excellent. If process of mesh generation needs to be highly automated (as automated as a tetrahedral mesh).

CD-adapco, Americas Agency Training Document

CFD Basics - 73

CFD Basics Volume Mesh Types


Tetrahedral Mesh

CD-adapco, Americas Agency Training Document

CFD Basics - 74

CFD Basics Volume Mesh Types

When is a tetrahedral mesh recommended? The only scenario where a tetrahedral mesh is recommended is when comparisons have to be made with legacy tetrahedral models.

CD-adapco, Americas Agency Training Document

CFD Basics - 75

CFD Basics Advantages of Polyhedral Mesh over Tetrahedral Mesh

Mesh dependency performed by successively halving surface triangulation size from 20mm to 0.625mm Convergence judged from pressure drop across jacket

CD-adapco, Americas Agency Training Document

CFD Basics - 76

CFD Basics Advantages of Polyhedral Mesh over Tetrahedral Mesh


39,587 TETS 21,872 POLYS

2,322,106 TETS

593,888 POLYS

CD-adapco, Americas Agency Training Document

CFD Basics - 77

CFD Basics Advantages of Polyhedral Mesh over Tetrahedral Mesh


Contours of Static Pressure

2,322,106 TETS

593,888 POLYS
CFD Basics - 78

CD-adapco, Americas Agency Training Document

CFD Basics Advantages of Polyhedral Mesh over Tetrahedral Mesh


7

MESH DEPENDENCY

POLY

TET

Delta P (kPa)

Run on a 3Ghz Dual Processor workstation with 2GB RAM

6.3 hours > 5% error 43.25 hours 1.6 hours < 3% error 10 hours

3 10000 100000 1000000 10000000

Number of Cells

CD-adapco, Americas Agency Training Document

CFD Basics - 79

CFD Basics Volume Mesh Quality


Low Quality
Diffusion

High Quality

Convection

CD-adapco, Americas Agency Training Document

CFD Basics - 80

CFD Basics Volume Mesh Quality


Accuracy of Convection When using linear interpolation for convective fluxes, the lines connecting neighboring faces should pass through the center of the common face. Accuracy of Diffusion - Maximum accuracy of diffusive fluxes is achieved when the line connecting neighbor cell centers is orthogonal to the cell face, and also passes through the center of the common face.

CD-adapco, Americas Agency Training Document

CFD Basics - 81

CFD Basics Grid Generation Guidelines


General Guidelines on Grid Generation

~5 control volumes across a shear layer ~5 control volumes across a separated region At Least 4 control volumes across a flow passage Vary grid spacing gradually Keep aspect ratio reasonable (Less than 1:10 whenever possible)

CD-adapco, Americas Agency Training Document

CFD Basics - 82

CFD Basics Grid Generation Guidelines


Insufficient mesh resolution to resolve flow. Refinement enables better resolution of the flow.

CD-adapco, Americas Agency Training Document

CFD Basics - 83

CFD Basics - Post-Processing

Reporting Drag / Lift Coefficients Heat Rejection by heat exchanger Pressure rise across a fan or compressor Pressure drop in a duct Swirl, tumble, burn rate in an IC engine Flow Visualization Visualization of Fields

Scalar Quantities Vector Quantities

Streamlines Iso-Surfaces Animation


CD-adapco, Americas Agency Training Document CFD Basics - 84

CFD Basics Reporting and Monitoring

Centerline Cp

Drag/Lift Monitoring Field Values Residual Convergence


CD-adapco, Americas Agency Training Document CFD Basics - 85

CFD Basics Post Processing Scalars and Vectors

CD-adapco, Americas Agency Training Document

CFD Basics - 86

CFD Basics Post-processing Surface Plot Coefficient of Pressure

CD-adapco, Americas Agency Training Document

CFD Basics - 87

CFD Basics : Post-Processing Capabilities: Streamlines

CD-adapco, Americas Agency Training Document

CFD Basics - 88

CFD Basics : Post-Processing - Isosurfaces


Total Pressure = 0, Isosurface plot.

CD-adapco, Americas Agency Training Document

CFD Basics - 89

CFD Basics - Divergence


What do I do if my solution diverges? Check physical models chosen, and boundary conditions applied. Check and make sure dimensions of the problem are setup correctly. Check and make sure mesh quality is good, and sufficient mesh density is available for resolving the flow features. Reduce under-relaxation factors. Simplify the physics

CD-adapco, Americas Agency Training Document

CFD Basics - 90

CFD Basics Ensuring Quality in CFD Analysis


Ensuring quality of CFD analysis is an important process. The next few slides briefly outline practices used within CD-adapco.

CD-adapco, Americas Agency Training Document

CFD Basics - 91

CFD Basics Ensuring Quality in CFD Analysis


Main Phases:
1. 2. 3.

Initial Project Review Pre-Analysis Review Final Analysis Review

CD-adapco, Americas Agency Training Document

CFD Basics - 92

CFD Basics Ensuring Quality of CFD Analysis


Initial Project Review - Define scope of project and cross check with customer - Define time frame and resources for project - Check with customer and make sure all cad data is available and consistent

CD-adapco, Americas Agency Training Document

CFD Basics - 93

CFD Basics Ensuring Quality of CFD Analysis


Pre Analysis Review - Does the generated mesh match CAD supplied? - Have the boundary conditions been correctly applied? - Is the mesh density sufficient to answer objectives of analysis? - Have correct material properties been defined? - Have the correct physics models been applied? - What post processing is required? - Do results from running a few iterations / time steps look reasonable?

CD-adapco, Americas Agency Training Document

CFD Basics - 94

CFD Basics Ensuring Quality of CFD Analysis


Final Analysis Review - Has the solution fully converged? - Double check, initial and boundary conditions - Double check material properties - Do results make physical sense? (compare with prior analysis if possible) - Have all the questions of the customer been answered?

CD-adapco, Americas Agency Training Document

CFD Basics - 95

CFD Basics: CD-adapco Solvers


CD-adapco offers two CFD Solvers: STAR-CD - V3.2x - 20 Years of Development - V4.x - Rewrite of STAR V3.2x as a face based solver. - Uses an upgraded pre/post Processor of V3.2x STAR-CCM+ - New Integrated Meshing / Pre-Processor / Solver / Post Processor, all under one GUI. - Developed with novel concepts, keeping in mind of very large models.
CD-adapco, Americas Agency Training Document CFD Basics - 96

CFD Basics Comparison of CD-adapco Solvers


The next few slides compare the available features (for mesh generation, physics, and coupling) in STAR V3.26, STAR V4.06 and STAR-CCM+ V3.02

CD-adapco, Americas Agency Training Document

CFD Basics - 97

CFD Basics Comparison of Solvers Mesh Topology

Mesh Type Hexahedral

STAR-CD V3.26 STAR-CD V4.06 STAR-CCM+ V3.02 Yes Yes Yes Yes Yes Yes Yes Yes Yes

Hexahedral / Trim Yes Hex / Tet (Hybrid) Yes Arbirtrary Polyhedra No

CD-adapco, Americas Agency Training Document

CFD Basics - 98

CFD Basics Comparison of Solvers Mesh Motion

Mesh Motion Rotating Reference Frames Arbitrary Sliding Meshes Parallel Partition across interfaces Cell layer addition / removal Conditional Cell attachment / detachment General Mesh Motion

STAR-CD V3.26 Yes Yes No Yes Yes Yes

STAR-CD V4.06 Yes Yes No Yes Yes Yes

STAR-CCM+ V3.02 Yes Yes Yes No No No

CD-adapco, Americas Agency Training Document

CFD Basics - 99

CFD Basics Comparison of Solvers Solution Algorithms

Algorithm SIMPLE AMG PISO Coupled Solver

STAR-CD V3.26 STAR-CD V4.06 STAR-CCM+ V3.02 Yes* Yes Yes Yes Yes No Yes Yes No Yes No Yes

Note: STAR V3.26 has SIMPLE for Steady State Only.

CD-adapco, Americas Agency Training Document

CFD Basics - 100

CFD Basics Comparison of Solvers Heat Transfer

Heat Transfer Conjugate Heat Transfer Surface Exchange Radiation Participating Media Radiation Solar Radiation Transparent Solids

STAR-CD V3.26 Yes Yes Yes Yes Yes

STAR-CD V4.06 Yes Yes Yes Yes Yes

STAR-CCM+ V3.02 Yes Yes Yes Yes Yes

CD-adapco, Americas Agency Training Document

CFD Basics - 101

CFD Basics Comparison of Solvers General Combustion Models


Mesh Type Solid (e.g. Coal) Liquid Gaseous EBU CFM Hybrid (kinetic / EBU) PPDF Ignition NOx and SOOT Models Complex Chemistry STAR-CD V3.26 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes STAR-CD V4.06 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes STAR-CCM+ V3.02 No No Yes Yes Yes No Yes Yes No No
CFD Basics - 102

CD-adapco, Americas Agency Training Document

CFD Basics Comparison of Solvers IC Engine Combustion Models

IC Engine Combustion Premixed SI Partially Premixed SI Diesel Ignition Models EGR NOx SOOT

STAR-CD V3.26 Yes Yes Yes Yes Yes Yes

STAR-CD V4.06 Yes Yes Yes Yes Yes Yes Yes

STAR-CCM+ V3.02 No No No No No No No

Diesel Combustion Models Yes

CD-adapco, Americas Agency Training Document

CFD Basics - 103

CFD Basics Comparison of Solvers Multi-Phase Flows

Feature Free Surface Cavitation

STAR-CD V3.26 STAR-CD V4.06 STAR-CCM+ V3.02 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes* No No

Dispersed Multiphase Yes (Lagrangian) Interpenetrating Yes Phases (Eulerian) Liquid Film Yes

Note:* Currently L2P in STAR-CCM+ does not include evaporation.


CD-adapco, Americas Agency Training Document CFD Basics - 104

CFD Basics Comparison of Solvers Multiphysics

Feature Aeroacoustics Fluid Structure Interaction Stress Melting and Solidification Electromagnetics

STAR-CD V3.26 STAR-CD V4.06 STAR-CCM+ V3.02 Yes Yes Yes Yes No No No No Yes* (Beta) Yes* (Beta) Yes* (Beta) No No No No

CD-adapco, Americas Agency Training Document

CFD Basics - 105

CFD Basics Comparison of Solvers Coupling to Other Codes


CODE GT-Power Wave FlowMaster SYSNOISE and ACTRAN CHEMKIN DARS STAR-CD V3.26 STAR-CD V4.06 STAR-CCM+ V3.02 Yes Yes No Yes Yes Yes Yes Yes* (V3.27) Yes Yes Yes No Yes No No No No Yes

CD-adapco, Americas Agency Training Document

CFD Basics - 106

Lecture STAR-CCM+ - Basics


This lecture introduces the basics of STAR-CCM+ to a new user. Topics Covered Introduction to the client server architecture Unique features Meshing capabilities Physics Models Boundary conditions and Post-Processing GUI layout Simulation File Workflow Accessing Help

1. 2. 3. 4. 5. 6. 7. 8. 9.

CD-adapco, Americas Agency Training Document

STAR-CCM+ Basics -1

Lecture - STAR-CCM+ Basics - Introduction

STAR-CCM+ is a state-of-the-art CFD solver from CDadapco that uses a Client Server approach. - Java front end (light on memory) and a C++ server

Client

Server
CD-adapco, Americas Agency Training Document STAR-CCM+ Basics -2

Lecture - STAR-CCM+ Basics - Introduction


What is a client? Client is the part through which you launch a simulation and work with, typically through the STAR-CCM+ workspace. What is a server? Server is the part of the architecture that implements commands in a simulation (e.g. import data, run the solver)

CD-adapco, Americas Agency Training Document

STAR-CCM+ Basics -3

Lecture - STAR-CCM+ - Basics Unique Environment

What is unique about the STAR-CCM+ environment? State of the art object-based GUI Simulation database: Fast, loaded on demand Binary Platform and Parallel independent User Programming Java language scripting User defined boundary conditions, source terms and post-processing Scalable, seamless parallel operation Client Server Architecture Operable on Windows, LINUX, and several UNIX platforms Documentation

Via online browser Context Sensitive help with F1 Key pdf document
CD-adapco, Americas Agency Training Document STAR-CCM+ Basics -4

Lecture - STAR-CCM+ Basics Novel Concepts


1. 2. 3.

Multi-Physics, continuum based modeling. Separation of Physics and Mesh. Generalized interfaces (allow communication between different regions in the solution domain).

CD-adapco, Americas Agency Training Document

STAR-CCM+ Basics -5

Lecture - STAR-CCM+ Basics Ports Supported


STAR-CCM+ is currently ported to: Windows 2000 / XP (32 bit and 64 bit) Linux 32 bit Linux 64 bit IBM AIX HPUX PaRisc HP Itanium SGI Altix Sun Solaris

CD-adapco, Americas Agency Training Document

STAR-CCM+ Basics -6

Lecture - STAR-CCM+ Basics Mesh

Surface Mesh Formats


.dbs pro-STAR surface database .inp pro-STAR cell / vertex shell input file .nas NASTRAN shell file .pat PATRAN shell file .stl Stereolithography file .fro FELISA front surface file Jt JT Open Surface file

CD-adapco, Americas Agency Training Document

STAR-CCM+ Basics -7

Lecture STAR-CCM+ Basics - Mesh


CAD Import Formats x_t, x_b Parasolid Transmit File .stp, .step Standardized Exchange of Product File .igs, .iges International Graphics Exchange Standard File

CD-adapco, Americas Agency Training Document

STAR-CCM+ Basics -8

Lecture - STAR-CCM+ - Basics - Mesh


Surface Meshing Surface Remesher Surface Wrapper (automated method for closing surfaces) Hole Filling Rough Patcher Edge Zipper Edge split, swap (techniques for improving triangle quality) Automatic repair of surface errors Automatic / Manual extraction of feature curves Surface Creation and Manipulation Creation of simple shapes Boolean Unite, Subtract and Intersect

CD-adapco, Americas Agency Training Document

STAR-CCM+ Basics -9

Lecture STAR-CCM+ Basics - Mesh

Volume Meshing Core Mesh


Tetrahedral mesh Polyhedral mesh Advanced Hexahedral (Trim) mesh

Boundary Layer mesh with prism layer Local / global parameter setting for mesh generation Volume sources (shapes like box, cone, cylinder, sphere for declaring regions in the cfd domain that need refinement) Extruder (For extending domains, building a solid layer)

CD-adapco, Americas Agency Training Document

STAR-CCM+ Basics -10

Lecture - STAR-CCM+ Basics - Mesh

Mesh Manipulation

Transform scale, translate, rotate, and reflect meshes Split and combine boundaries and regions Create, delete and fuse interfaces Convert 3D mesh to 2D mesh Create Cell Sets

CD-adapco, Americas Agency Training Document

STAR-CCM+ Basics -11

Lecture - STAR-CCM+ - Basics - Mesh

Import of Volume Mesh


pro-STAR Gridgen (via .cas file) Fluent (.cas, .msh) Gambit ICEM

CD-adapco, Americas Agency Training Document

STAR-CCM+ Basics -12

Lecture - STAR-CCM+ Basics - Physics


Basic Models

Space

Two-Dimensional Axisymmetric Three-Dimensional Steady Explicit / Implicit Unsteady Moving Reference Frames, Rotational, Translational Frozen Rotor (multiple reference frame)
CD-adapco, Americas Agency Training Document STAR-CCM+ Basics -13

Time

Motion

Lecture - STAR-CCM+ Basics - Physics


Flow and Energy

Inviscid, Laminar and Turbulent flow regimes Gas, Liquid, Solid, and Porous Media Total Energy Formulation Conjugate Heat Transfer Free-surface (VOF) Cavitation Lagrangian Multi-phase (no evaporation) Radiator Type Heat Exchanger Fan Curve Adjusted Momentum Source Fan
CD-adapco, Americas Agency Training Document STAR-CCM+ Basics -14

Lecture - STAR-CCM+ Basics - Physics


Turbulence Models

3 Variants of Spallart-Allmaras 7 Variants of k- 3 Variants of k- 3 Variants of Reynolds Stress Transport Large Eddy Simulation Detached Eddy Simulation Wall Treatment Low y+ High y+ All y+

CD-adapco, Americas Agency Training Document

STAR-CCM+ Basics -15

Lecture - STAR-CCM+ Basics - Physics


Radiation

Thermal Solar View Factors including support for baffles and symmetric boundaries Surface-to-Surface Participating Media

Multiphase Flow

VOF Cavitation Homogeneous Boiling Model Lagrangian Multi-Phase


CD-adapco, Americas Agency Training Document STAR-CCM+ Basics -16

Lecture - STAR-CCM+ Basics - Physics


Combustion

Eddy Break Up (EBU) Coherent Flame (CFM) Partially-Premixed Coherent Flame (PCFM) Presumed Probability Density Function (PPDF), adiabatic and non-adiabatic Ignitors

CD-adapco, Americas Agency Training Document

STAR-CCM+ Basics -17

Lecture - STAR-CCM+ Basics Boundary Conditions


Boundary Conditions

Wall No-slip, slip, specified temperature, adiabatic, specified heat flux, thermally convective wall (Tamb and heat transfer coefficient specified) Pressure Outlet Specified pressure, radial equilibrium Flow Split Outlet Specified outlet mass flow for incompressible flows Mass Flow Inlet Specified mass flow for compressible flows Stagnation Inlet Total Temperature, Total Pressure and Flow Direction

CD-adapco, Americas Agency Training Document

STAR-CCM+ Basics -18

Lecture - STAR-CCM+ Basics Boundary Conditions

Non-Reflecting Average total pressure, temperature and flow angle at inlet, static pressure at outlet. Velocity Inlet Specified velocity components, or specified magnitude and direction Free Stream Specified Mach number and flow angle, static temperature and static pressure Symmetry Plane Axis For Axisymmetric simulations

CD-adapco, Americas Agency Training Document

STAR-CCM+ Basics -19

Lecture - STAR-CCM+ Basics - Numerics


Numerics in STAR-CCM+
1. 2. 3.

Segregated Implicit Uses AMG SIMPLE solver Coupled Explicit Uses multi-stage Runge-Kutta solver Coupled Implicit Uses block AMG solver

CD-adapco, Americas Agency Training Document

STAR-CCM+ Basics -20

Lecture - STAR-CCM+ Basics Tools for Interacting with the Solution What are the tools available for interacting with the solution?
-

User defined properties and conditions Local coordinate systems Engineering Units for Input and Output (SI, USCS, User defined) Full interactivity between user and solution Field Functions Reports and Monitors Derived Parts (iso-surfaces, planes, lines, points, etc.)
CD-adapco, Americas Agency Training Document STAR-CCM+ Basics -21

Lecture - STAR-CCM+ Basics Tools For Interacting with the Solution


-

Visualization
-

Mesh, scalar and vector display Streamlines Animated streamlines and vectors Transforms (for symmetric or periodic models) Annotations with text or images Scene Legend Save Restore Views

High Resolution hard copy for plots X-Y plotting capability

CD-adapco, Americas Agency Training Document

STAR-CCM+ Basics -22

Lecture - STAR-CCM+ Basics - Terminology


STAR-CCM+ uses the following terminology: Regions Boundaries Interfaces Continuum Using the example shown on the right, the next few slides explain the terminology used.

1. 2. 3. 4.

CD-adapco, Americas Agency Training Document

STAR-CCM+ Basics -23

Lecture - STAR-CCM+ Basics - Region


A Region is a volume domain in space. Could be conformal (nodes connected one to one) or non-conformal (nodes not connected one to one).

CD-adapco, Americas Agency Training Document

STAR-CCM+ Basics -24

Lecture - STAR-CCM+ Basics - Boundaries


Boundaries are the exterior surface of regions. They could be a physical boundary (e.g. wall, inlet, outlet) or a connection between different regions.

CD-adapco, Americas Agency Training Document

STAR-CCM+ Basics -25

Lecture - STAR-CCM+ Basics - Interfaces


Interfaces permit transfer of mass and (or) energy between different regions, or non-conformal parts of the same region. Internal interface permits transfer of mass and energy. Contact interface permits transfer of energy only.

CD-adapco, Americas Agency Training Document

STAR-CCM+ Basics -26

Lecture - STAR-CCM+ Basics - Continuum


A continuum represents a collection of models that represent either the physics or the mesh of a given region.

CD-adapco, Americas Agency Training Document

STAR-CCM+ Basics -27

Lecture - STAR-CCM+ Basics Mouse Controls


Left Rotate Middle Zoom Right Pan Shift + Left Zoom box

CD-adapco, Americas Agency Training Document

STAR-CCM+ Basics -28

Lecture - STAR-CCM+ Basics Launching STAR-CCM+ In Windows: Double click on the STAR-CCM+ Icon In UNIX/LINUX Issue the command starccm+ Note: Need to make sure that the location of the starccm+ executable is defined in the path environmental variable.

CD-adapco, Americas Agency Training Document

STAR-CCM+ Basics -29

Lecture - STAR-CCM+ Basics - Startup


At startup, user can either: 1. Start a new simulation. 2. Load an existing simulation (after browsing files). 3. Select a simulation from recently opened simulations.

CD-adapco, Americas Agency Training Document

STAR-CCM+ Basics -30

Lecture - STAR-CCM+ Basics - Workspace

CD-adapco, Americas Agency Training Document

STAR-CCM+ Basics -31

Lecture STAR-CCM+ Basics - Toolbars


Toolbars in STAR-CCM+ provide easy access to common tasks executed while preparing and running a simulation. The next slide shows standard toolbars in STAR-CCM+. STAR-CCM+ provides methods for controlling the appearance of toolbars.

CD-adapco, Americas Agency Training Document

STAR-CCM+ Basics -32

Lecture - STAR-CCM+ Basics - Toolbars


System Toolbar Edit Toolbar Build Toolbar Mesh Toolbar Data Toolbar Display Toolbar
Plot Toolbar Animate Toolbar

CD-adapco, Americas Agency Training Document

STAR-CCM+ Basics -33

Lecture - STAR-CCM+ - Objects

CD-adapco, Americas Agency Training Document

STAR-CCM+ Basics -34

Lecture - STAR-CCM+ - Objects

CD-adapco, Americas Agency Training Document

STAR-CCM+ Basics -35

Lecture - STAR-CCM+ Basics - General Information


STAR-CCM+ has one file: (.sim) that contains the mesh, analysis setup and results. How do I save the simulation? File -> Save

CD-adapco, Americas Agency Training Document

STAR-CCM+ Basics -36

Lecture - STAR-CCM+ Basics: General Information


How do I run a simulation? Either: 1. Solution -> Run 2. Toolbar, pick run icon

CD-adapco, Americas Agency Training Document

STAR-CCM+ Basics -37

Lecture - STAR-CCM+ Basics Setting Preferences

CD-adapco, Americas Agency Training Document

STAR-CCM+ Basics -38

Lecture - STAR-CCM+ Basics Setting Preferences

CD-adapco, Americas Agency Training Document

STAR-CCM+ Basics -39

Lecture - STAR-CCM+ - General Information Work Flow


Work Flow in STAR-CCM+

Import CAD Check Surface Do manual repair if required. Setup Meshing Models and properties Setup Physics Models and properties Setup Boundary Conditions Generate Mesh Setup solver parameters and stopping criteria Setup post-processing (optional) Run analysis

CD-adapco, Americas Agency Training Document

STAR-CCM+ Basics -40

Lecture - STAR-CCM+ - General Information - Workflow

CD-adapco, Americas Agency Training Document

STAR-CCM+ Basics -41

Lecture - STAR-CCM+ - Getting Help


If you need help, you can click on the help button.

CD-adapco, Americas Agency Training Document

STAR-CCM+ Basics -42

Lecture - STAR-CCM+ - Getting Help


The online documentation can be accessed with a browser

CD-adapco, Americas Agency Training Document

STAR-CCM+ Basics -43

Lecture STAR-CCM+ - Basics - Help


Help contains:

Model description and formulation. Meshing, Solving, and Post-Processing techniques GUI panel descriptions. Training Guide that has several tutorials

CD-adapco, Americas Agency Training Document

STAR-CCM+ Basics -44

Lecture - STAR-CCM+ - Getting Help


In addition the F1 Key provides context sensitive help. e.g. If you need help on stopping criteria, then select Stopping Criteria, and hit the F1 key.

CD-adapco, Americas Agency Training Document

STAR-CCM+ Basics -45

Lecture - STAR-CCM+ - Getting Help


The browser will display help on Stopping Criteria

CD-adapco, Americas Agency Training Document

STAR-CCM+ Basics -46

Lecture STAR-CCM+ Basics - Summary

STAR-CCM+ is a state of the art CFD solver that uses a client server architecture. It is available on LINUX, several UNIX, and Windows platforms. Clearly separates physics and mesh providing great flexibility. Uses an object oriented GUI. All properties of the simulation (mesh, physics, solver settings, BCs) are stored in a .sim file. Online help is accessible via a browser.

CD-adapco, Americas Agency Training Document

STAR-CCM+ Basics -47

Lecture - STAR-CCM+ - Post-Processing


This section covers basic post-processing techniques in starccm+. For this case, we will use a pre-existing simulation file (lock30.sim). Main topics covered Scene Properties Working with Views Creation of Iso-surface Creation of tables to extract boundary values XY Plotting

1. 2. 3. 4. 5.

CD-adapco, Americas Agency Training Document

Post-Processing - 1

Lecture - STAR-CCM+ - Post-Processing Location of file

File for the exercise (lock30.sim) is located in: Foundation/STARCCM+/PostProcessing

CD-adapco, Americas Agency Training Document

Post-Processing - 2

Lecture - STAR-CCM+ - Post-Processing - Basics


STAR-CCM+ provides a powerful set of tools to visualize your solution. Post-Processing can be setup before, or after a CFD solution is obtained. Setting up of post-processing before start of the CFD solution, offers the advantage of watching the solution develop (as the CFD analysis is running in serial or parallel mode)

CD-adapco, Americas Agency Training Document

Post-Processing - 3

Lecture - Post-Processing - Basics


What is a Scene? A scene encapsulates a complete representation of components required to create an image or animation. It includes lights, cameras, actors, properties, transformations and geometry. What are the various types of Scenes? Geometry Scene Mesh Scene Scalar Scene Vector Scene Empty Scene
CD-adapco, Americas Agency Training Document Post-Processing - 4

Lecture - Post-Processing - Displayers


What is a displayer? It is the basic building block of a scene. Displayers provide a flexible way of controlling graphics entities in a scene. What are the types of displayers available? Geometry displayer (controls geometric appearance) Outline displayer (controls appearance of sharp edges) Scalar displayer (controls appearance of scalar contours) Vector displayer (controls appearance of vectors) Streamline displayer (controls appearance of streamlines)

CD-adapco, Americas Agency Training Document

Post-Processing - 5

Lecture - Post-Processing - Displayers


The next few slides show the layout of a typical scene in STAR-CCM+ (taken from our lock-valve tutorial) that has a geometry and scalar displayer. The properties associated with these displayers are explained.

CD-adapco, Americas Agency Training Document

Post-Processing - 6

Lecture - Post-Processing - Displayers


What are the Attributes of a Scene? -Background color -View (Projection mode) -Update (Is plot updated per iteration, time step? Where is it output (screen or file)) -Axes (Is triad displayed?) -Lights

CD-adapco, Americas Agency Training Document

Post-Processing - 7

Lecture - Post-Processing - Displayers


Geometry displayer controls -Color Mode -Opacity - Representation shown -Display of outline, mesh -Lighting -Transforms

CD-adapco, Americas Agency Training Document

Post-Processing - 8

Lecture - Post-Processing - Displayers


Properties of Outline displayer are similar to the geometry displayer, but it controls the appearance of outlines (edges) in the plot.

CD-adapco, Americas Agency Training Document

Post-Processing - 9

Lecture - Post-Processing - Displayers


Properties of a contour plot are controlled by the Scalar Displayer.

CD-adapco, Americas Agency Training Document

Post-Processing - 10

Lecture Post-Processing - Displayers

CD-adapco, Americas Agency Training Document

Post-Processing - 11

Lecture Post-Processing - Displayers


Main properties vector displayer controls: -Vector appearance and style -Projection mode -Opacity -Lighting

CD-adapco, Americas Agency Training Document

Post-Processing - 12

Lecture Post-Processing - Displayers


Vector Field Controls: -Range -Clipping -Units

CD-adapco, Americas Agency Training Document

Post-Processing - 13

Lecture Post-Processing - Views


Views control the appearance of a plot in STAR-CCM+. What are the three attributes of a view? Position Focal Point View up Projection Mode Where can I access views? Via Tools Folder

CD-adapco, Americas Agency Training Document

Post-Processing - 14

Lecture Post-Processing - Views

CD-adapco, Americas Agency Training Document

Post-Processing - 15

Lecture Post-Processing - Views


What is the Projection Mode? Property that controls how the camera maps world coordinates to view coordinates. Perspective Mapping of world coordinates into view coordinates that roughly approximates a camera lens. Parallel Mapping of world coordinates into view coordinates that preserves all parallel lines.

CD-adapco, Americas Agency Training Document

Post-Processing - 16

Lecture Post-Processing - Views


How can I access standard views?

CD-adapco, Americas Agency Training Document

Post-Processing - 17

Lecture Post-Processing Iso-surfaces


Iso-surfaces can be created via the Derived Parts folder in STAR-CCM+. Once created, iso-surfaces can be displayed in geometry, scalar and vector scenes, by including it in the parts folder of the appropriate geometry. Exercise: Create an iso-surface of turbulent viscosity ratio = 20 for the lock valve 30 deg Configuration.

CD-adapco, Americas Agency Training Document

Post-Processing - 18

Lecture Post-Processing Iso-surface

CD-adapco, Americas Agency Training Document

Post-Processing - 19

Lecture Post-Processing Iso-Surfaces

CD-adapco, Americas Agency Training Document

Post-Processing - 20

Lecture Post-Processing Iso-Surface

CD-adapco, Americas Agency Training Document

Post-Processing - 21

Lecture Post-Processing - Tables


STAR-CCM+ provides an easy means of extracting scalar quantities from boundaries, and exporting the data in table format. The next few slides show how wall shear stress can be extracted for the lock valve tutorial.

CD-adapco, Americas Agency Training Document

Post-Processing - 22

Lecture Post-Processing - Tables

CD-adapco, Americas Agency Training Document

Post-Processing - 23

Lecture Post-Processing - Tables

CD-adapco, Americas Agency Training Document

Post-Processing - 24

Lecture Post-Processing - Tables

CD-adapco, Americas Agency Training Document

Post-Processing - 25

Lecture Post-Processing XY Plots


The next few slides outline a procedure for creation of a line probe along a plane section, and plotting pressure on this line probe in the form of an XY plot.

CD-adapco, Americas Agency Training Document

Post-Processing - 26

Lecture Post-Processing XY Plot

CD-adapco, Americas Agency Training Document

Post-Processing - 27

Lecture Post-Processing XY plot

CD-adapco, Americas Agency Training Document

Post-Processing - 28

Lecture Post-Processing XY plot

CD-adapco, Americas Agency Training Document

Post-Processing - 29

Lecture Post-Processing XY Plot

CD-adapco, Americas Agency Training Document

Post-Processing - 30

Lecture Post-Processing XY Plot

CD-adapco, Americas Agency Training Document

Post-Processing - 31

Lecture Post-Processing XY Plot

CD-adapco, Americas Agency Training Document

Post-Processing - 32

Lecture Post-Processing XY Plot

CD-adapco, Americas Agency Training Document

Post-Processing - 33

Lecture Post-Processing - Summary


-

The concept of displayers was explained in detail. Properties of views were discussed. Creation of Iso-Surface was outlined. Creation of tables and export of data was described. Creation of XY plot was illustrated.

CD-adapco, Americas Agency Training Document

Post-Processing - 34

Lecture - STAR-CCM+ - Meshing


This Lecture outlines the Mesh Generation capabilities that are currently available in STAR-CCM+. Topics Surface Mesh Import and Checks Surface Mesh fixing tools Mesh generation Models Mesh Model Parameters Volume mesh generation Cell Quality Metrics

1. 2. 3. 4. 5. 6.

CD-adapco, Americas Agency Training Document

Meshing -1

Lecture - STAR-CCM+ - Meshing Surface Import


What are the surface mesh formats allowed by STARCCM+? .dbs proSTAR/amm database file .inp proSTAR/amm cell, vertex file .nas NASTRAN shell file .pat PATRAN shell file .stl Stereolithography file .fro- FELISA front surface file .jt JT Open Surface file

CD-adapco, Americas Agency Training Document

Meshing -2

Lecture - STAR-CCM+ - Meshing Surface Import Format Summary

CD-adapco, Americas Agency Training Document

Meshing -3

Lecture STAR-CCM+ Meshing CAD Import Formats What CAD Import Formats are allowed in STAR-CCM+? .iges Initial Graphics Exchange Specification file .x_t,.x_b Parasolid transmit file .stp, .step Standardized Exchange of Product file

CD-adapco, Americas Agency Training Document

Meshing -4

Lecture STAR-CCM+ Meshing CAD Import Format Summary

CD-adapco, Americas Agency Training Document

Meshing -5

Lecture - STAR-CCM+ - Meshing Surface Requirement What are the requirements for a surface mesh? Closed No free edges or mismatches Manifold Edges shared by no more than two triangles Non-Intersecting surface does not self intersect Good triangle quality - Nearly equal sized triangles - Gradual variation in triangle size - No sharp angles/ surface folds

CD-adapco, Americas Agency Training Document

Meshing -6

Lecture - STAR-CCM+ - Meshing Surface Fixing


What are the errors that can be fixed in STAR-CCM+? Holes Mismatches in surface (shells not connected one to one) Double surfaces, overlaps and unwanted internal features (via surface wrap) Pierced edges (self intersections) Details of surface repair in STAR-CCM+ will be covered with a tutorial.

CD-adapco, Americas Agency Training Document

Meshing -7

Lecture - STAR-CCM+ - Meshing Surface Checking How can I check the imported surface for errors?
1. 2.

Open Representations Folder. Right click on Import, and select Repair Surface.

CD-adapco, Americas Agency Training Document

Meshing -8

Lecture STAR-CCM+ Meshing Surface Fixing

CD-adapco, Americas Agency Training Document

Meshing -9

Lecture STAR-CCM+ Meshing Surface Checks

CD-adapco, Americas Agency Training Document

Meshing -10

Lecture STAR-CCM+ Meshing Surface Repair


-

After running surface checks, review the errors in surface. If there are too may errors to fix, you may need to run surface wrapper to fix errors. If there are a few errors in the surface, the following procedure is recommended: Fix non-manifold errors and free edges. Run Auto-repair to fix remaining errors

1. 2.

CD-adapco, Americas Agency Training Document

Meshing -11

Lecture STAR-CCM+ Meshing Surface Repair Options

CD-adapco, Americas Agency Training Document

Meshing -12

Lecture STAR-CCM+ Meshing Surface Repair Options

CD-adapco, Americas Agency Training Document

Meshing -13

Lecture STAR-CCM+ Meshing Surface Repair Selection Controls

CD-adapco, Americas Agency Training Document

Meshing -14

Lecture STAR-CCM+ Meshing Surface Repair Display Controls

CD-adapco, Americas Agency Training Document

Meshing -15

Lecture - STAR-CCM+ - Meshing - Continuum


What is a mesh continuum? A mesh continuum is a collection of models that are used to generate a mesh. What are the models that are available? Surface Wrapper Remesher Volume Mesher (tetrahedral, trimmed, polyhedral) Prism Layer Mesher Extruder

CD-adapco, Americas Agency Training Document

Meshing -16

Lecture STAR-CCM+ Meshing Surface Mesher Selection When should the surface remesher be used?
-

When a high accuracy of surface resolution is required. When imported surface is closed, but has poor quality triangulation (e.g. STL import) When triangulation quality of import surface has to be improved. When surface wrapper has been used.

CD-adapco, Americas Agency Training Document

Meshing -17

Lecture STAR-CCM+ Meshing - Surface Mesher Choice When should the Surface Wrapper be used? When a high level of surface accuracy is not critical When imported surface contains large gaps, holes and overlaps that cannot be fixed easily using manual repair. When import surface is made up of intersecting volumes that have to be combined.

CD-adapco, Americas Agency Training Document

Meshing -18

Lecture - STAR-CCM+ - Meshing Model Selection


To select models, right click on Mesh Continuum Pick Select Meshing Models

CD-adapco, Americas Agency Training Document

Meshing -19

Lecture - STAR-CCM+ - Meshing Model Selection


Now select the models that are needed, and pick close.

CD-adapco, Americas Agency Training Document

Meshing -20

Lecture - STAR-CCM+ - Meshing Reference Values


The properties of the Meshing models can be specified via the Reference Values Folder

CD-adapco, Americas Agency Training Document

Meshing -21

Lecture - STAR-CCM+ - Meshing Reference Values


Reference values allowed, depend on meshing models selected.

CD-adapco, Americas Agency Training Document

Meshing -22

Lecture - STAR-CCM+ - Meshing Reference Values Reference values can be specified at 4 levels: Continuum Region Boundary Interface Values specified at the boundary and interface level supercede values specified at region level, which in turn supercedes values specified at a continuum level.

1. 2. 3. 4.

CD-adapco, Americas Agency Training Document

Meshing -23

Lecture - STAR-CCM+ - Meshing Reference Value Specification What is the base size? Base size refers to a characteristic size used in mesh generation. What is a target size? Desired edge length What do we mean by min-max size? When proximity / curvature refinements are turned on, this parameter controls the lower and upper bounds of the cell size.
CD-adapco, Americas Agency Training Document Meshing -24

Lecture - STAR-CCM+ - Meshing Reference Value Specification Methods for specifying surface size: Min and Target -Try to achieve target size in absence of refinement from curvature / proximity -Refinements from curvature will not cause surface size to go below minimum Min and Max - Try to maintain current triangle size - If triangle size is larger than max, surface is refined - If triangle size is smaller than min, surface is coarsened
CD-adapco, Americas Agency Training Document Meshing -25

Lecture - STAR-CCM+ - Meshing Reference value specification Min only - Models will try and maintain current local triangle size - When local triangle size is below minimum, it will be coarsened

CD-adapco, Americas Agency Training Document

Meshing -26

Lecture - STAR-CCM+ - Meshing Surface Wrapper


What is the surface wrapper? Surface Wrapper, provides the user with a closed, manifold, non-intersecting surface, starting from a poor quality CAD surface. Problems commonly fixable by surface wrapping: Multiple intersecting parts Surface mismatches Double surfaces Overly complex details

1. 2. 3. 4.

CD-adapco, Americas Agency Training Document

Meshing -27

Lecture - STAR-CCM+ - Meshing Surface Wrapper Example

CD-adapco, Americas Agency Training Document

Meshing -28

Lecture - STAR-CCM+ - Meshing Surface Wrapper Example

CD-adapco, Americas Agency Training Document

Meshing -29

Lecture - STAR-CCM+ - Meshing - Remesher


What does the Remesher do? The remesher re-triangulates and improves the overall quality of the surface and optimizes it for generation of a volume mesh.

CD-adapco, Americas Agency Training Document

Meshing -30

Lecture - STAR-CCM+ - Meshing - Remesher


The remesher improves triangulation quality as shown below.

CD-adapco, Americas Agency Training Document

Meshing -31

Lecture - STAR-CCM+ - Meshing Volume Meshing


What are the types of volume meshes that can be generated by STAR-CCM+? Tetrahedral Mesh Polyhedral Mesh Trimmed Mesh (Advanced Hexahedral)

CD-adapco, Americas Agency Training Document

Meshing -32

Lecture - STAR-CCM+ - Meshing Volume Meshing

Tetrahedral Mesh

CD-adapco, Americas Agency Training Document

Meshing -33

Lecture - STAR-CCM+ - Meshing Volume Meshing

Polyhedral Mesh

CD-adapco, Americas Agency Training Document

Meshing -34

Lecture - STAR-CCM+ Meshing Volume Meshing

CD-adapco, Americas Agency Training Document

Meshing -35

Lecture - STAR-CCM+ Meshing Volume Meshing Poly/Tet Density

CD-adapco, Americas Agency Training Document

Meshing -36

Lecture - STAR-CCM+ - Meshing Volume Meshing

Trimmed Mesh (Advanced Hexahedral)

CD-adapco, Americas Agency Training Document

Meshing -37

Lecture - STAR-CCM+ Meshing Volume Meshing

CD-adapco, Americas Agency Training Document

Meshing -38

Lecture - STAR-CCM+ - Meshing Prism Layer Model What is the prism layer model? The prism layer model creates orthogonal, prismatic cells close to the boundary. Why is a prism layer needed? Whenever accurate simulation of turbulence or heat transfer is required, it is recommended to include a prism layer.

CD-adapco, Americas Agency Training Document

Meshing -39

Lecture - STAR-CCM+ - Meshing Prism Layer Model

For wall functions 1-3 layers are recommended. For Low Re turbulence models 10-15 layers are recommended.

CD-adapco, Americas Agency Training Document

Meshing -40

Lecture - STAR-CCM+ Meshing Prism Layer Model

CD-adapco, Americas Agency Training Document

Meshing -41

Lecture - STAR-CCM+ - Meshing Prism Layer Model


What methods are available to specify the prism layer properties? -Stretch Factor (default) -Wall Thickness -Thickness Ratio

CD-adapco, Americas Agency Training Document

Meshing -42

Lecture - STAR-CCM+ - Meshing Prism Layer Meshing


Selection of boundary type affects the default behavior of prism layers

CD-adapco, Americas Agency Training Document

Meshing -43

Lecture STAR-CCM+ Meshing Extruder Model


What is the Extruder Meshing Model? If the extruder is specified on a given boundary, the volume mesh will be extruded from the specified boundary either in the normal or specified direction, resulting in an extension to the original domain.

CD-adapco, Americas Agency Training Document

Meshing -44

Lecture STAR-CCM+ Meshing Extruder Model


What are the options available for extrusion type?
-

Constant Rate Constant Rate Normal Hyperbolic Tangent What parameters are applied for extrusion at boundary level?

Number of extrusion layers Extrusion Stretching Extrusion Magnitude

CD-adapco, Americas Agency Training Document

Meshing -45

Lecture STAR-CCM+ Meshing - Extruder

Note: There is an option to create a new region for the extruded mesh.

CD-adapco, Americas Agency Training Document

Meshing -46

Lecture - STAR-CCM+ - Meshing Cell Quality Metrics The following are the main cell quality metrics that are used to check a mesh in STAR-CCM+
-

Face Validity Cell Quality Volume Change Cell Skewness Angle Boundary Skewness Angle

CD-adapco, Americas Agency Training Document

Meshing -47

Lecture STAR-CCM+ Meshing Cell Quality Metrics How can I check Cell Quality Metrics in STAR-CCM+?
1.

2.

Select Mesh -> Diagnostics to run Mesh Diagnostics report. Via Derived parts, create thresholds for required cell quality metric.

CD-adapco, Americas Agency Training Document

Meshing -48

Lecture - STAR-CCM+ - Meshing Cell Quality Metrics


Face Validity It is an area weighted measure of the correctness of the face normals relative to their attached cell centroid. For a good quality cell, the face normals will point away from the attached cell centroid. For a cell with poor face validity, one or more face normals will point towards the cell centroid. Values below 1 mean that some portion of the face attached to the cell are not pointing away from the centroid (implying concavity). Values below 0.5 indicate a negative volume cell.

CD-adapco, Americas Agency Training Document

Meshing -49

Lecture - STAR-CCM+ - Meshing Cell Quality Metrics


Cell Quality This metric defines the quality of the cell based on the finite volume approximation of the gradient reconstruction at the cell centroid. A cell with a quality of 1.0 is considered perfect (e.g. perfect hex or tet). As the cell quality approaches zero, the cell becomes degenerate. Depending on the physics selected, the quality of the cell could be as low as 1e-6 and run without problems.

CD-adapco, Americas Agency Training Document

Meshing -50

Lecture - STAR-CCM+ Meshing Cell Quality Metrics


Volume Change This metric describes the ratio of a cells volume to the volume of its largest neighbor. A value of 1.0 indicates a cell has a volume equal to or higher than its neighbors. As the cell volume decreases relative to its neighbors (e.g. a sliver or flat cell), then the volume change metric can be used to flag the cell. Large jumps in volume from cell to cell cause instability in the solver. Cells with a value of Volume change of 1.0e-3 or less should be considered suspect and investigated.

CD-adapco, Americas Agency Training Document

Meshing -51

Lecture - STAR-CCM+ Meshing Cell Quality Metrics


Skewness Angle: This is the angle between the line joining the cell centroids of neighboring cells and the face normal. Cells with skewness angles greater than 85 degrees can cause convergence problems.

CD-adapco, Americas Agency Training Document

Meshing -52

Lecture STAR-CCM+ Meshing Cell Quality Metrics


Boundary Skewness Angle is the angle between the area face vector, and the vector joining the cell centroid and face centroid. It is important to keep this angle below 85 degrees, either when flow is laminar, or when solids are modeled.

CD-adapco, Americas Agency Training Document

Meshing -53

Lecture STAR-CCM+ Meshing Metrics - Fixing


What are the choices for fixing a mesh that has cells with poor cell quality metrics?
1.

2. 3.

Locate problem regions and remedy surface mesh (and thus volume mesh) by remeshing. Use Cell quality remediation (In Physics Models) Remove invalid cells from simulation.

CD-adapco, Americas Agency Training Document

Meshing -54

Lecture STAR-CCM+ - Meshing Cell Quality Remediation What does the cell quality remediation do? Computed gradients in bad quality cells and their neighbors are modified (at the expense of accuracy) to improve robustness of the solution. Thus impact on solution accuracy is limited to localized regions. Please note that it is always preferable to obtain a solution without using this option.

CD-adapco, Americas Agency Training Document

Meshing -55

Lecture - STAR-CCM+ - Meshing Removal of Invalid Cells


Make sure three dimensional model is turned on in the physics continuum. Region -> Remove Invalid cells. Suggested values are: 0.93 0.95 for face validity 1e-6 1e-9 for Min cell quality 1e-3 1e-4 for Min volume change Select OK
CD-adapco, Americas Agency Training Document Meshing -56

Lecture - STAR-CCM+ - Meshing Removal of Invalid Cells


On selecting OK, STARCCM+ will display the number of cells that are removed. To have minimal effect on the solution, symmetry plane boundaries are applied on the removed cell internal faces. Note: If cells are removed in this manner, the mesh cannot be exported.

CD-adapco, Americas Agency Training Document

Meshing -57

Lecture - STAR-CCM+ - Meshing - Summary

To generate a volume mesh in STAR-CCM+, the Surface Mesh has to be Closed, Manifold and Free of Pierced Faces (Intersections). The mesh should also have good triangulation quality. Surface Wrapper can be used to repair very poor quality CAD data (data with overlaps, intersecting parts, double shells, etc.) Remesher is used to improve triangulation quality. Volume mesh types allowed are Polyhedral, Trimmed (Advanced Hexahedral), and Tetrahedral. Prism Layer mesh is recommended when solving flows where turbulence and heat transfer at wall is important.

CD-adapco, Americas Agency Training Document

Meshing -58

Lecture - STAR-CCM+ - Meshing - Summary

Base Size is a reference size relative to which meshing parameters can be specified. Target Size is the desired edge length on a boundary. Min and Max size control the edge length when proximity or curvature based refinements are activated. Recommended Cell Quality Metrics for volume meshes are:

Face Validity > 0.93 Cell Quality > 1.0e-6 Volume Ratio > 1.0e-3 Skewness angle < 85 degrees
CD-adapco, Americas Agency Training Document Meshing -59

Lecture - STAR-CCM+ - Meshing Advanced Topics This Lecture outlines some of the advanced meshing topics in STAR-CCM+ Topics Creation and use of volume sources Multi-Region Meshing requirements Boolean Operations on Surfaces

1. 2. 3.

CD-adapco, Americas Agency Training Document

Advanced Meshing -1

Lecture STAR-CCM+ - Meshing Volume Sources


What are volume sources? Volume sources provide a means of defining refinement zones away from the surface of the geometry. (In the volume zone) Where can I access volume shapes? Under Tools -> Volume Shapes What shapes are currently allowed? Brick Sphere Cylinder Cone

CD-adapco, Americas Agency Training Document

Advanced Meshing -2

Lecture STAR-CCM+ Meshing Volume Shapes What are steps for using volume sources? Define volume shape Include volume shape in meshing continua, and specify size to be used.

1. 2.

CD-adapco, Americas Agency Training Document

Advanced Meshing -3

Lecture STAR-CCM+ - Meshing Volume Shapes

CD-adapco, Americas Agency Training Document

Advanced Meshing -4

Lecture STAR-CCM+ - Meshing Volume Shapes

CD-adapco, Americas Agency Training Document

Advanced Meshing -5

Lecture STAR-CCM+ - Meshing Volume Shapes

CD-adapco, Americas Agency Training Document

Advanced Meshing -6

Lecture STAR-CCM+ Meshing Multi Region


What are the requirements for multi-region meshing?
-

Each region should be closed, manifold, and nonintersecting. Common boundaries that exist between regions should be grouped together and flagged as interfaces. If a conformal mesh is required, interfaces have to be imprinted, and a single mesh continuum should be used.

CD-adapco, Americas Agency Training Document

Advanced Meshing -7

Lecture STAR-CCM+ Meshing Multi-Region

CD-adapco, Americas Agency Training Document

Advanced Meshing -8

Lecture Meshing Boolean Operations


What are the Boolean operations that can be performed in STAR-CCM+? Unite Intersect Subtract What are surface requirements for Boolean Operations? Each region should be closed, manifold and nonintersecting. The surface triangulation quality of regions does not matter.
CD-adapco, Americas Agency Training Document Advanced Meshing -9

Lecture Meshing Boolean Operations

CD-adapco, Americas Agency Training Document

Advanced Meshing -10

Lecture Meshing Boolean Operations

CD-adapco, Americas Agency Training Document

Advanced Meshing -11

Lecture Meshing Boolean Operations

CD-adapco, Americas Agency Training Document

Advanced Meshing -12

Lecture Meshing Boolean Operations

CD-adapco, Americas Agency Training Document

Advanced Meshing -13

Lecture Client Server in STAR-CCM+


Outline of Lecture Introduction to client and server Viewing Client and Server processes Connecting and Reconnecting to Servers Remote Server requirements Parallel Processing

CD-adapco, Americas Agency Training Document

Client Server 1

Lecture Client Server in STAR-CCM+


STAR-CCM+ uses a client server architecture in which: Simulation Objects are created and solved on the server Workspace views these objects through the client.

CD-adapco, Americas Agency Training Document

Client Server 2

Lecture Client Server in STAR-CCM+


Where should I run my Client? Client should be run on a local machine, that has hardware-accelerated graphics available. Where should I run my Server? Server should be run on a machine(s) with computing resources available for your simulation.

CD-adapco, Americas Agency Training Document

Client Server 3

Lecture Client Server in STAR-CCM+


Options for location of client and server:
-

Client and Server run on same machine (default) Client runs on local machine, server runs on remote machine. Client runs on one remote machine, server runs on a different remote machine. Note: Client can run on one architecture, and server can run on a different architecture.

CD-adapco, Americas Agency Training Document

Client Server 4

Lecture Client Server in STAR-CCM+ - Client and Server What is a Client? The client is that part of the client-server architecture through which you launch a simulation and work with it, typically through the STAR-CCM+ workspace. What is a Server? The server is the part of the client-server architecture, that implements your commands in a simulation (e.g. importing a mesh, running the solver)

CD-adapco, Americas Agency Training Document

Client Server 5

Lecture Client Server in STAR-CCM+ - Viewing Processes

CD-adapco, Americas Agency Training Document

Client Server 6

Lecture Client Server in STAR-CCM+ - Viewing Processes

CD-adapco, Americas Agency Training Document

Client Server 7

Lecture Client and Server in STAR-CCM+


How can I run my client in batch mode? A client can be run in batch mode, by passing a java macro that contains required commands. When should I run my client in batch mode? When no user interaction is required. (e.g. Running a large mesh for 1000 iterations, and saving simulation file)

CD-adapco, Americas Agency Training Document

Client Server 8

Lecture Client and Server in STAR-CCM+ - Server Properties

CD-adapco, Americas Agency Training Document

Client Server 9

Lecture Client and Server in STAR-CCM+ - Server Local Network Which server processes are displayed in the servers window? All servers that respond to a broadcast to the local network are listed in the window. What is a local network? In STAR-CCM+, a local network is all machines accessible without crossing a router, subject to any firewalls blocking the server locator port (8406).

CD-adapco, Americas Agency Training Document

Client Server 10

Lecture Client and Server in STAR-CCM+ Disconnecting From Server How can I disconnect from a Server? -Select Simulation Tab -Select File -> Disconnect

CD-adapco, Americas Agency Training Document

Client Server 11

Lecture Client and Server in STAR-CCM+ Reconnecting to Server How can I reconnect to my server? Option 1 File -> Connect to Server ; Specify host machine and port number that the server is listening. Option 2 Servers -> A Server -> Connect ; This attempts to connect directly to a given process based on properties of currently selected object. Note: Multiple clients can connect to the same server.
CD-adapco, Americas Agency Training Document Client Server 12

Lecture Client and Server in STAR-CCM+ Reconnecting to Server

CD-adapco, Americas Agency Training Document

Client Server 13

Lecture Client and Server in STAR-CCM+ - Remote Servers The client server model allows users to start the workspace on a different machine to the server. This is useful if you wish to setup and monitor your simulation from your workstation, but let another machine compute the solution. Requirements for running remotely Have remote shell access to the remote server machine without password prompting. Starccm+ command should be available on the remote machines.

1.

2.

CD-adapco, Americas Agency Training Document

Client Server 14

Lecture Client and Server in STAR-CCM+ - Parallel Processing What is a parallel simulation? A parallel simulation is one in which work is computed by more than one process. In distributing the processes across multiple CPUs the overall time to obtain a solution can be reduced. What are the key advantages in running a parallel analysis? Reducing turnaround time for a solution. Ability to run larger problems.

CD-adapco, Americas Agency Training Document

Client Server 15

Lecture Client Server in STAR-CCM+ - Parallel Processing


What is a Parallel Server?

The client server model is extended for parallel operation, by including a controller. The controller is a light weight process. It gathers instructions from the client, passes them to the workers. Then it gathers data from the workers and passes it to the client.
CD-adapco, Americas Agency Training Document Client Server 16

Lecture Client Server in STAR-CCM+ - Parallel Processing


The following are the basic requirements to run STAR-CCM+ in parallel:
1.

2. 3. 4.

5.

STAR-CCM+ must be installed on each of the machines you wish to run. (Alternately the workstations should have access to a server that has the installation) For Windows, MPI must be installed on each machine. LINUX / UNIX requires password free rsh access to each machine. Controller and the worker processes should run on homogeneous machines (client could run on a different platform). Correct number and type of licenses should be available during run time.

CD-adapco, Americas Agency Training Document

Client Server 17

Lecture Client and Server in STAR-CCM+ - Parallel Processing


How do I launch STAR-CCM+ in parallel from workspace and run on local workstation with multiple processors?
-

File -> New Simulation Set Run Mode to Parallel Select Run all processes on local host which is the default. Set number of Compute Processes to number of processors on workstation. Select OK

CD-adapco, Americas Agency Training Document

Client Server 18

Lecture Client and Server in STAR-CCM+ - Parallel Processing


How can I launch a parallel STAR-CCM+ run from the workspace to run on hosts (different from my workstation)?
-

Select File -> New Simulation (or File -> Load Simulation) Select Specify Parallel hosts Pick an option for the controller process Enter name of host, number of processors and select add host. (Or alternately use a machine file)

CD-adapco, Americas Agency Training Document

Client Server 19

Lecture - Client and Server in STAR-CCM+ - Parallel Processing How do I launch STAR-CCM+ on 2 processors of my workstation from the command line? starccm+ -np 2 To run on a local machine, the on and the machinefile options can be omitted.

CD-adapco, Americas Agency Training Document

Client Server 20

Lecture - Client and Server in STAR-CCM+ - Parallel Processing How can I run in parallel from the command line on four different hosts? starccm+ -on node1,node2,node3,node4 ~/airfoil.sim

CD-adapco, Americas Agency Training Document

Client Server 21

Lecture - Client and Server in STAR-CCM+ - Parallel Processing STAR-CCM+ can be run in parallel using the following batch queuing systems: pbs lsf Load Leveller Sun Grid Engine For more details, consult the online documentation. starccm+ -h or starccm+ -phelp will give additional details.
CD-adapco, Americas Agency Training Document Client Server 22

Lecture STAR-CCM+ - Scripting


This section gives a brief introduction to script development in STAR-CCM+. The topics covered include:
-

Introduction Recording and Playing Java Macros Simple Examples Java API Summary

CD-adapco, Americas Agency Training Document

Scripting -1

Lecture STAR-CCM+ - Scripting - Introduction


Why do we script? We develop scripts to automate repetitive tasks. What is a Java Macro? A STAR-CCM+ Java Macro is a Java Program that is compiled and executed within the STAR-CCM+ workspace.

CD-adapco, Americas Agency Training Document

Scripting -2

Lecture STAR-CCM+ - Scripting


What is the easiest way to create a macro in STARCCM+? Start recording a macro in a STAR-CCM+ session. Next, make suitable modifications, by editing the recorded macro in a text editor.

CD-adapco, Americas Agency Training Document

Scripting -3

Lecture STAR-CCM+ - Scripting - Introduction


Some Simple Rules to keep in Mind:
1.

2. 3.

Name of source code file must match the name of the public class defined in that file, and the file extension must be .java // comments out rest of the line. /*.*/ is used to comment multiple lines of text.

CD-adapco, Americas Agency Training Document

Scripting -4

Lecture STAR-CCM+ - Scripting Recording Macros

CD-adapco, Americas Agency Training Document

Scripting -5

Lecture STAR-CCM+ - Scripting Playing Macros

CD-adapco, Americas Agency Training Document

Scripting -6

Lecture STAR-CCM+ - Scripting Playing Macros How can I play a macro in batch mode? starccm+ -batch cavity.java (on linux / unix) starccm+.exe batch cavity.java (on windows)

CD-adapco, Americas Agency Training Document

Scripting -7

Lecture - STAR-CCM+ - Scripting Playing Macros If you would like to execute a java macro starting from an existing simulation file simname.sim, then issue the following command for a UNIX/LINUX based system: starccm+ simname.sim batch filename.java For windows: starccm+.exe simname.sim batch filename.java

CD-adapco, Americas Agency Training Document

Scripting -8

Lecture STAR-CCM+ - Scripting - Examples


The first example macro shows setting up of total number of iterations in a simulation. First, this will be hard coded in the macro. Next, it will be show how the number of iterations can be obtained as an input from a user.

CD-adapco, Americas Agency Training Document

Scripting -9

Lecture STAR-CCM+ - Scripting - Examples

CD-adapco, Americas Agency Training Document

Scripting -10

Lecture STAR-CCM+ - Scripting - Examples

CD-adapco, Americas Agency Training Document

Scripting -11

Lecture STAR-CCM+ - Scripting - Examples


The next macro shown sets up a physics continuum for air. This macro was created by means of recording a physics continuum setup from the GUI.

CD-adapco, Americas Agency Training Document

Scripting -12

Lecture STAR-CCM+ - Scripting - Examples

CD-adapco, Americas Agency Training Document

Scripting -13

Lecture STAR-CCM+ - Scripting - Examples

CD-adapco, Americas Agency Training Document

Scripting -14

Lecture STAR-CCM+ - Scripting Java API


What is the Java API? Java API or Application Programmer Interface, contains a comprehensive set of Java code that functions in STARCCM+ macros. It can be accessed via Help -> Java API.

CD-adapco, Americas Agency Training Document

Scripting -15

Lecture STAR-CCM+ - Scripting Java API

CD-adapco, Americas Agency Training Document

Scripting -16

Lecture STAR-CCM+ - Scripting - Summary


Scripting is used for automation of tasks. Java Macros are used for scripting STAR-CCM+. Easiest way of creating macros is by recording them from the GUI and playing them. Macros can be played interactively or in batch. A few simple macro examples were discussed.

CD-adapco, Americas Agency Training Document

Scripting -17

Lecture - Field Functions - Introduction


What are Field Functions? Field Functions provide a mechanism by which fields (i.e. raw data from a simulation stored in cells and / or boundaries) may be viewed and defined in STAR-CCM+. What are System Field Functions? These are pre-defined field functions created by models activated in continua. They have a unique name and could either be a scalar or a vector. What are User Field Functions? These are field functions created by a user to access scalar or vector field data. They are created manually and defined in terms of already defined field functions.

CD-adapco, Americas Agency Training Document

Field Functions - 1

Lecture - Field Functions - Uses


What are common uses of field functions? Specification of boundary conditions (e.g. Varying back pressure as a function of time). Specifying Material Properties (e.g. specification of density variation based on temperature). Initialization. Post-Processing (e.g extracting secondary quantities from the primary variables) Geometric manipulation (e.g. splitting of a boundary)

1.

2.

3. 4.

5.

CD-adapco, Americas Agency Training Document

Field Functions - 2

Lecture - Field Functions Locations and Components


Where are Field Functions Located? Tools -> Field Functions What are the components of a Field Function? Dimension Type (scalar or vector) Function Name

CD-adapco, Americas Agency Training Document

Field Functions - 3

Lecture - Field Functions Format and Rules


- Field Functions follow ANSI C syntax - General Syntax (condition)? true_value : false_value - Scalar field functions start with a $ - Vector field functions start with $$ - Scalar components of vector field functions are obtained by including a 0,1,2 in square brackets (e.g. $$Velocity[0])

CD-adapco, Americas Agency Training Document

Field Functions - 4

Lecture - Field Functions Commonly Used Field Functions

CD-adapco, Americas Agency Training Document

Field Functions - 5

Lecture - Field Functions Miscellaneous Operators

CD-adapco, Americas Agency Training Document

Field Functions - 6

Lecture - Field Functions Trigonometric Operators

CD-adapco, Americas Agency Training Document

Field Functions - 7

Lecture - Field Functions Vector Operators

CD-adapco, Americas Agency Training Document

Field Functions - 8

Lecture Field Functions - Examples


If we want to apply time varying velocity defined by:

V = 10 Sin (50t)
This can be defined as:

10 * sin(50 * $Time)

CD-adapco, Americas Agency Training Document

Field Functions - 9

Lecture Field Functions - Examples


A few field function coding examples are shown in the next few slides. It is assumed that the user has already defined the dimensions and name of the field function, and only the formula to be used is shown.

CD-adapco, Americas Agency Training Document

Field Functions - 10

Lecture Field Functions - Examples


If we want to define Turbulence Intensity as:

2 I= k 3
This can be defined as: sqrt (2/3 * TurbulentKineticEnergy)

CD-adapco, Americas Agency Training Document

Field Functions - 11

Lecture Field Function - Examples


For a boundary, if we want to set a temperature of 300K if X > 1, and 400K if X <= 1, this can be done as: ($$Centroid[0] > 1) ? 300 : 400

CD-adapco, Americas Agency Training Document

Field Functions - 12

Lecture - STAR-CCM+ - FAQ Solver Memory Requirement How Much Memory Does STAR-CCM+ Solver Require? For a non-polyhedral mesh with a two equation turbulence model: Segregated Coupled Explicit Coupled Implicit 500 MB per 1 million cells 1 GB per 1 million cells 2 GB per 1 million cells

CD-adapco, Americas Agency Training Document

FAQ -1

Lecture - STAR-CCM+ - FAQ - Convergence


Convergence Problems In numerous instances poor convergence can be traced to: Mesh quality
-

Skewness angles greater than 85 degrees eg. Placing a flow split boundary where there is recirculation.

In correctly placed or specified boundary conditions


-

Insufficient mesh resolution in regions of strong gradients

CD-adapco, Americas Agency Training Document

FAQ -2

Lecture - STAR-CCM+ - FAQ Tracking Residuals


How Can I track residuals on a cell wise basis?

In solver expert properties turn on Retain Temporary Storage

If analysis is run with this option turned on, then in the functions available for plotting, we get residuals and corrections for each equation. Use this option only for debug purposes, as it increases the memory requirement and the size of the file.

CD-adapco, Americas Agency Training Document

FAQ -3

Lecture - STAR-CCM+ - FAQ Under-relaxation Factors


Under-relaxation Factors

Coupled Solver

Turn on verbosity to low If number of inner iterations is less than 4, increase the courant number. If the number of inner iterations is larger than 8, then reduce the courant number. Use default values If flow and energy are coupled, use 0.5 for energy If analysis is struggling use 0.5 for for U,V,W and 0.2 for P If you have to lower the under-relaxation a lot lower than the above values, it may be an indication of other problems with the mesh or setup.
CD-adapco, Americas Agency Training Document FAQ -4

Segregated Solver

Lecture - STAR-CCM+ - FAQ Turbulence Initialization

When is it important to initialize turbulence? It is important to initialize turbulence when zero velocity initialization is used.

Reasonable values are 2% intensity and turbulence viscosity ratio between 1 and 100. K = 1.5 * I^2 * U^2 ; epsilon = (rho * 0.09 * k^2) / (viscosity ratio * mu) Note: Failure to use appropriate initialization tends to show as large normalized residual values for k and epsilon.

CD-adapco, Americas Agency Training Document

FAQ -5

Lecture - STAR-CCM+ - FAQ Residual Monitoring


What residuals are reported by STAR-CCM+ as default? The residuals reported by STAR-CCM+ as default are the residuals normalized with respect to the maximum residual value (in any cell) in the first 5 iterations. If I want to print the absolute residuals, how can I do this in STAR-CCM+? Under Monitor, if the Normalization option is set to off, then the RMS (root mean square) of the residuals of the entire domain will be plotted.

CD-adapco, Americas Agency Training Document

FAQ -6

Lecture - STAR-CCM+ - FAQ Residual Monitoring

CD-adapco, Americas Agency Training Document

FAQ -7

STAR-CCM+ - FAQ - Precision


What is the precision used in STAR-CCM+? STAR-CCM+ starts out as double precision. Anything that does not need double precision is downgraded to single precision. Spatial Coordinates and Pressure are stored using double precision. Volume and Pressure residuals are stored using single precision.

CD-adapco, Americas Agency Training Document

FAQ -8

Lecture STAR-CCM+ FAQ Meshing Memory


How much memory does STAR-CCM+ require for mesh generation? Rough conservative numbers are: Advanced Hexahedral (Trim) Tetrahedral Polyhedral 250 MB for 1 million cells 250 MB for 1 million cells 1 GB for 1 million cells

CD-adapco, Americas Agency Training Document

FAQ -9

Lecture STAR-CCM+ - Tessellation Density


What feature angle value is used at various tessellation densities for parasolid / iges / step import? The angles used are 12, 6, 3, 1.5, 0.75 degrees, moving from coarse to very fine.

CD-adapco, Americas Agency Training Document

FAQ -10

Lecture STAR-CCM+ FAQ Stopping Mesh Generation

CD-adapco, Americas Agency Training Document

FAQ -11

Lecture - STAR-CCM+ FAQ Cell Sets


Where Can I access the Cell Set Tool? Cell Set Tool is present in the Representations Folder.

What are the main methods for creating a new cell set? -Cell List (proSTAR cell number) -Threshold (using a scalar criteria) -Zone (drawing a box) -Geometric Range

CD-adapco, Americas Agency Training Document

FAQ -12

Lecture STAR-CCM+ - FAQ Adding Materials


How can I add a material to the material properties database?
1.

2.

Make a copy of props.dbs in the starccm+ installation directory for safe keeping. Edit database and add material to database.

CD-adapco, Americas Agency Training Document

FAQ -13

Lecture - STAR-CCM+ - FAQ Finding Scalar Values


How can I find the value of a scalar and location of a cell in a scalar scene? 1. Move mouse over cell of interest, and hit . The output window shows the value.

CD-adapco, Americas Agency Training Document

FAQ -14

Lecture - STAR-CCM+ - FAQ Reference Pressure


What is the use of reference pressure? Reference pressure is means of reducing numerical round off error in pressure calculations. This is necessary since differences in pressure are small relative to the absolute value of pressure (especially in incompressible and low Mach Number flows). When is the location of pressure reference important? If the domain does not have a pressure boundary, the location of pressure reference is important. Why is the location of pressure reference required for a problem without pressure boundaries? In such cases, Neumann conditions are applied at the boundary. If the pressure is not pinned, pressure can become arbitrarily high causing problems.
CD-adapco, Americas Agency Training Document FAQ -15

Lecture - STAR-CCM+ - FAQ Reference Pressure


How does STAR-CCM+ determine the location of reference pressure? STAR-CCM+ sets the reference pressure on the boundary face that has the smallest x,y,z coordinates.

CD-adapco, Americas Agency Training Document

FAQ -16

STAR-CCM+ - FAQ Saving Notes to sim file

Step 1.

Step 2.

Step 3. Step 4.

CD-adapco, Americas Agency Training Document

FAQ -17

Lecture STAR-CCM+ FAQ Graphics Hardware

STAR-CCM+ requires use of latest graphics drivers. On LINUX workstations, make sure that latest glx drivers are installed (older drivers can make the measuring tool freeze) If graphics problems persist after installation of latest drivers, users can launch starccm+ with the mesa option to bypass the installed graphics hardware.

CD-adapco, Americas Agency Training Document

FAQ -18

Das könnte Ihnen auch gefallen