cfoam 2.0 userguide.pdf

43
CFOAM 2.0. User Guide CABARET-code User's Guide // the description of input files for CFOAM.exe and outFoamX.exe 2012

Upload: danielle-hays

Post on 23-Dec-2015

37 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: CFOAM 2.0 UserGuide.pdf

CFOAM 2.0. User Guide

CABARET-code User's Guide

// the description of input files for CFOAM.exe and outFoamX.exe

2012

Page 2: CFOAM 2.0 UserGuide.pdf

CONTANTS

CABARET-CODE USER'S GUIDE 1

// THE DESCRIPTION OF INPUT FILES FOR CFOAM.EXE AND OUTFOAMX.EXE 1

1. NOTATIONS 3

2. INTRODUCTION 4

3. INSTALLATION 5

3.1. OVERWIEV 5

4. GENERAL INFORMATION ABOUT THE INPUT AND OUTPUT FILES 6

4.1. INPUT FILES 6 4.2. OUTPUT FILES 6

5. A BRIEF DESCRIPTION OF THE MODELS 7

5.1. GAS DYNAMICS 7 5.1.1. Main equation 7 5.1.2. Geometry 7

6. FORMAT OF INPUT FILE ZAI.KCAS 8

6.1. LIST OF SECTIONS IN ZAI.KCAS 8 6.2. CYLINDER’S DEFINION 9 6.3. DESCRIPTION OF SECTIONS 17

6.3.1. Transducers 17 6.3.2. AcousticSurfaces 25

7. FORMAT OF INPUT FILE ZAI.KCAS 29

7.1. LIST OF SECTIONS IN OUTFOAMX.INPUT 29 7.2. DESCRIPTION OF SECTIONS 30

7.2.1. ReadFile 30 7.2.2. TransducerSurface 34 7.2.3. Listeners 35

8. EXAMPLES OF INPUT FILES ZAI.KCAS AND OUTFOAMX.INPUT 36

8.1. ZAI.KCAS 36 8.2. OUTFOAMX.INPUT 39

Page 3: CFOAM 2.0 UserGuide.pdf

1. Notations

Список сокращений

Density, kg/m3

Subscripts

f – face number

i – cell number

Page 4: CFOAM 2.0 UserGuide.pdf

2. Introduction

CFOAM is the high-quality program software for simulation gas dynamics.

Page 5: CFOAM 2.0 UserGuide.pdf

3. Installation

3.1. Overwiev

Page 6: CFOAM 2.0 UserGuide.pdf

4. General information about the input and output files

4.1. Input files

CABARET-code has a single file for specifying all the options, boundary and initial

conditions. Mesh has OpenFOAM format. Optionally a geometry data file can be used to

define some surfaces for output and acoustics. The input file has title “zai.KCAS”.

4.2. Output files

Table 2. Output files.

File name Description

Page 7: CFOAM 2.0 UserGuide.pdf

5. A brief description of the models

CFOAM is the solver for gas dynamics.

5.1. Gas Dynamics

5.1.1. Main equation

5.1.2. Geometry

Page 8: CFOAM 2.0 UserGuide.pdf

6. Format of input file zai.KCAS

It is input file for CFOAM.exe. The input file follows a FORTRAN like syntax and it is

organized in sections. Every section is represented as following:

&section_name

…. ! parameters of the section, all symbols after ‘!’ are comment

/ ! end of the section

If the user does not define any parameter from the section, it would be equaled to

default value.

6.1. List of sections in zai.KCAS

Table 1. Sections of input file.

Name Description

BoundCond Boundary conditions

Material Properties (viscosity, heat capacity ratio)

Solution Initial conditions, scheme viscosity parameters and

acoustic dtOut

Vertex Rudiment

Tuning Computational parameters

Printing Restart (on/off), global output parameters and maximum

number of steps

Transducers Subdomain output

AcousticSurfaces Acoustics output

Page 9: CFOAM 2.0 UserGuide.pdf

6.1.1. BoundCond

Number of boundary condition should be equalled to the number of boundary conditions in

constant/polyMesh/boundary excluding processor interfaces.

Name Type Description and units Range of

values Default

BoundType INTEGER

Number of boundary

condition:

1 - outlet

2 - inlet

3 – no-slip wall

4 – slip wall

5 – cyclic

Required.

1,2,3,4,5 _______

u_inlet Real(8)

Inlet x-component

velocity, m/s

Required

if BoundType == 2

_______

v_inlet

Real(8) Inlet y-component

velocity, m/s

Required

if BoundType == 2

_______

w_inlet

Real(8) Inlet z-component

velocity, m/s

Required

if BoundType == 2

_______

p_inlet

Real(8) Inlet pressure, Pa

Required

if BoundType == 2

_______

t0_inlet

Real(8) Inlet temperature, K

Required

if BoundType == 2

_______

u_outlet

Real(8) Outlet x-component

velocity, m/s

Required

if BoundType == 2

_______

Page 10: CFOAM 2.0 UserGuide.pdf

Name Type Description and units Range of

values Default

v_outlet

Real(8) Outlet y-component

velocity, m/s

Required

if BoundType == 2

_______

w_outlet

Real(8) Outlet z-component

velocity, m/s

Required

if BoundType == 2

_______

p_outlet

Real(8) Outlet pressure, Pa

Required

if BoundType == 2

_______

t0_outlet

Real(8) Outlet temperature, K

Required

if BoundType == 2

_______

6.1.1.1. Example of BoundCond

&BoundCond

BoundType(1)= 3

P_outlet(1)= 101300.0

T0_outlet( 1)= 295.8716

BoundType(2)= 2

U_inlet(2)= 20.0

V_inlet(2)= 0

W_inlet(2)= 0

P_inlet(2)= 101300.0

T0_inlet(2)= 295.8716

BoundType(3)= 1

P_outlet(3)= 101300.0

T0_outlet(3)= 295.8716

Page 11: CFOAM 2.0 UserGuide.pdf

BoundType(4)= 1

P_outlet(4)= 101300.0

T0_outlet(4)= 295.8716

BoundType(5)= 1

P_outlet(5)= 101300.0

T0_outlet(5)= 295.8716

BoundType(6)= 4

P_outlet(6)= 101300.0

T0_outlet(6)= 295.8716

BoundType(7)= 4

P_outlet(7)= 101300.0

T0_outlet(7)= 295.8716

/

6.1.2. Material

6.1.3. Solution

Name Type Description and units Range of

values Default

CFL Real(8) Courant-Friedrichs-Lewy

coefficient 0<CLF<=1 0.3

UFON

Real(8) Initial x-component

velocity, m/s

Required.

_______

VFON

Real(8) Initial y-component

velocity, m/s

Required.

_______

WFON

Real(8) Initial z-component

velocity, m/s

Required.

_______

Page 12: CFOAM 2.0 UserGuide.pdf

Name Type Description and units Range of

values Default

ROFON

Real(8) Initial density, kg/m^3

Required.

_______

PFON

Real(8) Initial pressure, Pa

Required.

_______

Tfon

Real(8) Initial temperature, K

Required.

_______

SCALE

Xloc

Accel

Sound

epsilon

Real(8) Interpolation coefficient

between CABARET and

Godunov schemes

Epsilon == 0 –

CABARET

Epsilon == 1 – Godunov

[0,1.0]

Rwall

n

dtOut

TimeInitial

TimeEnd

TimeStepInitial

TimeStepMin

TimeStepMax

Page 13: CFOAM 2.0 UserGuide.pdf

Name Type Description and units Range of

values Default

epsilonPanikovski

Real(8) Special artificial

viscosity coefficient

0.7 is recommended for

any new problem.

If the code is stable it

could be decreased.

[0,1.0]

0.0

epsMaximumPrinciple

TotalPresTempAreGiven

ReadInletBoundaryConditions

nletBCon_direction

InitCondFromInletBoundaryConditions

6.1.4. Example of Solution

&solution

cfl= 0.3

UFON=31.7d0

VFON=0.0

WFON=0.0

ROFON=1.260979706d0

PFON= 107145.143d0

TFON=296d0

epsilon=0.d0

epsilonPanikovski = 0.01d0 ! 0.01d0

dtOut=1d-4

sound = 344.827

/

Page 14: CFOAM 2.0 UserGuide.pdf

6.1.5. Tuning

Name Type Description and units Range of

values Default

nTimeStepAcceleration INTEGER

Boundary condition

smoothing parameter:

Let V_init be an initial

constant variable vector and

V_boundary be a boundary

variable vector, than

V = V_init + (V_boundary-

V_init) * max((nT-nTs)/

n,1.0)

where

nT = current time step

number;

nTs =

nTimeStepAccelerationStart;

n = nTimeStepAcceleration

20000

nTimeStepAccelerationStart INTEGER For boundary condition

smoothing parameter 0

JustMeshCellFaceCentersOut

_______

Asynchrony

_______

CalcBoundaryFaceCubesOnly

OutputFaceCubesOnly

NewPeriodicNumeration

PeriodicBound1

PeriodicBound2

SplitPeriodicBoundaries

autoRes

meshFactorX Real(8) Scale factor along Ox, 1

>0 1.0

Page 15: CFOAM 2.0 UserGuide.pdf

Name Type Description and units Range of

values Default

meshFactorY Real(8) Scale factor along Ox, 1 >0

1.0

meshFactorZ Real(8) Scale factor along Ox, 1 >0

1.0

PreprOnly

Off

NormalChars

writeInitConditions

nonReflectOutletBC

6.1.5.1. Example of Tuning

&Tuning

nTimeStepAcceleration = 20000

meshFactorX = 10d0

meshFactorY = 10d0

meshFactorZ = 10d0

/

6.1.6. Printing

Name Type Description and units Range of

values Default

nprint INTEGER

=N – to print every Nth

time step.

Required.

>0 _______

NSTOP INTEGER

=N – stop simulation after

N time steps.

Required.

>0

_______

irestart

INTEGER =0 – new simulation

=N>0 – start from the

restart # N

Required.

>=0

0

Page 16: CFOAM 2.0 UserGuide.pdf

6.1.6.1. Example of Printing

&printing

irestart=0 ! run new simulation

NPrint=10 ! to write restart files every 10th time steps

NSTOP=100 ! stop simulation after 100 time steps

/

6.1.7. Transducers

6.1.8. AcousticSurfaces

6.2. Cylinder’s definion

To output subdomain or acoustic data CFOAM uses cylindrical surfaces.

Cylinder is defined by flat 3D contour, axis vector, length and restriction (extension)

factor (ratio) as shonw on Figure 1. Contour data is convex.

Format of contour data is tecPlot point data. Example:

VARIABLES = "x"

"y"

"z"

"u"

"v"

"w"

"p"

"t"

"vt"

"rt"

ZONE

10d0 10d0 -10d0 6.1825113856 0.000737353068715

8.01542649473E-005 102498.786406 289.030981604 6.18251156576

5.25454328489E-005

-10d0 10d0 -10d0 6.16557332832 0.00073768469477

0.000267703024949 102491.671933 289.025250548 6.16557338708

3.81771787248E-005

Page 17: CFOAM 2.0 UserGuide.pdf

-10d0 -10d0 -10d0 6.16508600084 0.000737663240931 -

0.000258671975039 102491.46619 289.025086416 6.16508607066

3.77053149538E-005

10d0 -10d0 -10d0 6.18167672882 0.000737512031574 -

0.000247942965184 102498.435495 289.030701663 6.18167678694

5.66290875451E-005

CFOAM misses first 12 line and use only first three real value from every line

begging from 13th one. According to former example ir means that CFOAM uses

only:

10d0 10d0 -10d0

-10d0 10d0 -10d0

-10d0 -10d0 -10d0

10d0 -10d0 -10d0

Left Right

Figure 1. Cylinder

6.3. Description of sections

6.3.1. Transducers

It is difficult to analyse huge amount of data (10 mln, 20 mln, 50 mln, 250 mln …).

Transducers allow getting subdomains from the whole domain. The geometry of subdomain is

based on cylinder. Detailed description of transducer’s parameters in Table 2. Maximum

number of transducers is 100.

Table 2. Parameters of Transducers

n L

Contour

factor

Page 18: CFOAM 2.0 UserGuide.pdf

Name Type Description and units Range of

values Default

TransName CHAR

Transducer’s name

Required.

Any

(maximum

50

characters)

_______

TransContourFile

CHAR

File name with contour

coordinates

Required.

Any

(maximum

50

characters)

_______

TransOutputFile(1)='WholeDomain' CHAR

Output file name

Required.

Any

(maximum

50

characters)

_______

TransWriteVariable(1)='Pres' CHAR

Every word notes a

variable:

‘Pres’ - pressure

‘Uvel’, ‘Vvel’, ‘Wvel’ –

velocity components,

’Temp’ – temperature. If

(TransTableOut(1)=='On')

every present variable will

be written into table for

every TimeOut

! Table

! x .................

! y .................

! z .................

! Time Pres Uvel Vvel

Wvel Temp

! .... .... .... ....

.... ....

Optional.

It is the

string with

some words

such as

‘Pres’,

‘Uvel’,

‘Vvel’,

‘Wvel’,

’Temp’.

Every word

is separated

from eahc

other by

space ‘ ‘.

‘ ‘

Page 19: CFOAM 2.0 UserGuide.pdf

Name Type Description and units Range of

values Default

TransDefCellsFromContour CHAR

If (‘On’) compute

transducer’s cells through

intersection of cylinder

and mesh. And write file

‘CellTrans_’+ TransName

with transducer’s cells.

If (‘Off’) read transducer’s

cells from file

‘CellTrans_’+

TransName.

Format ‘CellTrans_’+

TransName:

‘TransName’

nCellsOut:

600

CellsOut

meshCellCenters(1:3)

114 5.512 5.512 -6.310

! n meshCellCenters(1:3)

Area

114 1.452162073217283 !

n Area

xOut(1:3)

114 -5.473849961365770

-5.473805366966713

6.266947997801560 ! n

xOut(1:3)

Normal(1:3)

114 -0.548122267150357

-0.548127242044391

0.631758266097691 ! n

normal(1:3)

Optional.

[‘On’,’Off’] ‘On’

Page 20: CFOAM 2.0 UserGuide.pdf

Name Type Description and units Range of

values Default

TransLeftDiscActive CHAR

‘On’ - take into account

left surface

‘Off’ – do not take into

account left surface

Optional.

[‘On’,’Off’] ‘On’

TransRightDiscActive CHAR

‘On’ - take into account

right surface

‘Off’ – do not take into

account right surface

Optional.

[‘On’,’Off’] ‘On’

TransHollow CHAR

‘On’ – cylinder is solid

‘Off’ – cylinder is hollow

Optional.

[‘On’,’Off’] ‘Off’

TransCenterDirX REAL(8)

x-component of cylinder’s

axis

Optional.

[-1d10,

1d10] 0d0

TransCenterDirY REAL(8)

y-component of cylinder’s

axis

Optional.

[-1d10,

1d10] 1d0

TransCenterDirZ REAL(8)

z-component of cylinder’s

axis

Optional.

[-1d10,

1d10] 0d0

TransLength REAL(8)

Length of cylinder

Optional.

[0d0, 1d10] 0.2d0

TransFactor REAL(8)

Coefficient restriction

(extension) of cylinder

from left to right

Optional.

[0d0, 1d10] 1d0

Page 21: CFOAM 2.0 UserGuide.pdf

Name Type Description and units Range of

values Default

TransStepX

REAL(8) Minimal distance in x-

direction between

transducer’s cells (the

procedure of transducer’s

cells definition takes next

cell if its x-coordinate is

differ from x-coordinate

of former cells more then

on TransStepX)

Optional.

[1d-10,

1d10] 1d-10

TransStepY

REAL(8) Minimal distance in y-

direction between

transducer’s cells (the

procedure of transducer’s

cells definition takes next

cell if its y-coordinate is

differ from y-coordinate

of former cells more then

on TransStepY)

Optional.

[1d-10,

1d10] 1d-10

TransStepZ

REAL(8) Minimal distance in z-

direction between

transducer’s cells (the

procedure of transducer’s

cells definition takes next

cell if its z-coordinate is

differ from z-coordinate of

former cells more then on

TransStepZ)

Optional.

[1d-10,

1d10] 1d-10

TransTimeStart REAL(8)

Start time for output

Optional.

[0d0, 1d10] 0d0

TransTimeEnd REAL(8)

End time for output

Optional.

[0d0, 1d10] 1d10

TransDTimeOut REAL(8)

Time interval of output

Required.

[0d0, 1d10] _______

Page 22: CFOAM 2.0 UserGuide.pdf

Name Type Description and units Range of

values Default

TransAverage CHAR

‘On’ – write averaged

variables for time interval

of output

‘Off’ – write variables on

output time

Optional.

[‘On’,’Off’] ‘On’

TransSliceOut CHAR

‘On’ – output subdomain:

submesh is written into

TransName+’mesh’,

cell variables are written

into TransName,

face variables are written

into TransName+’Face’

‘Off’ – do not output

subdomain

If (TransSliceOut ==‘On’)

TransTableOut='Off'

Optional.

[‘On’,’Off’] ‘On’

TransTableOut CHAR

‘On’ – write table with

variables

‘Off’ – do not write table

with variables

! Table

! x .................

! y .................

! z .................

! Time Pres Uvel Vvel

Wvel Temp

! .... .... .... ....

.... ....

It is not useful for

transducers with big

amount of cells!

Optional.

[‘On’,’Off’] ‘Off’

Page 23: CFOAM 2.0 UserGuide.pdf

Name Type Description and units Range of

values Default

TransdPdtOut CHAR

‘On’ – write pressure

derivative on time

‘Off’ – do not write

pressure derivative on

time

Optional.

[‘On’,’Off’] ‘Off’

TransBoundaryOut INTEGER

Output intersection

between cylinder and the

boundary with number

TransBoundaryOut.

nCellsOut:

3

CellsOut

meshCellCenters(1:3)

1789 -0.0754910796

0.0178327239

-0.1500000059 ! nCell

meshCellCenters(1:3)

PointsOut:

3775 3776 3814 3813

0.0754910861

-0.0178168690

0.1500000059 !

nPoints of boundary

face +

meshFaceCenters(1:3)

If(TransBoundaryOut <=

0 or TransBoundaryOut >

nBoundaryFields) do not

write intersection between

cylinder and any boundary

Optional.

[-1,100] -1

TransBoundaryOutFile CHAR

Output file name for

intersection between

cylinder and the boundary

with number

TransBoundaryOut.

Requered if

(TransBoundaryOut>0

and TransBoundaryOut

< nBoundaryFields).

Any

(maximum

50

characters)

_______

Page 24: CFOAM 2.0 UserGuide.pdf

Name Type Description and units Range of

values Default

TransInsideOnly CHAR

‘On’ – write inside cells

only

‘Off’ – write not only

inside cells

Optional.

[‘On’,’Off’] ‘Off’

6.3.1.1. Example

&Transducers

TransName(1)='WholeDomain'

TransContourFile(1)='WholeDomain.dat'

TransOutputFile(1)='WholeDomain'

TransWriteVariable(1)='Pres'

TransDefCellsFromContour(1)='On'

TransLeftDiscActive(1)='Off'

TransRightDiscActive(1)='Off'

TransCenterDirX(1)=0.0d0

TransCenterDirY(1)=0.0d0

TransCenterDirZ(1)=1.0d0

TransLength(1)=2.0d0

TransFactor(1)=1.0d0

TransTimeStart(1)=0.0d0

TransTimeEnd(1)=0.1d0

TransDTimeOut(1)=0.001d0

TransAverage(1)='On'

TransSliceOut(1)='On'

TransTableOut(1)='Off'

TransdPdtOut(1) = 'On'

&end

Example for signal output

&Transducers

TransName(1)='Transducer1'

TransContourFile(1)= 'Transducer1.dat'

Page 25: CFOAM 2.0 UserGuide.pdf

TransOutputFile(1)=' Transducer '

TransWriteVariable(1)='Pres'

TransDefCellsFromContour(1)='On'

TransLeftDiscActive(1)='Off'

TransRightDiscActive(1)='Off'

TransCenterDirX(1)=0.0d0

TransCenterDirY(1)=0.0d0

TransCenterDirZ(1)=1.0d0

TransLength(1)=2.0d0

TransFactor(1)=1.0d0

TransTimeStart(1)=0.0d0

TransTimeEnd(1)=0.1d0

TransDTimeOut(1)=0.001d0

TransSliceOut(1)='On'

TransInsideOnly(1)=’On’

/

Thus cfoam should write data in space and time for cells, which are inside the cylinder, in

binary format for every processor which has non-zero number of these cells. Then one should

run outFoamX which writes these data in text format:

! Table

! x .................

! y .................

! z .................

! Time Pres Uvel Vvel Wvel Temp

! .... .... .... .... .... ....

6.3.2. AcousticSurfaces

Due to unknown averaged field of pressure it is difficult to compute acoustic signal during the

simulation. So AcousticSurface writes data for acoustic post-processor. Detailed description

of parameters in Table 3. Maximum number of acoustic surfaces is 100.

Table 3. Parameters of AcousticSurface

Name Type Description and units Range of

values Default

SurfName CHAR

Transducer’s name

Required.

Any

(maximum

50

characters)

_______

Page 26: CFOAM 2.0 UserGuide.pdf

Name Type Description and units Range of

values Default

SurfContourFile CHAR

File name with contour

coordinates

Required.

Any

(maximum

50

characters)

_______

SurfDefCellsFromContour CHAR

If (‘On’) compute

transducer’s cells through

intersection of cylinder and

mesh. And write file

‘CellTrans_’+ TransName

with transducer’s cells.

If (‘Off’) read transducer’s

cells from file

‘CellTrans_’+ TransName.

Format ‘CellTrans_’+

TransName:

‘TransName’

nCellsOut:

600

CellsOut

meshCellCenters(1:3)

114 5.512 5.512 -6.310 !

n meshCellCenters(1:3)

Area

114 1.452162073217283 !

n Area

xOut(1:3)

114 -5.473849961365770

-5.473805366966713

6.266947997801560 ! n

xOut(1:3)

Normal(1:3)

114 -0.548122267150357

-0.548127242044391

0.631758266097691 ! n

normal(1:3)

Optional.

[‘On’,’Off’] ‘On’

Page 27: CFOAM 2.0 UserGuide.pdf

Name Type Description and units Range of

values Default

SurfCenterDirX REAL(8)

x-component of cylinder’s

axis

Optional.

[-1d10,

1d10] 0d0

SurfCenterDirY REAL(8)

y-component of cylinder’s

axis

Optional.

[-1d10,

1d10] 1d0

SurfCenterDirZ REAL(8)

z-component of cylinder’s

axis

Optional.

[-1d10,

1d10] 0d0

SurfLeftDiscActive CHAR

‘On’ - take into account left

surface

‘Off’ – do not take into

account left surface

Optional.

[‘On’,’Off’] ‘On’

SurfRightDiscActive CHAR

‘On’ - take into account

right surface

‘Off’ – do not take into

account right surface

Optional.

[‘On’,’Off’] ‘On’

SurfLength REAL(8)

Length of cylinder

Optional.

[0d0, 1d10] 0.2d0

SurfFactor REAL(8)

Coefficient restriction

(extension) of cylinder from

left to right

Optional.

[0d0, 1d10] 1d0

SurfTimeStart REAL(8)

Start time for output

Optional.

[0d0, 1d10] 0d0

SurfTimeEnd REAL(8)

End time for output

Optional.

[0d0, 1d10] 1d10

SurfDTimeOut REAL(8)

Time interval of output

Required.

[0d0, 1d10] _______

Page 28: CFOAM 2.0 UserGuide.pdf

Name Type Description and units Range of

values Default

SurfAcousticsOut CHAR

Outout file name. If it is

given.

Acoustic Mesh is written

into

SurfAcousticsOut +’Mesh’

In bynary format:

write(11) nCellsOut

write(11) (areaOut(i),

i=1,nCellsOut)

write(11) ((xOut(j,i),

j=1,3), i=1,nCellsOut)

write(11)

((normalOut(j,i),

j=1,3), i=1,nCellsOut)

write(11) (

meshCellOut(i),

i=1,nCellsOut)

and all variables every time

step is written into file

SurfAcousticsOut

write(11)

ttime,0,nCellsOut

write(11) &

(Unew(1:3,CellsOut(i)),

pnew(CellsOut(i)),

rhonew(CellsOut(i)),

i=1,nCellsOut)

If (SurfAcousticsOut==’ ‘)

then acoustics is computed

during the simulation, but in

this case additional input

information is requied.

Optional.

Any

(maximum

50

characters)

‘ ‘

6.3.2.1. Example

&AcousticSurfaces

SurfName(1)='Cube'

SurfContourFile(1)='Cube.dat'

SurfDefCellsFromContour(1)='On'

SurfCenterDirX(1)=0.0d0

Page 29: CFOAM 2.0 UserGuide.pdf

SurfCenterDirY(1)=0.0d0

SurfCenterDirZ(1)=1.0d0

SurfLeftDiscActive(1)='On'

SurfRightDiscActive(1)='On'

SurfFactor(1)=1.0d0

SurfLength(1)=20d0

SurfAcousticsOut(1)='CubeOut.dat'

SurfSphere(1)='On'

SurfCenterX(1)=0.0d0

SurfCenterY(1)=0.0d0

SurfCenterZ(1)=0.0d0

SurfRadius(1)=10.0d0

&end

7. Format of input file outFoamX.input

It is input file for outFoamX.exe. The input file follows a FORTRAN like syntax and it

is organized in sections.

7.1. List of sections in outFoamX.input

Table 4. Sections of input file outFoamX.input.

Name Description

ReadFile Set of domains (mesh, cell variables, face variables)

TransducerSurface To get subdomains

Listeners Observer data for acoustic.

Page 30: CFOAM 2.0 UserGuide.pdf

7.2. Description of sections

7.2.1. ReadFile

There are parameters about output domains (subdomains) which were written by

CFOAM.exe. Detailed description of ReadFile’s parameters in Table 5. Maximum number of

ReadFiles is 100.

Table 5. Parameters of ReadFile

Name Type Description and units Range of

values Default

ReadFileMesh CHAR

File name with mesh.

Required.

Any

(maximum

50

characters)

_______

ReadFileOut CHAR

File name with cells data.

Required.

Any

(maximum

50

characters)

_______

ReadFileOutRes

File name with face data.

Optional.

Any

(maximum

50

characters)

‘OutRes’

WriteDatFile CHAR

Name for output tecPlot file

tecplot

Optional.

Any

(maximum

50

characters)

‘dat’

nump INTEGER

Number of processors.

Required.

[1,9999]

_______

nump3D INTEGER

Number of processors big mesh.

Required if

Transform2Dto3D==’On’.

[1,9999]

_______

RestartBin CHAR

‘On’ – read restart in binary

format

‘Off’ – read restart in text format

Optional.

[‘On’,’Off’] ‘On’

Page 31: CFOAM 2.0 UserGuide.pdf

Name Type Description and units Range of

values Default

RestartOut CHAR

‘On’ – read restart

‘Off’ – do not read restart

Optional.

[‘On’,’Off’] ‘On’

CalcAcoustics CHAR

‘On’ – compute acoustic signals

for all listeners

Acoustic mesh is red from

ReadFileMesh. Variables is red

from ReadFileOut.

Acoustic signal is written into

files

WriteDatFile+’_’+ListenerName

‘Off’ – do not compute acoustic

signal

Optional.

[‘On’,’Off’] ’Off’

CalcVelocityModule6 CHAR

‘On’ – compute and write

velocity module into 6th array in

tecPlot output file.

‘Off’ – do nothing extra

If(CalcVorticityModule6==’On’)

CalcVelocityModule6 = ‘Off’

Optional.

[‘On’,’Off’] ’Off’

CalcVorticityModule6 CHAR

‘On’ – compute and write

vorticity module into 6th array in

tecPlot output file.

‘Off’ – do nothing extra

If(CalcVorticityModule6==’On’)

CalcVelocityModule6 = ‘Off’

Optional.

[‘On’,’Off’] ‘On’

Page 32: CFOAM 2.0 UserGuide.pdf

Name Type Description and units Range of

values Default

CalcQfactor7 CHAR

Compute Qfactor into 7th array in

tecPlotOutput

Optional.

[‘On’,’Off’] ‘On’

Transform2Dto3D CHAR

‘On’ – transform the solution

from coarse mesh into the fine

mesh.

Note, coarse mesh is red from

CellCenters2D

FaceCenters2D

fine mesh is red from

CellCenters3D

FaceCenters3D

Cell and face variables are red

from

ReadFileMesh

ReadFileOut

Actually a coarse mesh is not

required to be 2D!

‘Off’ – do not transform the

solution from coarse mesh into

the fine mesh.

Optional.

[‘On’,’Off’] ’Off’

7.2.1.1. Example

&ReadFile

ReadFileMesh(1) = 'outmesh'

ReadFileOut(1) = 'out'

WriteDatFile(1) = 'dat'

nump(1) = 1

RestartBin(1) = 'On'

RestartOut(1) = 'On'

Page 33: CFOAM 2.0 UserGuide.pdf

ReadFileMesh(2) = 'WholeDomainmesh'

ReadFileOut(2) = 'WholeDomain'

WriteDatFile(2) = 'WholeDomain'

nump(2) = 1

RestartBin(2) = 'On'

RestartOut(2) = 'Off'

CalcVorticityModule6(2) = 'Off'

ReadFileMesh(3) = 'CubeOut.datMesh'

ReadFileOut(3) = 'CubeOut.dat'

WriteDatFile(3) = 'CubeOut'

nump(3) = 1

RestartBin(3) = 'On'

RestartOut(3) = 'Off'

CalcAcoustics(3) = 'On'

ReadFileMesh(4) = 'Cubemeshhsp'

ReadFileOut(4) = 'Cubehsp'

WriteDatFile(4) = 'dathsp'

nump(4) = 1

RestartBin(4) = 'On'

RestartOut(4) = 'Off'

&end

Example for signal output

&ReadFile

ReadFileMesh(1)='Transducer1mesh'

ReadFileOut(1)='Transducer1'

WriteDatFile(1)='Transducer1'

nump(1)=1200

RestartBin(1)='On'

RestartOut(1)='Off'

ReadSetOfFiles(1)='On'

nStartFile(1)=1

SignalOutput(1)='on'

RMSout(1)='Off'

/

Page 34: CFOAM 2.0 UserGuide.pdf

7.2.2. TransducerSurface

There are parameters about output subdomains from the domains defined above.

Detailed description of TransducerSurface’s parameters in Table 6. Maximum number of

TransducerSurface s is 100.

Table 6. Parameters of TransducerSurface

Name Type Description and units Range of

values Default

TransReadFileNumber INTEREG

Write subdomain for

ReadFile with number

TransReadFileNumber

Required.

Any

(maximum

50

characters)

_______

All other parameters are the same as for Transducer in zai.KCAS (see Table 2)

7.2.2.1. Example

&TransducerSurface

TransReadFileNumber(1) = 2

TransName(1)='Contour'

TransContourFile(1)='ContourClose.dat'

TransOutputFile(1)='ContourTable_2011-10-06.dat'

TransDefCellsFromContour(1)='On'

TransLeftDiscActive(1)='On'

TransRightDiscActive(1)='On'

TransCenterDirX(1)=0.0d0

TransCenterDirY(1)=0.0d0

TransCenterDirZ(1)=1.0d0

TransLength(1)=10.008d0

TransFactor(1)=1.0d0

TransTimeStart(1)=0.0d0

TransTimeEnd(1)=1.0d0

TransDTimeOut(1)=0.0001d0

TransStepX(1)=0.02

TransStepY(1)=0.02

TransStepZ(1)=0.02

TransAverage(1)='On'

TransSliceOut(1)='On'

Page 35: CFOAM 2.0 UserGuide.pdf

TransTableOut(1)='Off'

&end

7.2.3. Listeners

There are parameters for acoustic observers. Detailed description of Listener’s

parameters in Table 7. Maximum number of Listeners is 100.

Table 7. Parameters of Listeners

Name Type Description and units Range of

values Default

ListenerName INTEREG

Write subdomain for

ReadFile with number

TransReadFileNumber

Required.

Any

(maximum

50

characters)

_______

ListenerLocationX REAL(8)

X-coordinate of observer

Required.

[-1d10,

1d10] _______

ListenerLocationY

REAL(8) Y-coordinate of observer

Required.

[-1d10,

1d10] _______

ListenerLocationZ

REAL(8) Z-coordinate of observer

Required.

[-1d10,

1d10] _______

ListenerDtOut

REAL(8) Time interval for acoustic

signal output.

Optional.

[1d-10,

1d10] 2d-2

ListenerSound

REAL(8) Sound velocity.

Optional.

[1d-10,

1d10] 3.4d2

7.2.3.1. Example

&Listeners

ListenerName(1)='Observer1'

ListenerLocationX(1)=0d0

ListenerLocationY(1)=0d0

ListenerLocationZ(1)=50d0

ListenerDtOut(1)=0.001d0

ListenerSound(1)=340.0d0

Page 36: CFOAM 2.0 UserGuide.pdf

&end

8. Examples of input files zai.KCAS and outFoamX.input

8.1. zai.KCAS

!1 (39 (12 wall TUBE2)())

!2 (39 (13 wall WALL)())

!3 (39 (14 wall TUBE1)())

!4 (39 (15 wall OUTL)())

!5 (39 (16 wall INLT)())

!1 FLAP_SURFS

!2 WALL0

!3 INLET

!4 BOTTOM

!5 TOP

!6 OUTLET

!7 WALL_NEAR_FLAP

&BoundCond

BoundType(1)= 3

P_outlet(1)= 101300.0

T0_outlet( 1)= 295.8716

BoundType(2)= 2

U_inlet(2)= 20.0

V_inlet(2)= 0

Page 37: CFOAM 2.0 UserGuide.pdf

W_inlet(2)= 0

P_inlet(2)= 101300.0

T0_inlet( 2)= 295.8716

BoundType(3)= 1

P_outlet(3)= 101300.0

T0_outlet( 3)= 295.8716

BoundType(4)= 1

P_outlet(4)= 101300.0

T0_outlet( 4)= 295.8716

BoundType(5)= 1

P_outlet(5)= 101300.0

T0_outlet( 5)= 295.8716

BoundType(6)= 1

P_outlet(6)= 101300.0

T0_outlet( 6)= 295.8716

BoundType(7)= 1

P_outlet(7)= 101300.0

T0_outlet( 7)= 295.8716

&end

&material

mu=1.5D-5

! mu=0d0

gam=1.4d0

&end

&solution

cfl= 0.3

! 0.16

UFON=20.0

Page 38: CFOAM 2.0 UserGuide.pdf

VFON=0.0

WFON=0.0

ROFON=1.1927062

PFON= 101300.0

TFON=295.8716

epsilon=0.d0

! 0

n=0.0d0

rwall=2.0d0

dtOut=2d-2

! 20d-6

sound = 344.827

&end

&vertex

ivertex= 0

&end

&printing

irestart=0

NPrint=30000

NSTOP=10000000

&end

&Transducers

TransName(1)='Slice'

TransContourFile(1)='Slice.dat'

TransOutputFile(1)='Slice'

TransWriteVariable(1)='Pres'

TransDefCellsFromContour(1)='On'

TransLeftDiscActive(1)='On'

TransRightDiscActive(1)='Off'

TransCenterDirX(1)=0.0d0

TransCenterDirY(1)=0.0d0

Page 39: CFOAM 2.0 UserGuide.pdf

TransCenterDirZ(1)=1.0d0

TransLength(1)=1.0d0

TransFactor(1)=1.0d0

TransTimeStart(1)=0.0d0

TransTimeEnd(1)=1.0d0

TransDTimeOut(1)=0.0001d0

TransAverage(1)='On'

TransSliceOut(1)='On'

TransTableOut(1)='Off'

&end

&AcousticSurfaces

SurfName(1)='Surface1'

SurfContourFile(1)='ContourClose.dat'

SurfDefCellsFromContour(1)='On'

SurfCenterDirX(1)=0.0

SurfCenterDirY(1)=0.0

SurfCenterDirZ(1)=1.0

SurfLeftDiscActive='On'

SurfRightDiscActive='On'

SurfFactor(1)=1.0

SurfLength(1)=1.0

SurfAcousticsOut(1)='Surface1_proba.dat'

&end

8.2. outFoamX.input

&ReadFile

ReadFileMesh(1) = 'outmesh'

ReadFileOut(1) = 'out'

WriteDatFile(1) = 'dat'

nump(1) = 2

RestartBin(1) = 'On'

RestartOut(1) = 'On'

Page 40: CFOAM 2.0 UserGuide.pdf

ReadFileMesh(2) = 'Slicemesh'

ReadFileOut(2) = 'Slice'

WriteDatFile(2) = 'Slice'

nump(2) = 2

RestartBin(2) = 'On'

RestartOut(2) = 'Off'

&end

&TransducerSurface

TransReadFileNumber(1) = 2

TransName(1)='Contour'

TransContourFile(1)='ContourClose.dat'

TransOutputFile(1)='ContourTable_2011-10-06.dat'

TransDefCellsFromContour(1)='On'

TransLeftDiscActive(1)='On'

TransRightDiscActive(1)='On'

TransCenterDirX(1)=0.0d0

TransCenterDirY(1)=0.0d0

TransCenterDirZ(1)=1.0d0

TransLength(1)=10.008d0

TransFactor(1)=1.0d0

TransTimeStart(1)=0.0d0

TransTimeEnd(1)=1.0d0

TransDTimeOut(1)=0.0001d0

TransStepX(1)=0.02

TransStepY(1)=0.02

TransStepZ(1)=0.02

TransAverage(1)='On'

TransSliceOut(1)='On'

TransTableOut(1)='Off'

&end

Page 41: CFOAM 2.0 UserGuide.pdf

9. Mesh manipulations

9.1. Mesh conversion from ICEM CFD format into OpenFOAM format

The mesh in ICEM CFD format can be converted into openFOAM format using OpenFOAM

routine fluent3DMeshToFoam:

> fluent3DMeshToFoam name_file_with_mesh

9.2. Set up periodic boundary conditions

fluent3DMeshToFoam does not convert periodic boundary numeration from the mesh in

ICEM CFD into OpenFOAM format correctly. For this purpose one needs to specify the right

numeration using the following parameters in section Tuning (see Table). After that one will

have new files: points, owner, faces.

Then it is necessary to put the right openFOAM head of the file: /*--------------------------------*- C++ -*----------------------------------*\

| ========= | |

| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |

| \\ / O peration | Version: 1.7.1 |

| \\ / A nd | Web: www.OpenFOAM.com |

| \\/ M anipulation | |

\*---------------------------------------------------------------------------*/

Modify boundary since there is only one periodic boundary now and delete return in the

following string in owner

note "nPoints: 458328 nCells: 227944 nFaces: 912997

nInternalFaces: 454667 ";

Name Type Description and units Range of

values Default

NewPeriodicNumerationOn CHAR

To define new numeration

for periodic boundaries

Required.

Any

(maximum

50

characters)

‘On’

PeriodicBound1

Integer

The number of the first

periodic boundary

Required.

Page 42: CFOAM 2.0 UserGuide.pdf

Name Type Description and units Range of

values Default

PeriodicBound2 Integer

The number of the second

periodic boundary

Required.

PreprOnlyOn CHAR

Run only pre-processing

(not to run simulation)

Required.

Any

(maximum

50

characters)

‘Off’

Example:

&Tuning

NewPeriodicNumerationOn='On' ! 1 ! --- eto dlya perenumeracii granic, 4toby sdelat'

periodi4eskie granusloviya usloviya

PeriodicBound1=7 ! dlya togo je

PeriodicBound2=8 ! dlya togo je

nTimeStepAcceleration=20000 ! eto dlya "myagkogo" vyhoda na CABARET,

4toby skgladit' otrajeniya kotorye vna4ale srazu vozniknut ot tverdyh poverhnostej

PreprOnlyOn='On'

meshFactorX=0.1d0 ! Aerofoil chord = 1 m

meshFactorY=0.1d0 ! Rod diameter = 0.1 m

meshFactorZ=0.0304855742d0 ! Z/2 = 0.164012 m

/

9.3. Refine mesh

Mesh refinement can be performed using the following 2 commands:

> cellSet

> refineMesh

See refineMeshDict:

globalCoeffs

{

tan1 ( 0 0 10 );

tan2 ( 0 1 0 );

}

directions ( tan1 ); // it means that the refinement will be done along to

// tan1 direction

Page 43: CFOAM 2.0 UserGuide.pdf