Documente Academic
Documente Profesional
Documente Cultură
Keywords
OpenFOAM
SRF
MRF
cyclicAMI
Sliding Interface
Fumiya Nozaki
Last Updated: 22 May 2014
Preface
This document covers
In particular,
Chapter 1 Introduction
In this chapter we shall describe the classification of the
methods for solving a flow around a rotating machinery
using OpenFOAM.
1. Computational Domain
2. Time Dependency
1. Computational Domain
Does our model include some stationary regions or not?
2. Time Dependency
1. Computational Domain
2. Time Dependency
Which do we want to obtain, a steady or transient solution?
Classification of methods
2. Time Dependency
1. Computational Domain
Steady
Transient
Only
Rotating
Region
Include
Stationary
Region(s)
SRFSimpleFoam
SimpleFoam
+ fvOptions
Chapter 22
Chapter
Chapter 3
SRFPimpleFoam pimpleDyMFoam
Chapter 22
Chapter
Chapter 4
SRFSimpleFoam
and
SRFPimpleFoam
Overview
The Single Rotating Frame (SRF) model computes fluid flow
in a rotating frame of reference that is adhere to a rotating machinery.
SRFSimpleFoam
Transient solver
SRFPimpleFoam
Governing equations
Governing Equations of SRFSimpleFoam
Coriolis force Centrifugal force
+ 2 + = + +
= 0
axis of rotation
Relative velocity
(the velocity viewed from the rotating frame)
angular velocity
= +
position vector
Absolute velocity
(the velocity viewed from the stationary frame)
10
SRFSimpleFoam
SRFPimpleFoam
11
outlet
cyclic_half1
cyclic_half0
innerWall
12
Stationary wall
= 0 0 10
cyclic_half1
cyclic_half0
innerWall
Rotating wall =
SRFSimpleFoam
case
constant
Urel
system
RASProperties
controlDict
transportProperties
SRFProperties
omega
fvSolution
polyMesh
nut
fvSchemes
boundary
faces
neighbour
owner
points
SRFProperties
Angular velocity condition is described in SRFProperties file.
/*--------------------------------*- C++ -*----------------------------------*
| ========= | |
| / F ield | OpenFOAM: The Open Source CFD Toolbox |
| / O peration | Version: 2.3.0 |
| / A nd | Web: www.OpenFOAM.org |
| / M anipulation | |
*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object SRFProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
SRFModel rpm;
axis ( 0 0 1 );
rpmCoeffs
{
rpm 5000;
}
Axis of rotation
5000 rpm 5000 2 60 = 523.6 [rad/s]
// ************************************************************************* //
Rotational direction
When the axis vector points to you
rpm>0 rotation in counterclockwise direction
rpm<0 rotation in clockwise direction
15
Urel
In this tutorialSRFVelocity boundary condition is used on inlet
and outerWall boundaries.
inlet
{
type
inletValue
relative
value
}
SRFVelocity;
uniform (0 0 -10);
no;
uniform (0 0 0);
By setting relative up as no
This means = 0 0 10 .
outerWall
{
type
inletValue
relative
value
}
SRFVelocity;
uniform (0 0 0);
no;
uniform (0 0 0);
Boundary condition of
the relative velocity (Urel)
is able to be specified
in terms of the absolute velocity.
=
= 523.6 0.1 = 52.36 [/]
Rotational direction
17
SRFSimpleFoam
SRFPimpleFoam
18
0.2m
rotor
freestream
19
rotor
Rotating wall
freestream
20
+ 2 + = + +
= 0
UrelEqn.H
SRFModel.H
tmp<fvVectorMatrix> UrelEqn
(
fvm::div(phi, Urel)
+ turbulence->divDevReff(Urel)
+ SRF->Su()
==
fvOptions(Urel)
);
l.126
l.147
2.0*omega_ ^ Urel_
Implementation | SRFVelocity
void Foam::SRFVelocityFvPatchVectorField::updateCoeffs()
{
if (updated())
{
return;
}
no
Calculate
SRFModel.C l.60
operator==(-SRFVelocity + inletValue_); = +
}
// If already relative to the SRF simply supply the inlet value as a fixed
// value
else
If relative is yes
{
operator==(inletValue_);
}
fixedValueFvPatchVectorField::updateCoeffs();
}
22
23
Overview
The Multiple Reference Frame (SRF) model computes fluid flow
using both the rotating and stationary reference frame.
Multiple frames
simpleFoam
fvOptions
+
MRFSource
24
Conceptual image
Rotating
zone
Stationary
zone
25
Governing equations
Governing equations
Rotating zone
1 Coriolis force
= + +
= 0
Stationary zone
= + +
=0
In a rotating zone
1 the Coriolis force is added to the governing equations
stator
0.1m
0.04m
rotor
27
Rotating
zone
0.12m
Stationary
zone
28
stator
Stationary wall
rotor
Rotating wall
29
constant
system
RASProperties
controlDict
transportProperties
fvSchemes
polyMesh
fvSolution
epsilon
boundary
nut
faces
fvOptions
neighbour
owner
points
cellZones
30
fvOptions
MRF1
{
type
active
selectionMode
cellZone
MRFSource;
ture;
cellZone;
rotor;
MRFSourceCoeffs
{
origin
(0 0 0);
axis
(0 0 1);
omega
104.72;
}
Unit: [rad/s]
axis
origin
31
What is cellZones?
FoamFile
constant/polyMesh/cellZones
{
version
2.0;
format
ascii;
class
regIOobject;
location
"constant/polyMesh";
object
cellZones;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
1
(
The name of cellZones
rotor
{
type cellZone;
cellLabels
List<label>
1536
The number of cells
(
that make up cellZones
0
1
2
3
(snip)
1533
List of their cell labels
1534
1535
)
;
}
)
rotor
// ************************************************************************* //
32
362
363
364
365
366
367
368
369
370
if (rhs)
{
371
372
forAll(cells, i)
{
373
374
375
376
377
378
379
380
forAll(cells, i)
{
381
382
383
384
385
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
template<class RhoFieldType>
void Foam::MRFZone::makeRelativeRhoFlux
(
const RhoFieldType& rho,
surfaceScalarField& phi
) const
{
const surfaceVectorField& Cf = mesh_.Cf();
const surfaceVectorField& Sf = mesh_.Sf();
const vector Omega = omega_->value(mesh_.time().timeOutputValue())*axis_;
const vectorField& Cfi = Cf.internalField();
const vectorField& Sfi = Sf.internalField();
scalarField& phii = phi.internalField();
// Internal faces
forAll(internalFaces_, i)
{
label facei = internalFaces_[i];
phii[facei] -= rho[facei]*(Omega ^ (Cfi[facei] - origin_)) & Sfi[facei];
}
makeRelativeRhoFlux(rho.boundaryField(), phi.boundaryField());
}
35
Static Pressure
t=5.90 s
36
Velocity Magnitude
t=5.90 s
37
Velocity Magnitude
t=5.905 s
38
Velocity Magnitude
t=5.91 s
39
Velocity Magnitude
t=5.915 s
40
Velocity Magnitude
t=5.92 s
41
Velocity Magnitude
t=5.925 s
42
Velocity Magnitude
t=5.93 s
43
Velocity Magnitude
t=5.935 s
44
Velocity Magnitude
t=5.94 s
45
Velocity Magnitude
t=5.945 s
46
Velocity Magnitude
t=5.95 s
47
Mesh is stationary
dynamicMeshDict
FoamFile
{
version
2.0;
format
ascii;
class
dictionary;
location
"constant";
object
dynamicMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dynamicFvMesh
solidBodyMotionFvMesh;
cellZone: rotor
motionSolverLibs ( "libfvMotionSolvers.so" );
solidBodyMotionFvMeshCoeffs
{
cellZone
rotor;
solidBodyMotionFunction rotatingMotion;
rotatingMotionCoeffs
{
origin
(0 0 0);
The cellZone rotor is rotating
axis
(0 0 1);
counterclockwise at 6.2832 rad/s
omega
6.2832; // rad/s
}
about the origin.
49
Patch: AMI1
Coupled
through
cyclicAMI
Patch: AMI2
rotating
stationary
50
cyclicAMI
constant/polyMesh/boundary file
nFaces
startFace
192;
6048;
type
inGroups
nFaces
startFace
matchTolerance
transform
neighbourPatch
cyclicAMI;
1(cyclicAMI);
96;
6240;
0.0001;
noOrdering;
AMI2;
type
inGroups
nFaces
startFace
matchTolerance
transform
neighbourPatch
cyclicAMI;
1(cyclicAMI);
96;
6336;
0.0001;
noOrdering;
AMI1;
}
AMI1
{
}
AMI2
{
}
front
{
type
inGroups
empty;
1(empty);
51
Appendix
52
AMI1
{
type
inGroups
nFaces
startFace
neighbourPatch
transform
cyclicAMI;
1 (cyclicAMI);
20;
2440;
AMI2;
noOrdering;
type
inGroups
nFaces
startFace
neighbourPatch
transform
cyclicAMI;
1 (cyclicAMI);
40;
2460;
AMI1;
noOrdering;
}
AMI2
{
AMI1
AMI2
Coupled
through
cyclicAMI
53
type
inGroups
nFaces
startFace
neighbourPatch
transform
cyclicAMI;
1 (cyclicAMI);
20;
2440;
AMI2;
noOrdering;
type
inGroups
nFaces
startFace
neighbourPatch
transform
cyclicAMI;
1 (cyclicAMI);
40;
2460;
AMI1;
noOrdering;
source patch
Appearing first
in boundary file
AMI2
{
target patch
54
55
Fraction of
the intersecting areas
0.052
0.032
0.03
() =
= 0.6
0.05
56
0.0252
0.0052
0.005
= 0.2
0.025
57
58
Thank
You!
Kindly let me know
if you have trouble downloading this slide.
59