TUT: nonOrthogonalChannel/skewnessCavity: migrate under verificationAndValidation

TUT: nonOrthogonalChannel: refactor productionRate computation (fixes #2285)
This commit is contained in:
Kutalmis Bercin
2021-12-13 14:10:06 +00:00
committed by Andrew Heather
parent 4c2728a45c
commit beea7ba62f
316 changed files with 25 additions and 38 deletions

View File

@ -0,0 +1 @@
../../common/system/controlDict

View File

@ -0,0 +1 @@
../../common/system/cuttingPlane

View File

@ -0,0 +1 @@
../../common/system/decomposeParDict

View File

@ -0,0 +1,48 @@
/*--------------------------------*- 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 fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default none;
}
gradSchemes
{
default Gauss linear;
}
divSchemes
{
default none;
}
laplacianSchemes
{
default none;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default none;
}
// ************************************************************************* //

View File

@ -0,0 +1 @@
../../common/system/fvSolution

View File

@ -0,0 +1 @@
../../common/system/runtimePostProcessing

View File

@ -0,0 +1 @@
../../common/system/controlDict

View File

@ -0,0 +1 @@
../../common/system/cuttingPlane

View File

@ -0,0 +1 @@
../../common/system/decomposeParDict

View File

@ -0,0 +1,48 @@
/*--------------------------------*- 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 fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default none;
}
gradSchemes
{
default Gauss pointLinear;
}
divSchemes
{
default none;
}
laplacianSchemes
{
default none;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default none;
}
// ************************************************************************* //

View File

@ -0,0 +1 @@
../../common/system/fvSolution

View File

@ -0,0 +1 @@
../../common/system/runtimePostProcessing

View File

@ -0,0 +1,48 @@
/*--------------------------------*- 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 fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default none;
}
gradSchemes
{
default cellLimited Gauss linear 1;
}
divSchemes
{
default none;
}
laplacianSchemes
{
default none;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default none;
}
// ************************************************************************* //

View File

@ -0,0 +1 @@
../../common/system/runtimePostProcessing

View File

@ -0,0 +1,48 @@
/*--------------------------------*- 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 fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default none;
}
gradSchemes
{
default cellLimited Gauss pointLinear 1;
}
divSchemes
{
default none;
}
laplacianSchemes
{
default none;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default none;
}
// ************************************************************************* //

View File

@ -0,0 +1,48 @@
/*--------------------------------*- 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 fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default none;
}
gradSchemes
{
default cellLimited iterativeGauss linear 5 1;
}
divSchemes
{
default none;
}
laplacianSchemes
{
default none;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default none;
}
// ************************************************************************* //

View File

@ -0,0 +1,48 @@
/*--------------------------------*- 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 fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default none;
}
gradSchemes
{
default cellLimited leastSquares 1;
}
divSchemes
{
default none;
}
laplacianSchemes
{
default none;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default none;
}
// ************************************************************************* //

View File

@ -0,0 +1 @@
../../common/system/runtimePostProcessing

View File

@ -0,0 +1,48 @@
/*--------------------------------*- 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 fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default none;
}
gradSchemes
{
default cellMDLimited Gauss linear 1;
}
divSchemes
{
default none;
}
laplacianSchemes
{
default none;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default none;
}
// ************************************************************************* //

View File

@ -0,0 +1,48 @@
/*--------------------------------*- 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 fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default none;
}
gradSchemes
{
default cellMDLimited Gauss pointLinear 1;
}
divSchemes
{
default none;
}
laplacianSchemes
{
default none;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default none;
}
// ************************************************************************* //

View File

@ -0,0 +1,48 @@
/*--------------------------------*- 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 fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default none;
}
gradSchemes
{
default cellMDLimited iterativeGauss linear 5 1;
}
divSchemes
{
default none;
}
laplacianSchemes
{
default none;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default none;
}
// ************************************************************************* //

View File

@ -0,0 +1,48 @@
/*--------------------------------*- 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 fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default none;
}
gradSchemes
{
default cellMDLimited leastSquares 1;
}
divSchemes
{
default none;
}
laplacianSchemes
{
default none;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default none;
}
// ************************************************************************* //

View File

@ -0,0 +1,20 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
DT 0;
// ************************************************************************* //

View File

@ -0,0 +1,172 @@
/*--------------------------------*- 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 controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application scalarTransportFoam;
startFrom startTime;
startTime 0;
stopAt endTime;
endTime 100;
deltaT 0.005;
writeControl timeStep;
writeInterval 100;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable true;
functions
{
coded1
{
name calcGrad;
type coded;
libs (utilityFunctionObjects);
writeControl timeStep;
codeInclude
#{
#include "emptyFvPatchField.H"
#};
codeExecute
#{
const volVectorField& Cc = mesh().C();
volVectorField Cc2
(
IOobject
(
"Cc",
mesh().time().timeName(),
mesh(),
IOobject::NO_READ
),
mesh(),
dimensionedVector(dimless/dimLength, Zero),
calculatedFvPatchField<vector>::typeName
);
Cc2.primitiveFieldRef() = Cc.primitiveField();
auto& bf = Cc2.boundaryFieldRef();
forAll(bf, patchi)
{
fvPatchVectorField& pf = bf[patchi];
if (!isA<emptyFvPatchField<vector>>(pf))
{
pf == Cc.boundaryField()[patchi];
}
}
tmp<volTensorField> gradC = fvc::grad(Cc2);
const word gradCName(gradC.cref().name());
gradC->write();
volScalarField error
(
IOobject
(
"error",
mesh().time().timeName(),
mesh(),
IOobject::NO_READ
),
mesh(),
dimensionedScalar(dimless, Zero),
calculatedFvPatchField<scalar>::typeName
);
volScalarField magError
(
IOobject
(
"magError",
mesh().time().timeName(),
mesh(),
IOobject::NO_READ
),
mesh(),
dimensionedScalar(dimless, Zero),
calculatedFvPatchField<scalar>::typeName
);
const dimensionedScalar root2(dimless/sqr(dimLength), Foam::sqrt(2.0));
error = scalar(100)*(mag(gradC) - root2)/root2;
error.write();
magError = mag(error);
magError.write();
#};
}
readFields1
{
type readFields;
libs (fieldFunctionObjects);
fields ( error magError );
}
minMax1
{
type fieldMinMax;
libs (fieldFunctionObjects);
fields ( error magError );
}
volFieldAverage
{
type volFieldValue;
libs (fieldFunctionObjects);
fields ( error magError );
operation average;
regionType all;
writeFields false;
}
volFieldCoV
{
type volFieldValue;
libs (fieldFunctionObjects);
fields ( error magError );
operation CoV;
regionType all;
writeFields false;
}
#include "cuttingPlane"
// #include "runtimePostProcessing"
}
// ************************************************************************* //

View File

@ -0,0 +1,59 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
cuttingPlaneError
{
type surfaces;
libs (sampling);
surfaceFormat vtk;
fields ( error );
interpolationScheme cell;
surfaces
(
zNormal
{
type cuttingPlane;
planeType pointAndNormal;
pointAndNormalDict
{
point (0 0.05 -0.05);
normal (0 0 1);
}
interpolate no;
}
);
}
cuttingPlaneMagError
{
type surfaces;
libs (sampling);
surfaceFormat vtk;
fields ( magError );
interpolationScheme cell;
surfaces
(
zNormal
{
type cuttingPlane;
planeType pointAndNormal;
pointAndNormalDict
{
point (0 0.05 -0.05);
normal (0 0 1);
}
interpolate no;
}
);
}
// ************************************************************************* //

View File

@ -0,0 +1,22 @@
/*--------------------------------*- 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 decomposeParDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
numberOfSubdomains 2;
method scotch;
// ************************************************************************* //

View File

@ -0,0 +1,34 @@
/*--------------------------------*- 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 fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
T
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-10;
relTol 0;
}
}
SIMPLE
{
nNonOrthogonalCorrectors 0;
}
// ************************************************************************* //

View File

@ -0,0 +1,82 @@
// -*- C++ -*-
postPro1
{
type runTimePostProcessing;
functionObjectLibs (runTimePostProcessing);
outputControl outputTime;
output
{
name image;
width 1000;
height 1000;
}
camera
{
// If camera is moving, optionally provide start and end times
// startPosition 0.2;
// endPosition 0.75;
// Total number of frames to generate
nFrameTotal 1;
// Parallel projection flag
parallelProjection yes;
// Camera mode:
// - flightPath: define flight path
// - static: fixed position
mode static;
staticCoeffs
{
clipBox (0.1 0.1 0)(0.9 0.9 0.1); // optional
focalPoint (0 0.05 0);
up (0 1 0);
lookDir (0 0 -1);
}
}
// Default colours
// - If select to colourBy colour, these values are used unless
// they are locally overriden
colours
{
background (1 1 1);
text (0 0 0);
edge (0 0 0);
surface (0.5 0.5 0.5);
line (1 0 0);
}
// Line data
lines
{}
// Surface data
surfaces
{
plane1
{
type functionObject;
functionObject cuttingPlane;
colourMap blueWhiteRed;
representation surfaceWithEdges;
maxGlyphLength 0.1;
visible yes;
featureEdges yes;
colourBy field;
fieldName error-grad(Cc);
range (-10 10);
opacity 1;
scalarBar
{
visible no;
}
}
}
// Text data
text
{}
}
// ************************************************************************* //

View File

@ -0,0 +1,48 @@
/*--------------------------------*- 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 fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default none;
}
gradSchemes
{
default faceLimited Gauss linear 1;
}
divSchemes
{
default none;
}
laplacianSchemes
{
default none;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default none;
}
// ************************************************************************* //

View File

@ -0,0 +1 @@
../../common/system/runtimePostProcessing

View File

@ -0,0 +1,48 @@
/*--------------------------------*- 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 fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default none;
}
gradSchemes
{
default faceLimited Gauss pointLinear 1;
}
divSchemes
{
default none;
}
laplacianSchemes
{
default none;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default none;
}
// ************************************************************************* //

Some files were not shown because too many files have changed in this diff Show More