mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
TUT: clean up multiphase tutorials
This commit is contained in:
@ -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)
|
||||
|
||||
@ -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
|
||||
|
||||
@ -27,11 +27,13 @@ boundaryField
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
atmosphere
|
||||
{
|
||||
type pressureInletOutletVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
floatingObject
|
||||
{
|
||||
type movingWallVelocity;
|
||||
|
||||
@ -26,12 +26,14 @@ boundaryField
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
atmosphere
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform 0;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
floatingObject
|
||||
{
|
||||
type zeroGradient;
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -26,10 +26,12 @@ boundaryField
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
atmosphere
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
floatingObject
|
||||
{
|
||||
type zeroGradient;
|
||||
|
||||
@ -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;
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
#};
|
||||
}
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
@ -4,7 +4,9 @@ cd "${0%/*}" || exit # Run from this directory
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
runApplication blockMesh
|
||||
|
||||
runApplication topoSet
|
||||
|
||||
runApplication subsetMesh -overwrite c0 -patch floatingObject
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -47,7 +47,9 @@ runTimeModifiable yes;
|
||||
adjustTimeStep yes;
|
||||
|
||||
maxCo 1;
|
||||
|
||||
maxAlphaCo 1;
|
||||
|
||||
maxDeltaT 1;
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -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 );
|
||||
}
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
Reference in New Issue
Block a user