New interDyMFoam tutorial: sloshing in a ship's tank
This commit is contained in:
parent
95e7ba2af9
commit
1e7f8941c9
43
tutorials/interDyMFoam/sloshingTank/0/U
Normal file
43
tutorials/interDyMFoam/sloshingTank/0/U
Normal file
@ -0,0 +1,43 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
object U;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
front
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
back
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
walls
|
||||
{
|
||||
type movingWallVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
pipe
|
||||
{
|
||||
type movingWallVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
41
tutorials/interDyMFoam/sloshingTank/0/gamma.org
Normal file
41
tutorials/interDyMFoam/sloshingTank/0/gamma.org
Normal file
@ -0,0 +1,41 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object gamma.0;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
front
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
back
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
walls
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
pipe
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
41
tutorials/interDyMFoam/sloshingTank/0/pd
Normal file
41
tutorials/interDyMFoam/sloshingTank/0/pd
Normal file
@ -0,0 +1,41 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object pd;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
front
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
back
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
walls
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
pipe
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
4
tutorials/interDyMFoam/sloshingTank/Allclean
Executable file
4
tutorials/interDyMFoam/sloshingTank/Allclean
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
foamCleanTutorials cases
|
||||
rm -rf 0/gamma.gz probes wallPressure pRefProbe
|
9
tutorials/interDyMFoam/sloshingTank/Allrun
Executable file
9
tutorials/interDyMFoam/sloshingTank/Allrun
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
m4 < constant/polyMesh/blockMeshDict.m4 > constant/polyMesh/blockMeshDict
|
||||
runApplication blockMesh
|
||||
cp 0/gamma.org 0/gamma
|
||||
runApplication setFields
|
||||
runApplication interDyMFoam
|
173
tutorials/interDyMFoam/sloshingTank/constant/RASProperties
Normal file
173
tutorials/interDyMFoam/sloshingTank/constant/RASProperties
Normal file
@ -0,0 +1,173 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object RASProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// RASModel kEpsilon;
|
||||
RASModel laminar;
|
||||
|
||||
turbulence off;
|
||||
|
||||
laminarCoeffs
|
||||
{
|
||||
}
|
||||
|
||||
kEpsilonCoeffs
|
||||
{
|
||||
Cmu 0.09;
|
||||
C1 1.44;
|
||||
C2 1.92;
|
||||
alphaEps 0.76923;
|
||||
}
|
||||
|
||||
RNGkEpsilonCoeffs
|
||||
{
|
||||
Cmu 0.0845;
|
||||
C1 1.42;
|
||||
C2 1.68;
|
||||
alphak 1.39;
|
||||
alphaEps 1.39;
|
||||
eta0 4.38;
|
||||
beta 0.012;
|
||||
}
|
||||
|
||||
NonlinearKEShihCoeffs
|
||||
{
|
||||
Cmu 0.09;
|
||||
C1 1.44;
|
||||
C2 1.92;
|
||||
alphak 1;
|
||||
alphaEps 0.76932;
|
||||
A1 1.25;
|
||||
A2 1000;
|
||||
Ctau1 -4;
|
||||
Ctau2 13;
|
||||
Ctau3 -2;
|
||||
alphaKsi 0.9;
|
||||
}
|
||||
|
||||
LienCubicKECoeffs
|
||||
{
|
||||
C1 1.44;
|
||||
C2 1.92;
|
||||
alphak 1;
|
||||
alphaEps 0.76923;
|
||||
A1 1.25;
|
||||
A2 1000;
|
||||
Ctau1 -4;
|
||||
Ctau2 13;
|
||||
Ctau3 -2;
|
||||
alphaKsi 0.9;
|
||||
}
|
||||
|
||||
QZetaCoeffs
|
||||
{
|
||||
Cmu 0.09;
|
||||
C1 1.44;
|
||||
C2 1.92;
|
||||
alphaZeta 0.76923;
|
||||
anisotropic no;
|
||||
}
|
||||
|
||||
LaunderSharmaKECoeffs
|
||||
{
|
||||
Cmu 0.09;
|
||||
C1 1.44;
|
||||
C2 1.92;
|
||||
alphaEps 0.76923;
|
||||
}
|
||||
|
||||
LamBremhorstKECoeffs
|
||||
{
|
||||
Cmu 0.09;
|
||||
C1 1.44;
|
||||
C2 1.92;
|
||||
alphaEps 0.76923;
|
||||
}
|
||||
|
||||
LienCubicKELowReCoeffs
|
||||
{
|
||||
Cmu 0.09;
|
||||
C1 1.44;
|
||||
C2 1.92;
|
||||
alphak 1;
|
||||
alphaEps 0.76923;
|
||||
A1 1.25;
|
||||
A2 1000;
|
||||
Ctau1 -4;
|
||||
Ctau2 13;
|
||||
Ctau3 -2;
|
||||
alphaKsi 0.9;
|
||||
Am 0.016;
|
||||
Aepsilon 0.263;
|
||||
Amu 0.00222;
|
||||
}
|
||||
|
||||
LienLeschzinerLowReCoeffs
|
||||
{
|
||||
Cmu 0.09;
|
||||
C1 1.44;
|
||||
C2 1.92;
|
||||
alphak 1;
|
||||
alphaEps 0.76923;
|
||||
Am 0.016;
|
||||
Aepsilon 0.263;
|
||||
Amu 0.00222;
|
||||
}
|
||||
|
||||
LRRCoeffs
|
||||
{
|
||||
Cmu 0.09;
|
||||
Clrr1 1.8;
|
||||
Clrr2 0.6;
|
||||
C1 1.44;
|
||||
C2 1.92;
|
||||
Cs 0.25;
|
||||
Ceps 0.15;
|
||||
alphaEps 0.76923;
|
||||
}
|
||||
|
||||
LaunderGibsonRSTMCoeffs
|
||||
{
|
||||
Cmu 0.09;
|
||||
Clg1 1.8;
|
||||
Clg2 0.6;
|
||||
C1 1.44;
|
||||
C2 1.92;
|
||||
C1Ref 0.5;
|
||||
C2Ref 0.3;
|
||||
Cs 0.25;
|
||||
Ceps 0.15;
|
||||
alphaEps 0.76923;
|
||||
alphaR 1.22;
|
||||
}
|
||||
|
||||
SpalartAllmarasCoeffs
|
||||
{
|
||||
alphaNut 1.5;
|
||||
Cb1 0.1355;
|
||||
Cb2 0.622;
|
||||
Cw2 0.3;
|
||||
Cw3 2;
|
||||
Cv1 7.1;
|
||||
Cv2 5.0;
|
||||
}
|
||||
|
||||
wallFunctionCoeffs
|
||||
{
|
||||
kappa 0.4187;
|
||||
E 9;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
60
tutorials/interDyMFoam/sloshingTank/constant/dynamicMeshDict
Normal file
60
tutorials/interDyMFoam/sloshingTank/constant/dynamicMeshDict
Normal file
@ -0,0 +1,60 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object motionProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dynamicFvMesh solidBodyMotionFvMesh;
|
||||
|
||||
solidBodyMotionFvMeshCoeffs
|
||||
{
|
||||
solidBodyMotionFunction SDA;
|
||||
|
||||
SDACoeffs
|
||||
{
|
||||
// Centre of gravity
|
||||
CofG (0 0 0);
|
||||
|
||||
// Model scale ratio
|
||||
lamda 50;
|
||||
|
||||
// Max roll amplitude [rad]
|
||||
rollAmax 0.22654;
|
||||
|
||||
// Min roll amplitude [rad]
|
||||
rollAmin 0.10472;
|
||||
|
||||
// Heave amplitude [m]
|
||||
heaveA 3.79;
|
||||
|
||||
// Sway amplitude [m]
|
||||
swayA 2.34;
|
||||
|
||||
// Damping Coefficient [-]
|
||||
Q 2.00;
|
||||
|
||||
// Time Period for liquid [sec]
|
||||
Tp 13.93;
|
||||
|
||||
// Natural Period of Ship [sec]
|
||||
Tpn 11.93;
|
||||
|
||||
// Reference time step [sec]
|
||||
dTi 0.059;
|
||||
|
||||
// Incr. in Tp/unit 'dTi'[-]
|
||||
dTp -0.001;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,19 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object environmentalProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
g g [0 1 -2 0 0 0 0] (0 0 -9.81);
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,145 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object blockMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// General m4 macros
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// User-defined parameters
|
||||
|
||||
convertToMeters 1;
|
||||
|
||||
// Length of tank (x-direction)
|
||||
// Breadth of tank (y-direction)
|
||||
// Depth of tank (z-direction)
|
||||
|
||||
// Depth to the top (height) of lower chamfer
|
||||
// Height of upper chamfer
|
||||
|
||||
// Angle of lower chamfer to the horizontal
|
||||
// Angle of upper chamfer to the horizontal
|
||||
|
||||
// Centre of gravity in y-direction
|
||||
// Centre of gravity in z-direction
|
||||
|
||||
// Number of cells in the length (1 for 2D)
|
||||
// Number of cells in the breadth
|
||||
// Number of cells in the height of the lower champfer
|
||||
// Number of cells in the height between the chamfers
|
||||
// Number of cells in the height of the upper champfer
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// Derived parameters
|
||||
|
||||
// Breadth to the top (height) of lower chamfer
|
||||
// Breadth of upper chamfer
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// Parametric description
|
||||
|
||||
vertices
|
||||
(
|
||||
(-0.5 -15 -10.0) // Vertex bllcb = 0
|
||||
(-0.5 -20 -5) // Vertex bllc = 1
|
||||
(-0.5 -20 10) // Vertex bluc = 2
|
||||
(-0.5 -10 20) // Vertex bluct = 3
|
||||
(-0.5 15 -10.0) // Vertex brlcb = 4
|
||||
(-0.5 20 -5) // Vertex brlc = 5
|
||||
(-0.5 20 10) // Vertex bruc = 6
|
||||
(-0.5 10 20) // Vertex bruct = 7
|
||||
|
||||
(0.5 -15 -10.0) // Vertex fllcb = 8
|
||||
(0.5 -20 -5) // Vertex fllc = 9
|
||||
(0.5 -20 10) // Vertex fluc = 10
|
||||
(0.5 -10 20) // Vertex fluct = 11
|
||||
(0.5 15 -10.0) // Vertex frlcb = 12
|
||||
(0.5 20 -5) // Vertex frlc = 13
|
||||
(0.5 20 10) // Vertex fruc = 14
|
||||
(0.5 10 20) // Vertex fruct = 15
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
// block0
|
||||
hex (0 4 5 1 8 12 13 9)
|
||||
(40 6 1)
|
||||
simpleGrading (1 1 1)
|
||||
|
||||
// block1
|
||||
hex (1 5 6 2 9 13 14 10)
|
||||
(40 16 1)
|
||||
simpleGrading (1 1 1)
|
||||
|
||||
// block2
|
||||
hex (2 6 7 3 10 14 15 11)
|
||||
(40 12 1)
|
||||
simpleGrading (1 1 1)
|
||||
);
|
||||
|
||||
patches
|
||||
(
|
||||
patch walls
|
||||
(
|
||||
(0 4 12 8)
|
||||
(4 5 13 12)
|
||||
(5 6 14 13)
|
||||
(6 7 15 14)
|
||||
(7 3 11 15)
|
||||
(3 2 10 11)
|
||||
(2 1 9 10)
|
||||
(1 0 8 9)
|
||||
)
|
||||
|
||||
empty front
|
||||
(
|
||||
(8 12 13 9)
|
||||
(9 13 14 10)
|
||||
(10 14 15 11)
|
||||
)
|
||||
|
||||
empty back
|
||||
(
|
||||
(0 1 5 4)
|
||||
(1 2 6 5)
|
||||
(2 3 7 6)
|
||||
)
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,145 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object blockMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// General m4 macros
|
||||
|
||||
changecom(//)changequote([,])
|
||||
define(calc, [esyscmd(perl -e 'use Math::Trig; use POSIX; printf ($1)')])
|
||||
define(VCOUNT, 0)
|
||||
define(vlabel, [[// ]Vertex $1 = VCOUNT define($1, VCOUNT)define([VCOUNT], incr(VCOUNT))])
|
||||
|
||||
define(hex2D, hex (b$1 b$2 b$3 b$4 f$1 f$2 f$3 f$4))
|
||||
define(quad2D, (b$1 b$2 f$2 f$1))
|
||||
define(frontQuad, (f$1 f$2 f$3 f$4))
|
||||
define(backQuad, (b$1 b$4 b$3 b$2))
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// User-defined parameters
|
||||
|
||||
convertToMeters 1;
|
||||
|
||||
define(l, 1.0) // Length of tank (x-direction)
|
||||
define(b, 40) // Breadth of tank (y-direction)
|
||||
define(h, 30) // Depth of tank (z-direction)
|
||||
|
||||
define(hlc, 5) // Depth to the top (height) of lower chamfer
|
||||
define(huc, 10) // Height of upper chamfer
|
||||
|
||||
define(thetalc, 45) // Angle of lower chamfer to the horizontal
|
||||
define(thetauc, 45) // Angle of upper chamfer to the horizontal
|
||||
|
||||
define(CofGy, calc(b/2.0)) // Centre of gravity in y-direction
|
||||
define(CofGz, 10.0) // Centre of gravity in z-direction
|
||||
|
||||
define(Nl, 1) // Number of cells in the length (1 for 2D)
|
||||
define(Nb, 40) // Number of cells in the breadth
|
||||
define(Nhlc, 6) // Number of cells in the height of the lower champfer
|
||||
define(Nh, 16) // Number of cells in the height between the chamfers
|
||||
define(Nhuc, 12) // Number of cells in the height of the upper champfer
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// Derived parameters
|
||||
|
||||
define(blc, calc(hlc/tan(deg2rad(thetalc)))) // Breadth to the top (height) of lower chamfer
|
||||
define(buc, calc(huc/tan(deg2rad(thetauc)))) // Breadth of upper chamfer
|
||||
|
||||
define(Yl, -CofGy)
|
||||
define(Yllc, calc(Yl + blc))
|
||||
define(Yluc, calc(Yl + buc))
|
||||
|
||||
define(Yr, calc(Yl + b))
|
||||
define(Yrlc, calc(Yr - blc))
|
||||
define(Yruc, calc(Yr - buc))
|
||||
|
||||
define(Zb, -CofGz)
|
||||
define(Zlc, calc(Zb + hlc))
|
||||
define(Zt, calc(Zb + h))
|
||||
define(Zuc, calc(Zt - huc))
|
||||
|
||||
define(Xf, calc(l/2.0))
|
||||
define(Xb, calc(Xf - l))
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// Parametric description
|
||||
|
||||
vertices
|
||||
(
|
||||
(Xb Yllc Zb) vlabel(bllcb)
|
||||
(Xb Yl Zlc) vlabel(bllc)
|
||||
(Xb Yl Zuc) vlabel(bluc)
|
||||
(Xb Yluc Zt) vlabel(bluct)
|
||||
(Xb Yrlc Zb) vlabel(brlcb)
|
||||
(Xb Yr Zlc) vlabel(brlc)
|
||||
(Xb Yr Zuc) vlabel(bruc)
|
||||
(Xb Yruc Zt) vlabel(bruct)
|
||||
|
||||
(Xf Yllc Zb) vlabel(fllcb)
|
||||
(Xf Yl Zlc) vlabel(fllc)
|
||||
(Xf Yl Zuc) vlabel(fluc)
|
||||
(Xf Yluc Zt) vlabel(fluct)
|
||||
(Xf Yrlc Zb) vlabel(frlcb)
|
||||
(Xf Yr Zlc) vlabel(frlc)
|
||||
(Xf Yr Zuc) vlabel(fruc)
|
||||
(Xf Yruc Zt) vlabel(fruct)
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
// block0
|
||||
hex2D(llcb, rlcb, rlc, llc)
|
||||
(Nb Nhlc Nl)
|
||||
simpleGrading (1 1 1)
|
||||
|
||||
// block1
|
||||
hex2D(llc, rlc, ruc, luc)
|
||||
(Nb Nh Nl)
|
||||
simpleGrading (1 1 1)
|
||||
|
||||
// block2
|
||||
hex2D(luc, ruc, ruct, luct)
|
||||
(Nb Nhuc Nl)
|
||||
simpleGrading (1 1 1)
|
||||
);
|
||||
|
||||
patches
|
||||
(
|
||||
patch walls
|
||||
(
|
||||
quad2D(llcb, rlcb)
|
||||
quad2D(rlcb, rlc)
|
||||
quad2D(rlc, ruc)
|
||||
quad2D(ruc, ruct)
|
||||
quad2D(ruct, luct)
|
||||
quad2D(luct, luc)
|
||||
quad2D(luc, llc)
|
||||
quad2D(llc, llcb)
|
||||
)
|
||||
|
||||
empty front
|
||||
(
|
||||
frontQuad(llcb, rlcb, rlc, llc)
|
||||
frontQuad(llc, rlc, ruc, luc)
|
||||
frontQuad(luc, ruc, ruct, luct)
|
||||
)
|
||||
|
||||
empty back
|
||||
(
|
||||
backQuad(llcb, rlcb, rlc, llc)
|
||||
backQuad(llc, rlc, ruc, luc)
|
||||
backQuad(luc, ruc, ruct, luct)
|
||||
)
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,40 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class polyBoundaryMesh;
|
||||
location "constant/polyMesh";
|
||||
object boundary;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
3
|
||||
(
|
||||
walls
|
||||
{
|
||||
type patch;
|
||||
nFaces 148;
|
||||
startFace 2646;
|
||||
}
|
||||
front
|
||||
{
|
||||
type empty;
|
||||
nFaces 1360;
|
||||
startFace 2794;
|
||||
}
|
||||
back
|
||||
{
|
||||
type empty;
|
||||
nFaces 1360;
|
||||
startFace 4154;
|
||||
}
|
||||
)
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,33 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object transportProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
phase1
|
||||
{
|
||||
transportModel Newtonian;
|
||||
nu nu [0 2 -1 0 0 0 0] 1e-6;
|
||||
rho rho [1 -3 0 0 0 0 0] 998.2;
|
||||
}
|
||||
|
||||
phase2
|
||||
{
|
||||
transportModel Newtonian;
|
||||
nu nu [0 2 -1 0 0 0 0] 1.48e-05;
|
||||
rho rho [1 -3 0 0 0 0 0] 1;
|
||||
}
|
||||
|
||||
sigma sigma [1 0 -2 0 0 0 0] 0.0;
|
||||
|
||||
// ************************************************************************* //
|
107
tutorials/interDyMFoam/sloshingTank/system/controlDict
Normal file
107
tutorials/interDyMFoam/sloshingTank/system/controlDict
Normal file
@ -0,0 +1,107 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object controlDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application sloshingFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 40;
|
||||
|
||||
deltaT 0.01;
|
||||
|
||||
writeControl adjustableRunTime;
|
||||
|
||||
writeInterval 0.05;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 6;
|
||||
|
||||
writeCompression compressed;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable yes;
|
||||
|
||||
adjustTimeStep yes;
|
||||
|
||||
maxCo 0.5;
|
||||
|
||||
maxDeltaT 1;
|
||||
|
||||
functions
|
||||
(
|
||||
probes
|
||||
{
|
||||
// Type of functionObject
|
||||
type probes;
|
||||
|
||||
// Name of the directory for the probe data
|
||||
name probes;
|
||||
|
||||
// Locations to be probed. runTime modifiable!
|
||||
probeLocations
|
||||
(
|
||||
(0 9.95 19.77)
|
||||
(0 -9.95 19.77)
|
||||
);
|
||||
|
||||
// Fields to be probed. runTime modifiable!
|
||||
fields
|
||||
(
|
||||
p
|
||||
);
|
||||
}
|
||||
|
||||
wallPressure
|
||||
{
|
||||
// Type of functionObject
|
||||
type surfaces;
|
||||
|
||||
// Where to load it from (if not already in solver)
|
||||
functionObjectLibs ("libsampling.so");
|
||||
|
||||
// Output every 10th time step
|
||||
interval 10;
|
||||
|
||||
surfaceFormat raw;
|
||||
|
||||
fields
|
||||
(
|
||||
p
|
||||
);
|
||||
|
||||
surfaces
|
||||
(
|
||||
walls
|
||||
{
|
||||
type patch;
|
||||
patchName walls;
|
||||
triangulate false;
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
56
tutorials/interDyMFoam/sloshingTank/system/decomposeParDict
Normal file
56
tutorials/interDyMFoam/sloshingTank/system/decomposeParDict
Normal file
@ -0,0 +1,56 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object decomposeParDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
numberOfSubdomains 16;
|
||||
|
||||
method hierarchical;
|
||||
|
||||
simpleCoeffs
|
||||
{
|
||||
n (2 2 1);
|
||||
delta 0.001;
|
||||
}
|
||||
|
||||
hierarchicalCoeffs
|
||||
{
|
||||
n (4 2 2);
|
||||
delta 0.001;
|
||||
order xyz;
|
||||
}
|
||||
|
||||
metisCoeffs
|
||||
{
|
||||
processorWeights
|
||||
(
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
);
|
||||
}
|
||||
|
||||
manualCoeffs
|
||||
{
|
||||
dataFile "";
|
||||
}
|
||||
|
||||
distributed no;
|
||||
|
||||
roots
|
||||
(
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
59
tutorials/interDyMFoam/sloshingTank/system/fvSchemes
Normal file
59
tutorials/interDyMFoam/sloshingTank/system/fvSchemes
Normal file
@ -0,0 +1,59 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default Euler;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
grad(U) Gauss linear;
|
||||
grad(gamma) Gauss linear;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
div(rho*phi,U) Gauss vanLeerV;
|
||||
div(phi,gamma) Gauss vanLeer;
|
||||
div(phirb,gamma) Gauss vanLeer;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default Gauss linear corrected;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default corrected;
|
||||
}
|
||||
|
||||
fluxRequired
|
||||
{
|
||||
default no;
|
||||
pd;
|
||||
pcorr;
|
||||
gamma;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
123
tutorials/interDyMFoam/sloshingTank/system/fvSolution
Normal file
123
tutorials/interDyMFoam/sloshingTank/system/fvSolution
Normal file
@ -0,0 +1,123 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
pcorr PCG
|
||||
{
|
||||
preconditioner GAMG
|
||||
{
|
||||
tolerance 1e-5;
|
||||
relTol 0;
|
||||
|
||||
smoother DICGaussSeidel;
|
||||
nPreSweeps 0;
|
||||
nPostSweeps 2;
|
||||
nBottomSweeps 2;
|
||||
|
||||
cacheAgglomeration false;
|
||||
nCellsInCoarsestLevel 10;
|
||||
agglomerator faceAreaPair;
|
||||
mergeLevels 1;
|
||||
};
|
||||
|
||||
tolerance 1e-5;
|
||||
relTol 0;
|
||||
maxIter 100;
|
||||
};
|
||||
|
||||
pd GAMG
|
||||
{
|
||||
tolerance 1e-8;
|
||||
relTol 0.01;
|
||||
|
||||
smoother DIC;
|
||||
nPreSweeps 0;
|
||||
nPostSweeps 2;
|
||||
nFinestSweeps 2;
|
||||
|
||||
cacheAgglomeration true;
|
||||
nCellsInCoarsestLevel 10;
|
||||
agglomerator faceAreaPair;
|
||||
mergeLevels 1;
|
||||
};
|
||||
|
||||
pdFinal PCG
|
||||
{
|
||||
preconditioner GAMG
|
||||
{
|
||||
tolerance 2e-9;
|
||||
relTol 0;
|
||||
|
||||
nVcycles 2;
|
||||
|
||||
smoother DICGaussSeidel;
|
||||
nPreSweeps 2;
|
||||
nPostSweeps 2;
|
||||
nFinestSweeps 2;
|
||||
|
||||
cacheAgglomeration true;
|
||||
nCellsInCoarsestLevel 10;
|
||||
agglomerator faceAreaPair;
|
||||
mergeLevels 1;
|
||||
};
|
||||
|
||||
tolerance 2e-9;
|
||||
relTol 0;
|
||||
maxIter 20;
|
||||
};
|
||||
|
||||
U smoothSolver
|
||||
{
|
||||
smoother GaussSeidel;
|
||||
tolerance 1e-6;
|
||||
relTol 0;
|
||||
nSweeps 1;
|
||||
};
|
||||
}
|
||||
|
||||
PISO
|
||||
{
|
||||
momentumPredictor no;
|
||||
nCorrectors 2;
|
||||
nNonOrthogonalCorrectors 0;
|
||||
nGammaCorr 1;
|
||||
nGammaSubCycles 3;
|
||||
cGamma 1.5;
|
||||
correctPhi no;
|
||||
|
||||
pRefProbe
|
||||
{
|
||||
fields
|
||||
(
|
||||
p
|
||||
);
|
||||
|
||||
probeLocations
|
||||
(
|
||||
(0 0 0.15)
|
||||
);
|
||||
}
|
||||
|
||||
pRefValue 1e5;
|
||||
}
|
||||
|
||||
relaxationFactors
|
||||
{
|
||||
U 1.0;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
35
tutorials/interDyMFoam/sloshingTank/system/setFieldsDict
Normal file
35
tutorials/interDyMFoam/sloshingTank/system/setFieldsDict
Normal file
@ -0,0 +1,35 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object setFieldsDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
defaultFieldValues
|
||||
(
|
||||
volScalarFieldValue gamma 0
|
||||
);
|
||||
|
||||
regions
|
||||
(
|
||||
boxToCell
|
||||
{
|
||||
box (-100 -100 -100) (100 100 0);
|
||||
|
||||
fieldValues
|
||||
(
|
||||
volScalarFieldValue gamma 1
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
Loading…
Reference in New Issue
Block a user