Commit Graph

625 Commits

Author SHA1 Message Date
af6e5e75fd INT: S-A turbulence model - added enhanced DDES shielding function
Activated using the [optional] 'shielding' keyword having the options:

- standard: [default] same as v2406 and earlier
- ZDES2020: new option based on the reference:

    Deck, S., Renard, N. (2020).
    Towards an enhanced protection of attached boundary layers in hybrid
    RANS/LES methods.
    Journal of Computational Physics, 400, 108970.
    DOI:10.1016/j.jcp.2019.108970

Contribution from Marian Fuchs at UpstreamCFD GmbH

Integrated by Andrew Heather OpenCFD Ltd.
2024-12-19 16:17:51 +00:00
f321fc73ef ENH: wallFunctions: use cornerWeights linear. Fixes #3218. 2024-11-13 14:29:11 +00:00
c07997d816 Function1: added 'lookup' Function1 2024-05-30 10:25:24 +00:00
7f355ba343 STYLE: communication name "buffered" instead of "blocking"
- "buffered" corresponds to MPI_Bsend (buffered send),
  whereas the old name "blocking" is misleading since the
  regular MPI_Send also blocks until completion
  (ie, buffer can be reused).

ENH: IPstream::read() returns std::streamsize instead of label (#3152)

- previously returned a 'label' but std::streamsize is consistent with
  the input parameter and will help with later adjustments.

- use <label> instead of <int> for internal accounting of the message
  size, for consistency with the underyling List<char> buffers used.

- improve handling for corner case of IPstream receive with
  non-blocking, although this combination is not used anywhere
2024-04-29 10:19:40 +02:00
8a8b5db977 BUG: fvsPatchFields reading/writing the "value" entry (fixes #3144)
- manual revert for 44d0fbd594.

  Unless required for post-processing the "value" entry should not
  written if it is not mandatory for reading.

  This is especially crucial with an 'empty' patch field where the
  field (size 0) has a different size from the patch.

- the changes made align fvsPatchField behaviour with fvPatchField
2024-04-24 14:03:02 +02:00
c138f89c1f ENH: use tmp field factory methods [10] (#2723)
- src/TurbulenceModels
2024-02-21 14:31:40 +01:00
ac574a6ccb STYLE: use static call for regIOobject::store (#1507) 2024-02-20 16:56:22 +01:00
152eceeb56 Use factory Clone for patch fields 2024-01-23 11:22:19 +00:00
f485093d37 STYLE: use patch type instead of cloning list of the same 2024-01-17 14:45:31 +01:00
330bd16390 ENH: wall functions: swap the order of switch statements and for loops 2023-12-08 11:20:24 +00:00
612d9d3431 ENH: omegaWallFunction: change the scope of corner weights
The 'w' factor is factored out to improve consistency with the
'epsilonWallFunction', enhancing uniformity in these wall functions.
2023-12-08 11:20:24 +00:00
64aee19823 BUG: omegaWallFunction: add missing corner weight (fixes #3003) 2023-12-08 11:20:24 +00:00
a737240e13 BUG: wallFunctions: correct blending terms (fixes #2770) 2023-12-08 11:20:24 +00:00
fb26fcedfc STYLE: use getOrDefault instead of lookupOrDefault
- now mark methods with strict deprecation, to make it easier to find
  their use but without adding extra compilation noise for others

ENH: minor update for Enum methods and iterator

- add warnOnly (failsafe) option for readEntry and getOrDefault

- add good() method to Enum iterator (simliar to HashTable)

- replace unused/fragile Enum find() methods with iterator return
  that can be used more generally
2023-10-16 14:19:19 +02:00
945e3e41b1 ENH: more consistent use of good() or direct testing instead valid() 2023-07-27 16:52:03 +02:00
97459771ad ENH: more consistent handling/documentation of 'value' entry (#2703)
- for boundary conditions such as uniformFixed, uniformMixed etc the
  optional 'value' entry (optional) is used for the initial values and
  restarts.  Otherwise the various Function1 or PatchFunction1 entries
  are evaluated and used determine the boundary condition values.

  In most cases this is OK, but in some case such coded or expression
  entries with references to other fields it can be problematic since
  they may reference fields (eg, phi) that have not yet been created.

  For these cases the 'value' entry will be needed: documentation
  updated accordingly.

STYLE: eliminate some unneeded/unused declaration headers
2023-06-19 17:47:03 +02:00
60fc3906dc Merge remote-tracking branch 'origin/master' into develop 2023-06-12 13:59:19 +02:00
adc38d55ac ENH: coupled: enforce consistency. See #2783 2023-06-01 08:14:42 +00:00
59b1cf080e ENH: Tensor/SymmTensor: add devSymm and devTwoSymm funcs to avoid intermediates 2023-05-15 17:05:10 +01:00
2df90880d6 ENH: consistent use of name scoping for turbulence fields
- with IOobject::scopedName instead of literal ':' for future
  transitioning of separators
2023-05-09 19:30:57 +02:00
e967305ef2 STYLE: use calculatedType() and zeroGradientType() methods 2023-05-02 13:34:12 +02:00
09ce87135b DOC: kOmega: correct literature reference (fixes #2766) 2023-04-26 17:30:38 +01:00
ee39e3d276 STYLE: use explicit REGISTER option when storing fields 2023-04-25 13:45:08 +02:00
188e61af16 STYLE: use readValueEntry in BCs. Assign Zero for refValue/refGrad 2023-04-04 09:56:55 +02:00
87eed5e3b8 ENH: place more patch field attributes under template invariant Base
- attributes such as assignable(), coupled() etc

- common patchField types: calculatedType(), zeroGradientType() etc.
  This simplifies reference to these types without actually needing a
  typed patchField version.

ENH: add some basic patchField types to fieldTypes namespace

- allows more general use of the names

ENH: set extrapolated/calculated from patchInternalField directly

- avoids intermediate tmp
2023-04-03 13:33:56 +02:00
ed89d97627 BUG: LES: enable sigma model for compressible flows (fixes #2727) 2023-03-24 08:23:51 +00:00
25bc7d65f7 STYLE: prefer REGISTER/NO_REGISTER instead of true/false for IOobject
- self-documenting
2023-03-10 14:16:32 +00:00
b17422ef1a ENH: use readValueEntry, readMixedEntries for simpler program control 2023-03-08 15:30:04 +00:00
cdcbd05587 COMP: resolve clamp() float/double ambiguity (SPDP compilation)
- pass by value instead of reference, add functional casts in some
  places. Can still rely on integer promotions though.

  OK:   clamp(value, 2, 20)   ==> (float, int, int)
  OK:   clamp(value, scalar(2), scalar(20))  ==> (float, float, float)
  NOK:  clamp(value, 2.0, 20) ==> (float, double, int)
2023-02-27 15:41:25 +01:00
68bbd8f3a8 Merge remote-tracking branch 'origin/master' into develop 2023-02-21 10:21:31 +01:00
1cc72ea7e3 STYLE: use clamp/clamp_range instead of min(max(..., upper), lower) 2023-02-21 10:10:43 +01:00
ba6667a344 STYLE: use clamp/clamp_range instead of max(min(..., upper), lower) 2023-02-21 10:10:43 +01:00
70d526cd82 ENH: neg(x) instead of '1 - pos0(x)' for less-than 0 check
- fewer operations

ENH: replace 'neg(x)*a + pos0(x)*b' with 'lerp(a, b, pos0(x))'

- uses pos0 as a 0-1 selector. Fewer operations.
2023-02-21 10:05:27 +01:00
3d8a6a5433 ENH: use GeometricField clamp_min, clamp_max, clamp_range
- newer naming allows for less confusing code.
  Eg,
      max(lower)  ->  clamp_min(lower)
      min(upper)  ->  clamp_max(upper)

- prefer combined method, for few operations.
  Eg,
      max(lower) + min(upper) -> clamp_range(lower, upper)

  The updated naming also helps avoid some obvious coding errors.
  Eg,

     Re.min(1200.0);
     Re.max(18800.0);

  instead of
     Re.clamp_range(1200.0, 18800.0);

- can also use implicit conversion of zero_one to MinMax<Type> for
  this type of code:

      lambda_.clamp_range(zero_one{});
2023-02-21 10:05:26 +01:00
fe4688c27f ENH: patch fields writeValueEntry method (frequently used)
- add base-level readValueEntry, readMixedEntries methods
  that allow optional or mandatory reading.

STYLE: wording for patch fields comments
2023-02-20 11:13:43 +01:00
27a7ae2d1d ENH: use simpler lookupPatchField form 2023-02-13 20:08:48 +01:00
d597b3f959 STYLE: check iterator validity with good() instead of found()
- aligns better with other container checks
2023-02-10 17:12:48 +01:00
e790e1c4ba ENH: wallDistAddressing: wall distance which stores addressing. 2023-02-06 14:38:41 +00:00
e62b031f26 BUG: Casson coefficients not re-read (fixes #2681) 2023-01-22 18:28:00 +01:00
2d4ecc4326 GIT: remove unnecessary PatchField Fwd headers
- reduces clutter. In some cases the Fwd typedefs were also incorrect

STYLE: combine Scalar specialisations into corresponding PatchFields.C

- reduces clutter, simplifies future adjustments
2023-01-12 21:19:12 +01:00
c273ee4697 Merge remote-tracking branch 'origin/master' into develop 2022-12-20 13:31:41 +00:00
e90092ad91 INT: continuation of 7441e18475 for S-A DES models 2022-12-12 16:24:06 +00:00
115bf529ad BUG: vanDriestDelta: use 1 if not specified. See #2648 2022-12-12 14:55:43 +00:00
8f63fd5230 INT: refactored kOmegaSST sigma extensions to restore previous v2206 behaviour 2022-12-09 11:51:57 +00:00
7441e18475 INT: S-A RAS - added missing correctNut following recent refactoring 2022-12-09 11:51:57 +00:00
3e260b84db ENH: vanDriest: change calcInterval to updateInterval 2022-12-07 16:15:53 +00:00
e401e8f132 COMP: RASModelBase adjustments
- naming more consistent with DESModelBase etc for 'isA' dynamic
  casting
2022-11-25 12:48:45 +01:00
13606d4e09 ENH: RASModelBaseName: new type name for RANS models 2022-11-23 13:41:20 +00:00
a4d235af6b BUG: porousBafflePressure: read fixedJump entries - apply under-relaxation (fixes #2626) 2022-11-09 14:18:06 +00:00
3a4537abc9 STYLE: various simplifications and changes
BUG: DEShybrid: reintroduce e28bed59
2022-11-07 10:59:18 +00:00