You are on page 1of 43

CFOAM 2.0.

User Guide

CABARET-code User's Guide


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

2012

CONTANTS
CABARET-CODE USER'S GUIDE
// THE DESCRIPTION OF INPUT FILES FOR CFOAM.EXE AND OUTFOAMX.EXE

1
1

1.

NOTATIONS

2.

INTRODUCTION

3.

INSTALLATION

3.1.
4.

GENERAL INFORMATION ABOUT THE INPUT AND OUTPUT FILES


4.1.
4.2.

5.

OVERWIEV

INPUT FILES
OUTPUT FILES

A BRIEF DESCRIPTION OF THE MODELS


5.1.
GAS DYNAMICS
5.1.1. Main equation
5.1.2. Geometry

6.

FORMAT OF INPUT FILE ZAI.KCAS


6.1.
LIST OF SECTIONS IN ZAI.KCAS
6.2.
CYLINDERS DEFINION
6.3.
DESCRIPTION OF SECTIONS
6.3.1. Transducers
6.3.2. AcousticSurfaces

7.

8.

5
6
6
6
7
7
7
7
8
8
9
17
17
25

FORMAT OF INPUT FILE ZAI.KCAS

29

7.1.
LIST OF SECTIONS IN OUTFOAMX.INPUT
7.2.
DESCRIPTION OF SECTIONS
7.2.1. ReadFile
7.2.2. TransducerSurface
7.2.3. Listeners

29
30
30
34
35

EXAMPLES OF INPUT FILES ZAI.KCAS AND OUTFOAMX.INPUT


8.1.
8.2.

ZAI.KCAS
OUTFOAMX.INPUT

36
36
39

1.

Notations

Density, kg/m3

Subscripts
f face number
i cell number

2.

Introduction

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

3.

Installation

3.1.

Overwiev

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

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

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

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

BoundType

Type

Description and units

Number of boundary
condition:
1 - outlet
2 - inlet
INTEGER 3 no-slip wall
4 slip wall
5 cyclic
Required.
Inlet x-component
velocity, m/s

u_inlet

Range of
values

Default

1,2,3,4,5

_______

_______

Real(8)

Real(8)

Required
if BoundType == 2
Inlet y-component
velocity, m/s

_______

v_inlet

Real(8)

Required
if BoundType == 2
Inlet z-component
velocity, m/s

_______

w_inlet

Real(8)

Required
if BoundType == 2
Inlet pressure, Pa

_______

Real(8)

Required
if BoundType == 2
Inlet temperature, K

_______

p_inlet

t0_inlet

Real(8)

Required
if BoundType == 2
Outlet x-component
velocity, m/s

u_outlet
Required
if BoundType == 2

_______

Name

Type
Real(8)

Description and units


Outlet y-component
velocity, m/s

Range of
values

Default
_______

v_outlet

Real(8)

Required
if BoundType == 2
Outlet z-component
velocity, m/s

_______

w_outlet

Real(8)

Required
if BoundType == 2
Outlet pressure, Pa

_______

Real(8)

Required
if BoundType == 2
Outlet temperature, K

_______

p_outlet

t0_outlet

6.1.1.1.

Required
if BoundType == 2
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

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

CFL

Type
Real(8)
Real(8)

UFON

Range of
values

Default

Courant-Friedrichs-Lewy 0<CLF<=1
0.3
coefficient
Initial x-component
_______
velocity, m/s

Real(8)

Required.
Initial y-component
velocity, m/s

_______

Real(8)

Required.
Initial z-component
velocity, m/s

_______

VFON

WFON

Description and units

Required.

Name

Type

Description and units

Range of
values

Default

Real(8)

Initial density, kg/m^3

_______

Real(8)

Required.
Initial pressure, Pa

_______

Real(8)

Required.
Initial temperature, K

_______

ROFON

PFON

Tfon
Required.
SCALE
Xloc
Accel
Sound
Real(8)

Interpolation coefficient
between CABARET and
Godunov schemes

epsilon
Epsilon == 0
CABARET
Epsilon == 1 Godunov
Rwall
n
dtOut
TimeInitial
TimeEnd
TimeStepInitial
TimeStepMin
TimeStepMax

[0,1.0]

Name

Type
Real(8)

epsilonPanikovski

Description and units


Special artificial
viscosity coefficient
0.7 is recommended for
any new problem.
If the code is stable it
could be decreased.

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
/

Range of
values

Default
0.0

[0,1.0]

6.1.5.

Tuning
Name

Type

Description and units

Range of
values

Default

Boundary condition
smoothing parameter:
Let V_init be an initial
constant variable vector and
V_boundary be a boundary
variable vector, than

nTimeStepAcceleration

V = V_init + (V_boundaryV_init) * max((nT-nTs)/


INTEGER n,1.0)

20000

where
nT = current time step
number;
nTs =
nTimeStepAccelerationStart;
n = nTimeStepAcceleration
nTimeStepAccelerationStart

For boundary condition


INTEGER smoothing parameter

JustMeshCellFaceCentersOut

_______

Asynchrony

_______

CalcBoundaryFaceCubesOnly
OutputFaceCubesOnly
NewPeriodicNumeration
PeriodicBound1
PeriodicBound2
SplitPeriodicBoundaries
autoRes
meshFactorX

Real(8)

Scale factor along Ox, 1

>0

1.0

Name

Type

Description and units

meshFactorY

Real(8)

Scale factor along Ox, 1

meshFactorZ

Real(8)

Scale factor along Ox, 1

Range of
values
>0
>0

Default
1.0
1.0
Off

PreprOnly
NormalChars
writeInitConditions
nonReflectOutletBC

6.1.5.1.

Example of Tuning

&Tuning
nTimeStepAcceleration = 20000
meshFactorX = 10d0
meshFactorY = 10d0
meshFactorZ = 10d0
/
6.1.6.

Printing

Name

nprint

Type

INTEGER

Description and units


=N to print every Nth
time step.

Range of
values

Default

>0

_______

Required.
=N stop simulation after
N time steps.

NSTOP

INTEGER

irestart

Required.
INTEGER =0 new simulation
=N>0 start from the
restart # N

_______
>0

Required.

0
>=0

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.

Cylinders 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
8.01542649473E-005
5.25454328489E-005
-10d0 10d0
0.000267703024949
3.81771787248E-005

-10d0
102498.786406
-10d0
102491.671933

6.1825113856
0.000737353068715
289.030981604
6.18251156576
6.16557332832
289.025250548

0.00073768469477
6.16557338708

-10d0 -10d0
0.000258671975039
3.77053149538E-005

-10d0
6.16508600084
0.000737663240931 102491.46619
289.025086416
6.16508607066

10d0 -10d0
0.000247942965184
5.66290875451E-005

-10d0
6.18167672882
0.000737512031574 102498.435495
289.030701663
6.18167678694

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

Contour
factor

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 transducers parameters in Table 2. Maximum
number of transducers is 100.
Table 2. Parameters of Transducers

Name

Type

Description and units


Transducers name

TransName

CHAR
Required.
File name with contour
coordinates

TransContourFile
CHAR

Required.
Output file name
TransOutputFile(1)='WholeDomain'

CHAR
Required.

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.

Range of
values
Any
(maximum
50
characters)

Default

_______

Any
(maximum
50
characters)

_______

Any
(maximum
50
characters)

_______

It is the
string with
some words
such as
Pres,
Uvel,
Vvel,
Wvel,
Temp.
Every word
is separated
from eahc
other by
space .

Name

Type

Description and units

Range of
values

Default

[On,Off]

On

If (On) compute
transducers cells through
intersection of cylinder
and mesh. And write file
CellTrans_+ TransName
with transducers cells.
If (Off) read transducers
cells from file
CellTrans_+
TransName.

TransDefCellsFromContour

CHAR

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.

Name

TransLeftDiscActive

TransRightDiscActive

Range of
values

Default

CHAR

On - take into account


left surface
Off do not take into
account left surface

[On,Off]

On

CHAR

Optional.
On - take into account
right surface
Off do not take into
account right surface

[On,Off]

On

[On,Off]

Off

[-1d10,
1d10]

0d0

[-1d10,
1d10]

1d0

[-1d10,
1d10]

0d0

[0d0, 1d10]

0.2d0

[0d0, 1d10]

1d0

Type

Description and units

Optional.
On cylinder is solid
TransHollow

TransCenterDirX

TransCenterDirY

TransCenterDirZ

CHAR

Off cylinder is hollow


Optional.
x-component of cylinders
axis

REAL(8)
Optional.
y-component of cylinders
axis
REAL(8)
Optional.
z-component of cylinders
axis
REAL(8)
Optional.
Length of cylinder

TransLength

TransFactor

REAL(8)

REAL(8)

Optional.
Coefficient restriction
(extension) of cylinder
from left to right
Optional.

Name

Type

Description and units

REAL(8)

Minimal distance in xdirection between


transducers cells (the
procedure of transducers
cells definition takes next
cell if its x-coordinate is
differ from x-coordinate
of former cells more then
on TransStepX)

TransStepX

REAL(8)

TransStepY

REAL(8)

TransStepZ

Optional.
Minimal distance in ydirection between
transducers cells (the
procedure of transducers
cells definition takes next
cell if its y-coordinate is
differ from y-coordinate
of former cells more then
on TransStepY)
Optional.
Minimal distance in zdirection between
transducers cells (the
procedure of transducers
cells definition takes next
cell if its z-coordinate is
differ from z-coordinate of
former cells more then on
TransStepZ)

Range of
values

Default

[1d-10,
1d10]

1d-10

[1d-10,
1d10]

1d-10

[1d-10,
1d10]

1d-10

[0d0, 1d10]

0d0

[0d0, 1d10]

1d10

[0d0, 1d10]

_______

Optional.
Start time for output
TransTimeStart

REAL(8)
Optional.
End time for output

TransTimeEnd

REAL(8)
Optional.
Time interval of output

TransDTimeOut

REAL(8)
Required.

Name

TransAverage

Type

CHAR

Description and units


On write averaged
variables for time interval
of output
Off write variables on
output time

Range of
values

Default

[On,Off]

On

[On,Off]

On

[On,Off]

Off

Optional.
On output subdomain:
submesh is written into
TransName+mesh,
cell variables are written
into TransName,
face variables are written
into TransName+Face
TransSliceOut

CHAR
Off do not output
subdomain
If (TransSliceOut ==On)
TransTableOut='Off'
Optional.
On write table with
variables
Off do not write table
with variables

TransTableOut

CHAR

! Table
! x .................
! y .................
! z .................
! Time Pres Uvel Vvel
Wvel Temp
! .... .... .... ....
.... ....

It is not useful for


transducers with big
amount of cells!
Optional.

Name

TransdPdtOut

Type

CHAR

Description and units


On write pressure
derivative on time
Off do not write
pressure derivative on
time

Range of
values

Default

[On,Off]

Off

[-1,100]

-1

Any
(maximum
50
characters)

_______

Optional.
Output intersection
between cylinder and the
boundary with number
TransBoundaryOut.
nCellsOut:

TransBoundaryOut

INTEGER

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

TransBoundaryOutFile

Optional.
Output file name for
intersection between
cylinder and the boundary
with number
TransBoundaryOut.
CHAR
Requered if
(TransBoundaryOut>0
and TransBoundaryOut
< nBoundaryFields).

Name

TransInsideOnly

Type

Description and units

CHAR

On write inside cells


only
Off write not only
inside cells
Optional.

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'

Range of
values

Default

[On,Off]

Off

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


Transducers name

SurfName

CHAR
Required.

Range of
values
Any
(maximum
50
characters)

Default

_______

Name

SurfContourFile

Type

Description and units


File name with contour
coordinates

CHAR
Required.
If (On) compute
transducers cells through
intersection of cylinder and
mesh. And write file
CellTrans_+ TransName
with transducers cells.

Range of
values

Default

Any
(maximum
50
characters)

_______

[On,Off]

On

If (Off) read transducers


cells from file
CellTrans_+ TransName.

SurfDefCellsFromContour

CHAR

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.

Name

SurfCenterDirX

SurfCenterDirY

SurfCenterDirZ

SurfLeftDiscActive

SurfRightDiscActive

Range of
values

Default

[-1d10,
1d10]

0d0

[-1d10,
1d10]

1d0

[-1d10,
1d10]

0d0

CHAR

Optional.
On - take into account left
surface
Off do not take into
account left surface

[On,Off]

On

CHAR

Optional.
On - take into account
right surface
Off do not take into
account right surface

[On,Off]

On

Type

Description and units


x-component of cylinders
axis

REAL(8)
Optional.
y-component of cylinders
axis
REAL(8)
Optional.
z-component of cylinders
axis
REAL(8)

Optional.
Length of cylinder
SurfLength

REAL(8)

[0d0, 1d10]

0.2d0

SurfFactor

Optional.
Coefficient restriction
(extension) of cylinder from
REAL(8) left to right

[0d0, 1d10]

1d0

[0d0, 1d10]

0d0

[0d0, 1d10]

1d10

[0d0, 1d10]

_______

Optional.
Start time for output
SurfTimeStart

REAL(8)
Optional.
End time for output

SurfTimeEnd

REAL(8)
Optional.
Time interval of output

SurfDTimeOut

REAL(8)
Required.

Name

Type

Description and units

Range of
values

Default

Any
(maximum
50
characters)

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)

SurfAcousticsOut

CHAR

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.

6.3.2.1.

Example

&AcousticSurfaces
SurfName(1)='Cube'
SurfContourFile(1)='Cube.dat'
SurfDefCellsFromContour(1)='On'
SurfCenterDirX(1)=0.0d0

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.

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 ReadFiles parameters in Table 5. Maximum number of
ReadFiles is 100.
Table 5. Parameters of ReadFile
Name

Type

Description and units


File name with mesh.

ReadFileMesh

CHAR
Required.
File name with cells data.

ReadFileOut

CHAR
Required.
File name with face data.

ReadFileOutRes
Optional.

WriteDatFile

Name for output tecPlot file


tecplot
CHAR
Optional.
Number of processors.

nump

Range of
values
Any
(maximum
50
characters)
Any
(maximum
50
characters)
Any
(maximum
50
characters)
Any
(maximum
50
characters)

RestartBin

CHAR

_______

OutRes

dat

[1,9999]

INTEGER

INTEGER

_______

_______

Required.
Number of processors big mesh.
nump3D

Default

Required if
Transform2Dto3D==On.
On read restart in binary
format
Off read restart in text format
Optional.

_______
[1,9999]

[On,Off]

On

Name

Type

Description and units

Range of
values

Default

[On,Off]

On

[On,Off]

Off

[On,Off]

Off

[On,Off]

On

On read restart
RestartOut

CHAR

Off do not read restart


Optional.
On compute acoustic signals
for all listeners
Acoustic mesh is red from
ReadFileMesh. Variables is red
from ReadFileOut.

CalcAcoustics

CHAR

Acoustic signal is written into


files
WriteDatFile+_+ListenerName
Off do not compute acoustic
signal
Optional.
On compute and write
velocity module into 6th array in
tecPlot output file.

CalcVelocityModule6

Off do nothing extra


CHAR
If(CalcVorticityModule6==On)
CalcVelocityModule6 = Off
Optional.
On compute and write
vorticity module into 6th array in
tecPlot output file.

CalcVorticityModule6

Off do nothing extra


CHAR
If(CalcVorticityModule6==On)
CalcVelocityModule6 = Off
Optional.

Name

Type

Description and units


Compute Qfactor into 7th array in
tecPlotOutput

CalcQfactor7

CHAR

Range of
values

Default

[On,Off]

On

[On,Off]

Off

Optional.
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

Transform2Dto3D

CHAR

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.

7.2.1.1.

Example

&ReadFile
ReadFileMesh(1) = 'outmesh'
ReadFileOut(1) = 'out'
WriteDatFile(1) = 'dat'
nump(1) = 1
RestartBin(1) = 'On'
RestartOut(1) = 'On'

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'
/

7.2.2.

TransducerSurface

There are parameters about output subdomains from the domains defined above.
Detailed description of TransducerSurfaces parameters in Table 6. Maximum number of
TransducerSurface s is 100.
Table 6. Parameters of TransducerSurface
Name

TransReadFileNumber

Type

Description and units

Write subdomain for


ReadFile with number
INTEREG TransReadFileNumber
Required.

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'

Range of
values

Default

Any
(maximum
50
characters)

_______

TransTableOut(1)='Off'
&end
7.2.3.

Listeners

There are parameters for acoustic observers. Detailed description of Listeners


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

Type

Description and units

Write subdomain for


ReadFile with number
INTEREG TransReadFileNumber

ListenerName

Required.
X-coordinate of observer
ListenerLocationX

REAL(8)
Required.
REAL(8) Y-coordinate of observer

ListenerLocationY
Required.
REAL(8) Z-coordinate of observer
ListenerLocationZ
Required.
REAL(8) Time interval for acoustic
signal output.

ListenerDtOut

Optional.
REAL(8) Sound velocity.
ListenerSound
Optional.
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

Range of
values

Default

Any
(maximum
50
characters)

_______

[-1d10,
1d10]

_______

[-1d10,
1d10]

_______

[-1d10,
1d10]

_______

[1d-10,
1d10]

2d-2

[1d-10,
1d10]

3.4d2

&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

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

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

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'

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

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
nInternalFaces:
454667 ";

Name

NewPeriodicNumerationOn

nCells:

Type

CHAR

227944

nFaces:

Description and units


To define new numeration
for periodic boundaries
Required.
The number of the first
periodic boundary

PeriodicBound1
Integer

Required.

912997

Range of
values
Any
(maximum
50
characters)

Default

On

Name

Type

Description and units

Range of
values

Default

Any
(maximum
50
characters)

Off

The number of the second


periodic boundary

PeriodicBound2

Integer

PreprOnlyOn

CHAR

Required.
Run only pre-processing
(not to run simulation)
Required.

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
tan2
}
directions

( 0 0 10 );
( 0 1 0 );
( tan1 ); // it means that the refinement will be done along to
// tan1 direction

You might also like