ENH: yPlus: support disable of field writing (#2813)

- for simulations where the yPlus is needed for other purposes or
  just for obtaining information on the patches it can be useful
  to disable field writing and save disk space.

  The 'writeFields' flag (as per some other function objects)
  has been added control writing the yPlus volume field.

  If unspecified, the default value is 'true' so that the yPlus
  function object continues to work as before.
  However, this default may change to 'false' in the future to align
  with other function objects.

ENH: wallShearStress: support disable of field writing

- similar to yPlus, the write() method combines writing information
  and writing the fields. The 'writeFields' flag allows some
  separation of that logic.
This commit is contained in:
Mark Olesen
2023-06-23 13:05:27 +02:00
parent 7edacd3ab0
commit 2afd2320ce
22 changed files with 119 additions and 66 deletions

View File

@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2212 |
| \\ / O peration | Version: v2306 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
@ -50,6 +50,7 @@ functions
{
type yPlus;
libs ( fieldFunctionObjects );
writeFields yes;
writeControl writeTime;
}
}

View File

@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2212 |
| \\ / O peration | Version: v2306 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
@ -50,6 +50,7 @@ functions
{
type yPlus;
libs (fieldFunctionObjects);
writeFields yes;
writeControl writeTime;
}
}

View File

@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2212 |
| \\ / O peration | Version: v2306 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
@ -50,6 +50,7 @@ functions
{
type yPlus;
libs (fieldFunctionObjects);
writeFields yes;
writeControl writeTime;
}
}

View File

@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2212 |
| \\ / O peration | Version: v2306 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
@ -50,6 +50,7 @@ functions
{
type yPlus;
libs (fieldFunctionObjects);
writeFields yes;
writeControl writeTime;
}
}

View File

@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2212 |
| \\ / O peration | Version: v2306 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
@ -50,6 +50,7 @@ functions
{
type yPlus;
libs (fieldFunctionObjects);
writeFields yes;
writeControl writeTime;
}
}

View File

@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2212 |
| \\ / O peration | Version: v2306 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
@ -50,6 +50,7 @@ functions
// {
// type yPlus;
// libs ("libfieldFunctionObjects.so");
// writeFields yes;
// writeControl writeTime;
// }
}

View File

@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2212 |
| \\ / O peration | Version: v2306 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
@ -55,10 +55,11 @@ functions
{
type wallShearStress;
libs (fieldFunctionObjects);
log yes;
patches ( bottom top );
writePrecision 10;
writeFields yes;
writeToFile yes;
log yes;
executeControl timeStep;
executeInterval 1;
writeControl writeTime;

View File

@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2212 |
| \\ / O peration | Version: v2306 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
@ -95,6 +95,7 @@ functions
{
type yPlus;
libs (fieldFunctionObjects);
writeFields yes;
writeControl writeTime;
}
fieldAverage1

View File

@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2212 |
| \\ / O peration | Version: v2306 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
@ -12,6 +12,7 @@ wallShearStress
libs (fieldFunctionObjects);
enabled true;
writeFields yes;
writeControl writeTime;
patches ( bottomWall );
@ -23,9 +24,8 @@ yPlus
libs (fieldFunctionObjects);
enabled true;
writeFields yes;
writeControl writeTime;
patches ( bottomWall );
}

View File

@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2212 |
| \\ / O peration | Version: v2306 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
@ -127,6 +127,7 @@ functions
type yPlus;
libs (fieldFunctionObjects);
timeStart 10;
writeFields yes;
executeControl timeStep;
executeInterval 1;
writeControl writeTime;

View File

@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2212 |
| \\ / O peration | Version: v2306 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
@ -13,7 +13,8 @@ wallShearStress1
libs (fieldFunctionObjects);
// Optional entries
patches (fixedWalls);
patches (fixedWalls);
writeFields yes;
// Optional (inherited) entries
writePrecision 10;

View File

@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2212 |
| \\ / O peration | Version: v2306 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
@ -22,6 +22,8 @@ yPlus1
log true;
timeStart 0;
timeEnd 1000;
writeFields yes;
executeControl timeStep;
executeInterval 1;
writeControl writeTime;

View File

@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2212 |
| \\ / O peration | Version: v2306 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
@ -81,6 +81,7 @@ functions
{
type wallShearStress;
libs (fieldFunctionObjects);
writeFields yes;
writeControl writeTime;
patches (bump);
}
@ -89,8 +90,8 @@ functions
{
type yPlus;
libs (fieldFunctionObjects);
writeFields yes;
writeControl writeTime;
patches (bump);
}
cellCentres

View File

@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2212 |
| \\ / O peration | Version: v2306 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
@ -59,6 +59,7 @@ functions
type yPlus;
libs (fieldFunctionObjects);
patches (fixedWall);
writeFields yes;
writeControl writeTime;
}

View File

@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2212 |
| \\ / O peration | Version: v2306 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
@ -61,6 +61,7 @@ functions
{
type wallShearStress;
libs (fieldFunctionObjects);
writeFields yes;
patches ( bottom );
executeControl writeTime;
writeControl writeTime;
@ -70,6 +71,7 @@ functions
{
type yPlus;
libs (fieldFunctionObjects);
writeFields yes;
executeControl writeTime;
writeControl writeTime;
}

View File

@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2212 |
| \\ / O peration | Version: v2306 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
@ -61,6 +61,7 @@ functions
{
type wallShearStress;
libs (fieldFunctionObjects);
writeFields yes;
patches ( bottom );
executeControl writeTime;
writeControl writeTime;
@ -70,6 +71,7 @@ functions
{
type yPlus;
libs (fieldFunctionObjects);
writeFields yes;
executeControl writeTime;
writeControl writeTime;
}