Commit Graph

1063 Commits

Author SHA1 Message Date
295822daa6 ENH: cleanup/reorganize surfaceWriter and fileFormats
- remove unused surfaceWriter constructors, noexcept on methods

- relocate/rename writerCaching from surfMesh -> fileFormats

- changed from surfaceWriters::writerCaching to
  ensightOutput::writerCaching to permit reuse elsewhere

- relocate static output helpers to ensightCase

- refactor NAS coordinate writing
2022-02-10 19:28:51 +01:00
fb4fe06306 ENH: simplify component handling
- raw writer, components functionObject
2022-02-10 19:28:50 +01:00
6b99fea4e7 ENH: use nBoundaryFaces() in more places (less clutter, more clarity)
- noexcept for some methods
- add std:: qualifier to unique_ptr for additional clarity
2022-01-31 20:09:45 +01:00
bd10f67a13 ENH: avoid unneeded IOobjectList scan in sampledSurfaces
STYLE: replace findStrings with ListOps::found
2022-01-24 17:56:19 +01:00
1ea1b84f12 BUG: MapGeometricFields maps symmTensor instead of sphericalTensor (#2335)
STYLE: volFieldValue prints empty lines (#2334)

GIT: remove unused valveBank file (#2336)

STYLE: use value (not dimensioned value) in comfort warning (#2338)
2022-01-24 12:26:38 +01:00
d2961eec09 STYLE: avoid deprecation warnings for autoPtr set() method
- set() was silently deprecated in favour of reset() FEB-2018
  since the original additional check for overwriting an existing
  pointer was never used. The reset(...) name is more consistent
  with unique_ptr, tmp etc.

  Now emit deprecations for set().

- use direct test for autoPtr, tmp instead of valid() method.
  More consistent with unique_ptr etc.

STYLE: eliminate redundant ptr() use on cloned quantities
2022-01-24 12:26:38 +01:00
b874dc74b0 DEFEATURE: remove support for jplot (defunct) 2022-01-20 17:13:28 +01:00
2e81c80527 BUG: fix typo in comfort functionObject, minor style changes (#2325) 2022-01-18 16:42:11 +01:00
15c481204d ENH: comfort function object - added operative temperature. See #2325 2022-01-17 09:40:06 +00:00
99b2550af2 ENH: processorField: provision for mesh changes. Fixes #2319 2022-01-06 10:21:44 +00:00
79c23b0d23 BUG: energyTransport: delete own storage. Fixes #2302 2021-12-15 13:48:24 +00:00
734a3143dc ENH: Added new propellerInfo function object
Calculates propeller performance and wake field properties.

Controlled by executeControl:
- Propeller performance
  - Thrust coefficient, Kt
  - Torque coefficient, 10*Kq
  - Advance coefficient, J
  - Open water efficiency, etaO
  - Written to postProcessing/<name>/<time>/propellerPerformance.dat

Controlled by writeControl:
- Wake field text file
  - Wake: 1 - UzMean/URef
  - Velocity in cylindrical coordinates at xyz locations
  - Written to postProcessing/<name>/<time>/wake.dat
- Axial wake field text file
  - 1 - Uz/URef at r/R and angle
  - Written to postProcessing/<name>/<time>/axialWake.dat
- Velocity surface
  - Written to postProcessing/<name>/surfaces/time>/disk.<fileType>

Usage

    Example of function object specification:
    \verbatim
    propellerInfo1
    {
        type            propellerInfo;
        libs            (forces);
        writeControl    writeTime;

        patches         ("propeller.*");

        URef            5; // Function1 type; 'constant' form shown here
        rho             rhoInf; // incompressible
        rhoInf          1.2;

        // Optionally write propeller performance data
        writePropellerPerformance yes;

        // Propeller data:

        // Radius
        radius          0.1;

        rotationMode    specified; // specified | MRF

        // rotationMode = specified:
        origin          (0 -0.1 0);
        n               25.15;
        axis            (0 1 0);

        // Optional reference direction for angle (alpha) = 0
        alphaAxis       (1 0 0);

        //// rotationMode = mrf
        //// MRF             MRFZoneName;
        //// (origin, n and axis retrieved from MRF model)

        // Optionally write wake text files
        // Note: controlled by writeControl
        writeWakeFields yes;

        // Sample plane (disk) properties
        // Note: controlled by writeControl
        sampleDisk
        {
            surfaceWriter   vtk;
            r1              0.05;
            r2              0.2;
            nTheta          36;
            nRadial         10;
            interpolationScheme cellPoint;
            errorOnPointNotFound false;
        }
    }
    \endverbatim

    Where the entries comprise:
    \table
        Property        | Description                   | Required | Deflt value
        type            | Type name: propellerInfo      | yes      |
        log             | Write to standard output      | no       | no
        patches         | Patches included in the forces calculation | yes |
        p               | Pressure field name           | no       | p
        U               | Velocity field name           | no       | U
        rho             | Density field name            | no       | rho
        URef            | Reference velocity            | yes      |
        rotationMode    | Rotation mode (see below)     | yes      |
        origin          | Sample disk centre            | no*      |
        n               | Revolutions per second        | no*      |
        axis            | Propeller axis                | no*      |
        alphaAxis       | Axis that defines alpha=0 dir | no       |
        MRF             | Name of MRF zone              | no*      |
        originOffset    | Origin offset for MRF mode    | no       | (0 0 0)
        writePropellerPerformance| Write propeller performance text file | yes |
        writeWakeFields | Write wake field text files   | yes      |
        surfaceWriter   | Sample disk surface writer    | no*      |
        r1              | Sample disk inner radius      | no       | 0
        r2              | Sample disk outer radius      | no*      |
        nTheta          | Divisions in theta direction  | no*      |
        nRadial         | Divisions in radial direction | no*      |
        interpolationScheme | Sampling interpolation scheme | no* | cell
    \endtable

Note
- URef is a scalar Function1 type, i.e. supports constant, table, lookup values
- rotationMode is used to set the origin, axis and revolutions per second
  - if set to 'specified' all 3 entries are required
    - note: origin is the sample disk origin
  - if set to 'MRF' only the MRF entry is required
    - to move the sample disk away from the MRF origin, use the originOffset
- if writePropellerPerformance is set to on|true:
  - propellerPerformance text file will be written
- if writeWakeFields is set to on|true:
  - wake and axialWake text files will be written
- if the surfaceWriter entry is set, the sample disk surface will be written
  - extents set according to the r1 and r2 entries
  - discretised according to the nTheta and nRadial entries
2021-12-14 16:45:03 +00:00
923e8103dc INT: age/comfort: add new field function objects 2021-12-13 17:04:53 +00:00
7419b0bf98 ENH: heatTransferCoeff function object - use ::he(p,T) instead of ::he() 2021-12-13 14:37:47 +00:00
8d4ad0438d ENH: add exprField function object
- provides a simple means of defining/modifying fields. For example,

  ```
  <name1>
  {
      type    exprField;
      libs    (fieldFunctionObjects);
      field   pTotal;

      expression  "p + 0.5*(rho*magSqr(U))";
      dimensions  [ Pa ];
  }
  ```
  It is is also possible to modify an existing field.
  For example, to modify the previous one.
  ```
  <name2>
  {
      type    exprField;
      libs    (fieldFunctionObjects);
      field   pTotal;
      action  modify;

      // Static pressure only in these regions
      fieldMask
      #{
          (mag(pos()) < 0.05) && (pos().y() > 0)
       || cellZone(inlet)
      #};
      expression  "p";
  }
  ```

  To use as a simple post-process calculator, simply avoid storing the
  result and only generate on write:
  ```
  <name2>
  {
      store            false;
      executionControl none;
      writeControl     writeTime;
      ...
  }
  ```
2021-12-10 14:46:21 +00:00
65bc8d1140 STYLE: remove local version of momentum::scopedName
BUG: incorrect return for unscoped functionObject name
2021-12-07 15:48:19 +01:00
e5267bf81d ENH: sampledSetWriters - updated writing of particle tracks 2021-12-06 12:26:48 +01:00
e9054ec636 COMP: consistent FatalError/FatalIOError exit types
STYLE: hostName() is short name, don't need parameter
2021-12-03 15:32:37 +01:00
53e9c8eb5a ENH: forces|Coeffs FO - updated coordinate system 2021-12-03 13:48:33 +00:00
30a2fa4b27 BUG: dsmcFields fails with scoped field names 2021-11-26 11:22:36 +00:00
098aec4962 ENH: Function1's - added objectRegistry access 2021-11-26 11:22:36 +00:00
c233961d45 ENH: function objects - apply scoped name when registering objects 2021-11-26 11:22:36 +00:00
2c2310dc17 ENH: reference function object - retrieve reference using Function1
Note: previous behaviour to set the reference to a cell value can be recovered
by using the new 'sample' Function1
2021-11-26 11:22:36 +00:00
f459b11e24 STYLE: direct iteration over dictionary entries 2021-11-25 20:02:08 +01:00
55af2fc2c6 BUG: missing unit-normal weighting for surfaceFieldValue (fixes #2273)
- when using a vector field for weighting, it either used mag()
  or mag * area, but did not have a unit-normal projection version
2021-11-25 09:39:20 +01:00
aaeddba466 ENH: electricPotential: new solver function object 2021-11-24 18:05:58 +00:00
c45c649d15 ENH: portable scoping char for solver info names (#2224, #1675)
COMP: implicit cast scope name to C++-string in IOobject::scopedName

- handles 'const char*' and allows a check for an empty scope name

COMP: avoid potential name conflict in local function (Istream)

- reportedly some resolution issues (unconfirmed) with Fujitsu clang
2021-11-09 15:44:54 +01:00
ba8d6bddcc ENH: use singleton method for accessing runtime selection
STYLE: use alias to mark partialFaceAreaWeightAMI deprecation after v2012
2021-11-05 17:21:27 +01:00
5cba269072 ENH: proudmanAcousticPower - extended to operate on mean turbulence fields
Example using mean turbulence fields (mean fields should be available e.g. from
a fieldAverage function object)

    proudmanAcousticPower1
    {
        // Mandatory entries (unmodifiable)
        type        proudmanAcousticPower;
        libs        (fieldFunctionObjects);

        ...

        // Turbulence field names (if not retrieved from the turb model)
        k           kMean;
        epsilon     epsilonMean;
        omega       none; // omegaMean
    }
2021-11-05 13:06:31 +00:00
08588134fb ENH: report filter settings for distance surface (#1631) 2021-10-29 19:34:54 +02:00
f5058bca90 ENH: add static set/get dimensionSet::checking() method
- encapsulates toggling

STYLE: noexcept for some Time methods
2021-10-29 17:04:51 +02:00
40bed278ef DOC: pressure: correct the usage explanations for pName (#2221) 2021-10-04 15:25:49 +01:00
da1afe816a ENH: yPlus: add a warning to remind users about solver's postProcess option (#1846) 2021-09-14 15:21:09 +00:00
f3d0db18bb ENH: yPlus: add a flag to enable/disable wall-function predictions 2021-09-14 15:21:09 +00:00
ac6077b471 Merge remote-tracking branch 'origin/master' into develop 2021-09-07 10:14:29 +01:00
a870be6511 BUG: forces: ensure UName entry can be used (fixes #2093)
Previously, for basic incompressible and compressible simulations,
the "force" function object has not been using the user-specified "UName"
for the "devRhoReff" computation (affecting the tangential component),
but using the "U" of the latest available step. In contrast,
the user-specified "pName" has always been being used correctly.

This has been causing issues for users when they wish to use a specific
"UMean" field in various force and forceCoeff function object computations.
2021-08-05 12:40:47 +00:00
14b328d990 ENH: turbulenceFields: enable custom prefix for output fields 2021-08-04 11:36:53 +00:00
2e703543ff BUG: turbulenceFields: unset duplicate already-registered fields 2021-08-04 11:36:53 +00:00
be7d6b3afb DOC: turbulenceFields: improve header documentation 2021-08-04 11:36:53 +00:00
c6c575052f STYLE: turbulenceFields: apply more recent OpenFOAM-coding practices 2021-08-04 11:36:53 +00:00
99291a7ac5 BUG: turbulenceFields: use omega funcs of turbulence models (fixes #2132) 2021-08-04 11:36:53 +00:00
f482f74277 BUG: DMD: write snapshot0 at start times (fixes #2122) 2021-08-04 09:23:20 +00:00
9645e1adc2 BUG: Curle - added missing division by r. See #2169 2021-08-02 18:51:58 +01:00
2bb91e354b ENH: improve handling of database mapping for multi-world
- cleanup initialization (to avoid stealing tokens)
2021-07-28 16:07:31 +02:00
847b61d1f9 GIT: fix some merge and edit rubbish 2021-07-28 10:02:27 +02:00
b62306ddc5 ENH: Adding regionFaModels library to solvers 2021-07-16 16:38:06 +00:00
70c697fdcb BUG: momentum: boundary field mismatch on "empty" patches (fixes #2121) 2021-07-05 15:20:41 +02:00
e3796745ed CONFIG: Updated headers to v2106
Minor clean-up
2021-06-28 09:14:42 +01:00
03cc42414c BUG: Changing divDevRhoReff scheme for incompressible flows 2021-06-24 08:10:16 -07:00
6101272133 ENH: Adding subMesh option to momentumError and div FOs
1) Adding subMesh capabilities to momentumError and div FOs.
	- A subMesh is created from cellZones.
	- The operators (div, etc) are only calculated in the subMesh.

2) Optionally, halo cells can be added to the cellZones.

3) New helper class to handle the subMesh creation and field mapping.
2021-06-23 08:11:12 +00:00