Skip to content
Snippets Groups Projects
Commit 95fe43b0 authored by sergio's avatar sergio
Browse files

TUT: Add and update overset tutorials

parent 10b7479d
No related tags found
No related merge requests found
Showing
with 599 additions and 20 deletions
......@@ -15,7 +15,7 @@ FoamFile
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
simulationType RAS;
density variable;
RAS
{
RASModel kEpsilon;
......
......@@ -87,24 +87,6 @@ functions
(0.0009999 0.0015 0.003)
);
}
alphaVol
{
libs (utilityFunctionObjects);
type coded;
name alphaVolume;
writeControl timeStep;
writeInterval 10;
codeWrite
#{
const auto& alpha =
mesh().lookupObject<volScalarField>("alpha.water");
Info<< "Alpha volume = " << alpha.weightedAverage(mesh().Vsc())
<< endl;
#};
}
}
......
......@@ -96,7 +96,6 @@ PIMPLE
nOuterCorrectors 2;
nCorrectors 3;
nNonOrthogonalCorrectors 0;
ddtCorr false;
}
relaxationFactors
......
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ 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
{
#includeEtc "caseDicts/setConstraintTypes"
walls
{
type uniformFixedValue;
uniformValue (0 0 0);
}
hole
{
type movingWallVelocity;
value uniform (0 0 0);
}
outlet
{
type uniformFixedValue;
uniformValue (0 0 0);
}
inlet
{
type uniformFixedValue;
uniformValue (0 0 0);
}
overset
{
type overset;
}
}
// ************************************************************************* //
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object alpha.water;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
"(walls|hole|inlet|outlet)"
{
type zeroGradient;
}
overset
{
type overset;
}
}
// ************************************************************************* //
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object epsilon;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [ 0 2 -3 0 0 0 0 ];
internalField uniform 0.1;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
overset
{
type overset;
}
"(walls|hole|inlet|outlet)"
{
type epsilonWallFunction;
value $internalField;
}
}
// ************************************************************************* //
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [ 0 2 -2 0 0 0 0 ];
internalField uniform 0.01;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
overset
{
type overset;
}
"(walls|hole|inlet|outlet)"
{
type kqRWallFunction;
value $internalField;
}
}
// ************************************************************************* //
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object nut;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [ 0 2 -1 0 0 0 0 ];
internalField uniform 0;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
overset
{
type overset;
}
"(walls|hole|inlet|outlet)"
{
type nutkWallFunction;
value $internalField;
}
}
// ************************************************************************* //
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
"(walls|hole|outlet|inlet)"
{
type calculated;
value $internalField;
}
overset
{
type overset;
}
}
// ************************************************************************* //
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -2 0 0 0 0];
internalField uniform 0;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
oversetPatch
{
type overset;
}
"(walls|hole|outlet|inlet)"
{
type fixedFluxPressure;
}
}
// ************************************************************************* //
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class pointVectorField;
object pointDisplacement;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 0 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
".*"
{
type uniformFixedValue;
uniformValue (0 0 0);
}
hole
{
type zeroGradient;
}
overset
{
patchType overset;
type zeroGradient;
}
}
// ************************************************************************* //
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object zoneID;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
overset
{
type overset;
}
".*"
{
type zeroGradient;
}
}
// ************************************************************************* //
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
#------------------------------------------------------------------------------
cleanCase0
rm -f constant/cellInterpolationWeight
#------------------------------------------------------------------------------
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
canCompile || exit 0 # Dynamic code
./Allrun.pre
# Serial
#runApplication $(getApplication)
# Parallel
runApplication decomposePar -cellDist
runParallel $(getApplication)
runApplication reconstructPar
#------------------------------------------------------------------------------
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
runApplication blockMesh
# Select cellSets
runApplication -s 1 topoSet
runApplication subsetMesh box -patch hole -overwrite
# Select cellSets
runApplication -s 2 topoSet
restore0Dir
# Use cellSets to write zoneID
runApplication setFields
#------------------------------------------------------------------------------
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object dynamicMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dynamicFvMesh dynamicOversetFvMesh;
solver multiSolidBodyMotionSolver;
multiSolidBodyMotionSolverCoeffs
{
movingZone1
{
solidBodyMotionFunction multiMotion;//linearMotio;
multiMotionCoeffs
{
one
{
solidBodyMotionFunction linearMotion;
origin (0.005 0.005 0.005);
axis (0 0 1);
omega 0;//100.0;
velocity (-0.1 -0.1 0);
}
two
{
solidBodyMotionFunction rotatingMotion;
origin (0.005 0.005 0.005);
axis (0 0 1);
omega 20.0;
velocity (-0.1 0 0);
}
}
}
movingZone2
{
solidBodyMotionFunction linearMotion;
linearMotionCoeffs
{
velocity (0.1 0 0);
origin (0.009 0.005 0.005);
axis (0 0 1);
omega -100.0;
}
}
}
// multiSolidBodyMotionSolverCoeffs
// {
// movingZone1
// {
// solidBodyMotionFunction rotatingMotion;
// rotatingMotionCoeffs
// {
// origin (0.005 0.005 0.005);
// axis (0 0 1);
// omega 20.0;
// }
// }
//
// movingZone2
// {
// solidBodyMotionFunction rotatingMotion;
// rotatingMotionCoeffs
// {
// origin (0.013 0.005 0.005);
// axis (0 0 1);
// omega -20.0;
// }
// }
// }
// ************************************************************************* //
/*--------------------------------*- C++ -*---------------------------------*\
| //\\ A | |
| // \\ X | Axion: GM's End-2-End CFD Solution |
| // \\ I | Version: 0.2 |
| // \\ O | Web: axion.gm.com |
| ============== N | |
\*--------------------------------------------------------------------------*/
FoamFile
{
object fvOptions;
class dictionary;
format ascii;
version 2.0;
location "system";
}
limitU
{
type velocityDampingConstraint;
active true;
selectionMode cellType;
UMax 0;
C 4;
}
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class uniformDimensionedVectorField;
object g;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -2 0 0 0 0];
value ( 0 -9.81 0);
// ************************************************************************* //
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
phases (water air);
water
{
transportModel Newtonian;
nu 1e-06;
rho 998.2;
}
air
{
transportModel Newtonian;
nu 1.48e-05;
rho 1;
}
sigma 0.0;
// ************************************************************************* //
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object turbulenceProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
simulationType RAS;
density variable;
RAS
{
RASModel kEpsilon;
turbulence on;
printCoeffs on;
}
// ************************************************************************* //
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment