SlideShare uma empresa Scribd logo
1 de 111
Baixar para ler offline
Dynamic Mesh
in OpenFOAM
Fumiya Nozaki
Last updated: 31 December 2015
114 PAGES
1
Disclaimer
“This offering is not approved or
endorsed by OpenCFD Limited,
the producer of the OpenFOAM
software and owner of the
OPENFOAM® and OpenCFD®
trade marks.”
2
Dynamic Mesh in OpenFOAM
In OpenFOAM, the mesh motions and the topology
changes are handled by Dynamic Mesh functionality.
Settings for Dynamic Mesh are described in
dynamicMeshDict file located in the constant directory.
Solvers that can handle these mesh changes have the
letters “DyM”, an abbreviation for Dynamic Mesh, in its
name.
e.g. pimpleDyMFoam, interDyMFoam
3
Dynamic Mesh in OpenFOAM
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object dynamicMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dynamicFvMesh solidBodyMotionFvMesh;
motionSolverLibs ( "libfvMotionSolvers.so" );
solidBodyMotionFvMeshCoeffs
{
cellZone rotor;
solidBodyMotionFunction rotatingMotion;
rotatingMotionCoeffs
{
origin (0 0 0);
axis (0 0 1);
omega 6.2832; // rad/s
}
}
// ************************************************************************* //
constant/dynamicMeshDict
Selection of dynamicFvMesh
type from available options
Settings for the selected
dynamicFvMesh
4
Dynamic Mesh in OpenFOAM
In OpenFOAM, the mesh motions and the topology
changes are handled by Dynamic Mesh functionality.
Settings for Dynamic Mesh are described in
dynamicMeshDict file located in the constant directory.
Solvers that can handle these mesh changes have the
letters “DyM”, an abbreviation for Dynamic Mesh, in its
name.
e.g. pimpleDyMFoam, interDyMFoam
5
while (runTime.run())
{
#include "readControls.H"
#include "CourantNo.H"
#include "setDeltaT.H"
runTime++;
Info<< "Time = " << runTime.timeName() << nl << endl;
mesh.update();
// Calculate absolute flux from the mapped surface velocity
phi = mesh.Sf() & Uf;
if (mesh.changing() && correctPhi)
{
#include "correctPhi.H"
}
// Make the flux relative to the mesh motion
fvc::makeRelative(phi, U);
if (mesh.changing() && checkMeshCourantNo)
{
#include "meshCourantNo.H"
}
applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pimpleDyMFoam.C
It calls the mesh motion library
to calculate the new position of
points and update the mesh.
Dynamic Mesh in OpenFOAM 6
Available types of dynamicFvMesh without topological changes
• staticFvMesh
Disable dynamic mesh
• solidBodyMotionFvMesh
Perform the rigid-body motions such as translational and rotational
movements
• multiSolidBodyMotionFvMesh
Perform the rigid-body motions in multiple regions
• dynamicMotionSolverFvMesh
Solve a Laplace’s equation for the motion displacement or motion
velocity to calculate the updated position of points
• dynamicInkJetFvMesh
Move mesh points sinusoidally in the x direction by explicitly calculating
the new positions
• dynamicRefineFvMesh
Refine the mesh depending on the user specified field values
7
Available types of dynamicFvMesh with topological changes
• rawTopoChangerFvMesh
• movingConeTopoFvMesh
• mixerFvMesh
• linearValveFvMesh
• linearValveLayersFvMesh
Under survey
8
Inheritance diagram for dynamicFvMesh models
dynamicFvMesh
staticFvMesh
dynamicInkJetFvMeshsolidBodyMotionFvMesh
multiSolidBodyMotionFvMesh
dynamicMotionSolverFvMesh
dynamicRefineFvMesh
Abstract base class for geometry
and/or topology changing fvMesh
9
Inheritance diagram for dynamicFvMesh models
dynamicFvMesh
rawTopoChangerFvMesh
movingConeTopoFvMesh
mixerFvMesh
linearValveFvMesh
linearValveLayersFvMesh
topoChangerFvMesh Abstract base class for
a topology changing fvMesh
10
solidBodyMotionFvMesh
Available types of solid motions
 Translational motions
• linearMotion : Uniform linear motion with constant velocity
• oscillatingLinearMotion : Oscillating linear motion
 Rotational motions
• rotatingMotion : Uniform circular motion
• axisRotationMotion : Uniform circular motion
• oscillatingRotatingMotion : Oscillating rotation motion
 Ship Design Analysis [1]
• SDA
 Tabulated data
• tabulated6DoFMotion
 Combination of above types
• multiMotion
12
linearMotion
dynamicFvMesh solidBodyMotionFvMesh;
motionSolverLibs ( "libfvMotionSolvers.so" );
solidBodyMotionFvMeshCoeffs
{
solidBodyMotionFunction linearMotion;
linearMotionCoeffs
{
velocity (1 0 0);
}
}
constant/dynamicMeshDict
13
oscillatingLinearMotion
dynamicFvMesh solidBodyMotionFvMesh;
motionSolverLibs ( "libfvMotionSolvers.so" );
solidBodyMotionFvMeshCoeffs
{
cellZone inletChannel;
solidBodyMotionFunction oscillatingLinearMotion;
oscillatingLinearMotionCoeffs
{
amplitude (0 0.5 0);
omega 3.14;
}
}
tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/constant/
dynamicMeshDict
14
rotatingMotion
dynamicFvMesh solidBodyMotionFvMesh;
motionSolverLibs ( "libfvMotionSolvers.so" );
solidBodyMotionFvMeshCoeffs
{
cellZone rotor;
solidBodyMotionFunction rotatingMotion;
rotatingMotionCoeffs
{
origin (0 0 0);
axis (0 0 1);
omega 6.2832;
}
}
tutorials/incompressible/pimpleDyMFoam/mixerVesselAMI2D/constant/dynamicMeshDict
15
axisRotationMotion
dynamicFvMesh solidBodyMotionFvMesh;
motionSolverLibs ( "libfvMotionSolvers.so" );
solidBodyMotionFvMeshCoeffs
{
cellZone rotor;
solidBodyMotionFunction axisRotationMotion;
axisRotationMotionCoeffs
{
origin (0 0 0);
radialVelocity (0 0 360);
}
}
tutorials/incompressible/pimpleDyMFoam/mixerVesselAMI2D/constant/dynamicMeshDict
16
oscillatingRotatingMotion
dynamicFvMesh solidBodyMotionFvMesh;
motionSolverLibs ( "libfvMotionSolvers.so" );
solidBodyMotionFvMeshCoeffs
{
cellZone rotor;
solidBodyMotionFunction oscillatingRotatingMotion;
oscillatingRotatingMotionCoeffs
{
origin (0 0 0);
omega 6.28;
amplitude (0 0 45);
}
}
tutorials/incompressible/pimpleDyMFoam/mixerVesselAMI2D/constant/dynamicMeshDict
17
oscillatingRotatingMotion
rotor
18
oscillatingRotatingMotion
rotor
19
oscillatingRotatingMotion
rotor
20
oscillatingRotatingMotion
rotor
21
oscillatingRotatingMotion
rotor
22
oscillatingRotatingMotion
rotor
23
oscillatingRotatingMotion
rotor
24
oscillatingRotatingMotion
rotor
25
oscillatingRotatingMotion
rotor
26
oscillatingRotatingMotion
rotor
27
oscillatingRotatingMotion
rotor
28
oscillatingRotatingMotion
rotor
29
oscillatingRotatingMotion
rotor
30
oscillatingRotatingMotion
rotor
31
oscillatingRotatingMotion
rotor
32
oscillatingRotatingMotion
rotor
33
oscillatingRotatingMotion
rotor
34
oscillatingRotatingMotion
rotor
35
oscillatingRotatingMotion
rotor
36
oscillatingRotatingMotion
rotor
37
oscillatingRotatingMotion
rotor
38
tabulated6DoFMotion
dynamicFvMesh solidBodyMotionFvMesh;
solidBodyMotionFvMeshCoeffs
{
solidBodyMotionFunction tabulated6DoFMotion;
tabulated6DoFMotionCoeffs
{
CofG (0 0 0);
timeDataFileName "$FOAM_CASE/constant/6DoF.dat";
}
}
tutorials/multiphase/interDyMFoam/ras/sloshingTank3D6DoF/constant/dynamicMeshDict
39
100
(
(0 ((0 0 0) (0 0 0)))
(0.40404 ((0.401298 0.952899 0.321827) (4.82741 2.79073 2.00649)))
(0.808081 ((0.786273 1.8071 0.635266) (9.52899 5.3597 3.93137)))
(1.21212 ((1.13927 2.47414 0.932149) (13.9822 7.5028 5.69634)))
(1.61616 ((1.44593 2.88493 1.20474) (18.071 9.04972 7.22963)))
(2.0202 ((1.69377 2.99691 1.44593) (21.6889 9.87755 8.46886)))
(2.42424 ((1.87273 2.7985 1.64943) (24.7414 9.92051 9.36363)))
(2.82828 ((1.97551 2.31024 1.80994) (27.1492 9.17518 9.87755)))
. . .
(40 ((1.82589 1.65428 -0.575807) (-8.6371 2.70906 9.12945)))
)
tutorials/multiphase/interDyMFoam/ras/sloshingTank3D6DoF/constant/6DoF.dat
tabulated6DoFMotion 40
multiMotion
dynamicFvMesh solidBodyMotionFvMesh;
solidBodyMotionFvMeshCoeffs
{
solidBodyMotionFunction multiMotion;
multiMotionCoeffs
{
// Table rotating in z axis
rotatingTable
{
solidBodyMotionFunction rotatingMotion;
rotatingMotionCoeffs
{
origin (0 0.1 0);
axis (0 0 1);
omega 6.2832; // rad/s
}
}
// Tube rocking on rotating table
rotatingBox
{
solidBodyMotionFunction oscillatingRotatingMotion;
oscillatingRotatingMotionCoeffs
{
origin (0 0 0);
omega 40;
amplitude (45 0 0);
}
}
}
}
tutorials/multiphase/interDyMFoam/ras/testTubeMixer/constant/dynamicMeshDict
// Table rotating in z axis
rotatingTable
{
solidBodyMotionFunction rotatingMotion;
rotatingMotionCoeffs
{
origin (0 0.1 0);
axis (0 0 1);
omega 6.2832;
}
}
// Tube rocking on rotating table
rotatingBox
{
solidBodyMotionFunction oscillatingRotatingMotion;
oscillatingRotatingMotionCoeffs
{
origin (0 0 0);
omega 40;
amplitude (45 0 0);
}
}
41
multiSolidBodyMotionFvMesh
dynamicMeshDict
dynamicFvMesh multiSolidBodyMotionFvMesh;
motionSolverLibs ( "libfvMotionSolvers.so" );
multiSolidBodyMotionFvMeshCoeffs
{
rotor1
{
solidBodyMotionFunction rotatingMotion;
rotatingMotionCoeffs
{
origin (0 0 0);
axis (0 0 1);
omega 3.1416;
}
}
rotor2
{
solidBodyMotionFunction rotatingMotion;
rotatingMotionCoeffs
{
origin (4 0 0);
axis (0 0 1);
omega -3.1416;
}
}
}
// ************************************************************************* //
constant/dynamicMeshDict
Different settings of rigid body
motions in multiple cellZones
43
An example usage
rotor2
rotor1
44
dynamicMotionSolverFvMesh
Brief description of dynamicMotionSolverFvMesh
 Solve a Laplace’s equation for the motion displacement 𝑑 𝑚 [𝑚] or motion
velocity 𝑢 𝑚 [ 𝑚 𝑠]:
𝛻 ∙ 𝛾𝛻𝑑 𝑚 = 0
or
𝛻 ∙ 𝛾𝛻𝑢 𝑚 = 0
 Users can select which equations to be solved.
 Users need to specify how to calculate the diffusion coefficient 𝛾 of the
equation.
46
dynamicMeshDict
dynamicFvMesh dynamicMotionSolverFvMesh;
motionSolverLibs ( "libfvMotionSolvers.so" );
solver velocityComponentLaplacian;
velocityComponentLaplacianCoeffs
{
component x;
diffusivity directional (1 200 0);
}
tutorials/incompressible/pimpleDyMFoam/movingCone/constant/dynamicMeshDict
 Users can select which equations to be solved by choosing the solver
from the available options.
 Users need to specify how to calculate the diffusion coefficient 𝛾 of
the equation by selecting from the options.
1
2
1
2
47
Available types of solver
 Solving for cellDisplacement (unit: [𝑚])
• displacementLaplacian
• displacementComponentLaplacian
• displacementInterpolation
• displacementLayeredMotion
• displacementSBRStress
 Solving for cellMotionU (unit: [ 𝑚 𝑠])
• velocityLaplacian
• velocityComponentLaplacian
48
Available types of solver | displacementLaplacian
void Foam::displacementLaplacianFvMotionSolver::solve()
{
// The points have moved so before interpolation update
// the motionSolver accordingly
movePoints(fvMesh_.points());
diffusivity().correct();
pointDisplacement_.boundaryField().updateCoeffs();
Foam::solve
(
fvm::laplacian
(
diffusivity().operator()(),
cellDisplacement_,
"laplacian(diffusivity,cellDisplacement)"
)
);
}
src/fvMotionSolver/fvMotionSolvers/displacement/laplacian/
displacementLaplacianFvMotionSolver.C
Solving Laplace’s Eqn.
49
Available types of solver | velocityLaplacian
void Foam::velocityLaplacianFvMotionSolver::solve()
{
// The points have moved so before interpolation update
// the fvMotionSolver accordingly
movePoints(fvMesh_.points());
diffusivityPtr_->correct();
pointMotionU_.boundaryField().updateCoeffs();
Foam::solve
(
fvm::laplacian
(
diffusivityPtr_->operator()(),
cellMotionU_,
"laplacian(diffusivity,cellMotionU)"
)
);
}
src/fvMotionSolver/fvMotionSolvers/velocity/laplacian/
velocityLaplacianFvMotionSolver.C
Solving Laplace’s Eqn.
50
Available types of diffusivity models
• uniform
• directional
• motionDirectional
• inverseVolume
• inverseDistance
• inverseFaceDistance
• inversePointDistance
• quadratic
• exponential
• file
51
Class diagram of diffusivity models
motionDiffusivity
uniformDiffusivity quadraticDiffusivity exponentialDiffusivity fileDiffusivity
directionalDiffusivity
motionDirectionalDiffusivity
inverseVolumeDiffusivity
inverseDistanceDiffusivity
inverseFaceDistanceDiffusivity
inversePointDistanceDiffusivity
 Source Code: src/fvMotionSolver/motionDiffusivity/
52
Class diagram of diffusivity models
motionDiffusivity class
//- Return diffusivity field
virtual tmp<surfaceScalarField> operator()() const = 0;
// Protected data
surfaceScalarField faceDiffusivity_;
correct()
//- Correct the motion diffusivity
virtual void correct() = 0;
uniformDiffusivity class
virtual tmp<surfaceScalarField> operator()() const
{
return faceDiffusivity_;
}
directionalDiffusivity class
motionDirectionalDiffusivity class
inverseVolumeDiffusivity class
inverseDistanceDiffusivity class
inverseFaceDistanceDiffusivity class
inversePointDistanceDiffusivity class
override
override
53
Class diagram of diffusivity models
motionDiffusivity class
//- Return diffusivity field
virtual tmp<surfaceScalarField> operator()() const = 0;
Foam::tmp<Foam::surfaceScalarField>
Foam::quadraticDiffusivity::operator()() const
{
return sqr(basicDiffusivityPtr_->operator()());
}
//- Correct the motion diffusivity
virtual void correct() = 0;
quadraticDiffusivity class
override
void Foam::quadraticDiffusivity::correct()
{
basicDiffusivityPtr_->correct();
}
54
Class diagram of diffusivity models
motionDiffusivity class
//- Return diffusivity field
virtual tmp<surfaceScalarField> operator()() const = 0;
Foam::tmp<Foam::surfaceScalarField>
Foam::exponentialDiffusivity::operator()() const
{
return exp(-alpha_/basicDiffusivityPtr_->operator()());
}
//- Correct the motion diffusivity
virtual void correct() = 0;
exponentialDiffusivity class
override
void Foam::exponentialDiffusivity::correct()
{
basicDiffusivityPtr_->correct();
}
55
Calculation of diffusion coefficient
void Foam::inverseVolumeDiffusivity::correct()
{
volScalarField V
(
IOobject
(
"V",
mesh().time().timeName(),
mesh(),
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
mesh(),
dimless,
zeroGradientFvPatchScalarField::typeName
);
V.internalField() = mesh().V();
V.correctBoundaryConditions();
faceDiffusivity_ = 1.0/fvc::interpolate(V);
}
src/fvMotionSolver/motionDiffusivity/inverseVolume/inverseVolumeDiffusivity.C
In the case of inverseVolume type,
faceDiffusivity_ is calculated as the
inverse of the cell volumes as its
name indicates.
 correct() function calculates the diffusion coefficient field faceDiffusivity_
56
• cmptMultiply(a, b) where 𝑎 = 𝑎0, 𝑎1, 𝑎2 , 𝑏 = 𝑏0, 𝑏1, 𝑏2
𝑐𝑚𝑝𝑡𝑀𝑢𝑙𝑡𝑖𝑝𝑙𝑦 𝑎, 𝑏 = 𝑎0 𝑏0, 𝑎1 𝑏1, 𝑎2 𝑏2
Calculation of diffusion coefficient
void Foam::directionalDiffusivity::correct()
{
const surfaceVectorField n(mesh().Sf()/mesh().magSf());
faceDiffusivity_ == (n & cmptMultiply(diffusivityVector_, n));
}
src/fvMotionSolver/motionDiffusivity/directional/directionalDiffusivity.C
In the case of directional type,
faceDiffusivity_ is calculated using
the user specified diffusivityVector_
and unit normal vectors of each face.
57
Mesh update process
bool Foam::dynamicMotionSolverFvMesh::update()
{
fvMesh::movePoints(motionPtr_->newPoints());
if (foundObject<volVectorField>("U"))
{
volVectorField& U =
const_cast<volVectorField&>(lookupObject<volVectorField>("U"));
U.correctBoundaryConditions();
}
return true;
}
src/dynamicFvMesh/dynamicMotionSolverFvMesh/dynamicMotionSolverFvMesh.C
Foam::tmp<Foam::pointField> Foam::motionSolver::newPoints()
{
solve();
return curPoints();
}
src/dynamicMesh/motionSolver/motionSolver/motionSolver.C
 mesh.update() calls update() function of dynamicMotionSolverFvMesh class.
58
void Foam::velocityComponentLaplacianFvMotionSolver::solve()
{
// The points have moved so before interpolation update
// the fvMotionSolver accordingly
movePoints(fvMesh_.points());
diffusivityPtr_->correct();
pointMotionU_.boundaryField().updateCoeffs();
Foam::solve
(
fvm::laplacian
(
diffusivityPtr_->operator()(),
cellMotionU_,
"laplacian(diffusivity,cellMotionU)"
)
);
}
src/fvMotionSolver/fvMotionSolvers/componentVelocity/componentLaplacian/
velocityComponentLaplacianFvMotionSolver.C
Foam::tmp<Foam::pointField> Foam::motionSolver::newPoints()
{
solve();
return curPoints();
}
src/dynamicMesh/motionSolver/motionSolver/motionSolver.C
Solve Laplace’s Eqn.
Update the diffusion
coefficient field
Mesh update process 59
Foam::tmp<Foam::pointField> Foam::motionSolver::newPoints()
{
solve();
return curPoints();
}
src/dynamicMesh/motionSolver/motionSolver/motionSolver.C
Foam::tmp<Foam::pointField>
Foam::velocityComponentLaplacianFvMotionSolver::curPoints() const
{
volPointInterpolation::New(fvMesh_).interpolate
(
cellMotionU_,
pointMotionU_
);
tmp<pointField> tcurPoints(new pointField(fvMesh_.points()));
tcurPoints().replace
(
cmpt_,
tcurPoints().component(cmpt_)
+ fvMesh_.time().deltaTValue()*pointMotionU_.internalField()
);
twoDCorrectPoints(tcurPoints());
return tcurPoints;
}
src/fvMotionSolver/fvMotionSolvers/componentVelocity/componentLaplacian/
velocityComponentLaplacianFvMotionSolver.C
Calculate the new
position of points
Interpolate the motion velocity
from cell centres to points
Mesh update process 60
movingWall
{
type uniformFixedValue;
uniformValue constant 1;
}
Moving at constant
velocity of 1m/s
“farField.*”
{
type slip;
}
movingCone tutorial 61
movingCone tutorial 62
movingCone tutorial 63
movingCone tutorial 64
movingCone tutorial 65
movingCone tutorial 66
movingCone tutorial 67
movingCone tutorial 68
movingCone tutorial 69
movingCone tutorial 70
movingCone tutorial 71
movingCone tutorial 72
movingCone tutorial 73
movingCone tutorial 74
movingCone tutorial 75
movingCone tutorial 76
dynamicInkJetFvMesh
Brief description of dynamicInkJetFvMesh
 From the description in the header file
 Mesh motion specifically for the "pumping" system of an ink-jet injector.

The set of points in the "pumping" region are compressed and expanded
sinusoidally to impose a sinusoidal variation of the flow at the nozzle exit.
Points can move only in the X direction
78
Brief description of dynamicInkJetFvMesh
Points can move only in the X direction
 From the description in the header file
 Mesh motion specifically for the "pumping" system of an ink-jet injector.

The set of points in the "pumping" region are compressed and expanded
sinusoidally to impose a sinusoidal variation of the flow at the nozzle exit.
79
An example usage
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object dynamicMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dynamicFvMesh dynamicInkJetFvMesh;
motionSolverLibs ( "libfvMotionSolvers.so" );
dynamicInkJetFvMeshCoeffs
{
amplitude 0.5;
frequency 1;
refPlaneX 0.0;
}
// ************************************************************************* //
constant/dynamicMeshDict
Three input parameters
control the mesh motions
80
An example usage
refPlaneX
-1.0 -0.5 0.0 0.5 1.0
81
An example usage
-1.0 -0.5 0.0 0.5 1.0
refPlaneX
82
An example usage
-1.0 -0.5 0.0 0.5 1.0
refPlaneX
83
An example usage
-1.0 -0.5 0.0 0.5 1.0
refPlaneX
84
An example usage
-1.0 -0.5 0.0 0.5 1.0
refPlaneX
85
An example usage
-1.0 -0.5 0.0 0.5 1.0
refPlaneX
86
An example usage
-1.0 -0.5 0.0 0.5 1.0
refPlaneX
87
An example usage
-1.0 -0.5 0.0 0.5 1.0
refPlaneX
88
An example usage
-1.0 -0.5 0.0 0.5 1.0
refPlaneX
89
An example usage
-1.0 -0.5 0.0 0.5 1.0
refPlaneX
90
An example usage
-1.0 -0.5 0.0 0.5 1.0
refPlaneX
91
Calculation of the new position of points
bool Foam::dynamicInkJetFvMesh::update()
{
scalar scalingFunction =
0.5*
(
::cos(constant::mathematical::twoPi*frequency_*time().value())
- 1.0
);
Info<< "Mesh scaling. Time = " << time().value() << " scaling: "
<< scalingFunction << endl;
pointField newPoints = stationaryPoints_;
newPoints.replace
(
vector::X,
stationaryPoints_.component(vector::X)*
(
1.0
+ pos
(
- (stationaryPoints_.component(vector::X))
- refPlaneX_
)*amplitude_*scalingFunction
)
);
src/dynamicFvMesh/dynamicInkJetFvMesh/dynamicInkJetFvMesh.C
Explicitly calculate
the new position of points
Modify only the x-coordinate
92
Calculation of the new position of points
fvMesh::movePoints(newPoints);
volVectorField& U =
const_cast<volVectorField&>(lookupObject<volVectorField>("U"));
U.correctBoundaryConditions();
return true;
}
src/dynamicFvMesh/dynamicInkJetFvMesh/dynamicInkJetFvMesh.C
93
dynamicRefineFvMesh
Under survey
movingConeTopoFvMesh
Brief description of movingConeTopoFvMesh
 From the description in the header file
 Sample topoChangerFvMesh that moves an object in x direction
 and introduces/removes layers.
 It is designed exclusively for use with the movingCone tutorial.
96
An example usage
dynamicFvMesh movingConeTopoFvMesh;
motionSolverLibs ( "libfvMotionSolvers.so" );
movingConeTopoFvMeshCoeffs
{
motionVelAmplitude (1.5 0.0 0.0);
motionVelPeriod 0.003;
leftEdge 0.0;
leftObstacleEdge 0.0;
rightObstacleEdge 0.0;
right
{
minThickness 3e-5;
maxThickness 6e-5;
}
left
{
minThickness 3e-5;
maxThickness 5e-5;
}
}
constant/dynamicMeshDict
These parameters are required
but not used.
97
 Read dynamicMeshDict and set the values of private data
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct from components
Foam::movingConeTopoFvMesh::movingConeTopoFvMesh(const IOobject& io)
:
topoChangerFvMesh(io),
motionDict_
(
IOdictionary
(
IOobject
(
"dynamicMeshDict",
time().constant(),
*this,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE,
false
)
).subDict(typeName + "Coeffs")
),
src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C
Constructors 98
motionVelAmplitude_(motionDict_.lookup("motionVelAmplitude")),
motionVelPeriod_(readScalar(motionDict_.lookup("motionVelPeriod"))),
curMotionVel_
(
motionVelAmplitude_*
Foam::sin(time().value()*M_PI/motionVelPeriod_)
),
leftEdge_(readScalar(motionDict_.lookup("leftEdge"))),
curLeft_(readScalar(motionDict_.lookup("leftObstacleEdge"))),
curRight_(readScalar(motionDict_.lookup("rightObstacleEdge")))
{
Pout<< "Initial time:" << time().value()
<< " Initial curMotionVel_:" << curMotionVel_
<< endl;
addZonesAndModifiers();
src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C
Constructors (cont’d)
Read the parameters
from dynamicMeshDict
• motionVelAmplitude
• motionVelPeriod
• leftEdge
• leftObstacleEdge
• rightObstacleEdge
Create two faceZones
• rightExtrusionFaces
• leftExtrusionFaces
and modifiers for motion action
99
curLeft_ = average
(
faceZones()
[
faceZones().findZoneID("leftExtrusionFaces")
]().localPoints()
).x() - SMALL;
curRight_ = average
(
faceZones()
[
faceZones().findZoneID("rightExtrusionFaces")
]().localPoints()
).x() + SMALL;
motionMask_ = vertexMarkup
(
points(),
curLeft_,
curRight_
);
}
src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C
Constructors (cont’d) 100
The initial x-coordinates of left and
right sides of the moving obstacle
(curLeft_ and curRight_) are calculated
using the faceZones.
addZonesAndModifiers
void Foam::movingConeTopoFvMesh::addZonesAndModifiers()
{
// Add zones and modifiers for motion action
if
(
pointZones().size()
|| faceZones().size()
|| cellZones().size()
|| topoChanger_.size()
)
{
Info<< "void movingConeTopoFvMesh::addZonesAndModifiers() : "
<< "Zones and modifiers already present. Skipping."
<< endl;
return;
}
src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C
101
 Create two faceZones and modifiers for motion action
addZonesAndModifiers
Info<< "Time = " << time().timeName() << endl
<< "Adding zones and modifiers to the mesh" << endl;
const vectorField& fc = faceCentres();
const vectorField& fa = faceAreas();
labelList zone1(fc.size());
boolList flipZone1(fc.size(), false);
label nZoneFaces1 = 0;
labelList zone2(fc.size());
boolList flipZone2(fc.size(), false);
label nZoneFaces2 = 0;
src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C
102
addZonesAndModifiers
forAll(fc, faceI)
{
if
(
fc[faceI].x() > -0.003501
&& fc[faceI].x() < -0.003499
)
{
if ((fa[faceI] & vector(1, 0, 0)) < 0)
{
flipZone1[nZoneFaces1] = true;
}
zone1[nZoneFaces1] = faceI;
Info<< "face " << faceI << " for zone 1. Flip: "
<< flipZone1[nZoneFaces1] << endl;
nZoneFaces1++;
}
src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C
103
The faces whose center x-coordinates are
greater than -0.003501 and less than -0.003499
are added to the labelList zone1.
These hard-coded values are designed for movingCone tutorial.
For
movingCone
tutorial
addZonesAndModifiers
else if
(
fc[faceI].x() > -0.00701
&& fc[faceI].x() < -0.00699
)
{
if ((fa[faceI] & vector(1, 0, 0)) > 0)
{
flipZone2[nZoneFaces2] = true;
}
zone2[nZoneFaces2] = faceI;
Info<< "face " << faceI << " for zone 2. Flip: "
<< flipZone2[nZoneFaces2] << endl;
nZoneFaces2++;
}
}
zone1.setSize(nZoneFaces1);
flipZone1.setSize(nZoneFaces1);
zone2.setSize(nZoneFaces2);
flipZone2.setSize(nZoneFaces2);
Info<< "zone: " << zone1 << endl;
Info<< "zone: " << zone2 << endl;
src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C
104
The faces whose center x-coordinates are
greater than -0.00701 and less than -0.00699
are added to the labelList zone2.
Reset the size of four lists.
For
movingCone
tutorial
addZonesAndModifiers
List<pointZone*> pz(0);
List<faceZone*> fz(2);
List<cellZone*> cz(0);
label nFz = 0;
fz[nFz] =
new faceZone
(
"rightExtrusionFaces",
zone1,
flipZone1,
nFz,
faceZones()
);
nFz++;
fz[nFz] =
new faceZone
(
"leftExtrusionFaces",
zone2,
flipZone2,
nFz,
faceZones()
);
nFz++;
fz.setSize(nFz);
Info<< "Adding mesh zones." << endl;
addZones(pz, fz, cz);
src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C
105
Create two faceZones
• rightExtrusionFaces
from zone1 and flipZone1
• leftExtrusionFaces
from zone2 and flipZone2
addZonesAndModifiers
// Add layer addition/removal interfaces
List<polyMeshModifier*> tm(2);
label nMods = 0;
tm[nMods] =
new layerAdditionRemoval
(
"right",
nMods,
topoChanger_,
"rightExtrusionFaces",
readScalar
(
motionDict_.subDict("right").lookup("minThickness")
),
readScalar
(
motionDict_.subDict("right").lookup("maxThickness")
)
);
nMods++;
src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C
106
addZonesAndModifiers
tm[nMods] = new layerAdditionRemoval
(
"left",
nMods,
topoChanger_,
"leftExtrusionFaces",
readScalar
(
motionDict_.subDict("left").lookup("minThickness")
),
readScalar
(
motionDict_.subDict("left").lookup("maxThickness")
)
);
nMods++;
tm.setSize(nMods);
Info<< "Adding " << nMods << " mesh modifiers" << endl;
topoChanger_.addTopologyModifiers(tm);
write();
}
src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C
107
vertexMarkup
Foam::tmp<Foam::scalarField> Foam::movingConeTopoFvMesh::vertexMarkup
(
const pointField& p,
const scalar curLeft,
const scalar curRight
) const
{
Info<< "Updating vertex markup. curLeft: "
<< curLeft << " curRight: " << curRight << endl;
tmp<scalarField> tvertexMarkup(new scalarField(p.size()));
scalarField& vertexMarkup = tvertexMarkup();
forAll(p, pI)
{
if (p[pI].x() < curLeft - SMALL)
{
vertexMarkup[pI] = -1;
}
else if (p[pI].x() > curRight + SMALL)
{
vertexMarkup[pI] = 1;
}
else
{
vertexMarkup[pI] = 0;
}
}
return tvertexMarkup;
}
src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C
108
 Classify the points by their positions
vertexMarkup 109
curLeft curRight
-1 1
0
References
[1] Roll Motion of a Box and Interaction with Free-Surface
http://www.tfd.chalmers.se/~hani/kurser/OS_CFD_2009/ArashEslamdoost/RollMotionofaBoxandInteracti
onwithFreeSurface.pdf
[2] A tutorial on how to use Dynamic Mesh solver IcoDyMFOAM
http://www.tfd.chalmers.se/~hani/kurser/OS_CFD_2007/PiroozMoradnia/OpenFOAM-rapport.pdf
[3] Mesh motion alternatives
http://www.tfd.chalmers.se/~hani/kurser/OS_CFD_2009/AndreuOliverGonzalez/PresentationFINAL_Mesh
MotionAlternatives.pdf
[4] OpenFOAM project: A modification of the movingConeTopoFvMesh library
http://www.tfd.chalmers.se/~hani/kurser/OS_CFD_2008/ErikBjerklund/OpenFoamBjerklundE3.pdf
[5] Dynamic mesh in OpenFOAM
https://ilyasivkov.wordpress.com/2015/04/23/dynamic-mesh-in-openfoam/
110
This work is licensed under a Creative Commons
Attribution-ShareAlike 4.0 International License.
You should have received a copy of the license
along with this work. If not, see
<http://creativecommons.org/licenses/by-sa/4.0/>.
111

Mais conteúdo relacionado

Mais procurados

OpenFOAMによる気液2相流解析の基礎と設定例
OpenFOAMによる気液2相流解析の基礎と設定例OpenFOAMによる気液2相流解析の基礎と設定例
OpenFOAMによる気液2相流解析の基礎と設定例takuyayamamoto1800
 
OpenFOAMの壁関数
OpenFOAMの壁関数OpenFOAMの壁関数
OpenFOAMの壁関数Fumiya Nozaki
 
OpenFOAM の cyclic、cyclicAMI、cyclicACMI 条件について
OpenFOAM の cyclic、cyclicAMI、cyclicACMI 条件についてOpenFOAM の cyclic、cyclicAMI、cyclicACMI 条件について
OpenFOAM の cyclic、cyclicAMI、cyclicACMI 条件についてFumiya Nozaki
 
オープンソースの CFD ソフトウェア SU2 のチュートリアルをやってみた
オープンソースの CFD ソフトウェア SU2 のチュートリアルをやってみたオープンソースの CFD ソフトウェア SU2 のチュートリアルをやってみた
オープンソースの CFD ソフトウェア SU2 のチュートリアルをやってみたFumiya Nozaki
 
Spatial Interpolation Schemes in OpenFOAM
Spatial Interpolation Schemes in OpenFOAMSpatial Interpolation Schemes in OpenFOAM
Spatial Interpolation Schemes in OpenFOAMFumiya Nozaki
 
OpenFOAMにおける相変化解析
OpenFOAMにおける相変化解析OpenFOAMにおける相変化解析
OpenFOAMにおける相変化解析takuyayamamoto1800
 
OpenFOAM Programming Tips
OpenFOAM Programming TipsOpenFOAM Programming Tips
OpenFOAM Programming TipsFumiya Nozaki
 
OpenFoamの混相流solver interFoamのパラメータによる解の変化
OpenFoamの混相流solver interFoamのパラメータによる解の変化OpenFoamの混相流solver interFoamのパラメータによる解の変化
OpenFoamの混相流solver interFoamのパラメータによる解の変化takuyayamamoto1800
 
OpenFOAM LES乱流モデルカスタマイズ
OpenFOAM LES乱流モデルカスタマイズOpenFOAM LES乱流モデルカスタマイズ
OpenFOAM LES乱流モデルカスタマイズmmer547
 
OpenFOAMの混相流用改造solver(S-CLSVOF法)の設定・使い方
OpenFOAMの混相流用改造solver(S-CLSVOF法)の設定・使い方OpenFOAMの混相流用改造solver(S-CLSVOF法)の設定・使い方
OpenFOAMの混相流用改造solver(S-CLSVOF法)の設定・使い方takuyayamamoto1800
 
OpenFOAMソルバの実行時ベイズ最適化
OpenFOAMソルバの実行時ベイズ最適化OpenFOAMソルバの実行時ベイズ最適化
OpenFOAMソルバの実行時ベイズ最適化Masashi Imano
 
Limited Gradient Schemes in OpenFOAM
Limited Gradient Schemes in OpenFOAMLimited Gradient Schemes in OpenFOAM
Limited Gradient Schemes in OpenFOAMFumiya Nozaki
 
OpenFOAMにおける混相流計算
OpenFOAMにおける混相流計算OpenFOAMにおける混相流計算
OpenFOAMにおける混相流計算takuyayamamoto1800
 
OpenFOAMにおけるDEM計算の衝突モデルの解読
OpenFOAMにおけるDEM計算の衝突モデルの解読OpenFOAMにおけるDEM計算の衝突モデルの解読
OpenFOAMにおけるDEM計算の衝突モデルの解読takuyayamamoto1800
 
Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)
Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)
Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)takuyayamamoto1800
 
OpenFOAMにおけるDEM計算の力モデルの解読
OpenFOAMにおけるDEM計算の力モデルの解読OpenFOAMにおけるDEM計算の力モデルの解読
OpenFOAMにおけるDEM計算の力モデルの解読takuyayamamoto1800
 
OpenFOAMに実装したS-CLSVOF法検証(静止気泡のLaplace圧)
OpenFOAMに実装したS-CLSVOF法検証(静止気泡のLaplace圧)OpenFOAMに実装したS-CLSVOF法検証(静止気泡のLaplace圧)
OpenFOAMに実装したS-CLSVOF法検証(静止気泡のLaplace圧)takuyayamamoto1800
 
ParaviewでのParticle Tracerを用いた可視化
ParaviewでのParticle Tracerを用いた可視化ParaviewでのParticle Tracerを用いた可視化
ParaviewでのParticle Tracerを用いた可視化takuyayamamoto1800
 

Mais procurados (20)

OpenFOAMによる気液2相流解析の基礎と設定例
OpenFOAMによる気液2相流解析の基礎と設定例OpenFOAMによる気液2相流解析の基礎と設定例
OpenFOAMによる気液2相流解析の基礎と設定例
 
OpenFOAMの壁関数
OpenFOAMの壁関数OpenFOAMの壁関数
OpenFOAMの壁関数
 
OpenFOAM の cyclic、cyclicAMI、cyclicACMI 条件について
OpenFOAM の cyclic、cyclicAMI、cyclicACMI 条件についてOpenFOAM の cyclic、cyclicAMI、cyclicACMI 条件について
OpenFOAM の cyclic、cyclicAMI、cyclicACMI 条件について
 
オープンソースの CFD ソフトウェア SU2 のチュートリアルをやってみた
オープンソースの CFD ソフトウェア SU2 のチュートリアルをやってみたオープンソースの CFD ソフトウェア SU2 のチュートリアルをやってみた
オープンソースの CFD ソフトウェア SU2 のチュートリアルをやってみた
 
Spatial Interpolation Schemes in OpenFOAM
Spatial Interpolation Schemes in OpenFOAMSpatial Interpolation Schemes in OpenFOAM
Spatial Interpolation Schemes in OpenFOAM
 
OpenFOAMにおける相変化解析
OpenFOAMにおける相変化解析OpenFOAMにおける相変化解析
OpenFOAMにおける相変化解析
 
OpenFOAM Programming Tips
OpenFOAM Programming TipsOpenFOAM Programming Tips
OpenFOAM Programming Tips
 
OpenFoamの混相流solver interFoamのパラメータによる解の変化
OpenFoamの混相流solver interFoamのパラメータによる解の変化OpenFoamの混相流solver interFoamのパラメータによる解の変化
OpenFoamの混相流solver interFoamのパラメータによる解の変化
 
OpenFOAM LES乱流モデルカスタマイズ
OpenFOAM LES乱流モデルカスタマイズOpenFOAM LES乱流モデルカスタマイズ
OpenFOAM LES乱流モデルカスタマイズ
 
OpenFOAMの混相流用改造solver(S-CLSVOF法)の設定・使い方
OpenFOAMの混相流用改造solver(S-CLSVOF法)の設定・使い方OpenFOAMの混相流用改造solver(S-CLSVOF法)の設定・使い方
OpenFOAMの混相流用改造solver(S-CLSVOF法)の設定・使い方
 
OpenFOAMソルバの実行時ベイズ最適化
OpenFOAMソルバの実行時ベイズ最適化OpenFOAMソルバの実行時ベイズ最適化
OpenFOAMソルバの実行時ベイズ最適化
 
Limited Gradient Schemes in OpenFOAM
Limited Gradient Schemes in OpenFOAMLimited Gradient Schemes in OpenFOAM
Limited Gradient Schemes in OpenFOAM
 
rhoCentralFoam in OpenFOAM
rhoCentralFoam in OpenFOAMrhoCentralFoam in OpenFOAM
rhoCentralFoam in OpenFOAM
 
OpenFOAMにおける混相流計算
OpenFOAMにおける混相流計算OpenFOAMにおける混相流計算
OpenFOAMにおける混相流計算
 
OpenFOAMにおけるDEM計算の衝突モデルの解読
OpenFOAMにおけるDEM計算の衝突モデルの解読OpenFOAMにおけるDEM計算の衝突モデルの解読
OpenFOAMにおけるDEM計算の衝突モデルの解読
 
Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)
Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)
Setting and Usage of OpenFOAM multiphase solver (S-CLSVOF)
 
OpenFOAMにおけるDEM計算の力モデルの解読
OpenFOAMにおけるDEM計算の力モデルの解読OpenFOAMにおけるDEM計算の力モデルの解読
OpenFOAMにおけるDEM計算の力モデルの解読
 
OpenFOAMに実装したS-CLSVOF法検証(静止気泡のLaplace圧)
OpenFOAMに実装したS-CLSVOF法検証(静止気泡のLaplace圧)OpenFOAMに実装したS-CLSVOF法検証(静止気泡のLaplace圧)
OpenFOAMに実装したS-CLSVOF法検証(静止気泡のLaplace圧)
 
ParaviewでのParticle Tracerを用いた可視化
ParaviewでのParticle Tracerを用いた可視化ParaviewでのParticle Tracerを用いた可視化
ParaviewでのParticle Tracerを用いた可視化
 
interFoamの検証
interFoamの検証interFoamの検証
interFoamの検証
 

Semelhante a Dynamic Mesh in OpenFOAM

Nonlinear Aeroelastic Steady Simulation Applied to Highly Flexible Blades for...
Nonlinear Aeroelastic Steady Simulation Applied to Highly Flexible Blades for...Nonlinear Aeroelastic Steady Simulation Applied to Highly Flexible Blades for...
Nonlinear Aeroelastic Steady Simulation Applied to Highly Flexible Blades for...Fausto Gill Di Vincenzo
 
The Next Step in AS3 Framework Evolution - FITC Amsterdam 2013
The Next Step in AS3 Framework Evolution - FITC Amsterdam 2013The Next Step in AS3 Framework Evolution - FITC Amsterdam 2013
The Next Step in AS3 Framework Evolution - FITC Amsterdam 2013Raimundas Banevičius
 
FEATool Multiphysics Matlab FEM and CFD Toolbox - v1.6 Quickstart Guide
FEATool Multiphysics Matlab FEM and CFD Toolbox - v1.6 Quickstart GuideFEATool Multiphysics Matlab FEM and CFD Toolbox - v1.6 Quickstart Guide
FEATool Multiphysics Matlab FEM and CFD Toolbox - v1.6 Quickstart GuideFEATool Multiphysics
 
User manual matrix fitting toolbox
User manual matrix fitting toolboxUser manual matrix fitting toolbox
User manual matrix fitting toolboxFelipe Vasconcellos
 
Jörg Schad - NO ONE PUTS Java IN THE CONTAINER - Codemotion Milan 2017
Jörg Schad - NO ONE PUTS Java IN THE CONTAINER - Codemotion Milan 2017Jörg Schad - NO ONE PUTS Java IN THE CONTAINER - Codemotion Milan 2017
Jörg Schad - NO ONE PUTS Java IN THE CONTAINER - Codemotion Milan 2017Codemotion
 
advancedzplmacroprogramming_081820.pptx
advancedzplmacroprogramming_081820.pptxadvancedzplmacroprogramming_081820.pptx
advancedzplmacroprogramming_081820.pptxssuser6a1dbf
 
20091029%20 l edit%20by%20cwchang%20(for%20std)
20091029%20 l edit%20by%20cwchang%20(for%20std)20091029%20 l edit%20by%20cwchang%20(for%20std)
20091029%20 l edit%20by%20cwchang%20(for%20std)ashishkkr
 
Sonar rules in action with walkmod
Sonar rules in action with walkmodSonar rules in action with walkmod
Sonar rules in action with walkmodRaquel Pau
 
Motion Controller for Any Application | ElmoMC
Motion Controller for Any Application | ElmoMC Motion Controller for Any Application | ElmoMC
Motion Controller for Any Application | ElmoMC Elmo Motion Control
 
SenchaCon 2016: Handling Undo-Redo in Sencha Applications - Nickolay Platonov
SenchaCon 2016: Handling Undo-Redo in Sencha Applications - Nickolay PlatonovSenchaCon 2016: Handling Undo-Redo in Sencha Applications - Nickolay Platonov
SenchaCon 2016: Handling Undo-Redo in Sencha Applications - Nickolay PlatonovSencha
 
Drools, jBPM OptaPlanner presentation
Drools, jBPM OptaPlanner presentationDrools, jBPM OptaPlanner presentation
Drools, jBPM OptaPlanner presentationMark Proctor
 
.NET Fest 2019. Łukasz Pyrzyk. Daily Performance Fuckups
.NET Fest 2019. Łukasz Pyrzyk. Daily Performance Fuckups.NET Fest 2019. Łukasz Pyrzyk. Daily Performance Fuckups
.NET Fest 2019. Łukasz Pyrzyk. Daily Performance FuckupsNETFest
 
Spatiotemporal Raster Improvements in GeoServer
Spatiotemporal Raster Improvements in GeoServerSpatiotemporal Raster Improvements in GeoServer
Spatiotemporal Raster Improvements in GeoServerGeoSolutions
 
Bonn motion, traffic generation and nam
Bonn motion, traffic generation and namBonn motion, traffic generation and nam
Bonn motion, traffic generation and namManas Gaur
 
Struts Java I I Lecture 8
Struts  Java  I I  Lecture 8Struts  Java  I I  Lecture 8
Struts Java I I Lecture 8patinijava
 
Grow and Shrink - Dynamically Extending the Ruby VM Stack
Grow and Shrink - Dynamically Extending the Ruby VM StackGrow and Shrink - Dynamically Extending the Ruby VM Stack
Grow and Shrink - Dynamically Extending the Ruby VM StackKeitaSugiyama1
 
Reactive Design Patterns — J on the Beach
Reactive Design Patterns — J on the BeachReactive Design Patterns — J on the Beach
Reactive Design Patterns — J on the BeachRoland Kuhn
 
Reactive Design Patterns by Dr.Roland Kuhn
Reactive Design Patterns by Dr.Roland KuhnReactive Design Patterns by Dr.Roland Kuhn
Reactive Design Patterns by Dr.Roland KuhnJ On The Beach
 
Smallworld Data Check-Out to Microstation
Smallworld Data Check-Out to MicrostationSmallworld Data Check-Out to Microstation
Smallworld Data Check-Out to MicrostationSafe Software
 

Semelhante a Dynamic Mesh in OpenFOAM (20)

Nonlinear Aeroelastic Steady Simulation Applied to Highly Flexible Blades for...
Nonlinear Aeroelastic Steady Simulation Applied to Highly Flexible Blades for...Nonlinear Aeroelastic Steady Simulation Applied to Highly Flexible Blades for...
Nonlinear Aeroelastic Steady Simulation Applied to Highly Flexible Blades for...
 
The Next Step in AS3 Framework Evolution - FITC Amsterdam 2013
The Next Step in AS3 Framework Evolution - FITC Amsterdam 2013The Next Step in AS3 Framework Evolution - FITC Amsterdam 2013
The Next Step in AS3 Framework Evolution - FITC Amsterdam 2013
 
FEATool Multiphysics Matlab FEM and CFD Toolbox - v1.6 Quickstart Guide
FEATool Multiphysics Matlab FEM and CFD Toolbox - v1.6 Quickstart GuideFEATool Multiphysics Matlab FEM and CFD Toolbox - v1.6 Quickstart Guide
FEATool Multiphysics Matlab FEM and CFD Toolbox - v1.6 Quickstart Guide
 
Basic openfoa mtutorialsguide
Basic openfoa mtutorialsguideBasic openfoa mtutorialsguide
Basic openfoa mtutorialsguide
 
User manual matrix fitting toolbox
User manual matrix fitting toolboxUser manual matrix fitting toolbox
User manual matrix fitting toolbox
 
Jörg Schad - NO ONE PUTS Java IN THE CONTAINER - Codemotion Milan 2017
Jörg Schad - NO ONE PUTS Java IN THE CONTAINER - Codemotion Milan 2017Jörg Schad - NO ONE PUTS Java IN THE CONTAINER - Codemotion Milan 2017
Jörg Schad - NO ONE PUTS Java IN THE CONTAINER - Codemotion Milan 2017
 
advancedzplmacroprogramming_081820.pptx
advancedzplmacroprogramming_081820.pptxadvancedzplmacroprogramming_081820.pptx
advancedzplmacroprogramming_081820.pptx
 
20091029%20 l edit%20by%20cwchang%20(for%20std)
20091029%20 l edit%20by%20cwchang%20(for%20std)20091029%20 l edit%20by%20cwchang%20(for%20std)
20091029%20 l edit%20by%20cwchang%20(for%20std)
 
Sonar rules in action with walkmod
Sonar rules in action with walkmodSonar rules in action with walkmod
Sonar rules in action with walkmod
 
Motion Controller for Any Application | ElmoMC
Motion Controller for Any Application | ElmoMC Motion Controller for Any Application | ElmoMC
Motion Controller for Any Application | ElmoMC
 
SenchaCon 2016: Handling Undo-Redo in Sencha Applications - Nickolay Platonov
SenchaCon 2016: Handling Undo-Redo in Sencha Applications - Nickolay PlatonovSenchaCon 2016: Handling Undo-Redo in Sencha Applications - Nickolay Platonov
SenchaCon 2016: Handling Undo-Redo in Sencha Applications - Nickolay Platonov
 
Drools, jBPM OptaPlanner presentation
Drools, jBPM OptaPlanner presentationDrools, jBPM OptaPlanner presentation
Drools, jBPM OptaPlanner presentation
 
.NET Fest 2019. Łukasz Pyrzyk. Daily Performance Fuckups
.NET Fest 2019. Łukasz Pyrzyk. Daily Performance Fuckups.NET Fest 2019. Łukasz Pyrzyk. Daily Performance Fuckups
.NET Fest 2019. Łukasz Pyrzyk. Daily Performance Fuckups
 
Spatiotemporal Raster Improvements in GeoServer
Spatiotemporal Raster Improvements in GeoServerSpatiotemporal Raster Improvements in GeoServer
Spatiotemporal Raster Improvements in GeoServer
 
Bonn motion, traffic generation and nam
Bonn motion, traffic generation and namBonn motion, traffic generation and nam
Bonn motion, traffic generation and nam
 
Struts Java I I Lecture 8
Struts  Java  I I  Lecture 8Struts  Java  I I  Lecture 8
Struts Java I I Lecture 8
 
Grow and Shrink - Dynamically Extending the Ruby VM Stack
Grow and Shrink - Dynamically Extending the Ruby VM StackGrow and Shrink - Dynamically Extending the Ruby VM Stack
Grow and Shrink - Dynamically Extending the Ruby VM Stack
 
Reactive Design Patterns — J on the Beach
Reactive Design Patterns — J on the BeachReactive Design Patterns — J on the Beach
Reactive Design Patterns — J on the Beach
 
Reactive Design Patterns by Dr.Roland Kuhn
Reactive Design Patterns by Dr.Roland KuhnReactive Design Patterns by Dr.Roland Kuhn
Reactive Design Patterns by Dr.Roland Kuhn
 
Smallworld Data Check-Out to Microstation
Smallworld Data Check-Out to MicrostationSmallworld Data Check-Out to Microstation
Smallworld Data Check-Out to Microstation
 

Mais de Fumiya Nozaki

Basic Boundary Conditions in OpenFOAM v2.4
Basic Boundary Conditions in OpenFOAM v2.4Basic Boundary Conditions in OpenFOAM v2.4
Basic Boundary Conditions in OpenFOAM v2.4Fumiya Nozaki
 
blockCoupledSwirlTestチュートリアル
blockCoupledSwirlTestチュートリアルblockCoupledSwirlTestチュートリアル
blockCoupledSwirlTestチュートリアルFumiya Nozaki
 
CAESES Free チュートリアル
CAESES Free チュートリアルCAESES Free チュートリアル
CAESES Free チュートリアルFumiya Nozaki
 
CAESES-FFW,GridPro,OpenFOAMを使用した形状最適化事例#1
CAESES-FFW,GridPro,OpenFOAMを使用した形状最適化事例#1CAESES-FFW,GridPro,OpenFOAMを使用した形状最適化事例#1
CAESES-FFW,GridPro,OpenFOAMを使用した形状最適化事例#1Fumiya Nozaki
 
ParaView による可視化 Tips
ParaView による可視化 TipsParaView による可視化 Tips
ParaView による可視化 TipsFumiya Nozaki
 
無償のモデリングソフトウェアCAESESを使ってみた
無償のモデリングソフトウェアCAESESを使ってみた無償のモデリングソフトウェアCAESESを使ってみた
無償のモデリングソフトウェアCAESESを使ってみたFumiya Nozaki
 
OpenFOAMのチュートリアルを作ってみた#1 『くさび油膜効果の計算』
OpenFOAMのチュートリアルを作ってみた#1 『くさび油膜効果の計算』OpenFOAMのチュートリアルを作ってみた#1 『くさび油膜効果の計算』
OpenFOAMのチュートリアルを作ってみた#1 『くさび油膜効果の計算』Fumiya Nozaki
 
Adjoint Shape Optimization using OpenFOAM
Adjoint Shape Optimization using OpenFOAMAdjoint Shape Optimization using OpenFOAM
Adjoint Shape Optimization using OpenFOAMFumiya Nozaki
 
OpenFOAM -空間の離散化と係数行列の取り扱い(Spatial Discretization and Coefficient Matrix)-
OpenFOAM -空間の離散化と係数行列の取り扱い(Spatial Discretization and Coefficient Matrix)-OpenFOAM -空間の離散化と係数行列の取り扱い(Spatial Discretization and Coefficient Matrix)-
OpenFOAM -空間の離散化と係数行列の取り扱い(Spatial Discretization and Coefficient Matrix)-Fumiya Nozaki
 
OpenFOAM を用いた Adjoint 形状最適化事例1
OpenFOAM を用いた Adjoint 形状最適化事例1OpenFOAM を用いた Adjoint 形状最適化事例1
OpenFOAM を用いた Adjoint 形状最適化事例1Fumiya Nozaki
 

Mais de Fumiya Nozaki (10)

Basic Boundary Conditions in OpenFOAM v2.4
Basic Boundary Conditions in OpenFOAM v2.4Basic Boundary Conditions in OpenFOAM v2.4
Basic Boundary Conditions in OpenFOAM v2.4
 
blockCoupledSwirlTestチュートリアル
blockCoupledSwirlTestチュートリアルblockCoupledSwirlTestチュートリアル
blockCoupledSwirlTestチュートリアル
 
CAESES Free チュートリアル
CAESES Free チュートリアルCAESES Free チュートリアル
CAESES Free チュートリアル
 
CAESES-FFW,GridPro,OpenFOAMを使用した形状最適化事例#1
CAESES-FFW,GridPro,OpenFOAMを使用した形状最適化事例#1CAESES-FFW,GridPro,OpenFOAMを使用した形状最適化事例#1
CAESES-FFW,GridPro,OpenFOAMを使用した形状最適化事例#1
 
ParaView による可視化 Tips
ParaView による可視化 TipsParaView による可視化 Tips
ParaView による可視化 Tips
 
無償のモデリングソフトウェアCAESESを使ってみた
無償のモデリングソフトウェアCAESESを使ってみた無償のモデリングソフトウェアCAESESを使ってみた
無償のモデリングソフトウェアCAESESを使ってみた
 
OpenFOAMのチュートリアルを作ってみた#1 『くさび油膜効果の計算』
OpenFOAMのチュートリアルを作ってみた#1 『くさび油膜効果の計算』OpenFOAMのチュートリアルを作ってみた#1 『くさび油膜効果の計算』
OpenFOAMのチュートリアルを作ってみた#1 『くさび油膜効果の計算』
 
Adjoint Shape Optimization using OpenFOAM
Adjoint Shape Optimization using OpenFOAMAdjoint Shape Optimization using OpenFOAM
Adjoint Shape Optimization using OpenFOAM
 
OpenFOAM -空間の離散化と係数行列の取り扱い(Spatial Discretization and Coefficient Matrix)-
OpenFOAM -空間の離散化と係数行列の取り扱い(Spatial Discretization and Coefficient Matrix)-OpenFOAM -空間の離散化と係数行列の取り扱い(Spatial Discretization and Coefficient Matrix)-
OpenFOAM -空間の離散化と係数行列の取り扱い(Spatial Discretization and Coefficient Matrix)-
 
OpenFOAM を用いた Adjoint 形状最適化事例1
OpenFOAM を用いた Adjoint 形状最適化事例1OpenFOAM を用いた Adjoint 形状最適化事例1
OpenFOAM を用いた Adjoint 形状最適化事例1
 

Último

SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 

Último (20)

SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 

Dynamic Mesh in OpenFOAM

  • 1. Dynamic Mesh in OpenFOAM Fumiya Nozaki Last updated: 31 December 2015 114 PAGES 1
  • 2. Disclaimer “This offering is not approved or endorsed by OpenCFD Limited, the producer of the OpenFOAM software and owner of the OPENFOAM® and OpenCFD® trade marks.” 2
  • 3. Dynamic Mesh in OpenFOAM In OpenFOAM, the mesh motions and the topology changes are handled by Dynamic Mesh functionality. Settings for Dynamic Mesh are described in dynamicMeshDict file located in the constant directory. Solvers that can handle these mesh changes have the letters “DyM”, an abbreviation for Dynamic Mesh, in its name. e.g. pimpleDyMFoam, interDyMFoam 3
  • 4. Dynamic Mesh in OpenFOAM FoamFile { version 2.0; format ascii; class dictionary; location "constant"; object dynamicMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dynamicFvMesh solidBodyMotionFvMesh; motionSolverLibs ( "libfvMotionSolvers.so" ); solidBodyMotionFvMeshCoeffs { cellZone rotor; solidBodyMotionFunction rotatingMotion; rotatingMotionCoeffs { origin (0 0 0); axis (0 0 1); omega 6.2832; // rad/s } } // ************************************************************************* // constant/dynamicMeshDict Selection of dynamicFvMesh type from available options Settings for the selected dynamicFvMesh 4
  • 5. Dynamic Mesh in OpenFOAM In OpenFOAM, the mesh motions and the topology changes are handled by Dynamic Mesh functionality. Settings for Dynamic Mesh are described in dynamicMeshDict file located in the constant directory. Solvers that can handle these mesh changes have the letters “DyM”, an abbreviation for Dynamic Mesh, in its name. e.g. pimpleDyMFoam, interDyMFoam 5
  • 6. while (runTime.run()) { #include "readControls.H" #include "CourantNo.H" #include "setDeltaT.H" runTime++; Info<< "Time = " << runTime.timeName() << nl << endl; mesh.update(); // Calculate absolute flux from the mapped surface velocity phi = mesh.Sf() & Uf; if (mesh.changing() && correctPhi) { #include "correctPhi.H" } // Make the flux relative to the mesh motion fvc::makeRelative(phi, U); if (mesh.changing() && checkMeshCourantNo) { #include "meshCourantNo.H" } applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pimpleDyMFoam.C It calls the mesh motion library to calculate the new position of points and update the mesh. Dynamic Mesh in OpenFOAM 6
  • 7. Available types of dynamicFvMesh without topological changes • staticFvMesh Disable dynamic mesh • solidBodyMotionFvMesh Perform the rigid-body motions such as translational and rotational movements • multiSolidBodyMotionFvMesh Perform the rigid-body motions in multiple regions • dynamicMotionSolverFvMesh Solve a Laplace’s equation for the motion displacement or motion velocity to calculate the updated position of points • dynamicInkJetFvMesh Move mesh points sinusoidally in the x direction by explicitly calculating the new positions • dynamicRefineFvMesh Refine the mesh depending on the user specified field values 7
  • 8. Available types of dynamicFvMesh with topological changes • rawTopoChangerFvMesh • movingConeTopoFvMesh • mixerFvMesh • linearValveFvMesh • linearValveLayersFvMesh Under survey 8
  • 9. Inheritance diagram for dynamicFvMesh models dynamicFvMesh staticFvMesh dynamicInkJetFvMeshsolidBodyMotionFvMesh multiSolidBodyMotionFvMesh dynamicMotionSolverFvMesh dynamicRefineFvMesh Abstract base class for geometry and/or topology changing fvMesh 9
  • 10. Inheritance diagram for dynamicFvMesh models dynamicFvMesh rawTopoChangerFvMesh movingConeTopoFvMesh mixerFvMesh linearValveFvMesh linearValveLayersFvMesh topoChangerFvMesh Abstract base class for a topology changing fvMesh 10
  • 12. Available types of solid motions  Translational motions • linearMotion : Uniform linear motion with constant velocity • oscillatingLinearMotion : Oscillating linear motion  Rotational motions • rotatingMotion : Uniform circular motion • axisRotationMotion : Uniform circular motion • oscillatingRotatingMotion : Oscillating rotation motion  Ship Design Analysis [1] • SDA  Tabulated data • tabulated6DoFMotion  Combination of above types • multiMotion 12
  • 13. linearMotion dynamicFvMesh solidBodyMotionFvMesh; motionSolverLibs ( "libfvMotionSolvers.so" ); solidBodyMotionFvMeshCoeffs { solidBodyMotionFunction linearMotion; linearMotionCoeffs { velocity (1 0 0); } } constant/dynamicMeshDict 13
  • 14. oscillatingLinearMotion dynamicFvMesh solidBodyMotionFvMesh; motionSolverLibs ( "libfvMotionSolvers.so" ); solidBodyMotionFvMeshCoeffs { cellZone inletChannel; solidBodyMotionFunction oscillatingLinearMotion; oscillatingLinearMotionCoeffs { amplitude (0 0.5 0); omega 3.14; } } tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/constant/ dynamicMeshDict 14
  • 15. rotatingMotion dynamicFvMesh solidBodyMotionFvMesh; motionSolverLibs ( "libfvMotionSolvers.so" ); solidBodyMotionFvMeshCoeffs { cellZone rotor; solidBodyMotionFunction rotatingMotion; rotatingMotionCoeffs { origin (0 0 0); axis (0 0 1); omega 6.2832; } } tutorials/incompressible/pimpleDyMFoam/mixerVesselAMI2D/constant/dynamicMeshDict 15
  • 16. axisRotationMotion dynamicFvMesh solidBodyMotionFvMesh; motionSolverLibs ( "libfvMotionSolvers.so" ); solidBodyMotionFvMeshCoeffs { cellZone rotor; solidBodyMotionFunction axisRotationMotion; axisRotationMotionCoeffs { origin (0 0 0); radialVelocity (0 0 360); } } tutorials/incompressible/pimpleDyMFoam/mixerVesselAMI2D/constant/dynamicMeshDict 16
  • 17. oscillatingRotatingMotion dynamicFvMesh solidBodyMotionFvMesh; motionSolverLibs ( "libfvMotionSolvers.so" ); solidBodyMotionFvMeshCoeffs { cellZone rotor; solidBodyMotionFunction oscillatingRotatingMotion; oscillatingRotatingMotionCoeffs { origin (0 0 0); omega 6.28; amplitude (0 0 45); } } tutorials/incompressible/pimpleDyMFoam/mixerVesselAMI2D/constant/dynamicMeshDict 17
  • 39. tabulated6DoFMotion dynamicFvMesh solidBodyMotionFvMesh; solidBodyMotionFvMeshCoeffs { solidBodyMotionFunction tabulated6DoFMotion; tabulated6DoFMotionCoeffs { CofG (0 0 0); timeDataFileName "$FOAM_CASE/constant/6DoF.dat"; } } tutorials/multiphase/interDyMFoam/ras/sloshingTank3D6DoF/constant/dynamicMeshDict 39
  • 40. 100 ( (0 ((0 0 0) (0 0 0))) (0.40404 ((0.401298 0.952899 0.321827) (4.82741 2.79073 2.00649))) (0.808081 ((0.786273 1.8071 0.635266) (9.52899 5.3597 3.93137))) (1.21212 ((1.13927 2.47414 0.932149) (13.9822 7.5028 5.69634))) (1.61616 ((1.44593 2.88493 1.20474) (18.071 9.04972 7.22963))) (2.0202 ((1.69377 2.99691 1.44593) (21.6889 9.87755 8.46886))) (2.42424 ((1.87273 2.7985 1.64943) (24.7414 9.92051 9.36363))) (2.82828 ((1.97551 2.31024 1.80994) (27.1492 9.17518 9.87755))) . . . (40 ((1.82589 1.65428 -0.575807) (-8.6371 2.70906 9.12945))) ) tutorials/multiphase/interDyMFoam/ras/sloshingTank3D6DoF/constant/6DoF.dat tabulated6DoFMotion 40
  • 41. multiMotion dynamicFvMesh solidBodyMotionFvMesh; solidBodyMotionFvMeshCoeffs { solidBodyMotionFunction multiMotion; multiMotionCoeffs { // Table rotating in z axis rotatingTable { solidBodyMotionFunction rotatingMotion; rotatingMotionCoeffs { origin (0 0.1 0); axis (0 0 1); omega 6.2832; // rad/s } } // Tube rocking on rotating table rotatingBox { solidBodyMotionFunction oscillatingRotatingMotion; oscillatingRotatingMotionCoeffs { origin (0 0 0); omega 40; amplitude (45 0 0); } } } } tutorials/multiphase/interDyMFoam/ras/testTubeMixer/constant/dynamicMeshDict // Table rotating in z axis rotatingTable { solidBodyMotionFunction rotatingMotion; rotatingMotionCoeffs { origin (0 0.1 0); axis (0 0 1); omega 6.2832; } } // Tube rocking on rotating table rotatingBox { solidBodyMotionFunction oscillatingRotatingMotion; oscillatingRotatingMotionCoeffs { origin (0 0 0); omega 40; amplitude (45 0 0); } } 41
  • 43. dynamicMeshDict dynamicFvMesh multiSolidBodyMotionFvMesh; motionSolverLibs ( "libfvMotionSolvers.so" ); multiSolidBodyMotionFvMeshCoeffs { rotor1 { solidBodyMotionFunction rotatingMotion; rotatingMotionCoeffs { origin (0 0 0); axis (0 0 1); omega 3.1416; } } rotor2 { solidBodyMotionFunction rotatingMotion; rotatingMotionCoeffs { origin (4 0 0); axis (0 0 1); omega -3.1416; } } } // ************************************************************************* // constant/dynamicMeshDict Different settings of rigid body motions in multiple cellZones 43
  • 46. Brief description of dynamicMotionSolverFvMesh  Solve a Laplace’s equation for the motion displacement 𝑑 𝑚 [𝑚] or motion velocity 𝑢 𝑚 [ 𝑚 𝑠]: 𝛻 ∙ 𝛾𝛻𝑑 𝑚 = 0 or 𝛻 ∙ 𝛾𝛻𝑢 𝑚 = 0  Users can select which equations to be solved.  Users need to specify how to calculate the diffusion coefficient 𝛾 of the equation. 46
  • 47. dynamicMeshDict dynamicFvMesh dynamicMotionSolverFvMesh; motionSolverLibs ( "libfvMotionSolvers.so" ); solver velocityComponentLaplacian; velocityComponentLaplacianCoeffs { component x; diffusivity directional (1 200 0); } tutorials/incompressible/pimpleDyMFoam/movingCone/constant/dynamicMeshDict  Users can select which equations to be solved by choosing the solver from the available options.  Users need to specify how to calculate the diffusion coefficient 𝛾 of the equation by selecting from the options. 1 2 1 2 47
  • 48. Available types of solver  Solving for cellDisplacement (unit: [𝑚]) • displacementLaplacian • displacementComponentLaplacian • displacementInterpolation • displacementLayeredMotion • displacementSBRStress  Solving for cellMotionU (unit: [ 𝑚 𝑠]) • velocityLaplacian • velocityComponentLaplacian 48
  • 49. Available types of solver | displacementLaplacian void Foam::displacementLaplacianFvMotionSolver::solve() { // The points have moved so before interpolation update // the motionSolver accordingly movePoints(fvMesh_.points()); diffusivity().correct(); pointDisplacement_.boundaryField().updateCoeffs(); Foam::solve ( fvm::laplacian ( diffusivity().operator()(), cellDisplacement_, "laplacian(diffusivity,cellDisplacement)" ) ); } src/fvMotionSolver/fvMotionSolvers/displacement/laplacian/ displacementLaplacianFvMotionSolver.C Solving Laplace’s Eqn. 49
  • 50. Available types of solver | velocityLaplacian void Foam::velocityLaplacianFvMotionSolver::solve() { // The points have moved so before interpolation update // the fvMotionSolver accordingly movePoints(fvMesh_.points()); diffusivityPtr_->correct(); pointMotionU_.boundaryField().updateCoeffs(); Foam::solve ( fvm::laplacian ( diffusivityPtr_->operator()(), cellMotionU_, "laplacian(diffusivity,cellMotionU)" ) ); } src/fvMotionSolver/fvMotionSolvers/velocity/laplacian/ velocityLaplacianFvMotionSolver.C Solving Laplace’s Eqn. 50
  • 51. Available types of diffusivity models • uniform • directional • motionDirectional • inverseVolume • inverseDistance • inverseFaceDistance • inversePointDistance • quadratic • exponential • file 51
  • 52. Class diagram of diffusivity models motionDiffusivity uniformDiffusivity quadraticDiffusivity exponentialDiffusivity fileDiffusivity directionalDiffusivity motionDirectionalDiffusivity inverseVolumeDiffusivity inverseDistanceDiffusivity inverseFaceDistanceDiffusivity inversePointDistanceDiffusivity  Source Code: src/fvMotionSolver/motionDiffusivity/ 52
  • 53. Class diagram of diffusivity models motionDiffusivity class //- Return diffusivity field virtual tmp<surfaceScalarField> operator()() const = 0; // Protected data surfaceScalarField faceDiffusivity_; correct() //- Correct the motion diffusivity virtual void correct() = 0; uniformDiffusivity class virtual tmp<surfaceScalarField> operator()() const { return faceDiffusivity_; } directionalDiffusivity class motionDirectionalDiffusivity class inverseVolumeDiffusivity class inverseDistanceDiffusivity class inverseFaceDistanceDiffusivity class inversePointDistanceDiffusivity class override override 53
  • 54. Class diagram of diffusivity models motionDiffusivity class //- Return diffusivity field virtual tmp<surfaceScalarField> operator()() const = 0; Foam::tmp<Foam::surfaceScalarField> Foam::quadraticDiffusivity::operator()() const { return sqr(basicDiffusivityPtr_->operator()()); } //- Correct the motion diffusivity virtual void correct() = 0; quadraticDiffusivity class override void Foam::quadraticDiffusivity::correct() { basicDiffusivityPtr_->correct(); } 54
  • 55. Class diagram of diffusivity models motionDiffusivity class //- Return diffusivity field virtual tmp<surfaceScalarField> operator()() const = 0; Foam::tmp<Foam::surfaceScalarField> Foam::exponentialDiffusivity::operator()() const { return exp(-alpha_/basicDiffusivityPtr_->operator()()); } //- Correct the motion diffusivity virtual void correct() = 0; exponentialDiffusivity class override void Foam::exponentialDiffusivity::correct() { basicDiffusivityPtr_->correct(); } 55
  • 56. Calculation of diffusion coefficient void Foam::inverseVolumeDiffusivity::correct() { volScalarField V ( IOobject ( "V", mesh().time().timeName(), mesh(), IOobject::NO_READ, IOobject::NO_WRITE, false ), mesh(), dimless, zeroGradientFvPatchScalarField::typeName ); V.internalField() = mesh().V(); V.correctBoundaryConditions(); faceDiffusivity_ = 1.0/fvc::interpolate(V); } src/fvMotionSolver/motionDiffusivity/inverseVolume/inverseVolumeDiffusivity.C In the case of inverseVolume type, faceDiffusivity_ is calculated as the inverse of the cell volumes as its name indicates.  correct() function calculates the diffusion coefficient field faceDiffusivity_ 56
  • 57. • cmptMultiply(a, b) where 𝑎 = 𝑎0, 𝑎1, 𝑎2 , 𝑏 = 𝑏0, 𝑏1, 𝑏2 𝑐𝑚𝑝𝑡𝑀𝑢𝑙𝑡𝑖𝑝𝑙𝑦 𝑎, 𝑏 = 𝑎0 𝑏0, 𝑎1 𝑏1, 𝑎2 𝑏2 Calculation of diffusion coefficient void Foam::directionalDiffusivity::correct() { const surfaceVectorField n(mesh().Sf()/mesh().magSf()); faceDiffusivity_ == (n & cmptMultiply(diffusivityVector_, n)); } src/fvMotionSolver/motionDiffusivity/directional/directionalDiffusivity.C In the case of directional type, faceDiffusivity_ is calculated using the user specified diffusivityVector_ and unit normal vectors of each face. 57
  • 58. Mesh update process bool Foam::dynamicMotionSolverFvMesh::update() { fvMesh::movePoints(motionPtr_->newPoints()); if (foundObject<volVectorField>("U")) { volVectorField& U = const_cast<volVectorField&>(lookupObject<volVectorField>("U")); U.correctBoundaryConditions(); } return true; } src/dynamicFvMesh/dynamicMotionSolverFvMesh/dynamicMotionSolverFvMesh.C Foam::tmp<Foam::pointField> Foam::motionSolver::newPoints() { solve(); return curPoints(); } src/dynamicMesh/motionSolver/motionSolver/motionSolver.C  mesh.update() calls update() function of dynamicMotionSolverFvMesh class. 58
  • 59. void Foam::velocityComponentLaplacianFvMotionSolver::solve() { // The points have moved so before interpolation update // the fvMotionSolver accordingly movePoints(fvMesh_.points()); diffusivityPtr_->correct(); pointMotionU_.boundaryField().updateCoeffs(); Foam::solve ( fvm::laplacian ( diffusivityPtr_->operator()(), cellMotionU_, "laplacian(diffusivity,cellMotionU)" ) ); } src/fvMotionSolver/fvMotionSolvers/componentVelocity/componentLaplacian/ velocityComponentLaplacianFvMotionSolver.C Foam::tmp<Foam::pointField> Foam::motionSolver::newPoints() { solve(); return curPoints(); } src/dynamicMesh/motionSolver/motionSolver/motionSolver.C Solve Laplace’s Eqn. Update the diffusion coefficient field Mesh update process 59
  • 60. Foam::tmp<Foam::pointField> Foam::motionSolver::newPoints() { solve(); return curPoints(); } src/dynamicMesh/motionSolver/motionSolver/motionSolver.C Foam::tmp<Foam::pointField> Foam::velocityComponentLaplacianFvMotionSolver::curPoints() const { volPointInterpolation::New(fvMesh_).interpolate ( cellMotionU_, pointMotionU_ ); tmp<pointField> tcurPoints(new pointField(fvMesh_.points())); tcurPoints().replace ( cmpt_, tcurPoints().component(cmpt_) + fvMesh_.time().deltaTValue()*pointMotionU_.internalField() ); twoDCorrectPoints(tcurPoints()); return tcurPoints; } src/fvMotionSolver/fvMotionSolvers/componentVelocity/componentLaplacian/ velocityComponentLaplacianFvMotionSolver.C Calculate the new position of points Interpolate the motion velocity from cell centres to points Mesh update process 60
  • 61. movingWall { type uniformFixedValue; uniformValue constant 1; } Moving at constant velocity of 1m/s “farField.*” { type slip; } movingCone tutorial 61
  • 78. Brief description of dynamicInkJetFvMesh  From the description in the header file  Mesh motion specifically for the "pumping" system of an ink-jet injector.  The set of points in the "pumping" region are compressed and expanded sinusoidally to impose a sinusoidal variation of the flow at the nozzle exit. Points can move only in the X direction 78
  • 79. Brief description of dynamicInkJetFvMesh Points can move only in the X direction  From the description in the header file  Mesh motion specifically for the "pumping" system of an ink-jet injector.  The set of points in the "pumping" region are compressed and expanded sinusoidally to impose a sinusoidal variation of the flow at the nozzle exit. 79
  • 80. An example usage FoamFile { version 2.0; format ascii; class dictionary; location "constant"; object dynamicMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dynamicFvMesh dynamicInkJetFvMesh; motionSolverLibs ( "libfvMotionSolvers.so" ); dynamicInkJetFvMeshCoeffs { amplitude 0.5; frequency 1; refPlaneX 0.0; } // ************************************************************************* // constant/dynamicMeshDict Three input parameters control the mesh motions 80
  • 81. An example usage refPlaneX -1.0 -0.5 0.0 0.5 1.0 81
  • 82. An example usage -1.0 -0.5 0.0 0.5 1.0 refPlaneX 82
  • 83. An example usage -1.0 -0.5 0.0 0.5 1.0 refPlaneX 83
  • 84. An example usage -1.0 -0.5 0.0 0.5 1.0 refPlaneX 84
  • 85. An example usage -1.0 -0.5 0.0 0.5 1.0 refPlaneX 85
  • 86. An example usage -1.0 -0.5 0.0 0.5 1.0 refPlaneX 86
  • 87. An example usage -1.0 -0.5 0.0 0.5 1.0 refPlaneX 87
  • 88. An example usage -1.0 -0.5 0.0 0.5 1.0 refPlaneX 88
  • 89. An example usage -1.0 -0.5 0.0 0.5 1.0 refPlaneX 89
  • 90. An example usage -1.0 -0.5 0.0 0.5 1.0 refPlaneX 90
  • 91. An example usage -1.0 -0.5 0.0 0.5 1.0 refPlaneX 91
  • 92. Calculation of the new position of points bool Foam::dynamicInkJetFvMesh::update() { scalar scalingFunction = 0.5* ( ::cos(constant::mathematical::twoPi*frequency_*time().value()) - 1.0 ); Info<< "Mesh scaling. Time = " << time().value() << " scaling: " << scalingFunction << endl; pointField newPoints = stationaryPoints_; newPoints.replace ( vector::X, stationaryPoints_.component(vector::X)* ( 1.0 + pos ( - (stationaryPoints_.component(vector::X)) - refPlaneX_ )*amplitude_*scalingFunction ) ); src/dynamicFvMesh/dynamicInkJetFvMesh/dynamicInkJetFvMesh.C Explicitly calculate the new position of points Modify only the x-coordinate 92
  • 93. Calculation of the new position of points fvMesh::movePoints(newPoints); volVectorField& U = const_cast<volVectorField&>(lookupObject<volVectorField>("U")); U.correctBoundaryConditions(); return true; } src/dynamicFvMesh/dynamicInkJetFvMesh/dynamicInkJetFvMesh.C 93
  • 96. Brief description of movingConeTopoFvMesh  From the description in the header file  Sample topoChangerFvMesh that moves an object in x direction  and introduces/removes layers.  It is designed exclusively for use with the movingCone tutorial. 96
  • 97. An example usage dynamicFvMesh movingConeTopoFvMesh; motionSolverLibs ( "libfvMotionSolvers.so" ); movingConeTopoFvMeshCoeffs { motionVelAmplitude (1.5 0.0 0.0); motionVelPeriod 0.003; leftEdge 0.0; leftObstacleEdge 0.0; rightObstacleEdge 0.0; right { minThickness 3e-5; maxThickness 6e-5; } left { minThickness 3e-5; maxThickness 5e-5; } } constant/dynamicMeshDict These parameters are required but not used. 97
  • 98.  Read dynamicMeshDict and set the values of private data // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // Construct from components Foam::movingConeTopoFvMesh::movingConeTopoFvMesh(const IOobject& io) : topoChangerFvMesh(io), motionDict_ ( IOdictionary ( IOobject ( "dynamicMeshDict", time().constant(), *this, IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) ).subDict(typeName + "Coeffs") ), src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C Constructors 98
  • 99. motionVelAmplitude_(motionDict_.lookup("motionVelAmplitude")), motionVelPeriod_(readScalar(motionDict_.lookup("motionVelPeriod"))), curMotionVel_ ( motionVelAmplitude_* Foam::sin(time().value()*M_PI/motionVelPeriod_) ), leftEdge_(readScalar(motionDict_.lookup("leftEdge"))), curLeft_(readScalar(motionDict_.lookup("leftObstacleEdge"))), curRight_(readScalar(motionDict_.lookup("rightObstacleEdge"))) { Pout<< "Initial time:" << time().value() << " Initial curMotionVel_:" << curMotionVel_ << endl; addZonesAndModifiers(); src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C Constructors (cont’d) Read the parameters from dynamicMeshDict • motionVelAmplitude • motionVelPeriod • leftEdge • leftObstacleEdge • rightObstacleEdge Create two faceZones • rightExtrusionFaces • leftExtrusionFaces and modifiers for motion action 99
  • 100. curLeft_ = average ( faceZones() [ faceZones().findZoneID("leftExtrusionFaces") ]().localPoints() ).x() - SMALL; curRight_ = average ( faceZones() [ faceZones().findZoneID("rightExtrusionFaces") ]().localPoints() ).x() + SMALL; motionMask_ = vertexMarkup ( points(), curLeft_, curRight_ ); } src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C Constructors (cont’d) 100 The initial x-coordinates of left and right sides of the moving obstacle (curLeft_ and curRight_) are calculated using the faceZones.
  • 101. addZonesAndModifiers void Foam::movingConeTopoFvMesh::addZonesAndModifiers() { // Add zones and modifiers for motion action if ( pointZones().size() || faceZones().size() || cellZones().size() || topoChanger_.size() ) { Info<< "void movingConeTopoFvMesh::addZonesAndModifiers() : " << "Zones and modifiers already present. Skipping." << endl; return; } src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C 101  Create two faceZones and modifiers for motion action
  • 102. addZonesAndModifiers Info<< "Time = " << time().timeName() << endl << "Adding zones and modifiers to the mesh" << endl; const vectorField& fc = faceCentres(); const vectorField& fa = faceAreas(); labelList zone1(fc.size()); boolList flipZone1(fc.size(), false); label nZoneFaces1 = 0; labelList zone2(fc.size()); boolList flipZone2(fc.size(), false); label nZoneFaces2 = 0; src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C 102
  • 103. addZonesAndModifiers forAll(fc, faceI) { if ( fc[faceI].x() > -0.003501 && fc[faceI].x() < -0.003499 ) { if ((fa[faceI] & vector(1, 0, 0)) < 0) { flipZone1[nZoneFaces1] = true; } zone1[nZoneFaces1] = faceI; Info<< "face " << faceI << " for zone 1. Flip: " << flipZone1[nZoneFaces1] << endl; nZoneFaces1++; } src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C 103 The faces whose center x-coordinates are greater than -0.003501 and less than -0.003499 are added to the labelList zone1. These hard-coded values are designed for movingCone tutorial. For movingCone tutorial
  • 104. addZonesAndModifiers else if ( fc[faceI].x() > -0.00701 && fc[faceI].x() < -0.00699 ) { if ((fa[faceI] & vector(1, 0, 0)) > 0) { flipZone2[nZoneFaces2] = true; } zone2[nZoneFaces2] = faceI; Info<< "face " << faceI << " for zone 2. Flip: " << flipZone2[nZoneFaces2] << endl; nZoneFaces2++; } } zone1.setSize(nZoneFaces1); flipZone1.setSize(nZoneFaces1); zone2.setSize(nZoneFaces2); flipZone2.setSize(nZoneFaces2); Info<< "zone: " << zone1 << endl; Info<< "zone: " << zone2 << endl; src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C 104 The faces whose center x-coordinates are greater than -0.00701 and less than -0.00699 are added to the labelList zone2. Reset the size of four lists. For movingCone tutorial
  • 105. addZonesAndModifiers List<pointZone*> pz(0); List<faceZone*> fz(2); List<cellZone*> cz(0); label nFz = 0; fz[nFz] = new faceZone ( "rightExtrusionFaces", zone1, flipZone1, nFz, faceZones() ); nFz++; fz[nFz] = new faceZone ( "leftExtrusionFaces", zone2, flipZone2, nFz, faceZones() ); nFz++; fz.setSize(nFz); Info<< "Adding mesh zones." << endl; addZones(pz, fz, cz); src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C 105 Create two faceZones • rightExtrusionFaces from zone1 and flipZone1 • leftExtrusionFaces from zone2 and flipZone2
  • 106. addZonesAndModifiers // Add layer addition/removal interfaces List<polyMeshModifier*> tm(2); label nMods = 0; tm[nMods] = new layerAdditionRemoval ( "right", nMods, topoChanger_, "rightExtrusionFaces", readScalar ( motionDict_.subDict("right").lookup("minThickness") ), readScalar ( motionDict_.subDict("right").lookup("maxThickness") ) ); nMods++; src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C 106
  • 107. addZonesAndModifiers tm[nMods] = new layerAdditionRemoval ( "left", nMods, topoChanger_, "leftExtrusionFaces", readScalar ( motionDict_.subDict("left").lookup("minThickness") ), readScalar ( motionDict_.subDict("left").lookup("maxThickness") ) ); nMods++; tm.setSize(nMods); Info<< "Adding " << nMods << " mesh modifiers" << endl; topoChanger_.addTopologyModifiers(tm); write(); } src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C 107
  • 108. vertexMarkup Foam::tmp<Foam::scalarField> Foam::movingConeTopoFvMesh::vertexMarkup ( const pointField& p, const scalar curLeft, const scalar curRight ) const { Info<< "Updating vertex markup. curLeft: " << curLeft << " curRight: " << curRight << endl; tmp<scalarField> tvertexMarkup(new scalarField(p.size())); scalarField& vertexMarkup = tvertexMarkup(); forAll(p, pI) { if (p[pI].x() < curLeft - SMALL) { vertexMarkup[pI] = -1; } else if (p[pI].x() > curRight + SMALL) { vertexMarkup[pI] = 1; } else { vertexMarkup[pI] = 0; } } return tvertexMarkup; } src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C 108  Classify the points by their positions
  • 110. References [1] Roll Motion of a Box and Interaction with Free-Surface http://www.tfd.chalmers.se/~hani/kurser/OS_CFD_2009/ArashEslamdoost/RollMotionofaBoxandInteracti onwithFreeSurface.pdf [2] A tutorial on how to use Dynamic Mesh solver IcoDyMFOAM http://www.tfd.chalmers.se/~hani/kurser/OS_CFD_2007/PiroozMoradnia/OpenFOAM-rapport.pdf [3] Mesh motion alternatives http://www.tfd.chalmers.se/~hani/kurser/OS_CFD_2009/AndreuOliverGonzalez/PresentationFINAL_Mesh MotionAlternatives.pdf [4] OpenFOAM project: A modification of the movingConeTopoFvMesh library http://www.tfd.chalmers.se/~hani/kurser/OS_CFD_2008/ErikBjerklund/OpenFoamBjerklundE3.pdf [5] Dynamic mesh in OpenFOAM https://ilyasivkov.wordpress.com/2015/04/23/dynamic-mesh-in-openfoam/ 110
  • 111. This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. You should have received a copy of the license along with this work. If not, see <http://creativecommons.org/licenses/by-sa/4.0/>. 111