ENH: add fieldLevel handling for surface writers (#2382)

- this can be used to apply a uniform field level to remove from
  a sampled field. For example,

      fieldLevel
      {
          "p.*"   1e5;        // Absolute -> gauge [Pa]
          T       273.15;     // [K] -> [C]
          U       #eval{ 10/sqrt(3) };  // Uniform mag(U)=10
      }

  After the fieldLevel has been removed, any fieldScale is applied.
  For example

      fieldScale
      {
          "p.*"   0.01;       // [Pa] -> [mbar]
      }

  The fieldLevel for vector and tensor fields may still need some
  further refinement.
This commit is contained in:
Mark Olesen
2022-02-28 13:56:42 +01:00
parent cb10045094
commit 1a55829ef9
25 changed files with 245 additions and 220 deletions

View File

@ -10,7 +10,7 @@ debug
writeControl timeStep;
writeInterval 1;
fields (rho U);
fields (p rho U);
sampleScheme cellPoint;
interpolationScheme cellPoint;
@ -24,6 +24,11 @@ debug
{
collateTimes true;
// collateTimes false;
fieldLevel
{
"p.*" 1e5;
U 0;
}
}
raw
{