diff --git a/tutorials/interDyMFoam/sloshingTank/0/U b/tutorials/interDyMFoam/sloshingTank/0/U new file mode 100644 index 0000000000..ead7f1f8b7 --- /dev/null +++ b/tutorials/interDyMFoam/sloshingTank/0/U @@ -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); + } +} + +// ************************************************************************* // diff --git a/tutorials/interDyMFoam/sloshingTank/0/gamma.org b/tutorials/interDyMFoam/sloshingTank/0/gamma.org new file mode 100644 index 0000000000..8c4ab31ce2 --- /dev/null +++ b/tutorials/interDyMFoam/sloshingTank/0/gamma.org @@ -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; + } +} + +// ************************************************************************* // diff --git a/tutorials/interDyMFoam/sloshingTank/0/pd b/tutorials/interDyMFoam/sloshingTank/0/pd new file mode 100644 index 0000000000..fdb2ba3ce6 --- /dev/null +++ b/tutorials/interDyMFoam/sloshingTank/0/pd @@ -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; + } +} + +// ************************************************************************* // diff --git a/tutorials/interDyMFoam/sloshingTank/Allclean b/tutorials/interDyMFoam/sloshingTank/Allclean new file mode 100755 index 0000000000..2ffbd01add --- /dev/null +++ b/tutorials/interDyMFoam/sloshingTank/Allclean @@ -0,0 +1,4 @@ +#!/bin/sh + +foamCleanTutorials cases +rm -rf 0/gamma.gz probes wallPressure pRefProbe diff --git a/tutorials/interDyMFoam/sloshingTank/Allrun b/tutorials/interDyMFoam/sloshingTank/Allrun new file mode 100755 index 0000000000..748dcf65ba --- /dev/null +++ b/tutorials/interDyMFoam/sloshingTank/Allrun @@ -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 diff --git a/tutorials/interDyMFoam/sloshingTank/constant/RASProperties b/tutorials/interDyMFoam/sloshingTank/constant/RASProperties new file mode 100644 index 0000000000..ac1efb34c5 --- /dev/null +++ b/tutorials/interDyMFoam/sloshingTank/constant/RASProperties @@ -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; +} + +// ************************************************************************* // diff --git a/tutorials/interDyMFoam/sloshingTank/constant/dynamicMeshDict b/tutorials/interDyMFoam/sloshingTank/constant/dynamicMeshDict new file mode 100644 index 0000000000..e7a0ec06d6 --- /dev/null +++ b/tutorials/interDyMFoam/sloshingTank/constant/dynamicMeshDict @@ -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; + } +} + +// ************************************************************************* // diff --git a/tutorials/interDyMFoam/sloshingTank/constant/environmentalProperties b/tutorials/interDyMFoam/sloshingTank/constant/environmentalProperties new file mode 100644 index 0000000000..40232c0c40 --- /dev/null +++ b/tutorials/interDyMFoam/sloshingTank/constant/environmentalProperties @@ -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); + +// ************************************************************************* // diff --git a/tutorials/interDyMFoam/sloshingTank/constant/polyMesh/blockMeshDict b/tutorials/interDyMFoam/sloshingTank/constant/polyMesh/blockMeshDict new file mode 100644 index 0000000000..3c52247aa2 --- /dev/null +++ b/tutorials/interDyMFoam/sloshingTank/constant/polyMesh/blockMeshDict @@ -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) + ) +); + +// ************************************************************************* // diff --git a/tutorials/interDyMFoam/sloshingTank/constant/polyMesh/blockMeshDict.m4 b/tutorials/interDyMFoam/sloshingTank/constant/polyMesh/blockMeshDict.m4 new file mode 100644 index 0000000000..ced5dc533e --- /dev/null +++ b/tutorials/interDyMFoam/sloshingTank/constant/polyMesh/blockMeshDict.m4 @@ -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) + ) +); + +// ************************************************************************* // diff --git a/tutorials/interDyMFoam/sloshingTank/constant/polyMesh/boundary b/tutorials/interDyMFoam/sloshingTank/constant/polyMesh/boundary new file mode 100644 index 0000000000..57267e87f7 --- /dev/null +++ b/tutorials/interDyMFoam/sloshingTank/constant/polyMesh/boundary @@ -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; + } +) + +// ************************************************************************* // diff --git a/tutorials/interDyMFoam/sloshingTank/constant/transportProperties b/tutorials/interDyMFoam/sloshingTank/constant/transportProperties new file mode 100644 index 0000000000..c20854a903 --- /dev/null +++ b/tutorials/interDyMFoam/sloshingTank/constant/transportProperties @@ -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; + +// ************************************************************************* // diff --git a/tutorials/interDyMFoam/sloshingTank/system/controlDict b/tutorials/interDyMFoam/sloshingTank/system/controlDict new file mode 100644 index 0000000000..8d7fb44aa4 --- /dev/null +++ b/tutorials/interDyMFoam/sloshingTank/system/controlDict @@ -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; + } + ); + } +); + +// ************************************************************************* // diff --git a/tutorials/interDyMFoam/sloshingTank/system/decomposeParDict b/tutorials/interDyMFoam/sloshingTank/system/decomposeParDict new file mode 100644 index 0000000000..d4594e0947 --- /dev/null +++ b/tutorials/interDyMFoam/sloshingTank/system/decomposeParDict @@ -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 +( +); + +// ************************************************************************* // diff --git a/tutorials/interDyMFoam/sloshingTank/system/fvSchemes b/tutorials/interDyMFoam/sloshingTank/system/fvSchemes new file mode 100644 index 0000000000..f089e4e5e6 --- /dev/null +++ b/tutorials/interDyMFoam/sloshingTank/system/fvSchemes @@ -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; +} + +// ************************************************************************* // diff --git a/tutorials/interDyMFoam/sloshingTank/system/fvSolution b/tutorials/interDyMFoam/sloshingTank/system/fvSolution new file mode 100644 index 0000000000..3aaca52375 --- /dev/null +++ b/tutorials/interDyMFoam/sloshingTank/system/fvSolution @@ -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; +} + +// ************************************************************************* // diff --git a/tutorials/interDyMFoam/sloshingTank/system/setFieldsDict b/tutorials/interDyMFoam/sloshingTank/system/setFieldsDict new file mode 100644 index 0000000000..2c881a7ba4 --- /dev/null +++ b/tutorials/interDyMFoam/sloshingTank/system/setFieldsDict @@ -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 + ); + } +); + +// ************************************************************************* //