Documente Academic
Documente Profesional
Documente Cultură
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
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
CFD Basics - 2
CFD Basics
What is CFD? CFD is Computational Fluid Dynamics
PC, workstation, cluster gas or liquid: Material that deforms continuously under application of a shear stress Moving (as opposed to static)
Fluid
Dynamics
CFD Basics - 3
CFD Basics - 4
CFD Basics - 5
turbulence model
combustion model
moving mesh*
solution controls*
postprocessing*
conservation equations
computer
RESULTS
spray model
solution algorithm
initial/boundary conditions*
operating conditions*
optimisation
CAD geometry*
CAD
Meshing
1.
Geometry Building
2.
CFD
Pre/Post/Solution
3.
Pre-Processor
4.
Solver Post-Processor
Run Analysis
5.
CFD Basics - 7
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
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.
CFD Basics - 9
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
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)
CFD Basics - 11
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
CFD Basics - 12
/t dV + u dA = dA + S dV
V S S V
Convective Flux
Diffusion Flux
Volumetric Source
CFD Basics - 13
u dA
CD-adapco, Americas Agency Training Document
dA
CFD Basics - 14
CFD Basics - 15
CFD Basics - 16
CFD Basics - 17
CFD Basics Boundary Conditions External Flow Examples - Flow over an aircraft or automobile - Flow over a cylinder - Flow around buildings
CFD Basics - 18
Free Stream
Inlet
Outlet
No slip Wall
CFD Basics - 19
CFD Basics - 20
CFD Basics - 22
CFD Basics - 23
Flow inside ducts Flow inside Intake/Exhaust manifolds Flow inside coolant jackets Flow inside human blood vessels In-Cylinder flow of IC engines
CFD Basics - 24
Inlet
Outlet
CFD Basics - 25
CFD Basics - 26
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 direction
3L-8L
CD-adapco, Americas Agency Training Document
10L
CFD Basics - 28
CFD Basics - 29
A periodic boundary condition refers to a pair of boundaries where the flow repeats itself.
CFD Basics - 30
CFD Basics - 31
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.
CFD Basics - 33
==
1 t
t (t) dt
(t)=+ (t)
CFD Basics - 34
CFD Basics - 36
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.
CFD Basics - 37
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
CFD Basics - 38
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.
CFD Basics - 39
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
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 - 42
CFD Basics - 43
CFD Basics - 44
A cc + k A kk = Q c
CFD Basics - 45
CFD Basics - 46
CFD Basics - 47
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 - 49
CFD Basics - 50
CFD Basics - 51
CFD Basics - 52
CFD Basics - 53
CFD Basics - 54
CFD Basics - 55
CFD Basics - 56
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 - 58
Meshing: ...
CAD
MESHER
Solid
Fluid
CD-adapco, Americas Agency Training Document CFD Basics - 61
CFD Basics - 62
triangle
CD-adapco, Americas Agency Training Document CFD Basics - 63
LOW QUALITY
Equilateral triangles imply good quality. quality
HIGH QUALITY
CFD Basics - 64
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 - 66
Prismatic Hexahedral
Arbitrary Polyhedral
Tetrahedral Pyramid
CFD Basics - 67
CFD Basics - 68
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
CFD Basics - 69
CFD Basics - 70
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.
CFD Basics - 71
CFD Basics - 72
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).
CFD Basics - 73
CFD Basics - 74
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.
CFD Basics - 75
Mesh dependency performed by successively halving surface triangulation size from 20mm to 0.625mm Convergence judged from pressure drop across jacket
CFD Basics - 76
2,322,106 TETS
593,888 POLYS
CFD Basics - 77
2,322,106 TETS
593,888 POLYS
CFD Basics - 78
MESH DEPENDENCY
POLY
TET
Delta P (kPa)
6.3 hours > 5% error 43.25 hours 1.6 hours < 3% error 10 hours
Number of Cells
CFD Basics - 79
High Quality
Convection
CFD Basics - 80
CFD Basics - 81
~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)
CFD Basics - 82
CFD Basics - 83
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
Centerline Cp
CFD Basics - 86
CFD Basics - 87
CFD Basics - 88
CFD Basics - 89
CFD Basics - 90
CFD Basics - 91
CFD Basics - 92
CFD Basics - 93
CFD Basics - 94
CFD Basics - 95
CFD Basics - 97
STAR-CD V3.26 STAR-CD V4.06 STAR-CCM+ V3.02 Yes Yes Yes Yes Yes Yes Yes Yes Yes
CFD Basics - 98
Mesh Motion Rotating Reference Frames Arbitrary Sliding Meshes Parallel Partition across interfaces Cell layer addition / removal Conditional Cell attachment / detachment General Mesh Motion
CFD Basics - 99
STAR-CD V3.26 STAR-CD V4.06 STAR-CCM+ V3.02 Yes* Yes Yes Yes Yes No Yes Yes No Yes No Yes
Heat Transfer Conjugate Heat Transfer Surface Exchange Radiation Participating Media Radiation Solar Radiation Transparent Solids
IC Engine Combustion Premixed SI Partially Premixed SI Diesel Ignition Models EGR NOx SOOT
STAR-CCM+ V3.02 No No No No No No No
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
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
1. 2. 3. 4. 5. 6. 7. 8. 9.
STAR-CCM+ Basics -1
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
STAR-CCM+ Basics -3
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
Multi-Physics, continuum based modeling. Separation of Physics and Mesh. Generalized interfaces (allow communication between different regions in the solution domain).
STAR-CCM+ Basics -5
STAR-CCM+ Basics -6
.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
STAR-CCM+ Basics -7
STAR-CCM+ Basics -8
STAR-CCM+ Basics -9
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)
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
pro-STAR Gridgen (via .cas file) Fluent (.cas, .msh) Gambit ICEM
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
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
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+
Thermal Solar View Factors including support for baffles and symmetric boundaries Surface-to-Surface Participating Media
Multiphase Flow
Eddy Break Up (EBU) Coherent Flame (CFM) Partially-Premixed Coherent Flame (PCFM) Presumed Probability Density Function (PPDF), adiabatic and non-adiabatic Ignitors
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
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
Segregated Implicit Uses AMG SIMPLE solver Coupled Explicit Uses multi-stage Runge-Kutta solver Coupled Implicit Uses block AMG solver
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
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
1. 2. 3. 4.
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.
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
Model description and formulation. Meshing, Solving, and Post-Processing techniques GUI panel descriptions. Training Guide that has several tutorials
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.
1. 2. 3. 4. 5.
Post-Processing - 1
Post-Processing - 2
Post-Processing - 3
Post-Processing - 5
Post-Processing - 6
Post-Processing - 7
Post-Processing - 8
Post-Processing - 9
Post-Processing - 10
Post-Processing - 11
Post-Processing - 12
Post-Processing - 13
Post-Processing - 14
Post-Processing - 15
Post-Processing - 16
Post-Processing - 17
Post-Processing - 18
Post-Processing - 19
Post-Processing - 20
Post-Processing - 21
Post-Processing - 22
Post-Processing - 23
Post-Processing - 24
Post-Processing - 25
Post-Processing - 26
Post-Processing - 27
Post-Processing - 28
Post-Processing - 29
Post-Processing - 30
Post-Processing - 31
Post-Processing - 32
Post-Processing - 33
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.
Post-Processing - 34
1. 2. 3. 4. 5. 6.
Meshing -1
Meshing -2
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
Meshing -4
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
Meshing -6
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.
Meshing -8
Meshing -9
Meshing -10
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.
Meshing -11
Meshing -12
Meshing -13
Meshing -14
Meshing -15
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.
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.
Meshing -18
Meshing -19
Meshing -20
Meshing -21
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.
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
Meshing -26
1. 2. 3. 4.
Meshing -27
Meshing -28
Meshing -29
Meshing -30
Meshing -31
Meshing -32
Tetrahedral Mesh
Meshing -33
Polyhedral Mesh
Meshing -34
Meshing -35
Meshing -36
Meshing -37
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.
Meshing -39
For wall functions 1-3 layers are recommended. For Low Re turbulence models 10-15 layers are recommended.
Meshing -40
Meshing -41
Meshing -42
Meshing -43
Meshing -44
Constant Rate Constant Rate Normal Hyperbolic Tangent What parameters are applied for extrusion at boundary level?
Meshing -45
Note: There is an option to create a new region for the extruded mesh.
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
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.
Meshing -48
Meshing -49
Meshing -50
Meshing -51
Meshing -52
Meshing -53
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.
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.
Meshing -55
Meshing -57
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.
Meshing -58
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.
Advanced Meshing -1
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.
Advanced Meshing -3
Advanced Meshing -4
Advanced Meshing -5
Advanced Meshing -6
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.
Advanced Meshing -7
Advanced Meshing -8
Client Server 1
Client Server 2
Client Server 3
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.
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)
Client Server 5
Client Server 6
Client Server 7
Client Server 8
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).
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
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
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.
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.
Client Server 15
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
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.
Client Server 17
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
Client Server 18
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)
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.
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
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
Introduction Recording and Playing Java Macros Simple Examples Java API Summary
Scripting -1
Scripting -2
Scripting -3
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.
Scripting -4
Scripting -5
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)
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
Scripting -8
Scripting -9
Scripting -10
Scripting -11
Scripting -12
Scripting -13
Scripting -14
Scripting -15
Scripting -16
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.
Scripting -17
Field Functions - 1
1.
2.
3. 4.
5.
Field Functions - 2
Field Functions - 3
Field Functions - 4
Field Functions - 5
Field Functions - 6
Field Functions - 7
Field Functions - 8
V = 10 Sin (50t)
This can be defined as:
10 * sin(50 * $Time)
Field Functions - 9
Field Functions - 10
2 I= k 3
This can be defined as: sqrt (2/3 * TurbulentKineticEnergy)
Field Functions - 11
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
FAQ -1
Skewness angles greater than 85 degrees eg. Placing a flow split boundary where there is recirculation.
FAQ -2
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.
FAQ -3
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
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.
FAQ -5
FAQ -6
FAQ -7
FAQ -8
FAQ -9
FAQ -10
FAQ -11
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
FAQ -12
2.
Make a copy of props.dbs in the starccm+ installation directory for safe keeping. Edit database and add material to database.
FAQ -13
FAQ -14
FAQ -16
Step 1.
Step 2.
Step 3. Step 4.
FAQ -17
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.
FAQ -18