Commit Graph

701 Commits

Author SHA1 Message Date
30fe28ee8e ENH: Added new function object to compute the Proudman acoustic power
Calculates the acoustic power due to the volume of isotropic turbulence
using Proudman's formula

The acoustic power \f$ P_A \f$ [W/m3] in terms of turbulence \f$ k \f$
and \f$ \epsilon \f$ is given as:

    \f[
        P_A = alpha_\epsilon \rho \epsilon M_t^5
    \f]

where \f$ alpha_\epsilon \f$ is a constant (0.1) and

    \f[
        M_t = \frac{\sqrt{2 k}}{a_0}
    \f]

with \f$ a_0 \f$ the speed of sound.  The acoustic power is also output in
dB using:

    \f[
        L_P = 10 \log \frac{P_A}{P_ref}
    \f]

where \f$ P_ref \f$ is a constant (1e-12 W/m3)

Usage
    Example of function object specification to calculate the Proudman acoustic
    power

    proudmanAcousticPower1
    {
        type        proudmanAcousticPower;
        libs        ("libfieldFunctionObjects.so");
        ...

        // Required additional entries for incompressible calculations
        rhoInf      1.225;
        aRef        340;
    }

    Where the entries comprise:
        Property     | Description                 | Required   | Default value
        type         | type name: proudmanAcousticPower         | yes        |
        rhoInf       | Freestream density for incompressible cases  | no |
        aRef         | Reference spped of sound for incompressible cases | no |
        alphaEps     | Model coefficient           | no         | 0.1

Note
- The freestream density and reference speed of sound are only necessary
  when a thermodynamics package is unavailable, typically for incompressible
  cases.
2019-12-11 21:37:39 +00:00
a8ab9b8796 CONFIG: prefer use of ParaView_MESA_DIR in runTimePostProcessing
- when using VTK from ParaView sources it can better to tag them as
  such, but simultaneously not mask the ParaView with hardware
  rendering.

  The additional ParaView_MESA_DIR variable allows this.
  The balance of library and path setup is unaffected by this.

DOC: update doc/BuildIssues
2019-12-12 14:29:59 +01:00
6709f3ef6f ENH: Added new limitFields function object
Limits fields to user-specified min and max bounds

Usage
Example of function object specification:

    limitFields1
    {
        type        limitFields;
        libs        ("libfieldFunctionObjects.so");
        ...
        fields      (U);
        limit       max;
        max         100;
    }

Where the entries comprise:
    Property     | Description                 | Required | Default
    type         | type name: limitFields      | yes |
    fields       | list of fields to process   | yes |
    limit        | bound to limit - see below  | yes |
    min          | min limit value             | partly |
    max          | max limit value             | partly |

The "limit" entry can take the value:
- min : specify a minimum value
- max : specify a maximum value
- both : specify a minimum value and a maximum value
2019-12-10 11:04:20 +00:00
31aad2159f STYLE: writeFile - renamed writeTime to writeCurrentTime to avoid conflicts 2019-09-09 09:19:38 +01:00
5d7d24df94 GIT: Housekeeping 2019-12-06 17:43:08 +00:00
98467036b3 STYLE: regularize quoting and exit on failed 'cd' 2019-11-13 13:19:16 +01:00
7e9a417fca STYLE: adjust member ordering to improve packing (of bools) 2019-11-12 16:57:45 +01:00
3238a63a10 DOC: add description text for AMIWeights, fieldsExpression 2019-11-12 14:26:41 +01:00
7c1190f0b1 ENH: rationalize some string methods.
- silently deprecate 'startsWith', 'endsWith' methods
  (added in 2016: 2b14360662), in favour of
  'starts_with', 'ends_with' methods, corresponding to C++20 and
  allowing us to cull then in a few years.

- handle single character versions of starts_with, ends_with.

- add single character version of removeEnd and silently deprecate
  removeTrailing which did the same thing.

- drop the const versions of removeRepeated, removeTrailing.
  Unused and with potential confusion.

STYLE: use shrink_to_fit(), erase()
2019-11-11 18:50:00 +01:00
186b0350f9 ENH: Pressure function object - added optional inclusion of hydrostatic pressure
Example - create p-rgh from p:

    pressure-p-rgh
    {
        type            pressure;
        libs            (fieldFunctionObjects);
        writeControl    writeTime;
        mode            static;
        rho             rhoInf;
        rhoInf          1;
        hydrostaticMode subtract;
        g               (0 -9.81 0);
        hRef            0;
    }

- the hydrostaticMode entry is optional - setting is shown during construction
- g and/or hRef values are retrieved from the database if not specified
2019-10-22 15:54:13 +01:00
671519d2d9 ENH: Function objects - runTimePostProcessing - updated and exposed culling options 2019-11-01 11:03:30 +00:00
52d2643994 BUG: surfaceFieldValue interpolate on sampled surface fails (fixes #1488) 2019-11-11 08:54:05 +01:00
e6dfb39c66 STYLE: remove unnecessary stdout, stderr /dev/null redirects
- no stderr redirect needed:
    * 'command -v'

- no stdout/stderr redirect needed:
    * 'rm -f'

STYLE: consistent spacing after redirects
2019-11-06 10:44:36 +01:00
ec7e3c88e4 ENH: test for WM_PROJECT_DIR being set/unset in scripts 2019-11-06 09:18:51 +01:00
e5916fd9ba ENH: use findMinMax instead of findMin, findMax separately 2019-11-05 13:10:23 +01:00
b0c88dff58 ENH: treat self-assignment as no-op instead of a Fatal (#1473)
- this can help if using std algorithms that return a const reference
  such as std::min() does.
2019-11-05 11:10:49 +01:00
fdf8d10ab4 Merge commit 'e9219558d7' into develop-v1906 2019-12-05 11:47:19 +00:00
e9219558d7 GIT: Header file updates 2019-10-31 14:48:44 +00:00
fb7698f6a1 ENH: streamLine: add bidirectional tracking. Fixes #1466. 2019-10-23 16:52:27 +01:00
848a63572a BUG: nearWallFields: incorrect sampling location. Fixes #1464.
It was tracking to find the wanted sampling location. This tracking
was using the offsetted seed point instead of the offsetted wanted
sampling point.
2019-10-23 16:26:22 +01:00
f75e01c8c2 CONFIG: adjustments for CMake files
- drop plugin support for Qt4 (old paraview)

- handle upcoming changes in VTK version naming in CMake files
  * VTK_MAJOR_VERSION becomes VTK_VERSION_MAJOR etc.
2019-10-04 11:48:03 +02:00
38b53e5346 STYLE: use default destructor in header definitions 2019-09-24 12:14:36 +02:00
35d77aaec0 ENH: mapFields FO - mapping now on call to execute 2019-09-12 10:40:19 +01:00
b86f9944d7 ENH: handle some miscellaneous mixed input types (#1378) 2019-08-06 16:57:29 +02:00
1d79c0452c ENH: additional contiguous traits (#1378)
- change contiguous from a series of global functions to separate
  templated traits classes:

    - is_contiguous
    - is_contiguous_label
    - is_contiguous_scalar

  The static constexpr 'value' and a constexpr conversion operator
  allow use in template expressions.  The change also makes it much
  easier to define general traits and to inherit from them.

  The is_contiguous_label and is_contiguous_scalar are special traits
  for handling data of homogeneous components of the respective types.
2019-07-29 11:36:30 +02:00
037be8dbb0 STYLE: use default constructors/destructors for base cloud classes
- use cloud::defaultName instead of "defaultCloud" string literal
2019-08-02 17:22:00 +02:00
e90eafcf18 ENH: rationalize cloud method inheritance
- a top-level cloud::nParcels() virtual, which is overloaded by the
  first level of Cloud inheritance. This permits quick determination of
  cloud sizes, even when retrieved from registry with the base level.
  Eg,
      cloud* cldPtr = mesh.cfindObject<cloud>("myCloud");
      label nParcels = (cldPtr ? cldPtr->nParcels() : 0);

- make writeLagrangianPositions on by default unless explicitly
  disabled in the InfoSwitches.

  Flag output errors (where neither coordinates nor positions are
  written) with Fatal.

- additional IOField helper functions in cloud

STYLE: simplify iterator inheritance
2019-08-02 17:20:18 +02:00
492c30c34e ENH: mapFields FO - read schemes and cache mapped fields by default. See #1390 2019-08-05 09:48:25 +01:00
b0d32ce1b4 STYLE: use 'operator>>' instead of readLabel and readScalar 2019-07-30 14:52:46 +02:00
743311df7d STYLE: consistent access for particle sizeofFields, particle iterators 2019-07-30 14:22:56 +02:00
f94be1bebb ENH: use FatalIOErrorInLookup instead of FatalErrorInLookup 2019-07-16 10:26:51 +02:00
fb09f56aba ENH: use FatalErrorInLookup macros (#1362) 2019-07-12 18:00:00 +02:00
1d86fc4f6b ENH: add single-parameter sortedOrder() function 2019-07-17 11:08:40 +02:00
4380349f45 ENH: add vtk::writeIdentity() and optional repeat value for vtk::write()
- An identity is often useful when generating connectivity and offset
  information.

- The optional repeat value for vtk::write() allows it to also be used
  as a fill method.
2019-07-11 13:42:02 +02:00
5bd7c4b5bb BUG: pressure FO - corrected handling of enumeration in calcPressure function. See #1356 2019-07-09 11:44:52 +01:00
d6d95c33bc ENH: return scalar for surface uniformity (#1363) 2019-07-08 19:21:40 +02:00
7e935bd191 COMP: avoid ref to synchronization for non-MPI VTK build (fixes #1349) 2019-06-27 14:59:14 +02:00
43febddda1 BUG: Removed Debug statements 2019-06-26 11:53:41 +01:00
51bb4e0037 STYLE: remove trailing spaces 2019-06-26 11:36:49 +02:00
53cf9e2182 STYLE: pressure FO - provided feedback re: which calculation mode is applied 2019-06-24 12:11:53 +01:00
5215aab719 ENH: averageCondition - result now 'false' if no fields were processed 2019-06-20 12:10:12 +01:00
67c8b07021 ENH: derivedFields: fields created without timeName. Fixes #1345.
Please enter the commit message for your changes. Lines starting
2019-06-20 09:35:19 +01:00
7354af5dff STYLE: Updated FO output 2019-06-19 20:53:24 +01:00
32bd3800b1 ENH: Improved backwards compatibility for pressure FO 2019-06-19 15:02:58 +01:00
3f955cac07 STYLE: Updated header documentation 2019-06-19 11:32:53 +01:00
c901f9bc7f ENH: runTimeControl - updated time for maxDuration and minTimeStep conditions 2019-06-19 09:57:11 +01:00
12afb3d34a ENH: Refactored pressure function object 2019-06-19 09:00:14 +01:00
e184e1e72c ENH: Updated function object reading and output messages 2019-06-18 13:55:16 +01:00
fd6af75475 CONFIG: disable runtimePostProcessing titleHack by default
- a leftover from much older VTK versions that had poor handling of
  the scalar bar text.
2019-06-14 12:27:59 +02:00
aa1a0a85fa ENH: Forces function object - updated header documentation 2019-06-14 11:38:06 +01:00