Merge branch 'misc-kbc-jan-1' into 'develop'

TUT: misc cleanup in various tutorials

See merge request Development/openfoam!324
This commit is contained in:
Andrew Heather
2020-01-10 09:54:55 +00:00
37 changed files with 36 additions and 246 deletions

View File

@ -12,7 +12,7 @@ Description
\*---------------------------------------------------------------------------*/
#includeEtc "caseDicts/postProcessing/numerical/residuals.cfg"
#includeEtc "caseDicts/postProcessing/numerical/solverInfo.cfg"
fields (p U);

View File

@ -7,7 +7,7 @@
\*---------------------------------------------------------------------------*/
type solverInfo; //residuals;
libs ("libutilityFunctionObjects.so");
libs (utilityFunctionObjects);
writeControl timeStep;
writeInterval 1;

View File

@ -20,7 +20,7 @@ internalField uniform 273;
boundaryField
{
patch1
"(patch1|patch3)"
{
type zeroGradient;
}
@ -31,11 +31,6 @@ boundaryField
value uniform 273;
}
patch3
{
type zeroGradient;
}
patch4
{
type fixedValue;

View File

@ -4,6 +4,5 @@ cd "${0%/*}" || exit # Run from this directory
#------------------------------------------------------------------------------
cleanCase
rm -rf Fieldview
#------------------------------------------------------------------------------

View File

@ -3,18 +3,7 @@ cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
runAnsysToFoam()
{
if [ -f log.ansysToFoam ]
then
echo "ansysToFoam already run on $PWD: remove log file to re-run"
else
echo "Running ansysToFoam: converting mesh $1"
ansysToFoam $1 -scale $2 > log.ansysToFoam 2>&1
fi
}
runAnsysToFoam flange.ans 0.001
runApplication ansysToFoam flange.ans -scale 0.001
runApplication $(getApplication)
runApplication foamToEnsight -noZero
runApplication foamToEnsightParts -noZero

View File

@ -22,7 +22,7 @@ ddtSchemes
gradSchemes
{
default Gauss linear;
default none;
grad(T) Gauss linear;
}

View File

@ -10,14 +10,13 @@ FoamFile
version 2.0;
format ascii;
class volVectorField;
location "0.1";
location "0";
object cellDisplacement;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 0 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
@ -29,30 +28,16 @@ boundaryField
value uniform (0 0 0);
}
walls
{
type cellMotion;
value uniform (0 0 0);
}
hole
"(walls|hole|left1|right1)"
{
type cellMotion;
value uniform (0 0 0);
}
frontAndBack
{
type empty;
}
left1
{
type cellMotion;
value uniform (0 0 0);
}
right1
{
type cellMotion;
value uniform (0 0 0);
}
}

View File

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

View File

@ -5,8 +5,6 @@ cd "${0%/*}" || exit # Run from this directory
./Allrun.pre
# Run it for a bit
# Serial
#runApplication $(getApplication)

View File

@ -1,4 +0,0 @@
Transient, moving mesh
----------------------
Simple testcase for testing mesh motion

View File

@ -14,11 +14,11 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dynamicFvMesh dynamicOversetFvMesh;
dynamicFvMesh dynamicOversetFvMesh;
motionSolverLibs (fvMotionSolvers);
solver displacementLaplacian;
solver displacementLaplacian;
displacementLaplacianCoeffs
{

View File

@ -10,30 +10,12 @@ FoamFile
version 2.0;
format ascii;
class dictionary;
location "constant";
object transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
DT DT [ 0 2 -1 0 0 0 0 ] 1;
DT 1;
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 1e-05;
CrossPowerLawCoeffs
{
nu0 nu0 [ 0 2 -1 0 0 0 0 ] 1e-06;
nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
m m [ 0 0 1 0 0 0 0 ] 1;
n n [ 0 0 0 0 0 0 0 ] 1;
}
BirdCarreauCoeffs
{
nu0 nu0 [ 0 2 -1 0 0 0 0 ] 1e-06;
nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
k k [ 0 0 1 0 0 0 0 ] 0;
n n [ 0 0 0 0 0 0 0 ] 1;
}
// ************************************************************************* //

View File

@ -51,7 +51,6 @@ vertices
blocks
(
hex (0 1 2 3 4 5 6 7) (18 18 1) simpleGrading (1 1 1)
hex (8 9 10 11 12 13 14 15) movingZone (20 20 1) simpleGrading (1 1 1)
);
@ -110,6 +109,7 @@ boundary
(0 4 7 3)
);
}
right1
{
type patch;

View File

@ -16,7 +16,7 @@ FoamFile
numberOfSubdomains 2;
method hierarchical;
method hierarchical;
coeffs
{

View File

@ -16,7 +16,7 @@ FoamFile
ddtSchemes
{
default Euler; //steadyState;
default Euler;
}
gradSchemes
@ -28,13 +28,6 @@ gradSchemes
divSchemes
{
default none;
div(phi,U) bounded Gauss limitedLinearV 1;
div(phi,k) bounded Gauss limitedLinear 1;
div(phi,epsilon) bounded Gauss limitedLinear 1;
div(phi,R) bounded Gauss limitedLinear 1;
div(R) Gauss linear;
div(phi,nuTilda) bounded Gauss limitedLinear 1;
div((nuEff*dev(T(grad(U))))) Gauss linear;
}
laplacianSchemes

View File

@ -44,29 +44,15 @@ solvers
SIMPLE
{
nNonOrthogonalCorrectors 0; //2;
nNonOrthogonalCorrectors 0;
}
PIMPLE
{
correctPhi yes;
nOuterCorrectors 2;
nCorrectors 1;
nNonOrthogonalCorrectors 0;
}
relaxationFactors
{
fields
{
p 0.3;
}
equations
{
U 0.7;
k 0.7;
omega 0.7;
}
}
// ************************************************************************* //

View File

@ -1,15 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1912 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
inlet
{
type fixedValue;
value $internalField;
}
// ************************************************************************* //

View File

@ -8,6 +8,5 @@
flowVelocity (1 0 0);
pressure 0;
#inputMode merge
// ************************************************************************* //

View File

@ -29,19 +29,14 @@ boundaryField
type overset;
}
wall
{
type zeroGradient;
}
inlet
"(wall|inlet)"
{
type zeroGradient;
}
outlet
{
type fixedValue; //calculated;
type fixedValue;
value $internalField;
}

View File

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

View File

@ -14,11 +14,11 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dynamicFvMesh dynamicOversetFvMesh;
dynamicFvMesh dynamicOversetFvMesh;
motionSolverLibs (fvMotionSolvers);
solver displacementLaplacian;
solver displacementLaplacian;
displacementLaplacianCoeffs
{

View File

@ -49,7 +49,7 @@ snGradSchemes
oversetInterpolation
{
method leastSquares;//inverseDistanc;
method leastSquares;
}

View File

@ -21,7 +21,6 @@ solvers
{
solver PCG;
preconditioner DIC;
tolerance 1e-06;
relTol 0;
maxIter 100;
@ -31,7 +30,7 @@ solvers
{
solver PBiCGStab;
preconditioner DILU;
tolerance 1e-6;
tolerance 1e-06;
relTol 0.01;
}
@ -39,7 +38,6 @@ solvers
{
$Phi;
}
}
@ -50,5 +48,4 @@ potentialFlow
}
// ************************************************************************* //

View File

@ -1,58 +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;
location "system";
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default Euler;
}
gradSchemes
{
default Gauss linear;
}
divSchemes
{
default none;
div(phi,U) Gauss limitedLinearV 1;
div(phi,k) Gauss upwind;
div(phi,epsilon) Gauss upwind;
div(phi,R) Gauss upwind;
div(R) Gauss linear;
div(phid,p) Gauss limitedLinear 1;
div(phi,K) Gauss limitedLinear 1;
div(phi,e) Gauss limitedLinear 1;
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
}
laplacianSchemes
{
default Gauss linear limited corrected 0.5;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default corrected;
}
// ************************************************************************* //

View File

@ -1,51 +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;
location "system";
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
p
{
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-12;
relTol 0;
}
rho
{
solver PCG;
preconditioner DIC;
tolerance 1e-08;
relTol 0;
}
"(U|e|k|epsilon|R)"
{
$p;
tolerance 1e-08;
relTol 0;
}
}
PISO
{
nCorrectors 2;
nNonOrthogonalCorrectors 2;
}
// ************************************************************************* //

View File

@ -47,7 +47,7 @@ runTimeModifiable true;
functions
{
#includeFunc MachNo
#includeFunc residuals
#includeFunc solverInfo
}
// ************************************************************************* //

View File

@ -12,7 +12,7 @@ Description
\*---------------------------------------------------------------------------*/
#includeEtc "caseDicts/postProcessing/numerical/residuals.cfg"
#includeEtc "caseDicts/postProcessing/numerical/solverInfo.cfg"
fields (p U e k omega);

View File

@ -47,7 +47,7 @@ runTimeModifiable true;
functions
{
#includeFunc MachNo
#includeFunc residuals
#includeFunc solverInfo
}
// ************************************************************************* //

View File

@ -12,7 +12,7 @@ Description
\*---------------------------------------------------------------------------*/
#includeEtc "caseDicts/postProcessing/numerical/residuals.cfg"
#includeEtc "caseDicts/postProcessing/numerical/solverInfo.cfg"
fields (p U e k omega);

View File

@ -47,7 +47,7 @@ runTimeModifiable true;
functions
{
#includeFunc residuals
#includeFunc solverInfo
#includeFunc streamlines
}

View File

@ -12,7 +12,7 @@ Description
\*---------------------------------------------------------------------------*/
#includeEtc "caseDicts/postProcessing/numerical/residuals.cfg"
#includeEtc "caseDicts/postProcessing/numerical/solverInfo.cfg"
writeControl writeTime;

View File

@ -46,7 +46,7 @@ runTimeModifiable true;
functions
{
#includeFunc residuals
#includeFunc solverInfo
#includeFunc singleGraph
#includeFunc probes
}

View File

@ -12,7 +12,7 @@ Description
\*---------------------------------------------------------------------------*/
#includeEtc "caseDicts/postProcessing/numerical/residuals.cfg"
#includeEtc "caseDicts/postProcessing/numerical/solverInfo.cfg"
fields (p sigma);

View File

@ -31,7 +31,7 @@ writeControl adjustable;
writeInterval 50;
purgeWrite 0;
purgeWrite 10;
writeFormat binary;

View File

@ -31,7 +31,7 @@ writeControl adjustable;
writeInterval 0.25;
purgeWrite 0;
purgeWrite 10;
writeFormat ascii;

View File

@ -31,7 +31,7 @@ writeControl runTime;
writeInterval 50;
purgeWrite 0;
purgeWrite 10;
writeFormat binary;

View File

@ -28,11 +28,11 @@ endTime 2;
deltaT 0.001;
writeControl adjustable;
writeInterval 0.02;
purgeWrite 0;
writeFormat binary;
writePrecision 6;
@ -48,7 +48,9 @@ runTimeModifiable yes;
adjustTimeStep yes;
maxCo 0.5;
maxAlphaCo 0.5;
maxDeltaT 1;
functions