Commit Graph

1187 Commits

Author SHA1 Message Date
3a78203863 DEFEATURE: remove mixed precision support for streaming particles (#3412)
- since direct streaming of particles is only ever used internally and
  never for disk I/O (which is collated by property), mixed precision
  will never occur when constructing a particle from a stream.

  Due to padding issues, the previous code would have been faulty anyhow.
  Thus remove that code and replace with a simple sanity check.
2025-08-19 10:56:23 +00:00
53af711c6a ENH: simplify assign zero for Dimensioned and Geometric fields (#3402)
- regular or forced assignment from `zero` does not need dimension
  checking:

    Old:  U = dimensionedVector(U.dimensions(), Zero);
    New:  U = Zero;

  this eliminates a fair bit of clutter and simplifies new coding
  without losing general dimension checking capabilities.
2025-07-30 09:29:53 +02:00
4e513cec18 ENH: DimensionedField, GeometricField enhancements and style changes
- constCast() convenience methods.
  This simplies coding in places, especially in solvers

- inline some methods within headers, for better overview/maintenance

- only set DimensionedField default value on construct if not read

- storeOldTimes() does not require const_cast
2025-05-21 14:19:36 +02:00
59f3c55871 STYLE: avoid implicit cast of UList to List 2025-04-09 15:58:30 +02:00
0be19b7fae COMP: namespace qualify min/max functions (#3348)
FIX: missing patch face index writeFields (#3347)
2025-04-09 15:58:30 +02:00
01727c84f1 ENH: use gMinMax() instead of separate gMin(), gMax()
- for reciprocal values, gMinMax() first and then calculate the
  reciprocal, which avoids creating temporaries

STYLE: prefer MinMax to separate min/max accounting

COMP: namespace qualify min/max for deltaT, CourantNo, etc (#3348)
2025-04-09 15:58:30 +02:00
6c20df2808 ENH: additional in-place clamp_min(), clamp_max() field methods
- these already existed for a single value, but now handle the full
  field. This is more memory-friendly.

      fld.clamp_min(lower);  OLD: fld = max(fld, lower);
      fld.clamp_max(upper);  OLD: fld = min(fld, upper);
2025-04-09 15:58:29 +02:00
b9b0d1b3aa STYLE: use weighted average/sum in a few places
- minor adjustments to some BCs construction:
  * ensure origin/axis are zero-initialized
  * use dictionary get<> instead of lookup
2025-03-20 11:14:39 +01:00
7904a2734f BUG: twoPhaseEuler: incorrect phase. Fixes #3295. 2025-01-06 11:30:02 +00:00
782f22feb8 ENH: continuity: avoid excess evaluations. See #3225 2024-09-18 14:01:26 +01:00
d8d3e34d5c COMP: fix dangling references (gcc13+: -Wdangling-reference) 2024-06-26 16:53:05 +02:00
2d52ee13b1 ENH: icoReactingMultiphaseInterFoam - added frozenFlow option. Fixes #3128 2024-05-31 14:31:00 +01:00
cd8bc891f0 ENH: fvMatrix, faMatrix: replace raw pointers with unique_ptr (#3107) 2024-03-05 18:13:59 +00:00
8b73d06898 ENH: use tmp field factory methods [12] (#2723)
- applications
2024-02-21 14:31:40 +01:00
182afc27ba STYLE: noexcept for nullObject functions
STYLE: use nullObject for return values of NotImplemented

STYLE: shallowCopy(nullptr) shortcut
2024-01-25 16:03:09 +01:00
152eceeb56 Use factory Clone for patch fields 2024-01-23 11:22:19 +00:00
bb16c493b7 Code adjustments to avoid gcc-13 warnings about dangling references 2024-01-11 10:08:45 +00:00
987dbe4589 ENH: use factory Clone method for handling member clone() methods
- reduces code clutter, simplifies modification for new types.
  Handled classes:

    Function1, PatchFunction1, coordinateRotation, coordinateSystem,
    particle, liquidProperties, solidProperties
2024-01-09 11:56:45 +00:00
c9a9309b8c ENH: simplify construction of zero-sized Clouds
- use Foam::zero as a dispatch tag

FIX: return moleculeCloud::constProps() List by reference not copy

STYLE: range-for when iterating cloud parcels

STYLE: more consistent typedefs / declarations for Clouds
2023-12-15 16:17:15 +01:00
ef44df91f2 ENH: support direct lookup of solver controls
OLD:
        pEqn.solve(mesh.solver(p.select(piso.finalInnerIter())));
        pEqn.solve(mesh.solver("Yi"));

    NEW:
        pEqn.solve(p.select(piso.finalInnerIter()));
        pEqn.solve("Yi");
2023-12-07 17:42:24 +01:00
db16d80840 ENH: use objectRegistry/IOobjectList sorted instead of lookupClass
- in most cases a parallel-consistent order is required.
  Even when the order is not important, it will generally require
  fewer allocations to create a UPtrList of entries instead of a
  HashTable or even a wordList.
2023-07-31 20:11:32 +02:00
ed314b2740 ENH: use sorted order for patch IDs in fieldFunctionObjects (#2819)
- replaces labelHashSet with a sorted labelList to ensure that patches
  will be processed in consistent order in parallel
2023-07-31 20:11:32 +02:00
d5a0eaeeee STYLE: changes to Time and TimeState
- update TimeState access methods

- use writeTime() instead of old method name outputTime()

- use deltaTValue() instead of deltaT().value()
  to avoids pointless construct of intermediate
2023-07-04 17:25:25 +02:00
e967305ef2 STYLE: use calculatedType() and zeroGradientType() methods 2023-05-02 13:34:12 +02:00
25bc7d65f7 STYLE: prefer REGISTER/NO_REGISTER instead of true/false for IOobject
- self-documenting
2023-03-10 14:16:32 +00: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
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
35dae3fc3b STYLE: simpler mass-flow/volume-flow dimension check
* (dimMass/dimTime)    instead of  (dimDensity*dimVelocity*dimArea)
* (dimVolume/dimTime)  instead of  (dimVelocity*dimArea)
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
eb8b51b475 ENH: use back(), pop_back() instead remove()
- adjust looping to resemble LIFO pattern

STYLE: adjust some string includes
2023-01-27 09:50:46 +01:00
2a406bbb25 ENH: overset: various improvements in the framework
The improvements include:

- Allowing overset patches to be displaced outside background domain.
  - The approach does not support overlapping of multiple inset meshes
    on top of background domain.
- Allowing fringe faces to walk away from hole cells in background domain.
  - The approach was not extensibly tested with overlapping patches.
- Improving mass conservation.
- Various experimental entries are removed: massFluxInterpolation, ddtCorr.
- New entries:
  - oversetAdjustPhi: adds a flux correction outside the pressure equation.
  - massCorrection: adds an implicit correction.
2022-11-11 10:19:47 +00:00
70208a7399 ENH: use returnReduceAnd(), returnReduceOr() functions
DOC: document which MPI send/recv are associated with commType
2022-11-08 16:48:08 +00:00
716d330547 COMP: link finiteArea whenever regionFaModel is used 2022-09-22 11:50:50 +02:00
c4d18e97a3 ENH: additional methods for OBJstream
- write point fields
- writeLine (takes two points)
- writeFace (takes list of face loop points)
2022-07-19 11:17:51 +02:00
3d892ace29 STYLE: set readOpt(..), writeOpt(..) by parameter, not by assignment
STYLE: qualify format/version/compression with IOstreamOption not IOstream

STYLE: reduce number of lookups when scanning {fa,fv}Solution

STYLE: call IOobject::writeEndDivider as static
2022-07-19 11:17:47 +02:00
71246b94b7 ENH: minor update of particle methods 2022-07-08 11:13:00 +02:00
0f0a5c5c0f BUG: interfaceHeatResistance: remove max condensation limiter 2022-06-21 09:30:02 +01:00
45c3ba0e8e ENH: phaseSystemModels: new namespaces for various submodels
Co-authored-by: Kutalmis Bercin <kutalmis.bercin@esi-group.com>
2022-06-21 09:29:57 +01:00
9a80d0d5ef ENH: thermoTools: new library for thermophysics tools
thermoTools is a relocation of various existing tools:

- src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/
- src/semiPermeableBaffle/derivedFvPatchFields/
- src/thermophysicalModels/thermophysicalPropertiesFvPatchFields/liquidProperties/

ENH: Allwmake: reordering various compilation steps

Co-authored-by: Kutalmis Bercin <kutalmis.bercin@esi-group.com>
2022-06-21 09:29:13 +01:00
a4ef891594 COMP: missing linkage, unneeded linkage
- dynamicMesh, finiteVolume, regionFaModels, thermophysicalProperties
2022-04-29 13:26:36 +02:00
3721a61fe0 COMP: link twoPhaseProperties library (#2424) 2022-03-31 16:01:41 +02:00
529f6aa022 COMP: Resolved compiler warnings 2022-03-24 13:36:06 +00:00
af8161925b ENH: use mpi gather for list values in a few places
- avoid gatherList/scatterList when value are only need on master
2022-03-04 17:49:23 +00:00
cd2e69923e STY: Function names and arguments order 2021-12-15 10:16:20 +00:00
13b1417710 ENH: Adding new access to basic thermo for rho and Cp 2021-12-15 10:16:20 +00:00
0bf7758dd4 ENH: interIsoFoam/isoAdvection: new porosity extension
Co-authored-by: Niels Gjøl Jacobsen <>
Co-authored-by: Konstantinos Missios <>
Co-authored-by: Henning Scheufler <henning.scheufler@dlr.de>
Co-authored-by: Johan Roenby <johan.roenby@gmail.com>
2021-12-13 17:09:10 +00:00
cad325f41f BUG: icoReactingMultiphaseInterFoam: enable phasesSystem surface tension models (Fixes #2228) 2021-12-09 18:49:02 +00:00
098aec4962 ENH: Function1's - added objectRegistry access 2021-11-26 11:22:36 +00: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