Vous êtes sur la page 1sur 17

Axi-Symmetric Problem and Conjugate Heat Transfer

problem validation of OpenFoam codes


Version: OpenFoam 4.0
Author: Vijaya Kumar G
Reviewed by: Dr. Stephan Kelm / Dr. K.Arul Prakash

Contents:
S.No

Topic

Page No.

Axi Symmetric Mesh conversion ICEM CFD to OpenFOAM

Validation #1 Heat Conduction in a Hollow Cylinder

Validation #2 Laminar Flow through an Aluminium Pipe


Conjugate Heat Transfer

10

1. Axi Symmetric Mesh conversion ICEM CFD to OpenFOAM


1.1 Dont's
The following ways of creating Axi Symmetric Meshes are not recommended for
OpenFoam
1. Creating a 2D Planar Mesh and importing in OpenFoam and manipulating Not
Recommended
2. Creating a 2D Mesh of 1 cell thickness (extrusion by normal method in ICEM) and then
importing and manipulating it in OpenFoam - Not Recommended
3. Using 'makeAxialMesh' utility in OpenFoam Not Recommended
This utility is not supplied with OpenFOAM directly but we have to compile
it from contributions online. Throws up errors like 'normal to the plane is not patching to the
average normal', meaning it shows the Mesh Face is not planar even though we know that
the mesh is planar. Not recommended at all.
4. Using 'extrudeMesh' utility in OpenFoam - Not Recommended
This utility is supplied with OpenFoam itself. Needs a 'extrudeMeshDict' in
the 'system' folder of your case. First you have to create a 2D Mesh file of one cell thickness
in ICEM-CFD and capture the front and back planes of the mesh under separate names
(FRONT and BACK).
extrudeMeshDict
/*--------------------------------*- C++ -*----------------------------------*\
| =========
|
|
| \\
/ F ield
| OpenFOAM: The Open Source CFD Toolbox
| \\ / O peration | Version: 2.3.x
|
| \\ / A nd
| Web:
www.OpenFOAM.org
|
| \\/ M anipulation |
|
\*---------------------------------------------------------------------------*/
FoamFile
{

version 2.0;
format
ascii;
class
dictionary;
object
extrudeProperties;

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
constructFrom patch;
sourceCase "$FOAM_CASE";
sourcePatches (FRONT);
exposedPatchName BACK;
extrudeModel

wedge;

sectorCoeffs
{

axisPt
axis
angle

(0 0 0.01);
(0 1 0);
1;

flipNormals false;
mergeFaces false;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
COMMANDS:
fluent3DMeshToFoam <filename.msh>
extrudeMesh
Cons of 'extrudeMesh' utility
Creates highly non-orthogonal meshes and makes the solver crash. Not Recommended at
all.

1.2 Recommended Method


Work to be done in ICEM CFD
- First Create Points, then create curves from those points and then only create
Surfaces
from those curves. Directly creating surfaces from points, leads to
creation of multiple edges at the same location (especially with multi region meshes
having interface).
- Name the boundary curves (patches) at this stage itself. If you are working with
multi Region mesh like in conjugate Heat transfer, then name the interface patches
3

specifically as interface1. Else OpenFoam will not recognise the interfaces.


- Do blocking, association, PreMesh generation and convert to unstructured mesh.
(Usual step)
- Edit Mesh Extrude Mesh Extrude by rotate option Set everything to
'inherited' Number of layers = 1- Angle per layer = 1 deg Select the origin (bottom
most point of your intended axis) Select the axis (X or Y or Z or specify any vector)-
Select all visible objects and Done. Mesh is created.
- Capture the Front and Back of the mesh under separate part names (Example
FRONT, BACK)
- Export .msh file.

Mesh Manipulation in OpenFOAM


- Mesh conversion to OpenFOAM format.
COMMAND:
fluent3DMeshToFoam <filename.msh>
- Change the type of the boundary patches for FRONT, BACK patches in 'boundary'
file located in 'constant/polymesh' directory to 'wedge'
- Now running the 'checkMesh' command will throw the following error.

- This is because the FRONT patch coincides exactly with coordinate plane (XY
plane, equatoion of plane is z = 0, normal vector to the plane is (0 0 1) ).
- By definition in OpenFOAM if we want axisymmetric calculations, the wedge type
patches (FRONT and BACK should straddle the coordinate plane symmetricaly ie They
have to make equal angles with the coordinate plane on either side.)
- For example, in our case we gave the wedge angle as 1 degrees. So FRONT wedge
plane should make an angle of 0.5 degrees to the coordinate plane. The BACK wedge plane
should also make 0.5 degrees with coordinate plane (on other side).
- Therefore we have to rotate the mesh. We will use 'rotateMesh' command to
achieve this.

Syntax:
rotateMesh n1

n2

n1 Current normal
n2 Normal we require
In our case

n1 = (0 0 1)

For n2 it is suggested to use the following (derived from some vector geometry)
n2 = (-sin(0.5)
0
cos(0.5))
here 0.5 degrees is half of the wedge angle (1 degree).
COMMAND:
rotateMesh (0 0 1) (-sin(0.5)

cos(0.5))

- Now if we run 'checkMesh' again,

- Clearly what we set out to do, has been achieved.


- It must be noted that there is no separate patch for the 'axis' in OpenFOAM for axisymmetric meshes.

2. Validation #1 Heat Conduction in a Hollow Cylinder


Solver: laplacianFoam

2.1 Case Setup:

After following the procedures as in the previous section for mesh manipulation, setup the
case as above.
In the '0/T' file for temperature initial field , at the end add the following line
#includeEtc "caseDicts/setConstraintTypes"
This adds the wedge constraint for the wedge type patches.
6

'T' File
/*--------------------------------*- C++ -*----------------------------------*\
| =========
|
|
| \\
/ F ield
| OpenFOAM: The Open Source CFD Toolbox
| \\ / O peration | Version: 4.0
|
| \\ / A nd
| Web:
www.OpenFOAM.org
|
| \\/ M anipulation |
|
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class
volScalarField;
object
T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions

[0 0 0 1 0 0 0];

internalField uniform 400;


boundaryField
{
innerWall
{
type
fixedValue;
value
uniform 500;
}
outerWall
{
type
value
}
top
{
type
}

fixedValue;
uniform 300;

zeroGradient;

bottom
{
type
}

zeroGradient;

#includeEtc "caseDicts/setConstraintTypes"
}
// ************************************************************************* //

2.2 Comparison with Analytical Solution:

3. Validation #2 Laminar Flow through an Aluminium Pipe


Conjugate Heat Transfer
3.1 Case setup
- Create some dummy boundary files in the '0' folder. We call this dummy because we will
not specify boundary conditions in these files. Boundary conditions will be specified in
'changeDictionaryDict' of specific region in the system folder.
- Use the mesh manipulation as discussed in section 1 to get an axi-symmetric mesh.
- Splitting the Mesh regions (In our case AIR and ALUMINIUM)
COMMAND:
splitMeshRegions -cellZones -overwrite
- This command splits the regions and also creates separate folders for different
regions in '0','constant' and 'system' folders and adds some dummy files to them as well.

10

11

12

13

- The coupling of AIR and ALUMINIUM region is established by using the


'compressible::turbulentTemperatureCoupledBaffleMixed;' in the temperature boundary
condition of 'changeDictionaryDict' of both the regions.
- The case is run using the executable file 'Allrun' (look into this for some details)\
COMMAND:
./Allrun

3.2 PostProcessing:
- To view results 'paraFoam' command doesn't seem to work for conjugateHeatTransfer
cases.
- We use paraview for this case.
COMMANDS
touch all.foam
paraview

//creates a '.foam' file for paraview

// to open paraview

- In paraview interface, open the 'all.foam' file and do post processing as you wish.

14

3.3 Validation with Analytical Solution

3.3.1 Velocity Profile

We get a parabolic profile with Umax = 0.64 m/s

15

Analytical Calculations

It can be seen that there is a gulf between the theoretical result of Umax and OpenFoam
result.
- The theoretical calculation assumes incompressible, non heated flow.
- But since we have heat transfer also and the use a compressible flow solver, the density of
the fluid near the walls is lowered due to heating, and hence the mass flux near the walls is
also lowered.
- To maintain continuity these mass fluxes will be pushed outward (towards the axis of
pipe), and hence the velocity near the axis increases. This explains the difference between
theoretical and analytical solution.

3.3.2 Nusselt Number Calculation:


OpenFoam:
Wall Heat Flux Q is obtained by using the below command.
COMMAND:
wallHeatFlux -region AIR -latestTime

16

Analytical Solution:

17

Vous aimerez peut-être aussi