Best practices in CFD

37
© Zeus Numerix Defense | Nuclear Power | Aerospace | Infrastructure | Industry Practices to be followed to get reasonable results Abhishek Jain [email protected] Best Practices

Transcript of Best practices in CFD

© Z

eus N

um

erix

Defense | Nuclear Power | Aerospace | Infrastructure | Industry

Practices to be followed to get reasonable results

Abhishek [email protected]

Best Practices

© Z

eus N

um

erix

2

Overview

Zeus Numerix: Introduction

Assumption

What is a Best Practice

Surface Grid

Volume Grid

Sample Problems

Pressure Drop

Skin Friction

Heat driven flows

Initial and Boundary Conditions

General Gyan

© Z

eus N

um

erix

Assumption

Participants know what CFD is about

Know the basics of Compressible and Incompressible flow

Know what are Initial Conditions and Boundary Conditions

Know about Meshes

Surface Mesh

Volume Mesh

Clustering

Smoothening

Have basic idea of Fluid Mechanics

3

© Z

eus N

um

erix

Best Practices

Best Practice is a misnomer

It should be good practices

Before touching computer know

Problem statement

Aim of the problem

Accuracy required

Computing power available

No blind trust on the software

Validation

http://www.grc.nasa.gov/WWW/wind/valid/tutorial/glossary.html (a must read for all)

4

© Z

eus N

um

erix

GRID GENERATION

Rules to be followed in grid generation

5

© Z

eus N

um

erix

Grid Generation Essentials

Knowledge of Physics is essential

Grid for pressure drop estimation is very different from heat flux estimation

Accuracy required should be understood

Preliminary design calculations or design improvement

Very accurate may not be cost effective

Will the grid be moving, if yes where

Parameters that may be changed in design

Good grid is half CFD done

Bad grid is full CFD repeated

6

© Z

eus N

um

erix

Grid contd…

What size of mesh is good mesh size

For any new problem or new software grid convergence has to be repeated

Recipe for failing

This software is well established, it will work

Physics may be different but this software works

Automatic mesh will be good

Grid read by solver so it must be OK

Make a large mesh and coarsen it, till you get 2 meshes with reasonably identical results

7

© Z

eus N

um

erix

Grid contd…

Always smoothen a grid before doing any other operation

A grid parallel and perpendicular to the flow is the best grid

Clustering must never precede smoothening

More clustering makes convergence slower

Less clustering does not resolve flow features

5-10 grid points in boundary layer based on Reynolds number

Refinement of grid at sharp corners, bends and locations where shocks are expected

Check – Skewness, smoothness and aspect ratio

8

© Z

eus N

um

erix

Grid contd…

Coordination with solver

Velocity regime

Euler, Laminar or Turbulent flow

Which turbulent model

Proper labeling and boundary conditions

What BCs are required

Proper labels to various components

Units must be specified when grid is made

If not made in SI units, COMMUNICATE

9

© Z

eus N

um

erix

SIMPLE PROBLEMS

Problems requiring less accuracy and attention

10

© Z

eus N

um

erix

Problem Types

Problem desiring less accuracy

Pressure drop across regions

Supersonic flow – lift estimation

Preliminary design calculations

Design of low cost mechanical equipment

High rise buildings

Ventilation of huge spaces

These problems require only estimation of gross number

Spatial resolution of physical properties may not be accurate, however gross properties are reasonably accurate

11

© Z

eus N

um

erix

Case Study: High Rise

Aim 1: Estimation of wind loads on a high rise building

Aim 2: Estimation of discomfort due to air flow on balconies

Data required

Building drawings – usually given in 2D format

Wind data – Collection of data of metrology dept

Data on nearby buildings

Comfort data

Step 1: Selection of number of simulation

Select severest wind conditions for three seasons

Also select any other worst case scenario as seen in the metrology table

12

© Z

eus N

um

erix

CFD of Buildings

Input is received in format as shown below

Convert the format to 3D using Revit® or other tools

Remove features that are small compared to the building size like grill, ventilators, balcony designs and make them flat

13

Bu

ildin

g is

usu

ally

rep

rese

nte

d in

A

uto

CA

D ®

fo

rmat

© Z

eus N

um

erix

Meshes

Shown are meshes and cleaned building model as seen by CFD

Mesh very coarse even near wall

Good mesh = billions of cells

14

© Z

eus N

um

erix

Simulation Table

Following Simulations are selected from the Metrology data

Data measured near Colaba by Metrology dept

Site near the sea hence relative humidity is high

Ground Boundary layer is approximated when performing simulation

15

North-WestWestNorth-WestEastWind Direction

43.264.825.227Wind Speed (Kmph)

70877570Relative Humidity

37.434.842.236.2Temperature (C)

NovemberJulyAprilJanuary

© Z

eus N

um

erix

Results

Load on the whole building is integrated by adding individual forces on surface cells

Major focus is given on the vortices formed in the buildings

16

© Z

eus N

um

erix

Results

Vortices formed near NW apartments will be uncomfortable

Construction of small structures suggested to suppress them

17

Vortices

© Z

eus N

um

erix

ACCURACY MEDIUM

Problems requiring care in making mesh and simulation

18

© Z

eus N

um

erix

Problem Types

Problem desiring higher accuracy

Flow around automobiles

Flow around aircraft and missiles

Flow in process industry – cyclone separator, piping, ducts

These problems require only estimation of properties at specific locations with reasonable accuracy

Grid generation requires attention

19

© Z

eus N

um

erix

Case Study: Flow Past Automobile

Aim 1: Estimation of aerodynamic forces on an automobile

Aim 2: Estimation of discomfort due to dust ingress

Data required

IGES file of the automobile

Wind Conditions for the problem

Step 1: Cleaning of CAD data

Remove the components that are small in size

Close the gaps of handle, doors

Assumptions

Tyre rotation effect is not modeled

Dust as particles is not modeled

20

© Z

eus N

um

erix

CFD of Automobile

Input is received in format as shown below

Remove features that are small compared to the vehicle size like grill, door handle , headlight protrusions etc

21

CA

D D

raw

ing

of

an S

UV

Wit

h a

ll fe

atu

res

15

00

0 c

om

po

nen

ts

© Z

eus N

um

erix

Grid Generation

CAD is cleaned to remove surfaces not exposed to aerodynamics or insignificant surfaces

Surface is divided into patches for generation of hex grid

Clustering done to fraction of mm to capture boundary layer

22

Domain of Analysis for MUV

MUV Surface

MUV Block Surface

© Z

eus N

um

erix

Grid

View showing clustered grid at the surface

23

Grid density is high near vehicle

surface

© Z

eus N

um

erix

Results

Streamlines are important; seeds are correct locations

Dust ingress will be known by streamlines curving inside

24

Path lines seen to point inward

© Z

eus N

um

erix

Iso-surfaces

Zero axial velocity on green surfaces

25

Iso-surfaces shown by Green

© Z

eus N

um

erix

ACCURACY HIGH

Problems to be attempted by experienced personnel

26

© Z

eus N

um

erix

Problem Types

Problem desiring highest accuracy

Aerothermal considerations in high speed flow

Heat driven flows

Reactive flows

Turbomachinery (rotating flows)

These problems require estimation of properties accurately to serve the aim of simulation

Grid generation requires high degree of care as the simulations are very sensitive

27

© Z

eus N

um

erix

Heat Flux

Aim 1: Estimation of heat flux of a missile

Aim 2: Estimation of aerodynamic coefficients

Data required

IGES file of the missile

Atmospheric Conditions for the problem

Isothermal temperature of the wall

Step 1: Cleaning of CAD data

Remove the components that are small in size

Close the gaps of missile and fins etc

Assumptions

Air remains calorifically perfect

28

© Z

eus N

um

erix

Grid Generation

Surface grid chosen after extensive analysis

Requirement of y+ is within bounds of 1-5 at all places

Since the flow is very high speed, first cell distance has to be 1 micron from the surface for the given mach number

VALIDATION is a must before attempting these problems

29

Co

mp

aris

on

of

resu

lts

for

vari

ou

s m

esh

es.

15

1 a

nd

20

1

hav

e sa

me

res

ult

s

© Z

eus N

um

erix

Results

Variation of y+ on the surface

Variation of heat flux on the surface

* Heating more in wing than nose

30

Mach Number variation

High

Low

High heat flux regions

Heat Flux

Spalart-Allmaras TurbulenceModel, HLLC Scheme

y+ range 1-5 at all places

© Z

eus N

um

erix

INITIAL & BOUNDARY CONDITION

Importance of putting conditions for correct results

31

© Z

eus N

um

erix

Initial Conditions

It is a wrong assumption that whatever conditions you give flow will finally converge to a correct solution

Sometimes wrong initial condition may have a physical meaning

Constant Initial Conditions throughout the domain may not work always

Most obvious initial conditions may not be the fit for certain solvers

32

© Z

eus N

um

erix

Example

Consider a case of supersonic CD nozzle with the three ICs

Flow at zero velocity inside domain

Flow supersonic everywhere

Flow supersonic in converging section and gradually decreased to subsonic till the exit

The representation physically

Flow shock will enter inside and form a normal shock and subsequent flow will be subsonic throughout

Flow has been made supersonic everywhere by use for external machines

Flow has been made supersonic and now exiting in atmosphere

33

© Z

eus N

um

erix

Boundary Conditions

A pressure and velocity boundary is not the same as mass flow boundary for incompressible flow

Signal traveling backward may change mass flow rate

Farfield and outlet are not the same for compressible flow

Farfield means waves are not affected by flow

Isothermal wall is significantly different than adiabatic, default expression is adiabatic wall

34

© Z

eus N

um

erix

General

Better to use standard format like CGNS for interoperability Research says lot of time wasted in converting file formats

Aim not written at the beginning is a sure recipe for disaster

Solution should be doable in reasonable cost

Try to arrange a computer that can handle the problem instead of taking shortcuts and solving on existing resource CDAC gives good access to computing power for academics

Make a checklist of activities if same type of problem may come all the time Usually engineers make a mistake in routine simulations due

to over confidence

More engineers doesn’t mean faster results; reverse possible

35

© Z

eus N

um

erix

Thank You!

3 November 2014 36

© Z

eus N

um

erix

Questions?