TUT: clean up multiphase tutorials

This commit is contained in:
Kutalmis Bercin
2020-01-29 17:19:43 +00:00
parent 647e161511
commit 01514e4d43
1349 changed files with 5623 additions and 241919 deletions

View File

@ -24,7 +24,6 @@ boundaryField
defaultFaces
{
//type slip;
type uniformFixedValue;
uniformValue (0 0 0);
}
@ -35,12 +34,11 @@ boundaryField
value uniform (0 0 0);
}
atmosphere
{
type pressureInletOutletVelocity;
value uniform (0 0 0);
}
atmosphere
{
type pressureInletOutletVelocity;
value uniform (0 0 0);
}
"overset.*"
{

View File

@ -10,7 +10,6 @@ FoamFile
version 2.0;
format ascii;
class volScalarField;
location "0";
object alpha.water;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -19,7 +18,6 @@ dimensions [0 0 0 0 0 0 0];
internalField uniform 0;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
@ -34,20 +32,24 @@ boundaryField
{
type zeroGradient;
}
propellerWall
{
type zeroGradient;
}
rudderWall
{
type zeroGradient;
}
atmosphere
{
type inletOutlet;
inletValue uniform 0;
value uniform 0;
}
defaultFaces
{
type zeroGradient;

View File

@ -1,55 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1912 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object alpha.water;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0;
boundaryField
{
"overset.*"
{
type overset;
value uniform 1;
}
hullWall
{
type zeroGradient;
}
propellerWall
{
type zeroGradient;
}
rudderWall
{
type zeroGradient;
}
atmosphere
{
type inletOutlet;
inletValue uniform 0;
value uniform 0;
}
defaultFaces
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -10,7 +10,6 @@ FoamFile
version 2.0;
format ascii;
class volScalarField;
location "0";
object epsilon;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -19,7 +18,6 @@ dimensions [0 2 -3 0 0 0 0];
internalField uniform 0.1;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
@ -29,39 +27,44 @@ boundaryField
type overset;
value uniform 1;
}
hullWall
{
type epsilonWallFunction;
type epsilonWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0.1;
}
propellerWall
{
type epsilonWallFunction;
type epsilonWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0.1;
}
rudderWall
{
type epsilonWallFunction;
type epsilonWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0.1;
}
atmosphere
{
type inletOutlet;
inletValue uniform 0.1;
value uniform 0.1;
}
defaultFaces
{
type epsilonWallFunction;
type epsilonWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;

View File

@ -10,7 +10,6 @@ FoamFile
version 2.0;
format ascii;
class volScalarField;
location "0";
object k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -29,27 +28,32 @@ boundaryField
type overset;
value uniform 1;
}
hullWall
{
type kqRWallFunction;
value uniform 0.01;
}
propellerWall
{
type kqRWallFunction;
value uniform 0.01;
}
rudderWall
{
type kqRWallFunction;
value uniform 0.01;
}
atmosphere
{
type inletOutlet;
inletValue uniform 0.01;
value uniform 0.01;
}
defaultFaces
{
type kqRWallFunction;

View File

@ -10,7 +10,6 @@ FoamFile
version 2.0;
format ascii;
class pointScalarField;
location "0";
object motionScale;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -26,30 +25,37 @@ boundaryField
{
type calculated;
}
overset2
{
type calculated;
}
overset3
{
type calculated;
}
hullWall
{
type calculated;
}
propellerWall
{
type calculated;
}
rudderWall
{
type calculated;
}
atmosphere
{
type calculated;
}
defaultFaces
{
type calculated;

View File

@ -10,7 +10,6 @@ FoamFile
version 2.0;
format ascii;
class volScalarField;
location "0";
object nut;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -19,7 +18,6 @@ dimensions [0 2 -1 0 0 0 0];
internalField uniform 0;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
@ -29,22 +27,25 @@ boundaryField
type overset;
value uniform 1;
}
hullWall
{
type nutkWallFunction;
type nutkWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0;
}
propellerWall
{
type nutkWallFunction;
type nutkWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0;
}
rudderWall
{
type nutkWallFunction;
@ -53,11 +54,13 @@ boundaryField
E 9.8;
value uniform 0;
}
atmosphere
{
type calculated;
value uniform 0;
}
defaultFaces
{
type nutkWallFunction;

View File

@ -27,8 +27,8 @@ boundaryField
type fixedFluxPressure;
}
atmosphere
{
atmosphere
{
type totalPressure;
p0 uniform 0;
U U;
@ -37,12 +37,12 @@ boundaryField
psi none;
gamma 1;
value uniform 0;
}
defaultFaces
{
type fixedFluxPressure;
}
}
defaultFaces
{
type fixedFluxPressure;
}
"overset.*"
{

View File

@ -31,21 +31,25 @@ boundaryField
type calculated;
value uniform (0 0 0);
}
oversetPatch
{
patchType overset;
type zeroGradient;
}
"overset.*"
{
patchType overset;
type zeroGradient;
}
atmosphere
{
type fixedValue;
value uniform (0 0 0);
}
defaultFaces
{
type fixedValue;

View File

@ -10,50 +10,56 @@ FoamFile
version 2.0;
format ascii;
class volScalarField;
location "0";
object zoneID;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
overset1
{
type overset;
value uniform 0;
}
overset2
{
type overset;
value uniform 0;
}
overset3
{
type overset;
value uniform 0;
}
hullWall
{
type zeroGradient;
}
propellerWall
{
type zeroGradient;
}
rudderWall
{
type zeroGradient;
}
atmosphere
{
type zeroGradient;
}
defaultFaces
{
type zeroGradient;

View File

@ -5,8 +5,6 @@ cd "${0%/*}" || exit # Run from this directory
cleanCase0
rm -f constant/polyMesh/boundary
rm -f constant/polyMesh/zoneID
rm -f constant/cellInterpolationWeight
#------------------------------------------------------------------------------

View File

@ -6,6 +6,7 @@ cd "${0%/*}" || exit # Run from this directory
./Allrun.pre
runApplication decomposePar
runParallel $(getApplication)
#------------------------------------------------------------------------------

View File

@ -12,7 +12,6 @@ FoamFile
class dictionary;
object dynamicMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
motionSolverLibs (rigidBodyMeshMotion);
@ -21,138 +20,134 @@ dynamicFvMesh dynamicOversetFvMesh;
motionSolver rigidBodyMotion;
// rigidBodyMotionCoeffs - not needed any more
// {
report on;
report on;
solver
solver
{
type Newmark;
//gamma 0.1; // Velocity integration coefficient
//beta 0.1; // Position integration coefficient
}
accelerationRelaxation 0.4;
// prescribedRotation requires some sub-iterations to converge faster
// to desired value of omega.
nIter 3;
bodies
{
hull
{
type Newmark;
//gamma 0.1; // Velocity integration coefficient
//beta 0.1; // Position integration coefficient
}
type rigidBody;
parent root;
accelerationRelaxation 0.4;
// To get Tensor of Inertia (symmetrical) use surfaceInertia
// here hull is empty shell
// prescribedRotation requires some sub-iterations to converge faster
// to desired value of omega.
nIter 3;
mass 0.552;
inertia (0.0033 0 0 0.01 0 0.0095);
centreOfMass (0.2857 -0.07 0); // relative to the centreOfMass
// of parent body
// (here root = global coord system)
bodies
{
hull
// Transformation tensor and centre of rotation (CoR)
transform (1 0 0 0 1 0 0 0 1) (0.2857 -0.07 0);
joint
{
type rigidBody;
parent root;
// These constrains are applied only to body hull,
// other bodies need to have their own set
// Constraints used for faster run
// To get Tensor of Inertia (symmetrical) use surfaceInertia
// here hull is empty shell
mass 0.552;
inertia (0.0033 0 0 0.01 0 0.0095);
centreOfMass (0.2857 -0.07 0); // relative to the centreOfMass
// of parent body
// (here root = global coord system)
// Transformation tensor and centre of rotation (CoR)
transform (1 0 0 0 1 0 0 0 1) (0.2857 -0.07 0);
joint
{
// These constrains are applied only to body hull,
// other bodies need to have their own set
// Constraints used for faster run
type composite;
joints
(
{
type Px; // Allow translation in X -
}
{
type Ry; // Allow rotation along Y axis
// (local - body CS)
}
);
}
patches (hullWall);
innerDistance 100; // With overset we want to avoid the mesh
// deformation so have large innerDistance
outerDistance 200;
}
propeller
{
type rigidBody;
parent hull;
centreOfMass (-0.2847 0.03 0); // Relative to parent CoM
mass 0.0288;
inertia (7.6e-6 0 0 4.2e-6 0 4.2e-6);
// transform and CoR - relative to parent CoR
transform (1 0 0 0 1 0 0 0 1) (-0.2757 0.03 0);
patches (propellerWall);
innerDistance 100;
outerDistance 200;
joint
{
type Rx;
}
}
rudder
{
type rigidBody;
parent hull;
centreOfMass (-0.3602 -0.0055 0);
mass 0.0746;
inertia (3.3e-5 0 0 4.7e-6 0 3.4e-5);
// transform and CoR - relative to parent CoR
transform (1 0 0 0 1 0 0 0 1) (-0.3487 -0.04 0);
patches (rudderWall);
innerDistance 100;
outerDistance 200;
joint
{
type Ry;
}
}
}
restraints
{
rudderRotation
{
type prescribedRotation;
body rudder;
referenceOrientation (1 0 0 0 1 0 0 0 1);
axis (0 1 0); // Axis of rotation
omega sine; // Function1 entry
omegaCoeffs
{
frequency 4;
amplitude 0.2;
scale (0 1 0);
level (0 1 0);
}
}
propellerRotation
{
type prescribedRotation;
body propeller;
referenceOrientation (1 0 0 0 1 0 0 0 1);
axis (1 0 0);
omega table
type composite;
joints
(
(0 (0 0 0))
(1 (16 0 0))
{
type Px; // Allow translation in X -
}
{
type Ry; // Allow rotation along Y axis
// (local - body CS)
}
);
}
patches (hullWall);
innerDistance 100; // With overset we want to avoid the mesh
// deformation so have large innerDistance
outerDistance 200;
}
// } // end of rigidBodyMotionCoeffs
propeller
{
type rigidBody;
parent hull;
centreOfMass (-0.2847 0.03 0); // Relative to parent CoM
mass 0.0288;
inertia (7.6e-6 0 0 4.2e-6 0 4.2e-6);
// transform and CoR - relative to parent CoR
transform (1 0 0 0 1 0 0 0 1) (-0.2757 0.03 0);
patches (propellerWall);
innerDistance 100;
outerDistance 200;
joint
{
type Rx;
}
}
rudder
{
type rigidBody;
parent hull;
centreOfMass (-0.3602 -0.0055 0);
mass 0.0746;
inertia (3.3e-5 0 0 4.7e-6 0 3.4e-5);
// transform and CoR - relative to parent CoR
transform (1 0 0 0 1 0 0 0 1) (-0.3487 -0.04 0);
patches (rudderWall);
innerDistance 100;
outerDistance 200;
joint
{
type Ry;
}
}
}
restraints
{
rudderRotation
{
type prescribedRotation;
body rudder;
referenceOrientation (1 0 0 0 1 0 0 0 1);
axis (0 1 0); // Axis of rotation
omega sine; // Function1 entry
omegaCoeffs
{
frequency 4;
amplitude 0.2;
scale (0 1 0);
level (0 1 0);
}
}
propellerRotation
{
type prescribedRotation;
body propeller;
referenceOrientation (1 0 0 0 1 0 0 0 1);
axis (1 0 0);
omega table
(
(0 (0 0 0))
(1 (16 0 0))
);
}
}
// ************************************************************************* //

View File

@ -19,17 +19,17 @@ phases (water air);
water
{
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 1e-06;
rho rho [ 1 -3 0 0 0 0 0 ] 998.2;
nu 1e-06;
rho 998.2;
}
air
{
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 1.48e-05;
rho rho [ 1 -3 0 0 0 0 0 ] 1;
nu 1.48e-05;
rho 1;
}
sigma sigma [ 1 0 -2 0 0 0 0 ] 0;
sigma 0;
// ************************************************************************* //

View File

@ -24,4 +24,5 @@ RAS
printCoeffs on;
}
// ************************************************************************* //

View File

@ -61,13 +61,12 @@ vertices
blocks
(
// hex (0 1 2 3 4 5 6 7) background (60 40 56) simpleGrading (1 1 1) // coarser mesh cell size 0.025 m
hex (0 1 2 3 4 5 6 7) background (75 50 70) simpleGrading (1 1 1) // cell size 0.02 m
// hex (0 1 2 3 4 5 6 7) background (60 40 56)
// simpleGrading (1 1 1) // coarser mesh cell size 0.025 m
hex (0 1 2 3 4 5 6 7) background (75 50 70)
simpleGrading (1 1 1) // cell size 0.02 m
hex (8 9 10 11 12 13 14 15) hullBox (32 16 16) simpleGrading (1 1 1)
hex (16 17 18 19 20 21 22 23) propeller (10 20 20) simpleGrading (1 1 1)
hex (24 25 26 27 28 29 30 31) rudder (20 22 11) simpleGrading (1 1 1)
);
@ -90,7 +89,6 @@ boundary
(12 13 14 15)
);
}
overset2 //oversetPropeller
{
type overset;
@ -104,7 +102,6 @@ boundary
(19 18 17 16)
);
}
overset3 //oversetRudder
{
type overset;
@ -118,26 +115,22 @@ boundary
(24 25 29 28)
);
}
// Populated by subsetMesh
hullWall
{
type wall;
faces ();
}
propellerWall
{
type wall;
faces ();
}
rudderWall
{
type wall;
faces ();
}
// Populated by subsetMesh
hullWall
{
type wall;
faces ();
}
propellerWall
{
type wall;
faces ();
}
rudderWall
{
type wall;
faces ();
}
atmosphere
{
type patch;
@ -147,7 +140,6 @@ boundary
// (1 5 4 0)
);
}
defaultFaces
{
type wall;

View File

@ -14,7 +14,6 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
libs
(
overset
@ -54,13 +53,15 @@ runTimeModifiable true;
adjustTimeStep yes;
maxCo 4.0;
maxAlphaCo 5.0;
maxDeltaT 1;
functions
{
minMax
{
type fieldMinMax;

View File

@ -10,7 +10,6 @@ FoamFile
version 2.0;
format ascii;
class dictionary;
note "mesh decomposition control dictionary";
object decomposeParDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -22,8 +21,6 @@ method hierarchical;
coeffs
{
n (2 2 2);
// delta 0.001;
// order xyz;
}
// ************************************************************************* //

View File

@ -26,7 +26,7 @@ gradSchemes
divSchemes
{
div(rhoPhi,U) Gauss upwind ;//limitedLinearV 1;
div(rhoPhi,U) Gauss upwind;
div(U) Gauss linear;
div(phi,alpha) Gauss vanLeer;
div(phirb,alpha) Gauss linear;
@ -39,7 +39,7 @@ divSchemes
laplacianSchemes
{
default Gauss linear uncorrected;//uncorrected;
default Gauss linear uncorrected;
}
interpolationSchemes
@ -49,7 +49,7 @@ interpolationSchemes
snGradSchemes
{
default uncorrected;//uncorrected;
default uncorrected;
}
oversetInterpolation

View File

@ -16,12 +16,10 @@ FoamFile
solvers
{
"cellDisplacement.*"
{
solver PCG;
preconditioner DIC;
tolerance 1e-06;
relTol 0;
maxIter 300;

View File

@ -24,13 +24,19 @@ regions
boxToCell
{
box ( -100 -100 -100 ) ( 100 0.0 100 );
fieldValues ( volScalarFieldValue alpha.water 1 );
fieldValues
(
volScalarFieldValue alpha.water 1
);
}
boxToFace
{
box ( -100 -100 -100 ) ( 100 0.0 100 );
fieldValues ( volScalarFieldValue alpha.water 1 );
fieldValues
(
volScalarFieldValue alpha.water 1
);
}
);

View File

@ -1,6 +1,5 @@
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
#. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
cd "${0%/*}" || exit # Run from this directory
#------------------------------------------------------------------------------
(cd background && ./Allclean)

View File

@ -3,7 +3,7 @@ cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
# mesh floating body
# Mesh floating body
(cd floatingBody && ./Allrun.pre)
# Add background mesh

View File

@ -27,11 +27,13 @@ boundaryField
type fixedValue;
value uniform (0 0 0);
}
atmosphere
{
type pressureInletOutletVelocity;
value uniform (0 0 0);
}
floatingObject
{
type movingWallVelocity;

View File

@ -26,12 +26,14 @@ boundaryField
{
type zeroGradient;
}
atmosphere
{
type inletOutlet;
inletValue uniform 0;
value uniform 0;
}
floatingObject
{
type zeroGradient;

View File

@ -25,23 +25,19 @@ boundaryField
stationaryWalls
{
type epsilonWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0.1;
}
atmosphere
{
type inletOutlet;
inletValue uniform 0.1;
value uniform 0.1;
}
floatingObject
{
type epsilonWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0.1;
}
}

View File

@ -27,12 +27,14 @@ boundaryField
type kqRWallFunction;
value uniform 0.1;
}
atmosphere
{
type inletOutlet;
inletValue uniform 0.1;
value uniform 0.1;
}
floatingObject
{
type kqRWallFunction;

View File

@ -25,22 +25,18 @@ boundaryField
stationaryWalls
{
type nutkWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0;
}
atmosphere
{
type calculated;
value uniform 0;
}
floatingObject
{
type nutkWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0;
}
}

View File

@ -24,10 +24,12 @@ boundaryField
{
type overset;
}
stationaryWalls
{
type fixedFluxPressure;
}
atmosphere
{
type totalPressure;
@ -39,10 +41,12 @@ boundaryField
gamma 1;
value uniform 0;
}
floatingObject
{
type fixedFluxPressure;
}
overset
{
patchType overset;

View File

@ -27,21 +27,25 @@ boundaryField
type fixedValue;
value uniform (0 0 0);
}
atmosphere
{
type fixedValue;
value uniform (0 0 0);
}
floatingObject
{
type calculated;
value uniform (0 0 0);
}
oversetPatch
{
patchType overset;
type zeroGradient;
}
sides
{
patchType overset;

View File

@ -26,10 +26,12 @@ boundaryField
{
type zeroGradient;
}
atmosphere
{
type zeroGradient;
}
floatingObject
{
type zeroGradient;

View File

@ -19,17 +19,17 @@ phases (water air);
water
{
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 1e-06;
rho rho [ 1 -3 0 0 0 0 0 ] 998.2;
nu 1e-06;
rho 998.2;
}
air
{
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 1.48e-05;
rho rho [ 1 -3 0 0 0 0 0 ] 1;
nu 1.48e-05;
rho 1;
}
sigma sigma [ 1 0 -2 0 0 0 0 ] 0.007;
sigma 0.007;
// ************************************************************************* //

View File

@ -39,14 +39,12 @@ edges
boundary
(
// Dummy patch to trigger overset interpolation before any other
// bcs
// Dummy patch to trigger overset interpolation before any other bcs
oversetPatch
{
type overset;
faces ();
}
stationaryWalls
{
type wall;

View File

@ -16,7 +16,7 @@ FoamFile
libs (overset fvMotionSolvers);
application overInterDyMFoam ;
application overInterDyMFoam;
startFrom latestTime;
@ -49,9 +49,12 @@ runTimeModifiable yes;
adjustTimeStep yes;
maxCo 1.5;
maxAlphaCo 2.0;
maxDeltaT 1;
functions
{
probes
@ -76,7 +79,6 @@ functions
(
(0.00132 0.0009 0.005)
);
}
alphaVol
@ -93,8 +95,8 @@ functions
const volScalarField& alpha =
mesh().lookupObject<volScalarField>("alpha.water");
Info<< "Alpha volume = " << alpha.weightedAverage(mesh().Vsc()) << endl;
Info<< "Alpha volume = " << alpha.weightedAverage(mesh().Vsc())
<< endl;
#};
}
}

View File

@ -25,13 +25,19 @@ regions
boxToCell
{
box ( -100 -100 -100 ) ( 100 100 0.5368 );
fieldValues ( volScalarFieldValue alpha.water 1 );
fieldValues
(
volScalarFieldValue alpha.water 1
);
}
boxToCell
{
box ( 0.9 0.9 -100 ) ( 100 100 0.75 );
fieldValues ( volScalarFieldValue alpha.water 1 );
fieldValues
(
volScalarFieldValue alpha.water 1
);
}
cellToCell

View File

@ -4,7 +4,9 @@ cd "${0%/*}" || exit # Run from this directory
#------------------------------------------------------------------------------
runApplication blockMesh
runApplication topoSet
runApplication subsetMesh -overwrite c0 -patch floatingObject
#------------------------------------------------------------------------------

View File

@ -47,7 +47,9 @@ runTimeModifiable yes;
adjustTimeStep yes;
maxCo 1;
maxAlphaCo 1;
maxDeltaT 1;
// ************************************************************************* //

View File

@ -1,37 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1912 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object setFieldsDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
defaultFieldValues
(
volScalarFieldValue alpha.water 0
);
regions
(
boxToCell
{
box ( -100 -100 -100 ) ( 100 100 0.5368 );
fieldValues ( volScalarFieldValue alpha.water 1 );
}
boxToCell
{
box ( 0.7 0.8 -100 ) ( 100 100 0.65 );
fieldValues ( volScalarFieldValue alpha.water 1 );
}
);
// ************************************************************************* //

View File

@ -1,6 +1,5 @@
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
#. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
#------------------------------------------------------------------------------
(cd background && ./Allclean)

View File

@ -3,7 +3,7 @@ cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
# mesh floating body
# Mesh floating body
(cd floatingBody && ./Allrun.pre)
# Add background mesh

View File

@ -38,16 +38,19 @@ boundaryField
type pressureInletOutletVelocity;
value uniform (0 0 0);
}
sidePatch
{
type pressureInletOutletVelocity;
value uniform (0 0 0);
}
atmosphere
{
type pressureInletOutletVelocity;
value uniform (0 0 0);
}
floatingObject
{
type movingWallVelocity;

View File

@ -39,12 +39,14 @@ boundaryField
upperBound 1;
value uniform 0;
}
atmosphere
{
type inletOutlet;
inletValue uniform 0;
value uniform 0;
}
floatingObject
{
// type variableHeightFlowRate;
@ -53,6 +55,7 @@ boundaryField
// value uniform 0;
type zeroGradient;
}
sidePatch
{
type variableHeightFlowRate;

View File

@ -28,24 +28,25 @@ boundaryField
inletValue uniform 0.1;
value uniform 0.1;
}
"(atmosphere|sidePatch)"
{
type inletOutlet;
inletValue uniform 0.1;
value uniform 0.1;
}
floatingObject
{
type epsilonWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0.1;
}
overset
{
type overset;
}
oversetPatch
{
type overset;

View File

@ -24,25 +24,29 @@ boundaryField
stationaryWalls
{
type inletOutlet;
type inletOutlet;
inletValue uniform 0.01;
value uniform 0.01;
}
"(atmosphere|sidePatch)"
{
type inletOutlet;
inletValue uniform 0.01;
value uniform 0.01;
}
floatingObject
{
type kqRWallFunction;
value uniform 0.01;
}
overset
{
type overset;
}
oversetPatch
{
type overset;

View File

@ -27,24 +27,25 @@ boundaryField
type calculated;
value uniform 0;
}
"(atmosphere|sidePatch)"
{
type calculated;
value uniform 0;
}
floatingObject
{
type nutkWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0;
}
overset
{
patchType overset;
type zeroGradient;
}
oversetPatch
{
type overset;

View File

@ -24,10 +24,12 @@ boundaryField
{
type overset;
}
"(stationaryWalls|sidePatch)"
{
type fixedFluxPressure;
}
atmosphere
{
type totalPressure;
@ -39,10 +41,12 @@ boundaryField
gamma 1;
value uniform 0;
}
floatingObject
{
type fixedFluxPressure;
}
overset
{
patchType overset;

View File

@ -27,21 +27,25 @@ boundaryField
type calculated;
value uniform (0 0 0);
}
"(atmosphere|sidePatch)"
{
type calculated;
value uniform (0 0 0);
}
floatingObject
{
type calculated;
value uniform (0 0 0);
}
oversetPatch
{
patchType overset;
type zeroGradient;
}
sides
{
patchType overset;

View File

@ -26,15 +26,18 @@ boundaryField
{
type zeroGradient;
}
atmosphere
{
type zeroGradient;
}
floatingObject
{
type zeroGradient;
}
oversetPatch
oversetPatch
{
patchType overset;
type zeroGradient;

View File

@ -19,17 +19,17 @@ phases (water air);
water
{
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 1e-06;
rho rho [ 1 -3 0 0 0 0 0 ] 998.2;
nu 1e-06;
rho 998.2;
}
air
{
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 1.48e-05;
rho rho [ 1 -3 0 0 0 0 0 ] 1;
nu 1.48e-05;
rho 1;
}
sigma sigma [ 1 0 -2 0 0 0 0 ] 0.007;
sigma 0.007;
// ************************************************************************* //

View File

@ -39,14 +39,12 @@ edges
boundary
(
// Dummy patch to trigger overset interpolation before any other
// bcs
// Dummy patch to trigger overset interpolation before any other bcs
oversetPatch
{
type overset;
faces ();
}
stationaryWalls
{
type wall;

View File

@ -55,11 +55,10 @@ runTimeModifiable yes;
adjustTimeStep yes;
maxCo 5.0;
maxAlphaCo 2.0;
maxDeltaT 0.1;
functions
{
}
// ************************************************************************* //

View File

@ -54,7 +54,7 @@ snGradSchemes
oversetInterpolation
{
method inverseDistance;//cellVolumeWeight
method inverseDistance; //cellVolumeWeight
}
oversetInterpolationSuppressed

View File

@ -16,7 +16,6 @@ FoamFile
solvers
{
"cellDisplacement.*"
{
solver PCG;

View File

@ -25,14 +25,21 @@ regions
boxToCell
{
box ( -100 -100 -100 ) ( 100 100 0.5368 );
fieldValues ( volScalarFieldValue alpha.water 1 );
fieldValues
(
volScalarFieldValue alpha.water 1
);
}
boxToFace
{
box ( -100 -100 -100 ) ( 100 100 0.5368 );
fieldValues ( volScalarFieldValue alpha.water 1 );
fieldValues
(
volScalarFieldValue alpha.water 1
);
}
/*
boxToCell
{
@ -50,6 +57,7 @@ regions
volScalarFieldValue zoneID 0
);
}
cellToCell
{
set c1;
@ -59,7 +67,6 @@ regions
volScalarFieldValue zoneID 1
);
}
);
// ************************************************************************* //

View File

@ -47,7 +47,9 @@ runTimeModifiable yes;
adjustTimeStep yes;
maxCo 1;
maxAlphaCo 1;
maxDeltaT 1;
// ************************************************************************* //

View File

@ -1,37 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1912 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object setFieldsDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
defaultFieldValues
(
volScalarFieldValue alpha.water 0
);
regions
(
boxToCell
{
box ( -100 -100 -100 ) ( 100 100 0.5368 );
fieldValues ( volScalarFieldValue alpha.water 1 );
}
boxToCell
{
box ( 0.7 0.8 -100 ) ( 100 100 0.65 );
fieldValues ( volScalarFieldValue alpha.water 1 );
}
);
// ************************************************************************* //

View File

@ -34,16 +34,17 @@ boundaryField
value uniform (0 0 0);
}
outlet
{
type uniformFixedValue;
uniformValue (0 0 0);
}
inlet
{
type uniformFixedValue;
uniformValue (0 0 0);
}
outlet
{
type uniformFixedValue;
uniformValue (0 0 0);
}
inlet
{
type uniformFixedValue;
uniformValue (0 0 0);
}
overset
{

View File

@ -14,7 +14,6 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [ 0 2 -3 0 0 0 0 ];
internalField uniform 0.1;
@ -33,7 +32,6 @@ boundaryField
type epsilonWallFunction;
value $internalField;
}
}
// ************************************************************************* //

View File

@ -27,6 +27,7 @@ boundaryField
type calculated;
value $internalField;
}
overset
{
type overset;

View File

@ -26,6 +26,7 @@ boundaryField
{
type overset;
}
"(walls|hole|outlet|inlet)"
{
type fixedFluxPressure;

View File

@ -5,8 +5,6 @@ cd "${0%/*}" || exit # Run from this directory
cleanCase0
rm -f constant/polyMesh/boundary
rm -f constant/polyMesh/zoneID
rm -f constant/cellInterpolationWeight
#------------------------------------------------------------------------------

View File

@ -19,17 +19,17 @@ phases (water air);
water
{
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 1e-06;
rho rho [ 1 -3 0 0 0 0 0 ] 998.2;
nu 1e-06;
rho 998.2;
}
air
{
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 1.48e-05;
rho rho [ 1 -3 0 0 0 0 0 ] 1;
nu 1.48e-05;
rho 1;
}
sigma sigma [ 1 0 -2 0 0 0 0 ] 0.0;
sigma 0.0;
// ************************************************************************* //

View File

@ -74,7 +74,6 @@ boundary
( 9 13 12 8)
);
}
overset2
{
type overset;
@ -86,7 +85,6 @@ boundary
(17 21 20 16)
);
}
walls
{
type wall;
@ -96,7 +94,6 @@ boundary
(1 5 4 0)
);
}
inlet
{
type wall;
@ -105,7 +102,6 @@ boundary
(0 4 7 3)
);
}
outlet
{
type wall;
@ -114,14 +110,12 @@ boundary
(2 6 5 1)
);
}
// Populated by subsetMesh
hole
{
type wall;
faces ();
}
frontAndBack
{
type empty;
@ -131,7 +125,6 @@ boundary
(4 5 6 7)
);
}
frontAndBack1
{
type empty;
@ -141,7 +134,6 @@ boundary
(12 13 14 15)
);
}
frontAndBack2
{
type empty;

View File

@ -56,9 +56,12 @@ runTimeModifiable yes;
adjustTimeStep yes;
maxCo 1.5;
maxAlphaCo 2.0;
maxDeltaT 1;
functions
{
probes
@ -83,7 +86,6 @@ functions
(
(0.0009999 0.0015 0.003)
);
}
alphaVol

View File

@ -57,7 +57,10 @@ regions
boxToCell
{
box ( -100 -100 -100 ) ( 100 0.005 100 );
fieldValues ( volScalarFieldValue alpha.water 1 );
fieldValues
(
volScalarFieldValue alpha.water 1
);
}
);

View File

@ -56,7 +56,6 @@ actions
}
// Select box to remove from region 1 and 2
{
name box;
type cellSet;