Compare commits

...

2529 Commits

Author SHA1 Message Date
dd7cdf11c5 BUG: GAMG: processorAgglomeration not merging proc coeffs. Fixes #3172 2024-05-22 10:27:58 +01:00
0ef7589979 BUG: sampledMeshSurface sampling on "empty" patch fails
- requires a field size check when copying into the flat boundary
2024-05-02 10:24:28 +02:00
e651d63566 ENH: cyclicAMI - clear finished send/recv requests 2024-03-18 17:00:34 +01:00
119dd84327 CONFIG: bump patch level 2024-02-20 14:58:28 +01:00
08df023808 BUG: fvSchemes/fvSolution not properly updated on copy from fallback 2024-02-20 14:58:03 +01:00
a9b451b3e4 SUBMODULE: re-enable turbulence-community build
- compilation issues caused by hidden python dependency now alleviated
2024-02-13 09:31:38 +01:00
852f66fc11 CONFIG: add user/group libraries into path separately (#2948)
- on Darwin _foamAddLib() also checks the library path existence
  so passing in "path1:path2" together fails.
2024-02-06 22:16:22 +01:00
08c23685c3 BUG: incorrect cumulative area in triangulatedPatch (fixes #3097)
BUG: bad processor selection. Failed to select anything on non-master
2024-02-06 11:02:26 +01:00
d9c5a5d1a9 BUG: mapped: register to current, not other mesh. See #2723 2024-02-01 13:14:09 +00:00
ebe49d4cbd BUG: SlicedGeometricField, slices into field instead of shallow copy (#3080)
- regression introduced by e98acdc4fc

  Affected versions: (v2206, v2212, v2306, v2312)
2024-01-19 18:06:38 +01:00
62524b140c BUG: protected division - fixes #3084 2024-01-15 15:10:24 +00:00
a46b310fa4 COMP: g++11: suppress optimisation. See #3024 2024-01-08 14:30:06 +01:00
1dc216eb1f TUT: Corrected references to mut - related to #3057 2024-01-03 09:55:44 +00:00
c4328296b0 TUT: Corrected legacy muTilda -> nuTilda. Fixes 3057 2024-01-03 09:43:23 +00:00
52ab1fc06f TUT: changes in optimisation tutorials
- shape optimisation: SQP failed due to wrong divScheme for the adjoint
  equations
- shape optimisation: tutorials designed to show the impact of different flow
  conditions were actually using the same U
- topology optimisation: tutorials designed to show the impact of the
  flow rate distribution were actually using the same target
  fractions
- topology optimisation: updated old fvSolution syntax
2024-01-02 12:03:21 +00:00
58787bb166 COMP: avoid ambiguous max() call on MacOS (fixes #3066)
- had max(std::streamsize, label) but this does not resolve properly
  on OSX, so write out in long form instead.

  The similar logic in DynamicList is okay since there it compares
  max(label, label) instead
2023-12-22 15:10:49 +01:00
1d8f0d55f7 SUBMODULE: fix remnant function call in visualization 2023-12-21 16:23:42 +01:00
c39a0f6494 RELEASE: Updated version to v2312 2023-12-21 11:51:03 +00:00
82417d1d8b SUBMODULE: disable turbulence-community build until compilation issues are resolved 2023-12-21 11:48:30 +00:00
f88e06cac2 Merge branch 'fix-function-objects-in-optimisation' into 'develop'
FIX: functions objects in optimisation

See merge request Development/openfoam!654
2023-12-21 09:50:33 +00:00
e5a62a0bdd TUT: removed unnecessary computations of yPlus
in shape optimisation tutorials
2023-12-21 09:50:26 +00:00
d5661b50de FIX: roll-back of the execution of function objects in optimisation
In steadyOptimisation mode, each time-step corresponds to an
optimisation cycle and is sub-cycled, to allow for iterating the flow
and adjoint equations. This sub-cycling does not allow the execution of
function objects. This was circumvented in 8947735b1d, by explicitly
calling the execution of the function objects in the simple solver
of adjointOptimisationFoam.

However, each sub-cycled iteration is a writeTime, if the current
optimisation cycle corresponds to a writeTime. This means that function
objects with a

writeControl write;

will be executed in each iteration of the flow equations, within this
specific optimisation cycle, leading to a lot of disc space and file
clutter, if the function object outputs fields (e.g. yPlus).

8947735b1d is partially rolled back, by protecting the call to the
execution of the function objects with a bool that defaults to false.
2023-12-21 09:50:26 +00:00
9bb189d1d6 RELEASE: update API to v2312 2023-12-20 19:42:55 +01:00
28aad3a03e RELEASE: Updated headers to v2312 2023-12-20 19:42:55 +01:00
f8c20963d2 RELEASE: Updated completions cache 2023-12-20 19:42:51 +01:00
032a4519ff COMP: adjust link parameters (mingw)
- adjointOptimisation : missing link to fileFormats

- snappyHexMesh : add fvMotionSolvers link (#3058)

STYLE: remove remnant -DFULLDEBUG hints

- now more easily covered with wmake -debug ...
2023-12-20 19:22:19 +01:00
cf47600dde ENH: snappyHexMeshDict: some comment 2023-12-20 15:00:40 +00:00
de133af526 FIX: redistributePar problems with lagrangian
- the fileHandler changes included setting cacheLevel(0) to avoid
  blocking with redistributePar. However, this meant if clouds
  were not uniformly present on all ranks the fileHandler would follow
  different code paths and lead to blocking.

  Now switch to distributed mode for the lagrangian operations within
  redistributePar based on the cacheLevel information.

FIX: avoid triggering a false processor check in argList

- when redistributing to few ranks
2023-12-20 15:18:55 +01:00
88be9ef5c6 FIX: provide default uniform scotch weighting (#3063)
- maintains the same code path within scotch
2023-12-20 13:28:17 +01:00
7d9bba67c1 BUG: Fixed keepParticle regression introduced in 8fb148bb 2023-12-20 12:25:37 +00:00
2602d08d8a TUT: mergePairs: cleanup 2023-12-20 11:58:53 +00:00
af43f9aa24 ENH: caseInfo - use OF dictionary as default writeFormat
STYLE: checkMesh - removed writeChecks uppercase JSON option
2023-12-19 20:31:08 +00:00
686f2a3986 Merge branch 'extrae-profiling' into 'develop'
ENH: add profiling hooks for Extrae into the OpenFOAM profiling (#3043)

See merge request Development/openfoam!652
2023-12-19 14:45:43 +00:00
0fbdbb8330 ENH: add profiling hooks for Extrae into the OpenFOAM profiling (#3043)
- the hooks are defined as weak symbols and are compiled into OpenFOAM
  by default. If the library is not loaded (via LD_PRELOAD) the hooks
  have no effect.

    - https://tools.bsc.es/extrae
    - https://tools.bsc.es/paraver
2023-12-19 14:45:32 +00:00
e8f0cfb2a5 Merge branch 'feature-topology-optimization' into 'develop'
ENH: update of the adjoint library and introduction of topology optimisation

See merge request Development/openfoam!649
2023-12-18 18:01:56 +00:00
4c3f9a9772 TUT: added topology optimisation tutorials
using the Borrvall-Petersson method to compute the source terms of the
flow equations.
2023-12-18 18:01:35 +00:00
7868d9251a TUT: added a topology optimisation tutorial using ISQP
to update the design variables
2023-12-18 18:01:35 +00:00
0af46becdd ENH: treating issues with the convergence of ISQP
The solution of the QP subproblem can become quite expensive, especially
for cases with many design variables (e.g. topology optimisation).

A (potentially dense) matrix with the size of the design variables is
solved using a matrix-free CG solver. The convergence speed greatly
depends on the used preconditioner. This commit adds
preconditioner-vector products based on the L-BFGS inverse Hessian and,
more importantly, a preconditioner computed using the Sherman-Morrison
formula. The latter is applicable here since the LHS of the QP problem
is computed as the sum of rank-2 L-BFGS updates, a sum of rank-1 updates
(as many as the flow-related constraints) and a diagonal matrix
depending on the bound constraints.

Additionally, the QP subproblem could have no feasible points. To relax
this, constraints can be applied gradually through the
targetConstraintReduction enty (typical value of 0.1 for topology
optimisation).
2023-12-18 18:01:35 +00:00
0120d7720b BUG: topology optimisation design variables were not written
properly for continuation (written through SubField instead of Field)
2023-12-18 18:01:35 +00:00
afe9b90d04 STYLE: homogenised the use of "topO" instead of "topo"
whenever refering to topology optimisation.
2023-12-18 18:01:35 +00:00
a6e9a29f41 TUT: minor updates to the topology optimisation tutorials
Replaced 'convertToMeters' with 'scale' in blockMeshDicts and added the
creation of the triSurface folder in some re-evaluation cases
2023-12-18 18:01:35 +00:00
634f921831 GIT: removed unused file incompressibleAdjointSolverTemplates.C 2023-12-18 18:01:35 +00:00
28c538f3e1 ENH: the boundary value of the regularised field of design variables
(aTilda) in topology optimisation can now be provided through the 'wallValue' in the
regularisation dictionary (defaults to 1)
2023-12-18 18:01:35 +00:00
3cd2b2c692 ENH: The (final) sensitivities involved in topology optimisation
runs can now be written to files using the 'writeAllFields' flag in the
designVariables dictionary (defaults to false)
2023-12-18 18:01:35 +00:00
c3b212e06c ENH: Input in objectiveFlowRatePartition now reads "targetFractions"
instead of targetPercentages, with a compatibility read on the latter.
Changed corresponding tutorials too.
2023-12-18 18:01:35 +00:00
eabb821926 TUT: updated the topology optimisation tutorials
Most cases now rely on the nullSpace update method, instead of MMA,
since it has proven more reliable.

Also, added some constrained optimisation cases, including constraints
on the flow rate partition and total pressure losses as well as cases
targeting uniformity as the objective function.

Added a 3D topology optimisation case which also includes constraints.
2023-12-18 18:01:35 +00:00
46757d12ec ENH: minor update in levelSet-based topology optimisation,
to keep the regularised design variables and the signed distance in
different fields
2023-12-18 18:01:35 +00:00
1f7fb08060 BUG: wrong numbering when determining the zoneIDs
of the STL written by topology optimisation.

BUG: when determining which mesh faces are cut by iso-surface faces,
only append the latter if it contains more than two points
2023-12-18 18:01:35 +00:00
e5d5e7b0be ENH: added the option to stop the normalisation
of the objective and constraint gradients in MMA, at a specific
optimisation cycle
2023-12-18 18:01:35 +00:00
bf18fb758c ENH: nullSpace will now perturb the design variables
by a small amount, if all of them lay on the lower or upper bounds at
the beginning of the optimisation, to avoid singular matrices when
computing the update of the design variables.
2023-12-18 18:01:35 +00:00
e764f7b573 ENH: flowRate and flowRatePartition objectives are now computed
based on phi, instead of U & Sf
2023-12-18 18:01:35 +00:00
b5b48b66d1 ENH: enabled the postProcess option in adjointOptimisationFoam 2023-12-18 18:01:35 +00:00
741520801a STYLE: minor change on the output of max mags of the adjoint fields 2023-12-18 18:01:35 +00:00
8947735b1d ENH: enable the execution of functions objects in optimisation mode 2023-12-18 18:01:35 +00:00
2ad6c9f5d2 ENH: adjointRASModel will not crash if set to laminar
and the Jacobian of the objective function wrt the turbulence variables
is called (rare/unorthodox case).

Additionally, objectivePowerDissipation dissipation can now be used in
topology optimisation, adding the necessary blockage dependency to it.
2023-12-18 18:01:35 +00:00
753a534382 ENH: changes in topOVariablesBase and derived classes
- Building the iso-surface spliting fluid and solid parts in topology
  optimisation has been re-worked to obtain an iso-surface with unique
  point numbering
- The mechanism behind marchingCells for dynamicTopODesignVariables has
  been slightly reworked
2023-12-18 18:01:35 +00:00
f35b4cc3fb ENH: added a variant of betaMax that computes it
based on the product of the Reynolds and Darcy numbers
2023-12-18 18:01:35 +00:00
2927015824 ENH: added a null space approach to update the design variables 2023-12-18 18:01:35 +00:00
6020fabcdd ENH: added a normalisation mechanism in MMA
The derivatives of the objective and constraint functions can optionally
be normalised in each optimisation cycle, so that MMA does not put an
excesive stress on the constraints, which can negatively affect the
course of the optimisation
2023-12-18 18:01:35 +00:00
adaac7257f INT: integration updates
- Minor code style
- virtual functions
- added some noexcept
2023-12-18 18:01:35 +00:00
bd84860e9b ENH: added references to topology optimisation headers 2023-12-18 18:01:35 +00:00
50d13c6278 ENH: getters in objective are now const 2023-12-18 18:01:35 +00:00
e0ea0973b1 ENH: replace List<objective*> with UPtrList in incompressiblePrimalSolver (fixes #2946) 2023-12-18 18:01:35 +00:00
b435feffde TUT: added tutorials for topology optimisation
A 1-Inlet-2-Outlet geometry is showcased for laminar and turbulent
flows, set-up with different variants of porosity-based and
level-set-based topology optimisation
2023-12-18 18:01:35 +00:00
b23b09fdbd ENH: added adjoint-based topology optimisation (topO) capabilities
Both porosity-based and level-set-based topO frameworks are included
through the topO and levelSet designVariables, respectively.

Both frameworks work by manipulating an underlying field of design
variables, defined in all cells of the computational domain. That field
is then regularised through a Helmholtz-like filter, before being
processed in a different way from the two topO frameworks (the
porosity-based topO sharpens/projects it while the level-set-based topO
computes signed distances around its zero iso-surface). The result of
this processing is then fed into functions that define source terms to
be added to the mean flow and turbulence model equations, to block
off/solidify parts of the mesh that are counterproductive with respect
to the objective function. These source terms are added through
fvOptions.

Since the designed walls are only simulated through source terms, the
outcome of topO should be re-analyzed on a body-fitted grid, to quantify
the actual gain in the objective function. Both topO frameworks output
the designed wall in STL format which can be used, for instance with
snappyHexMesh, to construct such a body fitted grid.
2023-12-18 18:01:35 +00:00
2b2c78309c ENH: added an optional argument to the constructor of patchWave
This provides a list of faces (can be internal ones) to act as
additional seeds for the wave algorithm. The default argument provides
an empty list, so the behaviour of patchWave should not change.

Useful in topology optimisation, for propagating the active design
variables from the seed faces to the interior, with a given number of
cells at a time.
2023-12-18 18:01:35 +00:00
59bf69b92e ENH: changes in advectionDiffusionPatchDistMethod
- advectionDiffusion is frequently used within optimisation loops since
  it is differentiable. In shape optimisation, the re-computation of
  mesh distances is performed at the very beginning of a new
  optimisation cycle, due to inheriting from MeshObject. If the mesh
  quality is poor enough, the advectionDiffusion PDE might diverge and
  crash the run, before the problematic mesh is written to files for
  inspection. The default behaviour now is to check the mesh before
  solving the advectionDiffusion PDE and write the mesh points if some
  mesh check fails.
- fvOptions can now be included in advectionDiffusion (necessary for
  topology optimisation of turbulent flows for models that include the
  distance field)
- Minor changes in the numerical treatment of the diffusion term, to
  enhance stability
2023-12-18 18:01:35 +00:00
58cfb58b1a ENH: extened fvOptions to support sensitivity derivative
computations necessary in topology optimisation
2023-12-18 18:01:35 +00:00
b6a30fae61 ENH: overhaul of the adjoint optimisation library
Parts of the adjoint optimisation library were re-designed to generalise
the way sensitivity derivatives (SDs) are computed and to allow easier
extension to primal problems other than the ones governed by
incompressible flows. In specific:
- the adjoint solver now holds virtual functions returning the part of
  SDs that depends only on the primal and the adjoint fields.
- a new class named designVariables was introduced which, apart from
  defining the design variables of the optimisation problem and
  providing hooks for updating them in an optimisation loop, provides
  the part of the SDs that affects directly the flow residuals (e.g.
  geometric variations in shape optimisation, derivatives of source
  terms in topology optimisation, etc). The final assembly of the SDs
  happens here, with the updated sensitivity class acting as an
  intermediate.

With the new structure, when the primal problem changes (for instance,
passive scalars are included), the same design variables and sensitivity
classes can be re-used for all physics, with additional contributions to
the SDs being limited (and contained) to the new adjoint solver to be
implemented. The old code structure would require new SD classes for
each additional primal problem.

As a side-effect, setting up a case has arguably become a bit easier and
more intuitive.

Additional changes include:
---------------------------

- Changes in the formulation and computation of shape sensitivity derivatives
  using the E-SI approach. The latter is now derived directly from the
  FI approach, with proper discretization for the terms and boundary
  conditions that emerge from applying the Gauss divergence theorem used
  to transition from FI to E-SI. When E-SI and FI are based on the same
  Laplace grid displacement model, they are now numerically equivalent
  (the previous formulation proved the theoretical equivalence of the
  two approaches but numerical results could differ, depending on the
  case).
- Sensitivity maps at faces are now computed based (and are deriving
  from) sensitivity maps at points, with a constistent point-to-face
  interpolation (requires the differentiation of volPointInterpolation).
- The objective class now allocates only the member pointers that
  correspond to the non-zero derivatives of the objective w.r.t. the
  flow and geometric quantities, leading to a reduced memory footprint.
  Additionally, contributions from volume-based objectives to the
  adjoint equations have been re-worked, removing the need for
  objectiveManager to be virtual.
- In constrained optimisation, an adjoint solver needs to be present for
  each constraint function. For geometric constraints though, no adjoint
  equations need to solved. This is now accounted for through the null
  adjoint solver and the geometric objectives which do not allocate
  adjoint fields for this kind of constraints, reducing memory
  requirements and file clutter.
- Refactoring of the updateMethod to collaborate with the new
  designVariables. Additionally, all updateMethods can now read and
  write restart data in binary, facilitating exact continuation.
  Furthermore, code shared by various quasi-Newton methods (BFGS, DBFGS,
  LBFGS, SR1) has been organised in the namesake class. Over and above,
  an SQP variant capable of tackling inequality constraints has been
  added (ISQP, with I indicating that the QP problem in the presence of
  inequality constraints is solved through an interior point method).
  Inequality constraints can be one-sided (constraint < upper-value)
  or double-sided (lower-value < constraint < upper-value).
- Bounds can now be defined for the design variables.
  For volumetricBSplines in specific, these can be computed as the
  mid-points of the control points and their neighbouring ones. This
  usually leads to better-defined optimisation problems and reduces the
  chances of an invalid mesh during optimisation.
- Convergence criteria can now be defined for the optimisation loop
  which will stop if the relative objective function reduction over
  the last objective value is lower than a given threshold and
  constraints are satisfied within a give tolerance. If no criteria are
  defined, the optimisation will run for the max. given number of cycles
  provided in controlDict.
- Added a new grid displacement method based on the p-Laplacian
  equation, which seems to outperform other PDE-based approaches.

TUT: updated the shape optimisation tutorials and added a new one
showcasing the use of double-sided constraints, ISQP, applying
no-overlapping constraints to volumetric B-Splines control points
and defining convergence criteria for the optimisation loop.
2023-12-18 18:01:35 +00:00
ae8b654a86 BUG: cyclicAMI: missing autoMap,rmap 2023-12-18 16:40:12 +00:00
dbacd7bc95 Merge branch 'feature-fileOperation-nProcs' into 'develop'
ENH: fileOperation: fix fileOperation::nProcs to handle multiple candidates

See merge request Development/openfoam!653
2023-12-18 15:59:31 +00:00
d6ba54bfec ENH: fileOperation: fix fileOperation::nProcs to handle multiple candidates 2023-12-18 15:59:31 +00:00
577f584446 Merge branch 'feature-nonblockingGAMG' into 'develop'
ENH: cyclicAMI: add non-blocking for GAMG

See merge request Development/openfoam!651
2023-12-18 12:56:33 +00:00
7a9dd4c0c2 ENH: cyclicAMI: add non-blocking for GAMG 2023-12-18 12:56:33 +00:00
80d7227c3a SUBMODULE: update all the submodules 2023-12-18 11:39:20 +00:00
88b3fb7c2d ENH: foamMonitor: modernise and refactor the script (fixes #2104)
- enhance POSIX compliance
- apply distinct colours and dash type for each line
- standardize the frame size to 1200x627
- dynamically replace the title with <function-object-name>/<file-name>
- address underscore character issues
- introduce legend components for tensors
- resolve a bug caused by parentheses in tensor files

BUG: particleTrackProperties: correct the typo (fixes #3050)
2023-12-15 22:20:27 +00:00
7e0acfa4ed ENH: handle 64-bit memory information (#3060)
- on large memory systems (eg, 6TB) the process information
  exceeds an 'int' range, so adjust parsing of the /proc/..
  to use int64

ENH: update/modernize OSspecific system information

ENH: minor update of profiling code

- std::string, noexcept, lazier evaluations

STYLE: use direct call of memInfo
2023-12-15 17:21:38 +01:00
2045de8345 CONFIG: foamPackRelease handling of recursive submodules 2023-12-15 16:17:16 +01:00
432d65475c ENH: preserve origId in foamFormatConvert (fixes# #3051)
- previously read the cloud directly without any of the
  passiveParticle fields (origProcId, origId), which meant they would
  not actually be converted.
2023-12-15 16:17:16 +01: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
0352a224b7 COMP: access transformedElements by reference, not copy
- better code style and seems to avoid triggering a gcc warning about
  possibly uninitialized values

COMP: JSONformatter writeEntry missing a return value

STYLE: accept 'json' for checkMesh write format

- consistent with caseInfo functionObject
2023-12-15 16:17:15 +01:00
79993bba43 CONFIG: support explicit selection of 'ld' linker
- for clang-based compilers the default linker may be lld or simply ld.
  Support '+link-ld' to explicitly select use of the ld linker.

- consolidate linker rules into single files

STYLE: adjust SPDX Identifier
2023-12-15 16:17:12 +01:00
5cdc8c6fde BUG: redistributePar: Differing communicator. See #3053.
redistributePar -decompose switches communicator when
reading on master. However other processors still get
constructed with the worldComm. >v2306 AMI stores the communicator
from construction time there was a mismatch
2023-12-13 12:56:59 +00:00
f99bcd1f6c BUG: solver performance updates overwrite pimple controls (fixes #3054)
- regression introduced by commit 0ff86ee2
  (only affects recent develop).

- now split off first/final iterations into a separate
  "controls" dictionary (instead of lumping them into "solver") to
  make them persistent between iterations.
2023-12-13 12:34:43 +01:00
35c884971a BUG: redistributePar blocks with -ioRanks (#3005) 2023-12-12 20:35:09 +01:00
a0e4ee0b3e BUG: masterUncollated readStream causes checkOut/checkIn (#2952)
- updating the header information (by copying) was closing the stream,
  removing all watches and doing a checkOut/checkIn, which could lead to
  dangling references.
  Now just close the stream and simply copy the IOobject header
  information directly.

STYLE: mark regIOobject assignment operator as possibly deprecated

- will revisit to revise or remove in the future
2023-12-12 20:06:50 +01:00
c647e68e1f BUG: mismatch in watch file indices (see !605) 2023-12-12 20:06:50 +01:00
56a0f80863 BUG: copy construct of faSchemes/faSolution ignored (see !605)
- the faMesh/fvMesh copy constructors were using the readOption from
  the base-mesh schemes/solution instead of copying their contents.

  This would not really affect fvMesh (since it has its own IOobject
  for the constructor), but did affect faMesh. However, the problem
  only shows up with collated + redistribute, since that is where
  the ranks can be doing uncoordinated IO.

  Only consider as a bug for recent develop since previous versions
  had other problems with collated+redistribute with finite-area
  anyhow.
2023-12-12 20:06:50 +01:00
5b177b44f3 STYLE: update README to v2312 2023-12-12 20:06:50 +01:00
4612238eff BUG: multiWorld: switch to inter-world communicator. Fixes #3053. 2023-12-12 17:26:59 +00:00
3339f25992 Merge branch 'update-registry-handling0' into 'develop'
Improved DimensionedField/GeometricField factory methods

See merge request Development/openfoam!650
2023-12-12 11:57:57 +00:00
7cc6d52345 CONFIG: increment API level to 2310 2023-12-11 15:56:00 +01:00
4cf1691cdd ENH: update DimensionedField and GeometricField New factory methods
- allow separate specification of the registerObject (no/yes/auto)
  to improve the flexibility of the factory methods.
2023-12-11 15:56:00 +01:00
6ea4328ea1 SUBMODULE: update avalanche, visualization 2023-12-11 15:56:00 +01:00
28b6a5b85a ENH: allow modification of tmp state (cached or uncached)
- simplifies handling.
  * enables unprotecting to avoid accidentally cloning.
  * removes the need for dedicated constructor or factory forms.
  * simplfies DimensionedField and GeometricField New factory methods

- update objectRegistry management method (internal use)

  old:  bool cacheTemporaryObject(...)
  new:  bool is_cacheTemporaryObject(...)

  to clarify that it is a query, not a request for caching etc.
2023-12-11 15:56:00 +01:00
d086cc5a0e COMP: stricter handling of openmp vs no-openmp
- give precedence to ~openmp (-no-openmp) over +openmp (-openmp)
  in the general rules and in the Makefile. This makes it robuster
  when specifying +openmp in general, but ~openmp for specific build
  components.

- disable openmp for OSspecific and Pstream components.
  Neither should contain any openmp code anyhow.

  Additionally, since OSspecific is generally built as a static
  object, it can become problematic (eg, with AMD ROCm) if the
  compiler generates information that openmp is required but then uses
  static linkage.
2023-12-11 15:56:00 +01:00
cd493897d3 CONFIG: update ADIOS version. From 2.8.3 to 2.9.2 2023-12-11 15:56:00 +01:00
2fa0c7520c ENH: provide faMesh static accessors for registry and single-region
- the fields for finite-area are currently stored directly on the
  polyMesh registry, but for future relocation to a sub-registry
  provide a uniform accessor.

ENH: use thisDb() for faMatrix access and extrapolatedCalculated
2023-12-11 15:56:00 +01:00
05f2d54979 ENH: masterCoarsest: demo case for processorAgglom. See !645 2023-12-11 12:28:08 +00:00
cf4af229b6 ENH: shm: more layer printing. Fixes #3049 2023-12-11 10:26:09 +00:00
ca80affe60 COMP: MapLagrangian: unused reference 2023-12-11 09:06:19 +00:00
d2b2b9fa0f TUT: redistributePar: use instead of decomposePar 2023-12-11 08:54:41 +00:00
bc5aafa0d9 TUT: fileOperation: bit more testing. See #2952 2023-12-08 15:58:12 +00:00
1844f87a0d COMP: pass as labelList as List<int> for MPI 2023-12-08 13:33:30 +00:00
b4f150b095 Merge branch 'feature-patchSeedSet' into 'develop'
Extended patchSeedSet to generate seed points more uniformly

See merge request Development/openfoam!647
2023-12-08 11:42:22 +00:00
ec48e2f309 ENH: Extended patchSeedSet to generate seed points more uniformly 2023-12-08 11:41:55 +00:00
df71026509 ENH: Added triangulatedPatch class to triangulate pacthes for searching
- Provides random local and global points, optionally perturbed away from the
  boundary faces
2023-12-08 11:41:55 +00:00
863dbc68cb Merge branch '2770-wall-functions' into 'develop'
ENH: wall functions: swap the order of switch statements and for loops

See merge request Development/openfoam!635
2023-12-08 11:21:04 +00: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
db29d535c8 Merge branch 'feature-cyclicAMI-processorAgglomeration' into 'develop'
ENH: GAMG: processor agglomeration extended for all interfaces

See merge request Development/openfoam!645
2023-12-07 17:33:29 +00:00
8ae0056edd ENH: GAMG: processor agglomeration extended for all interfaces 2023-12-07 17:33:29 +00:00
04e4156403 COMP: remove IOobject template specialization (gcc) 2023-12-07 17:55:27 +01:00
13352861c8 ENH: improve consistency in handling of global IOobjects (#3045)
- replace typeGlobal() global function with is_globalIOobject
  traits for more consistent and easier overriding.

- relocate typeFilePath() global function as a member of IOobject
  for consistency with typeHeaderOk.

BUG: faSchemes, fvSchemes not marked as global file types

- caused issues with collated
2023-12-07 17:42:25 +01:00
43143f21d2 BUG: mis-loading of faMesh in redistribute mode (see !605) 2023-12-07 17:42:25 +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
30a7c22563 ENH: support 'if-present' handling of relaxation coefficients
- new

  scalar relaxCoeff = 0;
  if (solution().relaxEquation(name, relaxCoeff))
  {
      relax(relaxCoeff);
  }

  // or
  scalar relaxCoeff = 0;
  solution().relaxEquation(name, relaxCoeff);

- old

  if (solution().relaxEquation(name))
  {
      relax(solution().equationRelaxationFactor(name));
  }

  // or
  scalar relaxCoeff = 0;
  if (solution().relaxEquation(name))
  {
      relaxCoeff = solution().equationRelaxationFactor(name);
  }
2023-12-07 17:42:24 +01:00
42feffc794 ENH: harmomize schemes-lookup and solution internal accessor names
FIX: correct the schemes internal dictionary name

- change from '.' to '/' delimiter as per 886ba89ddb (#1073)
2023-12-07 17:42:24 +01:00
ca25929372 ENH: minor simplifications for handling region meshes
- static version of polyMesh::meshDir(), which takes a region name

      polyMesh::meshDir(regionName)
  vs
      polyMesh::regionName(regionName)/polyMesh::meshSubDir

STYLE: use polyMesh::regionName(..) instead of comparing to defaultRegion

STYLE: use getOrDefault when retrieving various -region options

FIX: polyMesh::dbDir() now checks registry name, not full path (#3033)
2023-12-07 17:42:24 +01:00
f377875bc8 FIX: avoid questionable lookup and casting for interfaceTrackingFvMesh 2023-12-07 17:42:24 +01:00
149cd7042f ENH: use thisDb reference when referencing/creating finite-area fields
COMP: remove faMesh::operator()() in favour of mesh() or thisDb() instead

- makes the purpose and usage clearer
2023-12-07 17:42:24 +01:00
c9e4b0edac FIX: avoid doubled dbDir() in fileOperation::readObjects (#3037) 2023-12-07 17:42:24 +01:00
09fdeaa38a ENH: more consistent use of endEntry (issue #3035)
- enables capturing of end entry as an event
2023-12-07 17:42:24 +01:00
2de1a26c7b STYLE: indentation, comments
ENH: additional faMesh cleanup in CleanFunctions
2023-12-07 17:42:24 +01:00
227480c366 TUT: snappyHexMesh: demo multiple insidePoints 2023-12-07 14:42:22 +00:00
8cd22c1a83 TUT: redistributePar does not write dummy meshes anymore. 2023-12-07 10:22:57 +00:00
0d16e1a7c6 ENH: variableHeightFlowRateInletVelocity BC - update for moving meshes. See #3012
Dynamic mesh updates trigger a velocity field update. For [this] BC the update
can fail if the dependent alpha field has not already been updated.
2023-12-06 14:52:05 +00:00
513fe05c21 ENH: GeometricBoundaryField - added evaluateSelected function
Provides a mechanism to update specific boundary conditions
2023-12-06 14:52:05 +00:00
6c0ee5d177 BUG: shm: fix to unbalancing info printing. See #3034. 2023-12-06 09:46:51 +00:00
9a7e97ab98 BUG: fileHandler: wrong communicator. Fixes #3042 2023-12-05 17:36:51 +00:00
aa71de0db3 Merge branch 'feature-kinematic-weber-no' into 'develop'
ENH: KinematicWeberNumber: New cloud function object

See merge request Development/openfoam!648
2023-12-05 09:48:42 +00:00
1973c75899 STYLE: ReactingWeberNumber: rename WeberNumberReacting function object for consistency 2023-12-05 09:47:23 +00:00
4c6b7217d1 ENH: KinematicWeberNumber: add new cloud function object 2023-12-05 09:47:23 +00:00
9c8c69a5f3 STYLE: less noisy setting of first/final iteration 2023-12-04 16:24:20 +00:00
1482547756 BUG: facGrad: ensure compatibility between caching and corrections (fixes #3039) 2023-12-04 15:34:02 +00:00
4609aa38e1 BUG: redistributePar: fix global object headerOk. See !605
- mesh/parallel/cavity not yet working since zero-sized mesh
  not written on new processors.
2023-12-04 14:40:32 +00:00
75790ba540 TUT: Allrun : requires numberOfDomains in decomposeParDict 2023-12-04 14:40:32 +00:00
f2dcd88f1e Merge branch 'develop-feature-abaqus' into 'develop'
Added Abaqus sampling and writing

See merge request Development/openfoam!644
2023-12-04 10:36:29 +00:00
a1819a5411 ENH: Added new abaqus sampledSet
Generates sample positions from points specified in a file as Abaqus mesh
points.

Example usage:

    sets
    {
        cone25 // user-specified set name
        {
            type        abaqusMesh;
            file        "abaqusMesh.inp";

            // Optional entries

            // Scale, e.g. mm to m
            scale       0.001;

            // Search distance when the sample point is not located in a cell
            maxDist     0.25;

            ...
        }
    }
2023-12-04 10:34:14 +00:00
d3b3a5a41e ENH: Added new abaqus coordSet writer
Write coordSet(s) as Abaqus point fields

Example usage

    T
    {
        type        sets;
        setFormat   abaqus;
        fields      (T);
        sets
        {
            ...
        }
    }
    \endverbatim

    Optional format options
    \verbatim
    formatOptions
    {
        abaqus
        {
            format          ascii;

            // Optional entries

            // Custom header: $ entries are substituions
            header
            (
                "** OpenFOAM abaqus output"
                "** Project $FOAM_CASE"
                "** File $FILE_NAME"
                "** $FIELD_NAME Time t=$TIME"
            );

            // Write geometry in addition to field data
            writeGeometry   yes;

            // Null value when sample value is not found
            // Default is scalar::min
            nullValue       0;

            // Insert additional time sub-directory in the output path
            // - yes : postProcessing/<fo-name>/<time>/<file>
            // - no  : postProcessing/<fo-name>/<file>
            useTimeDir      no;

            // Available when 'useTimeDir' is 'no' to disambiguate file names

            // Time base for output file names:
            // - 'time'      : <base>.inp_<field>.<time>
            // - 'iteration' : <base>.inp_<field>.<iteration>
            timeBase        iteration;

            // Optional start counters when using timeBase iteration
            writeIndex
            (
                T 1
            );

            ...
        }
    }
2023-12-04 10:05:29 +00:00
3944c7a628 ENH: coordSetWriter - brought across field scaling and offsets from surface writers
Example:

    formatOptions
    {
        <writer>
        {
            // Apply offsets to field values
            fieldLevel
            {
                T   273.15; // Convert from K to C by subtracting 273.15
            }

            // Note: scale applied after application of field level
            fieldScale
            {
                p   0.001;  // Convert pressure from Pa to kPa by scaling by 0.001
            }
        }
    }
2023-12-04 09:57:08 +00:00
0ba821a96d Merge branch 'feature-caseInfo-json' into 'develop'
Extract case and solver information

See merge request Development/openfoam!646
2023-12-04 09:51:33 +00:00
f8742146a7 ENH: checkMesh - added -writeChecks option
Added -writeChecks <format> option

- writes computed mesh metrics to file in using <format>
- currently supported formats are OpenFOAM dictionary and JSON
2023-12-01 15:04:41 +00:00
9d20dd84a9 TUT: Added caseInfo function object example 2023-12-01 15:04:41 +00:00
6242e70d09 ENH: Added new caseInfo function object
Collects and writes case information to file in OpenFOAM dictionary or JSON
format.  Data includes:

- meta: case name, path, regions, parallel etc.
- dictionaries: entries retrieved from dictionaries - registered or from file
- per region: mesh metrics, boundary and boundary field types
- function object results

Example of function object specification:

    caseInfo
    {
        type            caseInfo;
        libs            (utilityFunctionObjects);

        // Warn when entries are not found
        lookupMode  warn; // none | warn | error;

        // Write format
        writeFormat json; //  dictionary | json;

        dictionaries
        {
            USolver // User-specified names
            {
                // Look up using registered name
                name        "fvSolution";

                // Optionally limit to specific entries
                include
                (
                    "solvers/U/solver"
                );
            }
            fvSchemes
            {
                name        "fvSchemes";

                // include all entries by default
            }
            timeScheme
            {
                name        "fvSchemes";

                include
                (
                    "/ddtSchemes/default"
                );
            }

            turbulence
            {
                name        "turbulenceProperties";

                // include all entries by default
            }
            controlDict
            {
                // Look up using file path
                path        "<case>/system/controlDict";

                include
                (
                    "application"
                    "deltaT"
                    "startTime"
                    "endTime"
                );
            }
        }

        functionObjects (minMax1);
    }
2023-12-01 14:00:52 +00:00
d77db0edb9 ENH: Added new JSONformatter to write Ostream content in JSON format
New Ostream wrapper that writes entries as JSON objects/convert OpenFOAM
dictionaries to JSON dictionaries, e.g.

    dictionary dict ...

    // Create file for writing
    OFstream os("myData.json");

    // Wrap Ostream
    JSONformatter json(os);

    // Write dictionary as JSON
    json.writeDict(dict);
2023-12-01 11:54:35 +00:00
c7a639d0dd ENH: polyMeshCheck - added mesh quality metrics to meshState dictionary
Quality metrics, e.g. non-orthogonality, skewness etc are calculated/reported
in polyMeshCheck functions. These results are now added to the meshState/mesh
dictionary to enable external access.
2023-12-01 11:54:35 +00:00
0ff86ee2e7 ENH: replaced fragile dict interactions by meshState functions 2023-12-01 11:54:35 +00:00
79cd147de0 STYLE: Refactoring use of meshState in {fv|faMesh}
{fv|fa}Mesh classes inherited the [old] data class (renamed meshState)
- meshState removed from inheritance list and added as data members
2023-12-01 11:54:35 +00:00
da20ff2666 STYLE: renamed/moved 'data' to 'meshState'
ENH: added 'mesh' dictionary to meshState to hold mesh properties

- solver information now stored in a 'solver' dictionary (was solverPerformance)
  - {first|final}Iteration entry now stored in solver dict instead of top level
- mesh data (new) stored in 'mesh' dictionary
2023-12-01 11:54:34 +00:00
6da041e61f TUT: added -constant for redistributePar. See !605 2023-11-29 09:14:59 +00:00
6c08e995ba BUG: redistributePar: handle lagrangian in decompose mode. See !605
- only affects recent develop
- fixed by supplying invalid casename for non-master ranks
2023-11-28 16:50:51 +00:00
b4b022f283 BUG: SRFModel: tmp() abuse. Fixes #3038. 2023-11-27 18:03:11 +00:00
1c0f59c0e2 Merge branch 'feature-nonblockingACMI' into 'develop'
ENH: cyclicACMI: add non-blocking matrix updates.

See merge request Development/openfoam!641
2023-11-27 13:58:02 +00:00
7c64cdbd01 ENH: cyclicACMI: add non-blocking matrix updates. 2023-11-27 13:58:02 +00:00
7c8daed124 Merge branch 'feature-rom' into 'develop'
ENH: Reduced-order modelling field reconstruction with DMD

See merge request Development/openfoam!639
2023-11-24 19:57:18 +00:00
1a4d2f735f TUT: cylinder2D: add examples for the createROMfields utility 2023-11-24 19:57:11 +00:00
c9d1f741ce ENH: createROMfields: new reduced-order model utility to reconstruct fields 2023-11-24 19:57:11 +00:00
b093e3a709 CONFIG: increment API level to 2309
- filehandler and watched files changes
- addition of turbulence submodule
2023-11-23 22:42:22 +01:00
c5e4b62df7 ENH: improve/simplify streaming of exprValue
- ensure that operator<< and operator>> behave symmetrically
2023-11-23 22:42:22 +01:00
2ab3490552 STYLE: invert ASCII/BINARY checks. Helps if adding other formats
STYLE: use globalIndex::totalSize()
2023-11-23 22:42:20 +01:00
5a29b2b076 ENH: probes: reformat output for third-party readers 2023-11-23 15:32:31 +00:00
2d042268ba ENH: shm: add unbalancing info printing. Fixes #3034. 2023-11-23 15:31:43 +00:00
4ea5bfe2ac SUBMODULE: turbulence-community: add new submodule
SUBMODULE: updated cfmesh
2023-11-23 09:42:33 +00:00
92dc2e0459 BUG: facGrad: correct the gradient calculation (fixes #2979) 2023-11-22 15:31:32 +00:00
0ae6141397 Merge branch 'update-redistributePar' into 'develop'
improve fileHandler support for redistributePar

See merge request Development/openfoam!605
2023-11-21 11:14:45 +00:00
5be652d03c ENH: hostCollated: naming without ranges if running on single rank 2023-11-21 11:14:28 +00:00
31825dd981 BUG: redistributePar: cell/face/pointProcAddressing written to incorrect dir 2023-11-21 11:14:28 +00:00
910713398e ENH: redistributePar: loose matching of processors directories 2023-11-21 11:14:28 +00:00
9ed0bb1e4f ENH: redistributePar: update for distribute mode
- uses read&write handlers
- fixes initialisation of partial handlers
- 'uniform' copied to wrong place
- -overwrite not deleting old processors dirs
2023-11-21 11:14:28 +00:00
af267e0c1b BUG: redistributePar: excessive directories for collated. Fixes #2936.
BUG: collated: cooperate with non-parallel
2023-11-21 11:14:28 +00:00
4183419be0 TUT: redistributePar 2023-11-21 11:14:28 +00:00
259e8c22a5 ENH: improve check for decomposedBlock and simpler startup 2023-11-21 11:14:28 +00:00
c880efb4a6 ENH: improve fileHandler support for redistributePar
- use file handlers to manage where meshes/fields are to be read and
  written.
2023-11-21 11:14:28 +00:00
030a467a23 ENH: broadcast dynamicCode, create missing processor directories
- code is compiled dynamically on the master node.
  In the normal (non-distributed) case, simply poll the NFS
  to see when it appears on the sub-procs.

  For a case with distributed roots, first broadcast it (via MPI)
  to the IO master nodes and then poll afterwards.

- on startup, detect and create missing processorXXX/ subdirectories
  on distributed filesystems
2023-11-21 11:14:28 +00:00
65523e9d24 ENH: add delayed handling of file watches to regIOobject
- this delay the communication of file watches, which helps avoid
  communication deadlocks with master-only reading.

Co-authored-by: Mark Olesen <>
2023-11-21 11:14:28 +00:00
aec4ba30a3 ENH: handle watching included files 2023-11-21 11:14:28 +00:00
bcd873ccfe ENH: Update redistribute clouds with readOnProc/writeOnProc
- when reading, detect all clouds on all processors and uses this when
  reading fields. Similarly, when writing it uses writeOnProc to skip
  clouds that are empty on any particular processor.

Co-authored-by: Mark Olesen <>
2023-11-21 11:14:28 +00:00
eea72282ab ENH: CHT solvers - avoid fvSolution persisting on time db 2023-11-20 14:32:11 +00:00
11ecf55a86 Merge branch 'pstream-updates' into 'develop'
Extend some Pstream, PstreamBuffers and globalIndex functionality

See merge request Development/openfoam!640
2023-11-20 10:10:49 +00:00
8818201196 ENH: extend mpiAllGather to include integer and float types
- was previously limited to 'char' whereas gatherv/scatterv
  already supported various integer and float types

STYLE: rebundle allToAll declarations with macros

ENH: provide a version of allToAllConsensus returning the Map

- simplifies use and avoids ambiguities in the send/recv parameters

- the Map version will now also transmit zero value data if they exist
  in the Map. Unlike the List version, zero values are not necessary to
  signal connectivity with a Map.

COMP: forwarding template parameters for NBX routines

ENH: consolidate PstreamBuffers size exchange options

- had a variety of nearly identical backends for all-to-all,
  gather/scatter. Now combined internally with a dispatch enumeration
  which provides better control over which size exchange algorithm
  is used.

DEFEATURE: remove experimental full-NBX PstreamBuffers variant

- no advantages seen compared to the hybrid NBX/PEX approach.
  Removal reduces some code cruft.

DEFEATURE: remove experimental "double non-blocking" NBX version

- the idea was to avoid blocking receives for very large data transfers,
  but that is usually better accomplished with a hybrid NBX/PEX approach
  like PstreamBuffers allows
2023-11-20 09:39:35 +01:00
3fd1b74b26 ENH: globalIndex contains(), findProcAbove(), findProcBelow() methods
- these help when building upper or lower connected topologies.
  The new findProc() method is a non-failing whichProcID alternative
2023-11-20 09:36:23 +01:00
cfb752647a ENH: globalIndex and CompactListList improvements
- provide a globalIndex::calcOffsets() taking an indirect list, which
  enables convenient offsets calculation from a variety of inputs.

- new CompactListList unpack variant: copy_unpack()
  The copy_unpack() works somewhat like std::copy() in that it writes
  the generated sublists to iterator positions, which makes this
  type of code possible:

      CompactListList<label> compact = ...;
      DynamicList<face> extracted;

      compact.copy_unpack<face>
      (
          std::back_inserter(extracted),
          labelRange(4, 10)
      );

  -and-

      const label nOldFaces = allFaces.size();
      allFaces.resize(allFaces + nNewFaces);

      auto iter = allFaces.begin(nOldFaces);

      iter = compact.copy_unpack<face>(iter, /* selection 1 */);
      ...
      iter = compact.copy_unpack<face>(iter, /* selection 2 */);

ENH: globalIndex resize()

- can be used to shrink or grow the offsets table.
  Any extension of the offsets table corresponds to 'slots'
  with 0 local size.
2023-11-20 09:35:59 +01:00
ef201ecfea STYLE: adjust globalIndex/CompactListList overflow reporting
- report location with previous good offset and the new count that
  would cause overflow. Simpler to report and the (very long) list
  of input sizes is not particularly useful for diagnostics either.

ENH: add globalIndex comparison operators

- for outputting lists of globalIndex
2023-11-20 09:24:17 +01:00
5e0cafa637 COMP: fix constexpr mismatches 2023-11-20 09:11:33 +01:00
d6d28ccfa2 ENH: make sliceRange modifiable - similar to labelRange 2023-11-18 17:25:22 +01:00
a0b9732321 ENH: add support for CHAR_DATA token
- allows construction of string tokens holding character content.
  For example, data that has been serialized and buffered and that
  now needs to be written or sent to another process.
2023-11-18 15:24:15 +01:00
5bcf70081a INT: dictionary formattingEntry
- this is a primitiveEntry for holding purely formatting content
  such as blank lines, comments, other placeholders etc
2023-11-18 15:24:15 +01:00
b1f9fe9d79 STYLE: adjust ITstream naming for empty_stream() 2023-11-18 15:24:15 +01:00
636a654f4a ENH: add standard _byte access for exprValue
- allows UPstream::broadcast and direct read/write

- add operator== for exprValue
2023-11-18 15:24:01 +01:00
24188d70a6 Merge branch 'feature-evaluation-check' into 'develop'
Feature evaluation check

See merge request Development/openfoam!628
2023-11-16 10:33:32 +00:00
d0542c7014 Feature evaluation check 2023-11-16 10:33:32 +00:00
85243dc89d ENH: provide referPatchID() at the coupled patch level (simplifies code)
- the default returns -1 (ie, not found/available). This is overridden
  by processorCyclicPolyPatch to actually perform a search

COMP: explicitly define polyMesh::writeObject in the header

- currently no special treatment, but allows future adjustments
  without affecting the header.
2023-11-15 11:11:35 +01:00
6adac8e0ab ENH: update Nastran surface reader to handle new ANSA conventions (#3009) 2023-11-15 11:11:34 +01:00
17257f9f97 DOC: add -print-context to tutorial/Alltest
- allows separate query/generation of context information
2023-11-15 11:10:10 +01:00
a81d757721 COMP: add missing include for SortList
- extend test to include partition + sort
2023-11-14 22:54:44 +01:00
3524a6f4df FIX: getLine() line counting (adjustment to 459aaad0f9)
ENH: return ITstream::emptyStream() in a 'bad' state

- to indicate that it is invalid for reading
2023-11-14 22:54:44 +01:00
a03077e151 ENH: add IOobjectOption::LEGACY_REGISTER enumeration
- extends the enumeration (NO_REGISTER, REGISTER, LEGACY_REGISTER).
  Can be used to tweak registration preference where required and
  potentially (TDB) to define a different default value in the future
2023-11-14 22:54:44 +01:00
6ea2041122 Merge remote-tracking branch 'origin/master' into develop 2023-11-14 17:52:28 +00:00
dfdc2d95a7 ENH: cloudSolution - updated handling of under-relaxation
- unspecified field names now return a value of 1 by default
- new debug switch can be used to see default selections

STYLE: Minor code reformatting
2023-11-14 17:27:52 +00:00
9ac7982d64 ENH: mapFields FO - continuation of commit 46faebf783
- cuttingPatches now automatically constructed when createPatchMap is true
2023-11-14 15:19:09 +00:00
46faebf783 ENH: mapFields FO - see #3013
- Added option to automatically create patch map when consistent=false

  Example usage:

      // New optional entry
      createPatchMap    yes;

- Cross-ref: EP2230
2023-11-10 19:04:35 +00:00
20c5b6602d ENH: functionObjectProperties - added fn to return function object results 2023-11-10 19:04:35 +00:00
a833f9cc2e Merge branch 'feature-lagrangian-source-terms' into 'develop'
ENH: Lagrangian: mass exchanges between parcels and carriers

See merge request Development/openfoam!631
2023-11-10 13:36:07 +00:00
0c8bbfeefd ENH: lagrangian - added transfer of parcel to carrier source terms 2023-11-10 13:35:17 +00:00
0b381897c3 ENH: lagrangian - updated calls to cloud function objects 2023-11-10 13:35:17 +00:00
8fb148bb0e ENH: lagrangian cloud function objects - added track data to hooks 2023-11-10 13:35:17 +00:00
c4a8fbcf49 ENH: lagrangian - added mass source exchange for kinematic cloud
STYLE: replace ':' scoping with IOobject::scopedName()
2023-11-10 13:35:17 +00:00
e67f8d0929 TUT: overset: demo some motion. See #2711. 2023-11-09 15:02:51 +00:00
f75aa7fbc8 TUT: steadyBoundaryLayer: ensure compatibility with gnuplot version > 5.4
- fix various scripts
2023-11-09 14:02:13 +00:00
6103303b9a CONFIG: wmakeLnInclude with '-extra' option
- enables symlink for .cpp and .cxx source files
2023-11-08 22:08:16 +01:00
7766854a7e BUG: stringOps::split with keepEmpty accidentally ignores non-empty trailing
- fixes #3025
2023-11-08 15:44:36 +01:00
0e3bb22088 Merge branch 'IOobject-global-paths' into 'develop'
ENH: additional handling for global (non-processor) time paths

See merge request Development/openfoam!638
2023-11-08 10:12:23 +00:00
41b6794e2d ENH: add global (serial) path accessor to IOobject (#3007)
- new methods added to IOobject to ease mixed (serial vs parallel)
  file locations. Some redirect to Time, others are defined for
  IOobject only.

    | "normal" (serial/parallel) | "global" (serial locations) |
    | ---------------------------|-----------------------------|
    | caseName()                 | globalCaseName()            |
    | path()                     | globalPath()          *new* |
    | path(...)                  | globalPath(...)       *new* |
    | objectPath()               | globalObjectPath()    *new* |
2023-11-07 11:52:09 +01:00
507805c330 ENH: partly align globalIndex and CompactListList methods
- CompactListList::size() corresponds to the number of sub-lists
  whereas globalIndex::size() corresponds to the totalSize().
  This difference can lead to potential coding errors when switching
  between pure addressing (eg globalIndex) and addressing with content
  (eg, CompactListList).

  Within the source tree, there are no longer any occurances of
  globalIndex::size() but it is nonetheless unsafe to change its
  meaning now. Instead provide a commonly named length() method that
  corresponds to the natural length: ie, the number of offsets minus 1
  (with guards).

- add CompactListList::writeMatrix for writing the compact contents
  in an unpacked form (eg, for debugging) without actually needing to
  unpack into storage.

- provide globalIndex::whichProcID() two-parameter version
  with myProcNo as the first argument.
  Symmetric with isLocal etc, useful when using a communicator
  that is not worldComm.
2023-11-07 10:33:47 +01:00
269be2f4ea ENH: provide Time::NewGlobalTime factory methods (#3007)
- avoids clutter of argList::envGlobalPath() ...

ENH: allow temporary overwriting of output writeFormat

- allows switching for particular output routines

COMP: explicitly use TimePaths methods with Time

- this simplifies any overloading done at a later stage
2023-11-07 10:33:47 +01:00
0338cf9a84 REVERT: unstable MPI_Mprobe/MPI_Mrecv on intelmpi + PMI-2 (#2796)
- remnant was left in the NBX implementation for Map<Type>.

  Still not entirely certain which vendors/versions handle message
  probe/recv properly, but using the "regular" probe and recv is OK
  since everything is without threaded race conditions.

STYLE: adjust file extension of UPstreamWrapping templates

- avoids it being exposed via lnInclude
2023-11-07 10:33:47 +01:00
07dcdefa02 ENH: support creation of boundaries/zones from list of entries
- this makes it easier to split creation into a two-stage process
  as required

- extend handling for polyBoundaryMeshEntries, faBoundaryMeshEntries
  with more functionality. Ensure that these are never registered.

ENH: addition writeEntry methods for polyBoundaryMesh

- simplifies streaming and collating into other files

ENH: polyMesh rereading - update owner/neighbour header information

- this avoids accidentally reading the "cells" file if the mesh has
  been created with NO_READ and then updated

STYLE: less vertical space when outputting empty PtrList
2023-11-07 10:33:47 +01:00
08a9b03891 ENH: polyBoundaryMesh additional faces() and faceOwner() slice methods
- return a subList view of the mesh faces, owners
2023-11-07 10:33:47 +01:00
98246a438e ENH: simplify calling of decomposition, support CompactListList
- combined most of the unweighted and weighted decomposition routines
  such that an empty weight field is treated as uniform weighting.
  This allows default parameters and cuts down on the number of
  decompose methods.

- for topology-driven decomposition, it is now possible to pass in the
  owner/neighbour connectivity as a CompactListList directly instead
  of first creating a labelListList (which was internally repacked into
  a CompactListList in many cases).
  However, multiLevelDecomp still uses unpacking (to avoid a larger
  reworking of code).

- support direct creation of some methods (eg, random, scotch etc)
  without a dictionary

- fix incorrect neighbour face weighting (fixes #3019)

ENH: relocate calcCellCells from decompositionMethod to globalMeshData

- makes it more universally available
2023-11-07 10:33:47 +01:00
546b204793 COMP: split endian.H into foamEndianFwd.H and foamEndian.H
- usually only need big/little defines (which are now in the Fwd)
  and rarely need byte-swapping.

  Provide endian.H compatibility include, but foamEndianFwd.H or
  foamEndian.H to avoid potential name clashes.
2023-11-07 10:33:47 +01:00
98ccb7df6b ENH: extend VectorSpace traits to include pTraits_cmptType
- The pTraits_cmptType returns the data type of 'cmptType' (for
  arithmetic and VectorSpace types) or is simply a pass-through.

  This can be combined with the pTraits_nComponents for casting.
  For example,

  function
  (
      reinterpret_cast<pTraits_cmptType<Type>::type*>(buf.data()),
      (buf.size()/pTraits_nComponents<Type>::value)
  );

ENH: extend Foam::identityOp so support array indexing (pass-through)
2023-11-07 10:33:47 +01:00
df8efcaf62 REGRESSION: registry filtering not using regIOobject name (fixes #3023)
- was using the derived object name (could be something like "region0")
  instead of the actual registered name (ie, the regIOobject name)
2023-11-07 10:33:47 +01:00
ad2389a37d BUG: foamMeshToFluent: improve compatibility with tmerge (fixes #2820) 2023-11-03 16:26:57 +00:00
8f54827d19 Merge branch 'feature-map-constraint' into 'develop'
ENH: Moving electric sources mapped from external meshes

See merge request Development/openfoam!630
2023-11-03 14:33:10 +00:00
4fa1f723eb ENH: MapFieldConstraint: new fvOption constraint 2023-11-03 14:32:49 +00:00
ef6fa8007a ENH: cellSetOption: enable dictionary-based updates of selections 2023-11-03 14:32:49 +00:00
f54400d5cc ENH: cellSetOption: add new selectionMode for moving points 2023-11-03 14:32:49 +00:00
f3d939fa10 ENH: electricPotential: add finite-volume constraint hook 2023-11-03 14:32:49 +00:00
a50ee8e2d2 BUG: electricPotential: correct return value of read function 2023-11-03 14:32:49 +00:00
6373dfd6ac COMP: linear: duplicate filename in same library 2023-11-02 14:23:31 +00:00
dc7d0ffeaa ENH: add face/triFace find(edge) method (#3004)
- returns the edge index within the face, -1 if not found
2023-10-27 13:48:18 +02:00
29e2718162 ENH: add face/triFace contains(edge) method (#3004)
STYLE: use contains() and reduce reliance on edgeDirection -1/+1 values
2023-10-26 14:11:28 +02:00
b34793c392 ENH: additional globalIndex methods and helpers
- single() method : simply tests if the globalIndex has nProcs == 1,
  which is typically from a gatherNone invocation.
  For example,

     globalIndex gi;
     if (...) gi.reset(localSize);
     else     gi.reset(globalIndex::gatherNone{}, localSize);

     // later...
     const label begin = (gi.single() ? 0 : gi.localStart());
     const label count = (gi.single() ? gi.totalSize() : gi.localSize());

- add front() and back() methods to return the begin/end ranges,
  and begin_value(), end_value() - as per labelRange.

- make more methods noexcept

- calcOffset(), calcRange() helper functions to determine
  the processor-local of a numbering range without the overhead of
  creating a list of offsets.

  For example,

     label myOffset = globalIndex::calcOffset(mesh.nCells());
     labelRange mySlice = globalIndex::calcRange(mesh.nCells());

- add globalIndex localEnd() as per CompactListList method

STYLE: align looping constructs in CompactListList with List

- make more methods noexcept
2023-10-26 14:03:39 +02:00
d9f0587416 ENH: promote ListOps::identity to Foam::identity
- becoming more frequently used and there is no ambiguity in calling
  parameters either - identity(label) vs identity(labelUList&).

  Provide both int32 and int64 versions.
2023-10-26 11:24:57 +02:00
ef92d31493 ENH: construct labelRange from begin/end value pair 2023-10-26 11:11:48 +02:00
1faa143a7c ENH: expose fieldNames() selection for sampledSets/sampledSurfaces
- consistent with probes. Allows reporting/querying
2023-10-26 09:19:18 +02:00
d296713af1 CONFIG: increment API level to 2308
- support for SpanStreams etc
2023-10-24 10:57:49 +02:00
0343ab00f3 DOC: add application/test/README.md
- extraction of Description from the respective tests.
  Relatively incomplete

  Uses the `application/tests/get-descriptions` extractor
2023-10-24 10:57:49 +02:00
870c6a6924 TEST: add standalone test application: Test-surface-sampling 2023-10-24 10:57:22 +02:00
1476de89ee ENH: add unary functor for Foam::zero
- acts somewhat like an identity op that 'swallows' its parameter
  and maps back to zero.
2023-10-23 15:28:34 +02:00
93f48d88ea STYLE: add scoping limit to Field macros 2023-10-23 15:28:08 +02:00
cfa6da5953 COMP: circumvent aggressive compiler branch optimization (clang-17)
- it seems that both sides of the ternary are evaluated despite
  the divide-by-zero protection. Use volatile to force the compiler
  to use in-order evaluation.
2023-10-23 15:27:58 +02:00
a7bb8edbad COMP: avoid issues with new compilers and/or new C++ standards
- prevent automatic comparison rewriting (c++20)
- no bitwise operations between different enumerations
- template instantiation

ENH: add DimensionedField Internal typedef (simplifies handling)
2023-10-23 09:45:41 +02:00
e4745d09ec STYLE: remove virtual from override-qualified methods (surfaceFeatureExtract) 2023-10-23 09:44:54 +02:00
32a8a30b8c CONFIG: bump paraview from 5.11.1 to 5.11.2 2023-10-20 10:29:41 +02:00
2b34412591 Merge branch 'ensight-timeFormat' into 'develop'
support user specification of ensight time format/precision (#2999)

See merge request Development/openfoam!634
2023-10-19 10:39:07 +00:00
ba2e774aac ENH: increase precision for ensight field cache (#2999)
- attempt to minimize rounding in the cached time values
  since these are also used to re-populate the case files

STYLE: remove ancient handling of "meshes" entry

- was superseded by "geometry" entry in OpenFOAM-1912 and later.
  Now remove the transitional shim, which was in place for
  restart migration from 1906.
2023-10-19 10:28:09 +00:00
3618d07134 ENH: support user-defined sampleFreq for noise models (#2999)
CONFIG: downgrade non-uniform time from error to warning

- can be a spurious error when the deltaT is very small

CONFIG: support keywords 'minFreq', 'maxFreq'

- these are the updated naming for 'fl' and 'fu' (still supported)
2023-10-19 10:28:09 +00:00
dafae668d1 ENH: support user specification of ensight time format/precision (#2999)
- new format option keywords: timeFormat, timePrecision

CONFIG: default ensight output is now consistently BINARY

- this removes some uncertainty with the ensightWrite functionObject
  which was previously dependent on the simulation writeFormat
  and makes its behaviour consistent with foamToEnsight

  Note: binary Ensight output is consistent with the
  defaults for VTP output (inline binary)

ENH: minor adjustment of ensight writing methods
2023-10-19 10:28:09 +00:00
8ec35d0b26 Merge branch 'update-zone-handling' into 'develop'
ENH: zone improvements

See merge request Development/openfoam!633
2023-10-19 10:23:14 +00:00
05c66ae62d ENH: reduce overhead for readUpdate of mesh zones 2023-10-17 12:33:03 +02:00
6aa8b82744 ENH: zone improvements
- retain group information when copying zones
- support construct empty (add details later)
- improve consistency for zone and boundaryMesh construction

- support front/back/both selection for faceZoneToCell

STYLE: prefer faceZone patch() method instead of operator()

STYLE: use std::unique_ptr instead of manual pointer management

- for zones and core patch types.
  Easier data management, allows default destructors (for example)
2023-10-17 12:33:03 +02:00
59c366525e ENH: add release() method to UPstream::communicator
- allows caller to take ownership of the communicator
2023-10-16 16:42:23 +02:00
c1e2fd6726 ENH: improve consistency of adding tokens to ITstream
- use add_tokens() instead of the old multi-parameter
  append(.., bool) method which was misleading since it added tokens
  at the current tokenIndex, not at the end.

- stringify ITstream contents with CharStream instead of StringStream.
  Allows string_view for copying out the content.

ENH: set namedDictionary dictionary name from Istream

- provides context for error messages etc (#2990)
2023-10-16 14:21:14 +02: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
3562565995 ENH: minor updates for globalIndex
- explicit use of UPstream::worldComm in globalIndex methods
  for more clarity

- adjust method declaration ordering:
  de-emphasize the processor-local convenience methods

- consistent use of leading tag dispatch,
  remove unused enum-based dispatch tag

- add begin()/cbegin() with offset (as per List containers)

BUG: missing use of communicator in globalIndex gatherNonLocal

- does not affect any existing code (which all use worldComm anyhow)
2023-10-13 14:44:18 +02:00
c65fac192e REGRESSION: incorrect fill range for ensight writeString
- introduced by b76595df42, only affects recent develop
2023-10-13 14:42:37 +02:00
c423ebecc1 BUG: ConeInjection - corrected parallel restart. Fixes #2998 2023-10-12 11:37:02 +01:00
fc9fb5c150 Merge branch 'update-stringIO-and-containers' into 'develop'
updates for resizing containers, reduced overhead for std::string output etc

See merge request Development/openfoam!632
2023-10-11 18:12:09 +00:00
0fb2c8eb1c STYLE: update applications/tests to use SpanStream/CharStream 2023-10-11 18:11:37 +00:00
3693d61e6c ENH: refine SpanStream and CharStream methods
- support std::string_view (c++17) or span view (older c++) of stream
  buffer contents. This simplifies formatting + reparsing.

  Example,

      OCharStream os;
      os << ...;

      ISpanStream is(os.view());
      is >> ...;

- additional release() method for ICharStream, OCharStream
  that returns the contents as a DynamicList<char> and resets the stream.

- provide a str() method for API compatibility with older
  std::ostringstream etc.
2023-10-11 18:11:37 +00:00
1ddcad820f ENH: multi-parameter IOobject::scopedName 2023-10-11 18:11:37 +00:00
722c528316 ENH: add string::length static methods
- simplifies writing of code that should accept either
  C strings (forwards to strlen) or
  C++ strings (forwards to std::string::length)
2023-10-11 18:11:37 +00:00
b76595df42 ENH: improve stream output of std::string etc.
- change write(const string&) to write(const std::string&).
  This allows output of std::string without an intermediate copy.

- additional writeQuoted method to handle range of char data:

     writeQuoted(const char* str, std::streamsize len, bool)

  This helps with supporting string_view and span<char>

- add operator<< for stdFoam::span<char> and std::string_view (c++17)

- avoid duplicate code in OBJstream

STYLE: add override keyword for IO stream methods
2023-10-11 18:11:37 +00:00
d9727fad1c ENH: use updated HashTable methods 2023-10-11 18:11:37 +00:00
5dcced7b86 ENH: use capacity=0 for HashTable/HashSet/Map default constructors
- default construct is now identical to HashTable(Foam::zero).
  It performs no allocation and is also noexcept.

  The previously used default capacity (128) was a holdover from
  much older versions where set/insert did not properly handle
  insertion into a table with zero capacity (number of buckets).
2023-10-11 18:11:37 +00:00
89d3687278 ENH: HashTable sizing improvements
- earlier deletion of unpopulated HashTable on resizing:

  If the table is already clear (ie, has no entries),
  can immediately remove the old internal table before reallocating
  the newly sized table, which may avoid a needless memory spike.

- reserve() method:

  Naming and general behaviour as per std::unordered_map.
  It behaves similarly to the resize() method but is supplied the
  number of elements instead of the capacity, which can be a more
  natural way of specifying the storage requirements.
  Additionally, reserve() will only increase the table capacity for
  behaviour similar to DynamicList and std::vector, std::string etc.

  Old:
     labelHashSet set;
     set.resize(2*nElems);

  Now:
     labelHashSet set;
     set.reserve(nElems);

- remove unused HashTable(Istream&, label) constructor

STYLE: static_cast of (nullptr) and std::fill_n for filling table
2023-10-11 18:11:37 +00:00
58bd255a73 ENH: handle List<char> I/O in base class
- previously used a template specialization, but now recombined into
  regular readList/writeList methods to consolidate the code logic
2023-10-11 18:11:37 +00:00
96c9bf8615 ENH: add List::resize_unsafe(label)
- changes the addressed list size without affecting list allocation.
  Can be useful for the following type of coding pattern:

  - pre-allocate a List with some max content length
  - populate with some content (likely not the entire pre-allocated size)
  - truncate the list to the length of valid content
  - process the List
  - discard the List

  Since the List is being discarded, using resize_unsafe() instead of
  resize() avoids an additional allocation with the new size and
  copying/moving of the elements.

  This programming pattern can also be used when the List is being
  returned from a subroutine, and carrying about a bit of unused memory
  is less important than avoiding reallocation + copy/move.

  If used improperly, it can obviously result in addressing into
  unmanaged memory regions (ie, 'unsafe').
2023-10-11 18:11:37 +00:00
0f53871fd3 ENH: make various List/Field move constructors noexcept 2023-10-11 18:11:37 +00:00
ce1260cf70 ENH: improve DynamicList shrink and swapping
- shrink_to_fit()
  corresponds to std::vector naming.
  For DynamicList it is a *binding* request.

- shrink_unsafe()
  simply adjusts the capacity() to match the
  current size() without forcing a re-allocation.

  Useful when collapsing to a non-dynamic list to avoid reallocation
  and copying contents. The memory cleanup will still occur properly
  at a later stage.

- DynamicList::swap(List&)
  simple recovery of content into a non-dynamic List that also
  ensures that the capacity is correctly updated.

STYLE: promote List::capacity() to public visibility (like std::vector)

STYLE: remove unused expandStorage() method

- simply a wrapper for resize(capacity())
2023-10-11 18:11:37 +00:00
1d43e45fdd ENH: add test application for fileHander writing
COMP: update applications/test
2023-10-11 18:11:37 +00:00
1af40e7dfe STYLE: remove unused (transitional) methods from CircularBuffer
- old methods (and class) were not widely used
2023-10-11 18:11:37 +00:00
524c953af3 STYLE: use List clear() instead of setSize(0), resize(0)
- adds some consistency
2023-10-11 18:11:37 +00:00
9ac0f03963 ENH: pisoFoam: allow runTimeModifiable. Fixes #2997. 2023-10-11 15:54:30 +01:00
dfb08af3de BUG: ThermoSurfaceFilm: reintroduce energy to film sources (fixes #2996) 2023-10-11 11:23:08 +01:00
3458cea49e FIX: avoid bad copy (foamCloneCase) when time dir is missing (fixes #2975) 2023-10-08 17:58:53 +02:00
a811e25556 DOC: StandardWallInteraction: correct restitution coeff (fixes #2676) 2023-10-04 17:06:43 +01:00
f7dfb02d12 DEFEATURE: remove unused (and partly-broken) SubDimensionedField 2023-09-27 19:37:18 +02:00
a252677618 BUG: Lambda2: reverse the sign of the governing equation (fixes #2731) 2023-09-27 17:09:13 +01:00
99f5d9a7db BUG: overset: correct sizing. Fixes #2985. 2023-09-18 18:12:37 +01:00
133149a1dd ENH: snappyHexMesh: mutliple inside points. Fixes #2981 2023-09-14 16:12:53 +01:00
6396256522 BUG: cyclicAMI: operate on copy. Fixes #2980
also
- steal nbr value
- do not copy nbr value if different internalfield
2023-09-14 15:10:15 +01:00
8fe025cb8e BUG: snappyHexMesh: correct oppositeness checking. Fixes #2971 2023-09-07 11:55:57 +01:00
5d98eec6af ENH: re-toggle warnings in functionObjectList execution (#2973)
- when running with "errors warn;" it will reset the warnings counter
  (if any) when it returns to a good state.
  This re-enables un-suppressed warnings for the next cycle.
  Also reset the warnings counter on end().

ENH: add short-circuit in HashTable::erase(key)

- skip and return false if the table is empty or the key is not found.
  This makes for faster no-op behaviour.
2023-09-06 10:19:38 +02:00
2d76514b5b Merge branch 'issue-2966-errorhandling' into 'develop'
ENH: add error handling for empty surfaces in surfaceFieldValue (#2966)

See merge request Development/openfoam!627
2023-09-05 15:37:33 +00:00
2e3f0811a0 ENH: error handling for empty surfaces in surfaceFieldValue (#2966)
- for workflows with appearing/disappearing patches (for example)
  can specify that empty surfaces should be ignored or warned about
  instead of raising a FatalError.

  Note that this handling is additional to the regular top-level
  "errors" specification. So specifying 'strict' will only actually
  result in a FatalError if the "errors" does not trap errors.

- "ignore" : any empty surfaces are simply ignored and no
  file output (besides the header).

- "warn" : empty surfaces are warned about a few times (10)
  and the file output contains a NaN entry

- "strict" : corresponds to the default behaviour.
  Throws a FatalError if the surface is empty.
  This error may still be caught by the top-level "errors" handling.
2023-09-05 15:36:53 +00:00
ff2abdf1f0 ENH: relocate functionObjectList errorHandling types to error (#2966)
- was previously private within functionObjectList, now exposed from
  error as 'handlerTypes' and 'handlerNames' enumeration.
2023-09-05 15:36:53 +00:00
f49403969e Merge branch 'extend-list-functionality' into 'develop'
Add SubList re-slicing, find within a List sub-section, uniformity enumeration

See merge request Development/openfoam!626
2023-09-05 15:36:17 +00:00
2e8e259217 CONFIG: increment API level to 2307 2023-09-05 10:15:57 +02:00
0250a1b0bb ENH: support List sub-slice searching, use std::find()
- support UList shallowCopy with pointer/size
  (eg, for slicing into or from span)

ENH: add SubList::reset() functionality

- allows modification of a SubList after construction.
  Previously a SubList had an immutable location after construction
  and there was no way to shift or change its location.

BUG: missed special handling for DynamicList<char>::readList (fixes #2974)

- equivalent to List<char>::readList, in which the stream is
  temporarily toggled from ASCII to BINARY when reading in a List of
  char data.
  This specialization was missed when DynamicList<T>::readList() was
  fully implemented.
2023-09-05 10:15:17 +02:00
aa1b6d9cbd ENH: add ListPolicy uniformity enumeration and algorithm
- defines values for EMPTY, UNIFORM, NONUNIFORM and MIXED
  that allow bitwise OR reduction and provide an algorithm
  for calculating uniformity

ENH: consolidate more efficient uniformity checks in PackedList

ENH: improve linebreak handling when outputting small matrices
2023-09-04 14:40:33 +02:00
df6de6ed33 CONFIG: runParallel with --oversubscribe for openmpi
- not always required, but useful when running some tutorials locally
2023-09-04 14:24:13 +02:00
f800ccc3d9 Merge branch 'update-memory-streams' into 'develop'
update and enhancements for memory-based streams

See merge request Development/openfoam!624
2023-09-01 14:44:56 +00:00
459aaad0f9 ENH: improve robustness of raw reading, file size checks
- use ignore instead of seekg/tellg to swallow input (robuster)

- check for bad gcount() values

- wrap Foam::fileSize() compressed/uncompressed handling into IFstream.

- improve handling of compressed files in masterUncollatedFileOperation.
  Previously read into a string via stream iterators.
  Now read chunk-wise into a List of char for fewer reallocations.
2023-09-01 14:44:49 +00:00
a341d09afc ENH: update and enhancement of memory-streams
- soft renames (ie, old names still available via typedefs) for more
  reasonable names and more coverage with std stream variants.

  The old names could be a bit cryptic.
  For example, uiliststream (== an unallocated/external list storage),
  which is written as std::ispanstream for C++23.

  Could similarly argue that IListStream is better named as
  ICharStream, since it is an input stream of characters and the
  internal storage mechanism (List or something else) is mostly
  irrelevant.

  Extending the coverage to include all std stream variants, and
  simply rewrap them for OpenFOAM IOstream types. This simplifies the
  inheritance patterns and allows reuse of icharstream/ocharstream as
  a drop-in replace for istringstream/ostringstream in other wrappers.

  Classes:
    * icharstream / ICharStream   [old: none / IListStream]
    * ocharstream / OCharStream   [old: none / OListStream]
    * ispanstream / ISpanStream   [old: uiliststream / UIListStream]
    * ospanstream / OSpanStream   [old: none / UOListStream]

  Possible new uses : read file contents into a buffer, broadcast
  buffer contents to other ranks and then transfer into an icharstream
  to be read from. This avoid the multiple intermediate copies that
  would be associated when using an istringstream.

- Use size doubling instead of block-wise incremental for ocharstream
  (OCharStream). This corresponds to the sizing behaviour as per
  std::stringstream (according to gcc-11 includes)

STYLE: drop Foam_IOstream_extras constructors for memory streams

- transitional/legacy constructors but not used in any code
2023-09-01 14:44:49 +00:00
6d7e67408e BUG: snappyHexMesh: correct oppositeness checking. Fixes #2971 2023-08-31 14:06:02 +01:00
313b1f71f1 BUG: mapFields: incorrect patches. Fixes #2944. 2023-08-31 09:45:12 +02:00
61cd298928 COMP: missing compilation of hostUncollated (fixes #2934) 2023-08-31 09:45:12 +02:00
d8f5714d1b Merge branch 'feature-nonblocking-cyclicAMI' into 'develop'
Support non-blocking construction of cyclic AMI

See merge request Development/openfoam!623
2023-08-30 15:52:01 +00:00
69169c5abe ENH: add non-blocking handling for cyclicAMI (#2963)
Co-authored-by: Mark Olesen <>
2023-08-30 13:39:16 +00:00
539d538d5a ENH: mapDistribute consistency improvements
- nonBlocking: receive before send

- nonBlocking: wait for receive requests, process and then wait for
  other requests. Can be extended to use polling...

- the 'fake' send (to self) now send copies into recv buffers instead
  of send buffers.
  This provides a clear separation of send and receive fields

- avoid unnecessary reallocations with PtrList of send/recv buffers

- remove outer looping for accessAndFlip and pass target field
  as parameter for inner looping instead

ENH: refine mapDistribute send/recv requests handling

- separate send/recv requests for finer control
- receive does not need access to PtrList of sendBuffers, since the
  send-to-self now uses the recvBuffers
2023-08-30 13:39:16 +00:00
c09acbb781 ENH: avoid list resizing when reindexing AMIInterpolation::append (#2933)
- create reindexing values as interleaved identity maps directly into
  the remapping lookup.
2023-08-30 13:39:16 +00:00
b931772369 ENH: mapDistribute subMapTotalSize(), constructMapTotalSize()
- the sum of the respective list sizes

COMP: add noexcept to trivial mapDistribute constructors
2023-08-30 13:39:16 +00:00
750d9084d4 ENH: improve addressing into labelRanges (#2933)
- totalSize() returns retrieve the linear (total) size
  (naming as per globalIndex)
- operator[] retrieves the referenced value (linear indexing)
- labels() returns a flattened labelList (as per labelRange itself)
2023-08-30 13:39:16 +00:00
6defeddbff BUG: mapFields: incorrect patches. Fixes #2944. 2023-08-30 11:46:25 +01:00
9d291ab4cc ENH: add Pstream::broadcastList()
- broadcasts list contiguous content as a two-step process:
    1. broadcast the size, and resize for receiver list
    2. broadcast contiguous contents (if non-empty)

  This avoids serialization/de-serialization memory overhead but at
  the expense of an additional broadcast call.
  The trade-off of the extra broadcast of the size will be less
  important than avoiding a memory peak for large contiguous mesh data.

REVERT: unstable MPI_Mprobe/MPI_Mrecv on intelmpi + PMI-2 (#2796)

- partial revert of commit c6f528588b, for NBX implementation.
  Not yet flagged as causing errors here, but eliminated for
  consistency.
2023-08-29 11:24:16 +02:00
0e11f47f74 STYLE: prefer emplace_back() to append() + last() 2023-08-29 11:24:16 +02:00
698e05eeb3 STYLE: prefer push_uniq() to appendUniq
- more consistency with push_back etc.
2023-08-29 11:24:16 +02:00
2395e493d1 ENH: simplify add/remove patch/zone groups
STYLE: reuse polyBoundaryMesh patchSizes(), patchStarts()
2023-08-29 11:24:16 +02:00
12916cd7a3 ENH: additional fstream pointer constructors with IOstreamOption
- allow future tweaking based on the target stream format.

- add ifstreamPointer::open().
  Allows default construct followed by open()
2023-08-29 11:24:13 +02:00
b66369fb37 ENH: add sigFpe::fillNan(char* buf, size_t count)
- simplifies use with other allocators (eg, memory pools).
  Can also be used with other containers.

  vectorField fld = ...;
  sigFpe::fillNan(fld.data_bytes(), fld.size_bytes());

COMP: inline sigFpe::ignore helper class

- now unused (may be removed in the future), but can avoid compiling
  code for it

COMP: missing sigStopAtWriteNow() definition for MSwindows
2023-08-29 10:01:41 +02:00
b236e1493c SUBMODULE: compilation fix for visualization 2023-08-28 18:11:44 +02:00
a6744d0814 ENH: add is_range test to pTraits
- helps support algorithms with list-based forwarding
2023-08-28 15:50:32 +02:00
1e2858e8cb ENH: attachDetach: use parallel sizes. See #2969 2023-08-24 13:17:25 +01:00
09d86dc02b Merge branch 'update-scoped-dictionary' into 'develop'
ENH: change internal dictionary separator to '/' (#1073)

See merge request Development/openfoam!622
2023-08-21 12:35:15 +00:00
36f8542e01 TUT: use '/' dictionary scoping for variables and foamDictionary (#1073)
- leave windAroundBuildings blockMeshDict with older '.' syntax
  (to test compatibility)
2023-08-21 12:12:41 +02:00
886ba89ddb ENH: change internal dictionary separator to '/' (#1073)
- simplifies internal handling (like a fileName) and allows the
  dictionary name to be used with unambiguous addressing.
  The previous dot (.) separator is ambiguous (ie, as dictionary
  separator or as part of a keyword).

ENH: foamDictionary report -add/-set to stderr
2023-08-21 08:40:39 +02:00
778796853d CONFIG: enable use of stricter deprecation warnings
- selected with '+strict' in WM_COMPILE_CONTROL or 'wmake -strict', it
  enables the FOAM_DEPRECATED_STRICT() macro, which can be used to
  mark methods that are implicitly deprecated, but are not yet marked
  as full deprecated (eg, API modification is too recent, generates
  too many warnings).  Can be considered a developer option.
2023-08-21 08:39:36 +02:00
224c3199aa CONFIG: enable xcrun with cc/c++ based on WM_COMPILE_CONTROL (#2965)
- adding in +xcrun into WM_COMPILE_CONTROL changes the compiler
  settings as follows (for MacOS)

      cc         := xcrun cc
      CC         := xcrun c++ -std=c++14
2023-08-18 15:46:25 +02:00
e4f2efec18 COMP: add rpath information to MacOS compilation rules (#2948)
- since the Apple SIP (System Integrity Protection) clears environment
  variables such as DYLD_LIBRARY_PATH, a number of workarounds have
  been used to provide shadow values. However, for a more robust
  installation using -rpath at compilation time appears to be the
  better solution.

  In addition to the usual -rpath specification with absolute file
  paths, MacOS supports (@loader_path, @executable_path) as well.
  Now default to link with rpath information for MacOS, which can be
  disabled by adding `~rpath` in WM_COMPILE_CONTROL

  Explicit library paths handled:
    - FOAM_FOAM_EXT_LIBBIN, FOAM_EXT_LIBBIN/FOAM_MPI

  The executable rpaths are handled assuming a structure of
     install-path/bin
     install-path/lib/$(FOAM_MPI)
     install-path/lib

  Absolute compile-time paths for FOAM_USER_LIBBIN, FOAM_SITE_LIBBIN
  and FOAM_LIBBIN are not handled since these are either too fragile
  (FOAM_USER_LIBBIN and FOAM_SITE_LIBBIN values) or covered via
  @loader_path anyhow (FOAM_LIBBIN).

  Since the value of FOAM_MPI is a compile-time value, this rpath
  treatment makes the installation less suitable for runtime changes
  to the MPI vendor/version.

  Note: no rpath added for c-only compilations since there are
  currently no c-only libraries or executables with dynamic loading
2023-08-18 15:46:12 +02:00
3630333526 ENH: improve FPE handling for Apple and ARM64 (#2956) 2023-08-18 15:44:12 +02:00
97668eab26 STYLE: update noexcept and default construct for signals
- eliminate ClassName in favour of simple debug

- include Apple-specific FPE handling after local definition
  to allow for more redefinitions

COMP: remove stray <csignal> includes
2023-08-18 15:42:18 +02:00
b620152191 ENH: add UPstream::msgType() setter method and UPstream::incrMsgType()
- like UPstream::parRun() etc, returns old value
2023-08-18 15:08:42 +02:00
03ca52b036 ENH: PtrList, PtrDynList, HashPtrTable try_emplace() method
- naming like std::map::try_emplace(), it behaves like emplace_set()
  if there is no element at the given location otherwise a no-op

ENH: reuse existing HashPtrTable 'slot' when setting pointers

- avoids extra HashTable operations
2023-08-18 13:55:32 +02:00
11a1f78338 Merge branch 'feature-delayed-compound-reading' into 'develop'
Extend ITstream handling and provision for delayed reading of compound tokens

See merge request Development/openfoam!621
2023-08-17 08:16:56 +00:00
268de43afc ENH: provision for delayed reading of compound tokens (#2953)
- the construction of compound tokens is now split into two stages:
    - default construct
    - read contents
  This permits a larger variety of handling.

- the new token::readCompoundToken(..) method allows for simpler
  more failsafe invocations.

- forward resize(), read() methods for compound tokens to support
  separate read and population.
  Top-level refCompoundToken() method for modify access.

ENH: split off a private readCompoundToken() method within ISstream

- this allows overloading and alternative tokenisation handling for
  derived classes
2023-08-16 16:22:17 +02:00
43f8b477b7 ENH: additional ITstream access/manipulate methods
- simplifies iteration of ITstream using nRemainingTokens() and skip()
  methods or directly as a list of tokens.

  The currentToken() method returns const or non-const access to
  the token at the current tokenIndex.

  The peekToken(label) method provides failsafe read access to tokens
  at given locations.

ENH: add primitiveEntry construct with moving a single token
2023-08-16 16:22:17 +02:00
bbbab8a9c2 Merge branch 'feature-container-algorithms' into 'develop'
Increase usage of std algoritms within the OpenFOAM List classes. Remove reliance on linked-list during reading

See merge request Development/openfoam!620
2023-08-16 12:58:09 +00:00
2422e6f061 ENH: use std algorithms for copy/move/compare within List containers
ENH: add List resize_fill variant. Fuses resize_nocopy + uniform fill

COMP: avoid cast ambiguity when assigning Foam::zero to UList<char>
2023-08-16 12:28:12 +02:00
eeb9d144e3 STYLE: qualify Swap with Foam:: prefix (visibility)
- drop unnecessary Foam::Swap specializations when MoveConstructible
  and MoveAssignable already apply. The explicit redirect to swap
  member functions was needed before proper move semantics where
  added.

  Removed specializations: autoPtr, refPtr, tmp, UList.
  Retained specialization: DynamicList, FixedList.

     Special handling for DynamicList is only to accommodate dissimilar
     sizing template parameters (which probably doesn't occur in
     practice).
     Special handling for FixedList to apply element-wise swapping.

- use std::swap for primitives. No need to mask with Foam::Swap wrapper
2023-08-16 12:28:09 +02:00
fabd3f4e0c ENH: eliminate reliance on SLList during reading
- fully implement DynamicList::readList() instead of simply
  redirecting to List::readList(). This also benefits DynamicField.
  Leverage DynamicList reading to simplify and improve CircularBuffer
  reading.

- bracket lists are now read chunk-wise instead of using a
  singly-linked list. For integral and vector-space types
  (eg, scalar, vector, etc) this avoids intermediate allocations
  for each element.

ENH: add CircularBuffer emplace_front/emplace_back

STYLE: isolate to-be-deprecated construct/assign forms

- still have construct/assign FixedList from a C-array.
  This is not really needed, can use std::initializer_list

- still have construct/assign List from SLList.
  Prefer to avoid these in the future.

DEFEATURE: remove construct/assign FixedList from SLList

- never used

DEFEATURE: remove move construct/assign List from SLList

- now unused. Retain copy construct/assign from SLList for transition
  purposes.
2023-08-16 12:27:04 +02:00
7828067ef6 BUG: snappyHexMesh: support dryRun. Fixes #2959 2023-08-14 13:01:42 +01:00
53b3fff7d5 Merge branch 'feature-pTraits-vectorspace' into 'develop'
Extend traits to include VectorSpace tests and wrapped access to pTraits static members

See merge request Development/openfoam!619
2023-08-11 12:40:00 +00:00
066a5a997a CONFIG: update compiler minimums (gcc-7.5.0) and standard (c++14) 2023-08-11 10:50:13 +02:00
4daaf6dd2a ENH: support move sematics for get/set putback token 2023-08-10 16:39:31 +02:00
944840f8d6 ENH: polyMesh/faMesh hasGlobalData() query
- test for existing globalData() or perhaps use DIY globalIndex instead

STYLE: check for non-ASCII instead of BINARY with compression

- allows for other non-ASCII formats
2023-08-10 16:39:25 +02:00
1340bc50bd STYLE: qualify zero/one dispatch tags with Foam:: prefix
- use Foam::zero{} instead of Zero with tagged re-dispatch
2023-08-10 11:51:04 +02:00
97a42df7ba ENH: add VectorSpace trait tests and evaluations
- is_vectorspace :
  test existence and non-zero value of the Type 'rank' static variable

- pTraits_rank :
  value of 'rank' static variable (if it exists), 0 otherwise

- pTraits_nComponents :
  value of 'nComponents' static variable (if it exists), 1 otherwise

- pTraits_has_zero :
  test for pTraits<T>::zero member, which probably means that it also
  has one, min, max members as well

Note that these traits are usable with any classes. For example,

  - is_vectorspace<std::string>::value  ==> false
  - pTraits_nComponents<std::string>::value  ==> 1
  - pTraits<std::string>::nComponents  ==> fails to compile

  Thus also allows testing pTraits_rank<...>::value with items
  for which pTraits<...>::rank fails to compile.

  Eg, cyclicAMIPolyPatch::interpolate called by FaceCellWave with a
  wallPoint.

     pTraits<wallPoint>::rank ==> fails to compile
     is_vectorspace<wallPoint>::value ==> false

GIT: relocate ListLoopM.H to src/OpenFOAM/fields/Fields (future isolation)
2023-08-10 10:38:39 +02:00
286de9dde9 BUG: filmPyrolysisRadiativeCoupledMixed - corrected field retrieval. See #2955 2023-08-03 19:47:22 +01:00
5eacd8257b Merge branch 'feature-subsetMesh-exclude-patches' into 'develop'
Support select/ignore patches for subsetMesh, extend select/ignore to general selection (#2947)

See merge request Development/openfoam!618
2023-08-02 15:06:45 +00:00
aad4c2222e ENH: subsetMesh -exclude-patches (#2947)
STYLE: use -exclude-patches instead of -excludePatch for other utilities

- avoids inconsistencies with utilities like foamToVTK etc.
2023-08-02 12:35:10 +02:00
14f7d44ca0 ENH: patch/zone indices with select/ignore combination
STYLE: prefer indices() to patchSet() with warn=false
2023-08-02 12:34:41 +02:00
db39f196cc Merge branch 'update-selection-ordering' into 'develop'
Updates to function objects handling of patches / selection names for parallel consistent order

See merge request Development/openfoam!617
2023-08-01 15:26:42 +00:00
2fc2d1f95f TUT: missing ';' for solverInfo 2023-07-31 20:11:32 +02: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
d65e2d89b5 ENH: use MinMax for bounds management in binModels (code simplication) 2023-07-31 20:11:32 +02:00
dc95242cd2 ENH: use sorted order for fieldSelection::selectionNames() (#2819)
- return a sorted wordList instead of a wordHashSet to ensure that
  fields will be processed in consistent order in parallel
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
5397c9ac04 COMP: use csorted() instead of sorted() 2023-07-31 20:11:32 +02:00
129b738136 ENH: define IOobjectList::csorted(), deprecate some sorted() const methods
- prefer csorted() method for const access since it ensures that the
  return values are also const pointers (for example) even if
  the object itself can be accessed as a non-const.

- the csorted() method already existed for HashTable and
  objectRegistry, but now added to IOobjectList for method name
  consistency (even although the IOobjectList only has a const-access
  version)

ENH: objectRegistry with templated strict lookup

- for lookupClass and csorted/sorted. Allows isType restriction as a
  compile-time specification.
2023-07-31 20:11:32 +02:00
0eb4354ee0 ENH: use DynamicList for handling stored objects (ReadFields)
- DynamicList can be used as a LIFO with fewer allocations than a
  linked-list would have.

- support generic name matcher for readFields()
2023-07-31 20:11:32 +02:00
f18a29a742 ENH: subsetMesh suppress wildcard selection of processor patches (#2947) 2023-07-31 14:07:17 +02:00
36161e682a STYLE: FOAM_DEPRECATED_FOR instead of FOAM_DEPRECATED
- explains what the preferred replacement should be
2023-07-31 14:07:10 +02:00
a3ec19c344 Merge branch 'update-emplace' into 'develop'
refine PtrList and other emplace methods

See merge request Development/openfoam!616
2023-07-28 14:41:15 +00:00
4dfafc3c36 ENH: store sorted mesh pointers for vtkWrite, areaWrite
- replaces HashTable of pointers
2023-07-27 16:52:03 +02:00
945e3e41b1 ENH: more consistent use of good() or direct testing instead valid() 2023-07-27 16:52:03 +02:00
76efcba4c7 ENH: simpler handling of dictionary start/end line numbers
STYLE: use front(), back(), push_front(), push_back() methods
2023-07-27 16:52:03 +02:00
7cae3b9660 ENH: add HashTable zero-size construct, move construct is noexcept
BUG: HashTable::operator+= self-assignment check was being ignored

STYLE: minor code cleanup for templated Dictionary types
2023-07-27 16:52:03 +02:00
8117cde596 ENH: use emplace_set, emplace_back to simplify code
- eg, for cloud fields, tmp emplace when reading fields etc.
2023-07-27 16:52:03 +02:00
63258d0b33 ENH: refine PtrList emplace method, add emplace for autoPtr/refPtr...
* resize_null() methods for PtrList variants
  - for cases where an existing PtrList needs a specific size and
    but not retain any existing entries.

    Eg,
        ptrs.resize_null(100);

    vs.   ptrs.free();     ptr.resize(100);
    or    ptr.resize(100); ptrs.free();

* remove stored pointer before emplacing PtrList elements
  - may reduce memory peaks

* STYLE: static_cast of (nullptr) instead of reinterpret_cast of (0)

* COMP: implement emplace_set() for PtrDynList
  - previously missing, which meant it would have leaked through to the
    underlying PtrList definition

* emplace methods for autoPtr, refPtr, tmp
  - applies reset() with forwarding arguments.
    For example,

        tmp<GeoField> tfld = ...;

    later...

        tfld.emplace(io, mesh);

    vs.
        tfld.reset(new GeoField(io, mesh));
    or
        tfld.reset(tmp<GeoField>::New(io, mesh));

    The emplace() obviously has reduced typing, but also allows the
    existing stored pointer to be deleted *before* creating its
    replacement (reduces memory peaks).
2023-07-27 16:52:03 +02:00
5e334c0686 ENH: more consistent use of AMIInterpolation distributed() query 2023-07-27 16:52:03 +02:00
32903d337e ENH: add slice/range support to UPstream::waitSomeRequests()
- this simplifies polling receives and allows separation from
  the sends

ENH: add UPstream::removeRequests(pos, len)

- cancel/free of outstanding requests and remove segment from the
  internal list of outstanding requests
2023-07-27 16:52:03 +02:00
f717f79833 ENH: simplify copy/filling of List containers. Make swap noexcept
- internal use of std::fill instead of legacy manual code

- use UList<T>::deepCopy() to reduce code duplication
2023-07-27 16:41:13 +02:00
3430ab3aa8 STYLE: add reset() method for labelRange for symmetry with MinMax 2023-07-26 18:48:45 +02:00
bd5021e31c BUG: AMI - areaNormalisationMode now written to boundary file. Fixes #2949 2023-07-26 15:39:02 +01:00
1fc9313c97 BUG: Conservative AMI - use supplied points when resetting the AMI. See #2078 2023-07-26 15:36:25 +01:00
779c3fe11e STYLE: use 'is_sorted()' instead of 'sorted()' for readers, Pair, ...
- avoids naming ambiguity between querying sorted state vs returning a
  sorted list (for example)

ENH: add 'good()' method to a few more classes
2023-07-19 14:10:31 +02:00
8562f4d7a4 STYLE: use UPtrList::test() instead of separate bounds checking 2023-07-19 14:10:31 +02:00
65cddb6120 ENH: specialise bitOr<unsigned char> reduction
STYLE: remove extraneous parRun check before Pstream::combineReduce

- already handled by Pstream::combineReduce itself

STYLE: remove deprecated globalMeshData::ListPlusEqOp

- deprecated/superseded by ListOps::appendEqOp (2020-09)

STYLE: qualify stream format with IOstreamOption (easier to find)
2023-07-19 14:06:23 +02:00
95b820368c Merge branch 'feature-writeLeakFaces' into 'develop'
ENH: snappyHexMesh: write leak-closure faces

See merge request Development/openfoam!615
2023-07-19 11:58:09 +00:00
ab0d4d95ff ENH: snappyHexMesh: write leak-closure faces 2023-07-19 12:55:02 +01:00
a8df552998 ENH: checkMesh: use built-in merging 2023-07-18 12:03:58 +01:00
edb455ca97 TUT: weightedFluxExample: correct plot indices (fixes #2940) 2023-07-13 16:07:49 +01:00
ae6de092d5 ENH: update vscode-settings (fixes #2935) 2023-07-06 16:23:53 +01:00
69dae2e008 ENH: adjust/update debugSurfaceWriter flags
- removed gatherv control.
  The globalIndex information is cached on the merged surface
  and thus not triggered often.

- strip out debug mergeField method which was a precursor to
  what is now within surfaceWriter itself.

- add 'merge' true/false handling to allow testing without
  parallel merging (implies no writing)
2023-07-05 22:08:54 +02:00
63753605a0 STYLE: update surface writers to use UPstream, IOobjectOption naming 2023-07-05 22:03:09 +02:00
7a29eb9b3b STYLE: remove transitional import of std::unique_ptr in Foam namespace 2023-07-05 18:10:15 +02:00
4db98e5de4 COMP: missing compilation of hostUncollated (fixes #2934) 2023-07-05 17:05:44 +02:00
115bbd2699 ENH: reinstate support for cubic Brownian motion (#2922)
- continue to support spherical by default (for compatibility)
  but add the 'spherical' switch to disable that and use a cubic
  distribution instead.

STYLE: reduce number of inline files

  Co-authored-by: Mark Olesen <>
2023-07-05 16:55:58 +02:00
8ee4b52560 ENH: provide MPI native bitOrOp reduce with single/multiple values
- can be used, for example, to track global states:

      // Encode as 0:empty, 1:uniform, 2:nonuniform, 3:mixed
      PackedList<2> uniformity(fields.size());

      forAll(fields, i)
      {
          uniformity.set(i, fields[i].whichUniformity());
      }

      reduce
      (
          uniformity.data(),
          uniformity.size_data(),
          bitOrOp<unsigned>()
      );
2023-07-05 15:14:26 +02:00
f398d7b313 ENH: consolidate PstreamBuffers reduced communication bookkeeping
- can reduce communication by only sending non-zero data (especially
  when using NBX for size exchanges), but proper synchronisation with
  multiply-connected processor/processor patches (eg, processorCyclic)
  may still require speculative sends.

  Can now setup for PstreamBuffers 'registered' sends to avoid
  ad hoc bookkeeping within the caller.
2023-07-05 14:03:54 +02:00
a1e34bb251 ENH: use mapDistribute linear construct order in a few places
- simplifies code by avoiding code duplication:
  * parLagrangianDistributor
  * meshToMesh (processorLOD and AABBTree methods)

BUG: inconsistent mapping when using processorLOD boxes (fixes #2932)

- internally the processorLODs createMap() method used a 'localFirst'
  layout whereas a 'linear' order is what is actually expected for the
  meshToMesh mapping. This will cause of incorrect behaviour
  if using processorLOD instead of AABBTree.
  A dormant bug since processorLOD is not currently selectable.
2023-07-04 20:29:07 +02:00
0d456a4c66 ENH: support alternative construct map layout mapDistributeBase
- when constructing from a sendMap, can now also specify a linear
  receive layout instead of a localFirst layout

  This will make it easier to reduce some code (#2932)

- add missing interface for simple distribute of List/DynamicList
  with a specified commsType. Was previously restricted to
  defaultCommsType only.

ENH: mapDistribute distribute/reverseDistribute with specified commsType

STYLE: prefer UPstream vs Pstream within mapDistribute
2023-07-04 17:29:15 +02:00
728527a345 ENH: use exprValue in exprResult
- replaces previous (similar) union but leverages the type tag for
  handling logic

STYLE: remove unneeded refCount from exprResult

COMP: operator!= as member operator (exprResultDelayed, exprResultStored)

- the operator!= as a free function failed to resolve after removing
  the refCount inheritance
2023-07-04 17:25:26 +02:00
5635e14f81 ENH: add low-level polymorphic/boxed exprValue
- primarily for handling expression results,
  but can also be used as a universal value holder.

  Has some characteristics suitable for type-less IO:
  eg, is_integral(), nComponents()

ENH: add is_pointer() check for expression scanToken
2023-07-04 17:25:26 +02:00
fc2760ab9c ENH: simplify/extend decomposedBlockData retrieve block information
- handle existence/non-existence of a FoamFile header automatically
- support an upper limit when getting the number of blocks and
  use that for a hasBlock(...) method, which will stop reading sooner.
2023-07-04 17:25:25 +02:00
f8987e64ed ENH: add ITstream::emptyStream()
- returns readable reference to an empty ITstream for functions
  needing to return an ITstream reference but which
  don't have anything to return.
2023-07-04 17:25:25 +02:00
a215f94ec4 ENH: expose read option for Time construction
- Time is normally constructed with READ_MODIFIED for its controlDict
  and objectRegistry, but for certain applications (eg, redistributePar)
  it can be useful to construct without file monitoring and specifying
  MUST_READ instead.

  Example,

  Info<< "Create time\n" << Foam::endl;
  Time runTime
  (
      Time::controlDictName,
      args,
      false,   // Disallow functionObjects
      true,    // Allow controlDict "libs"
      IOobjectOption::MUST_READ  // Instead of READ_MODIFIED
  );
2023-07-04 17:25:25 +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
7a857b318a DOC: document/warn about GeometricField constructor being always read (#2926)
- no change in behaviour except to emit a warning when called with the
  a non-reading readOption

STYLE: remove redundant size check

- size checking is already done by Field::assign() within the
  DimensionedField::readField
2023-07-04 17:25:22 +02:00
aff5c3b680 DOC: update links to source packs (#2927) 2023-07-03 11:01:48 +02:00
a6e826bd55 Merge branch 'OpenFOAM-v2306-rc1' 2023-06-30 14:43:29 +01:00
763bf4674d RELEASE: Updated headers to v2306 2023-06-28 16:35:48 +01:00
fbf00d6bf2 RELEASE: Updated version to v2306 2023-06-28 16:35:48 +01:00
2d145e070e COMP: chtMultiRegionTwoPhaseEulerFoam: compile local files only 2023-06-28 16:35:47 +01:00
beb0c910a0 REVERT: turbulentTemperatureRadCoupledMixed: remove merge-review updates (!609) 2023-06-28 16:35:47 +01:00
664e8e0060 DOC: Updated contibutor list 2023-06-27 14:28:22 +01:00
7b20e888a8 REGRESSION: inconsistent constructMap order in meshToMesh::calcProcMap
- commit fb69a54bc3 accidentally changed the constructMap compact
  order from linear ordering to local elements first order. Seems to
  interact poorly with other bookkeeping so doing a partial revert,
  but still replacing the old allGatherList with exchangeSizes.

Note:
   the processorLOD method does actually use a constructMap with local
   elements first ordering, so some inconsistency may still exist
   there
2023-06-27 13:20:07 +02:00
c4b4d1e03e BUG: expressions rand() ignores objectRegistry timeIndex (fixes #2923) 2023-06-26 17:49:18 +02:00
4d7c827bd7 ENH: checkMesh: report on processor patch if non-parallel. Fixes #698 2023-06-26 12:14:30 +01:00
d6d319d95a TUT: mixerVessel: update problematic entries 2023-06-26 10:28:58 +01:00
f93b4338d5 ENH: Added new limitTurbulenceViscosity fvOption
Corrects turbulence viscosity field (e.g. nut) within a specified
region by applying a maximum limit, set according to a coefficient
multiplied by the laminar viscosity:

    \nu_{t,max} = c \nu

Corrections applied to:

  nut  | Turbulence vicosity                   [m2/s2]

Usage
    Minimal example by using \c constant/fvOptions:
    \verbatim
    limitTurbulenceViscosity1
    {
        // Mandatory entries (unmodifiable)
        type            limitTurbulenceViscosity;

        // Optional entries (runtime modifiable)
        nut             nut;
        c               1e5;

        // Mandatory/Optional (inherited) entries
        ...
    }
2023-06-26 10:19:22 +01:00
c9645e61a6 ENH: AMI - added option to control area normailisation mode
The optional areaNormalisationMode entry determines how the area normalisation
is performed. Options are:

- `project`: tri face area dotted with patch face normal; same as v2212 (default)
- `mag`: tri face area magnitude (v2206 and earlier)

Example usage:

    AMI1
    {
        type            cyclicAMI;
        ...
        areaNormalisationMode mag;
        //areaNormalisationMode project;
    }
2023-06-26 10:19:22 +01:00
b264d2e913 CONFIG: reinstate FOAM_LD_LIBRARY_PATH adjustments (#2801)
- the special MacOS dlopen handling (commit f584ec97d0)
  did not fully solve the problem with SIP clearing.

  Eg, sourcing the RunFunctions (for runParallel) triggers SIP and
  clears DYLD_LIBRARY_PATH. With the cleared path it finds the dummy
  libraries: the dummy Pstream::init() fails.
2023-06-26 09:47:07 +02:00
c3660b4123 STYLE: AMI - updated output to show AMI patch names
Helps when running/debugging cases with multiple AMI patches

Example:

AMI: Creating AMI for source:AMI1 and target:AMI2
AMI: Patch source faces: 96
AMI: Patch target faces: 96
AMI: Patch source sum(weights) min:1 max:1 average:1
AMI: Patch target sum(weights) min:1 max:1 average:1
2023-06-25 16:49:11 +01:00
642d8a9dfa COMP: guards around #define OMPI_SKIP_MPICXX (avoids compiler warnings) 2023-06-23 16:05:19 +02:00
2afd2320ce ENH: yPlus: support disable of field writing (#2813)
- for simulations where the yPlus is needed for other purposes or
  just for obtaining information on the patches it can be useful
  to disable field writing and save disk space.

  The 'writeFields' flag (as per some other function objects)
  has been added control writing the yPlus volume field.

  If unspecified, the default value is 'true' so that the yPlus
  function object continues to work as before.
  However, this default may change to 'false' in the future to align
  with other function objects.

ENH: wallShearStress: support disable of field writing

- similar to yPlus, the write() method combines writing information
  and writing the fields. The 'writeFields' flag allows some
  separation of that logic.
2023-06-23 16:05:19 +02:00
7edacd3ab0 ENH: yPlus: eliminate field IO control of controlDict (fixes #2813) 2023-06-22 17:34:31 +01:00
6a1e56e6e9 SUBMODULE: updates for OpenQBMM
- https://github.com/OpenQBMM/OpenQBMM/releases/tag/OpenFOAM-v2306
2023-06-22 17:28:08 +02:00
360aad19dc DOC: document the NBX and PstreamBuffers parameters 2023-06-22 17:26:35 +02:00
a3e6af8fcf BUG: processorCyclic: cell->point interpolation. Fixes #2817 2023-06-22 15:10:04 +01:00
183e9511e5 Merge branch 'fix-processorCyclic_reducedSending' into 'develop'
ENH: improve send/recv robustness in the presence of processorCyclic (#2814)

See merge request Development/openfoam!614
2023-06-22 12:19:14 +00:00
c5c7f2b7fe ENH: reduce local overheads in send/recv bookkeeping (#2814)
- replace Map with a List or DynamicList to reduce the number of
  operations and allocations within the loops.

  Use polyBoundaryMesh::nProcessorPatches() for initial capacity
  to avoid reallocations.
2023-06-22 12:16:45 +00:00
d5ed01dc70 ENH: boundary mesh nProcessorPatches() method
- returns the number of processorPolyPatch patches (finiteVolume)
  or else the number of processorFaPatch patches (finiteArea).

  These can be useful when sizing lists etc.
2023-06-22 12:16:45 +00:00
3dee3438d5 ENH: improve send/recv robustness in the presence of processorCyclic (#2814)
- the changes introduced in f215ad15d1 aim to reduce unnecessary
  point-to-point communication. However, if there are also
  processorCyclic boundaries involved, there are multiple connections
  between any two processors, so simply skipping empty sends will cause
  synchronization problems.

  Eg,

    On the send side:
        patch0to1_a is zero (doesn't send) and patch0to1_b does send
        (to the same processor).

    On the receive side:
        patch1to0_a receives the data intended for patch1to0_b !

  Remedy
  ======
     Simply stream all of send data into PstreamBuffers
     (regardless if empty or non-empty) but track the sends
     as a bit operation: empty (0) or non-empty (1)

     Reset the buffer slots that were only sent empty data.
     This adds an additional local overhead but avoids communication
     as much as possible.
2023-06-22 12:16:45 +00:00
0411a75e24 BUG: purgeWrite: not working for overset. Fixes #2815 2023-06-22 12:27:45 +01:00
4a5f542cb4 Merge branch 'feature-snappyHexMesh-no-balance' into 'develop'
ENH: snappyHexMesh: enable late balancing. Fixes #2792

See merge request Development/openfoam!607
2023-06-21 14:25:17 +00:00
d3419e4e56 ENH: snappyHexMesh: enable late balancing. Fixes #2792 2023-06-21 14:25:17 +00:00
da98104a79 COMP: streamFunction: avoid over-eager optimisation (fixes #2603) 2023-06-21 15:03:18 +01:00
aaf1fcf460 SUBMODULE: updates for adios, avalanche, external-solver
- adios: minor updates
- avalanche: bug fixes, improvements, new solver
- external-solver: improved cache handling, error checks, etc
2023-06-21 15:31:47 +02:00
c6741f5073 CONFIG: update completion cache (csh)
- drop the '-doc-source' from csh completion (rarely used option)
- includes the '-mpi-thread' and other newer options
2023-06-21 15:14:21 +02:00
09edb23c1d BUG: collated fails with controlDict watch files
- files might have been set during token reading so only on
  known on master processor.
  Broadcast names to all processors (even alhough they are only
  checked on master) so that the watched states remain synchronised
2023-06-21 14:56:06 +02:00
32386d0b39 TUT: turbulentFlatPlate: tighten solver settings for epsilon (fixes #2810) 2023-06-20 17:33:39 +01:00
3de090e602 BUG: UPstream::shutdown misbehaves with external initialisation (fixes #2808)
- freeCommmunicatorComponents needs an additional bounds check.
  When MPI is initialized outside of OpenFOAM, there are no
  UPstream communicator equivalents
2023-06-20 09:10:47 +02:00
67bd9119ee CONFIG: update kahip (3.15) and petsc (3.19.2) versions
- kahip includes patches to compile with gcc-13,
  improved CMake MPI detection

- petsc is the latest production release
2023-06-19 17:47: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
fc86e52451 ENH: extrapolateInternal() method for patch fields
- provides a more succinct way of writing

      {fa,fv}PatchField<Type>::patchInternalField(*this)

  as well as a consistent naming that can be used for patches derived
  from valuePointPatchField

ENH: readGradientEntry helper method for fixedGradient conditions

- simplifies coding and logic.
- support different read construct modes for fixedGradient
2023-06-19 17:47:03 +02:00
e54ead28e8 BUG: zeroFixedValue pointPatch not set correctly (fixes #2807) 2023-06-19 17:47:03 +02:00
34f12219bd ENH: base-level construct patch field with value
- more consistent with fvPatchField
2023-06-19 17:47:02 +02:00
f9d0895707 ENH: avoid spurious library loading for decomposePar, redistributePar
- individual processor Time databases are purely for internal logistics
  and should not be introducing any new library symbols: these will
  already have been loaded in the outer loop.
2023-06-19 17:05:45 +02:00
4412566c58 ENH: support command-line specification of MPI threads (#2791)
- MPI_THREAD_MULTIPLE is usually undesirable for performance reasons,
  but in some cases may be necessary if a linked library expects it.
  Provide a '-mpi-threads' option to explicitly request it.

ENH: consolidate some looping logic within argList
2023-06-19 17:05:45 +02:00
b2217d5e6b ENH: simplify inheritances for fileOperationInitialise
- can be broadly categorised as 'unthreaded'
  or 'collated' (threading requirement depends on buffering)
  without other opaque inheritances.

CONFIG: add hostUncollated to bash completion prompt
2023-06-19 17:05:45 +02:00
66a2894da8 ENH: parProfiling: add few more functionality to test 2023-06-19 15:53:27 +01:00
979b5a20cd ENH: update Visual Studio Code settings for new vscode versions (fixes #2805) 2023-06-19 10:01:49 +01:00
41cb168649 TUT: scalarTransport: avoid excessive number of output directories (fixes #2806) 2023-06-19 09:01:37 +01:00
5894e6ee8b Merge branch 'feature-fan-curve-momentum-source' into 'develop'
Feature: Fan momentum source fvOption based on fan curve

See merge request Development/openfoam!604
2023-06-15 13:21:30 +00:00
0f2bbbcbbe Feature: Fan momentum source fvOption based on fan curve 2023-06-15 13:21:29 +00:00
4c86664aba Merge branch 'feature-axisymmetric-fvdom-bc' into 'develop'
ENH: specularRadiation: add axisymmetric fvDOM boundary condition

See merge request Development/openfoam!610
2023-06-15 12:34:18 +00:00
ee26a36add ENH: specularRadiation: add axisymmetric fvDOM boundary condition 2023-06-15 12:33:38 +00:00
8f46e47931 Merge branch 'feature-preconditioner-cache' into 'develop'
ENH: PCG: cache preconditioner

See merge request Development/openfoam!612
2023-06-15 12:33:25 +00:00
40d6ba19b1 ENH: PCG: cache preconditioner 2023-06-15 12:33:25 +00:00
f1f797a815 Merge branch 'feature-ttrc-debug' into 'develop'
ENH: turbulentTemperatureRadCoupledMixed: add postprocessing elements

See merge request Development/openfoam!609
2023-06-14 14:36:28 +00:00
f4cc4d7652 ENH: turbulentTemperatureRadCoupledMixed: add postprocessing elements
- add writeFile functionality
- enable the optional calculation of heat-transfer coefficient fields

Co-authored-by: mattijs <mattijs>
2023-06-14 14:35:30 +00:00
d2e8c75dc9 Merge branch 'feature-sixdof-constraints-restraints' into 'develop'
ENH: sixDoF: add max/min angle constraints to the axis constraint

See merge request Development/openfoam!613
2023-06-14 14:30:55 +00:00
67c5e63819 ENH: sixDoF: add max/min angle constraints to the axis constraint 2023-06-14 14:29:13 +00:00
789db1d554 ENH: sixDoF: enable time-variant constraints in body motions 2023-06-14 14:29:13 +00:00
bfcf3b2ac4 ENH: sixDoF: add underlying-motion access to constraints 2023-06-14 14:29:13 +00:00
246d927573 Merge branch 'feature-fa-cache-grad' into 'develop'
ENH: finiteArea: enable gradient caches

See merge request Development/openfoam!611
2023-06-14 14:22:07 +00:00
188c303a27 ENH: finiteArea: enable cache-gradient mechanism 2023-06-14 14:21:27 +00:00
70874860b9 CONFIG: bump patch level for maintenance-v2212 2023-06-14 14:57:29 +02:00
528c5ed8eb CONFIG: set API level to 2306 (pre-release state)
- README updated to v2306
2023-06-14 13:55:38 +02:00
f584ec97d0 ENH: reimplement Foam::dlOpen() for macOS (#2801)
- The Apple SIP (System Integrity Protection) clears environment
  variables, which affects the behaviour of dynamic library loading
  (the DYLD_LIBRARY_PATH env variable).

  OpenFOAM shadows this variable as FOAM_LD_LIBRARY_PATH, which has
  been used to restore DYLD_LIBRARY_PATH (eg, in RunFunctions script).

  However, this solution is not quite complete, as it
    (a) requires sourcing of RunFunctions file,
    (b) additional errors appear depending on a user workflow.

  This changeset alleviates the problem by also iterating through
  paths stored in the shadow variable when loading dynamic libraries
  (if the DYLD_LIBRARY_PATH is empty).
2023-06-14 13:55:38 +02:00
83b1ebee6f COMP: replace sprintf with snprintf (MacOS), add note about vfork 2023-06-14 13:55:38 +02:00
ffbd05f72a DOC: add deprecation notes for exprFixed/exprMixed BCs (#2703)
- this functionality can now be handled directly within
  uniformMixedFvPatchField etc, which are also more flexible.
2023-06-14 13:55:38 +02:00
9489a5a101 COMP: replace selfComm/globalComm variables with functions instead (#2799)
- with C++11, static constexpr variables apparently also require
  definition in a translation unit and not just as inlined quantities.
  Mostly not an issue, however gcc with -O0 does not do the inlining
  and thus actually requires them to be defined in a translation unit
  as well.

  These variables were provided for symmetry with worldComm, but only
  used in low-level internal code. Changing to inlined functions
  solves the linkage issue and also aligns with the commWorld()
  function naming.

Mnemonics:
   MPI_COMM_SELF           => UPstream::commSelf()
   overall MPI_COMM_WORLD  => UPstream::commGlobal(), sometimes commWorld()
   local COMM_WORLD        => UPstream::commWorld()
2023-06-14 13:55:38 +02:00
a8cec219c3 ENH: add UPstream request cancellation (#2800)
- useful when speculative receives have been initiated but are no
  longer required.

  Combines MPI_Cancel() + MPI_Request_free() for consistent resource
  management. Currently no feedback provided if the request was
  satisfied by a completed send/recv or by cancellation (can be added
  later if required).
2023-06-14 13:52:58 +02:00
f4df00a4e9 ENH: support alternative registration name for solution "data" (#2797) 2023-06-13 20:41:53 +02:00
1cdba9b269 ENH: make checkMesh writing of bad edges optional (#2771)
- primarily relevant for finite-area meshes, in which case they can be
  considered to be an additional, detailed diagnositic that is
  normally not needed (clutters the file system).

  Writing can be enabled with the `-write-edges` option.
2023-06-13 20:41:53 +02:00
b87db82c05 ENH: particleTracks - reinstated label field output 2023-06-13 14:13:58 +01:00
dbba89fc92 ENH: InterfaceCompositionModel: add new combination 2023-06-13 09:04:27 +01:00
e92975075a ENH: sum reduction of nPoints/nFaces/nCells in a single call (globalMeshData)
STYLE: use labelRange instead of identity(...) for communicator
2023-06-12 15:39:05 +02:00
f096c34a80 REVERT: unstable MPI_Mprobe/MPI_Mrecv on intelmpi + PMI-2 (#2796)
- reverts commit c6f528588b
2023-06-12 15:32:06 +02:00
57c50bda79 CONFIG: re-export FOAM_DYLD_LIBRARY_PATH in foamJob (#2793) 2023-06-12 14:15:47 +02:00
b13c2c042f COMP: resolve clang/MacOS size ambiguities (fixes #2778) 2023-06-12 13:59:48 +02:00
1c9ea038d0 MISC: additional -repeat option for testing MPI_Comm leakage (#1598) 2023-06-12 13:59:47 +02:00
60fc3906dc Merge remote-tracking branch 'origin/master' into develop 2023-06-12 13:59:19 +02:00
2ac4e5f4d6 ENH: MGridGen: adapt to new GAMGAgglomeration API. Fixes #2795 2023-06-09 18:15:59 +01:00
3455d67d7f COMP: word: using uintptr_t needs <cstdint> 2023-06-07 20:22:13 +01:00
7bc3bc9194 DOC: Scalar: fix the comment (fixes #2794) 2023-06-07 15:09:48 +01:00
68c44f3219 COMP: distributedDILU: solveScalar support 2023-06-05 09:51:34 +01:00
9b5b5ecc75 BUG: DarcyForchheimer: fix debug condition for start times (fixes #2787) 2023-06-02 20:22:17 +01:00
f55adf6c5d Merge branch 'feature-distributedDIC' into 'develop'
Feature distributed DIC/DILU preconditioners

See merge request Development/openfoam!608
2023-06-01 16:21:00 +00:00
c8e224b598 ENH: lduMatrix: parallel version of DIC,DILU 2023-06-01 16:21:00 +00:00
ddf96afdfe Merge branch 'feature-particle-histogram' into 'develop'
ENH: ParticleHistogram: refactor PatchParticleHistogram function object

See merge request Development/openfoam!595
2023-06-01 08:24:29 +00:00
2eb2de5f8e ENH: ParticlePostProcessing: refactor PatchPostProcessing function object
- enable 'faceZones' support.
- enable 'writeFile' support to better control file output.
- rename 'PatchPostProcessing' as 'ParticlePostProcessing' for better clarity.
- fix #1808
2023-06-01 08:22:57 +00:00
c177637db2 ENH: ParticleHistogram: refactor PatchParticleHistogram function object
- enable 'faceZone' support.
- introduce 'cloudFunctionObjectTools' to simplify collection of particle info
  on patches or face zones.
- enable 'writeFile' support to better control file output.
- rename 'PatchParticleHistogram' as 'ParticleHistogram' for better clarity.
2023-06-01 08:22:57 +00:00
f0fca75726 Merge branch 'feature-masterCoarsest-restart' into 'develop'
Restarting local agglomeration inside masterCoarsets processor agglomeration

See merge request Development/openfoam!600
2023-06-01 08:19:05 +00:00
e566142f8a ENH: materCoarsest: input renaming 2023-06-01 08:17:58 +00:00
6a66a15b8f ENH: generalise masterCoarsest restart (GAMG) 2023-06-01 08:17:58 +00:00
0680d0c553 Merge branch 'feature-evaluation-check-bugfix-only' into 'develop'
ENH: coupled: enforce consistency. See #2783

See merge request Development/openfoam!606
2023-06-01 08:17:08 +00:00
adc38d55ac ENH: coupled: enforce consistency. See #2783 2023-06-01 08:14:42 +00:00
113fe48d0e ENH: faceAreaWeightAMI - report centre of problenm face. Fixes #2730 2023-05-30 18:00:21 +01:00
d94744e9f7 BUG: parcel injection models - corrected volume calculations. Fixes #2708 2023-05-30 12:07:33 +01:00
dcf005508b BUG: ReversibleReaction::kr - replaced 1e-6 by VSMALL. Fixes #2704 2023-05-30 11:53:47 +01:00
fcbfa40b0b ENH: checkMesh: small message change 2023-05-30 10:41:15 +01:00
30dc465615 ENH: update timeActivatedFileUpdate with distributed fileHandler 2023-05-23 15:03:23 +02:00
4984153d2d ENH: Update faMeshTools and fvMeshTools for read handler
- extend the loadOrCreateMesh functionality to work in conjunction
  with file handlers. This allows selective loading of the mesh parts
  without the ugly workaround of writing zero-sized meshes to disk and
  then reading them back.

Co-authored-by: Mark Olesen <>
2023-05-23 15:03:23 +02:00
8d2bf3fc2e ENH: soft update of autoPtr<fileOperation> to refPtr<fileOperation>
Co-authored-by: mattijs <mattijs>
2023-05-23 15:03:23 +02:00
8a060e87cb ENH: fileHandler support for faMeshDistributor and field distributors
- fatten the interface to continue allowing write control with a bool
  or with a dedicated file handler. This may slim down in the future.

Co-authored-by: mattijs <mattijs>
2023-05-23 15:01:09 +02:00
d34dfbe0b7 ENH: dummy fileOperation: placeholder for interfaces taking a reference
STYLE: align readOnProc/writeOnProc naming within masterUncollated
2023-05-23 11:12:37 +02:00
a34262966b STYLE: use fileOperation nProcs() instead of setNProcs() 2023-05-22 18:04:21 +02:00
5284bc3019 ENH: add fileOperation::New with a subset of ranks
- replicate the given fileHandler properties with
  a subset of (global) ranks
2023-05-22 18:02:43 +02:00
73f6c7fe28 ENH: centralise handling of fileOperations communicator subset
- use local function for the decision making, whether worldComm or a
  dedicated communicator is needed (and which sibling ranks are
  involved)

Co-authored-by: mattijs <mattijs>
2023-05-22 18:02:41 +02:00
401c6646be ENH: support fileHandler in fieldsDistributor 2023-05-22 18:00:06 +02:00
821d395259 ENH: use refPtr fileHandler in decomposeFaFields, faMeshReconstructor 2023-05-22 17:59:33 +02:00
06147dabe7 ENH: more flexible handling of FOAM_IORANKS
- accept plain lists (space or comma separated) as well as the
  traditional OpenFOAM lists. This simplifies argument handling
  with job scripts.

  For example,
     simpleFoam -ioRanks 0,4,8 ...
  vs
     simpleFoam -ioRanks '(0 4 8)'  ...

  It is also possible to select the IO ranks on a per-host basis:

     simpleFoam -ioRanks host  ...

- expose rank/subrank handling as static fileOperation methods
2023-05-22 17:59:30 +02:00
336422e00b ENH: check managed communicator upon construction of fileOperation
- previously checked on destruction, but it is robuster to check for a
  locally defined communicator during construction

- add InfoProxy output for fileOperation

ENH: add fileOperation::storeComm()

- transfers management of the communicator from external to internal.
  Use with caution
2023-05-22 17:54:33 +02:00
abc60d4d20 ENH: use refPtr to manage current fileHandler
- for special cases it can simplify sharing of processor communication
  patterns, but no visible change for most code.

- make fileHandler communicator modifiable (mutable), for special
  cases. The changes from 9711b7f1b9 now make this safer to do.

Continue to support legacy global function using an autoPtr:

   autoPtr<fileOperation> Foam::fileHandler(autoPtr<fileOperation>&&);

However, new code using refPtr uses the following static method since
swapping out file handlers is an infrequent operation that should
also stand out a bit more.

    fileOperation::fileHandler(...);
2023-05-22 17:51:14 +02:00
19254d0cf2 ENH: parallel-consistent check for dynamic library loading
- consolidate file synchronization checks in dynamicCode

STYLE: report missing library on master only (not every rank)

- avoid flooding the output with messages

Co-authored-by: mattijs <mattijs>
2023-05-22 17:49:21 +02:00
8320a1e421 ENH: additional routines to extract number of collated data blocks
- uses file seek instead of read

ENH: broadcast instead of scatterv to sending sizes

Co-authored-by: Mark Olesen <>
2023-05-22 17:48:45 +02:00
11742301f1 ENH: add support for file/directory broadcasting
Co-authored-by: mattijs <mattijs>
2023-05-22 17:48:09 +02:00
1abea53d1a ENH: lazy reading of old volume, old surface area
- avoid explicit isFile() check in favour of a lazy-read.
  With redistributePar + fileHandler, for example, it is possible that
  the master processor finds file but not the subprocs

ENH: lazy reading of tetBasePtIs

- delay reading until needed

Co-authored-by: Mark Olesen <>
2023-05-22 17:47:48 +02:00
16064b60e2 ENH: respect IOobject::readOpt in hexRef8 constructor 2023-05-22 17:47:22 +02:00
505704d290 ENH: allow numberOfSubdomains to be optional in parallel
- allows for a missing or empty file
2023-05-22 17:47:20 +02:00
9cd14bc8b0 STYLE: remove unused isWriteProc() methods from distribute fields 2023-05-22 17:46:16 +02:00
f15e58d3d5 ENH: add nbx.tuning to enable/disable initial barrier
- to prevent NBX from intercepting previous messages an initial
  barrier can help with synchronization. (Gregor Weiss)
2023-05-22 17:43:42 +02:00
5eebc75845 ENH: improved UPstream gather/scatter functionality
- added UPstream::allGatherValues() with a direct call to MPI_Allgather.
  This enables possible benefit from a variety of internal algorithms
  and simplifies the caller

    Old:
        labelList nPerProc
        (
            UPstream::listGatherValues<label>(patch_.size(), myComm)
        );
        Pstream::broadcast(nPerProc, myComm);

    New:

        const labelList nPerProc
        (
            UPstream::allGatherValues<label>(patch_.size(), myComm)
        );

- Pstream::allGatherList uses MPI_Allgather for contiguous values
  instead of the hand-rolled tree walking involved with
  gatherList/scatterList.

-
- simplified the calling parameters for mpiGather/mpiScatter.

  Since send/recv data types are identical, the send/recv count
  is also always identical. Eliminates the possibility of any
  discrepancies.

  Since this is a low-level call, it does not affect much code.
  Currently just Foam::profilingPstream and a UPstream internal.

BUG: call to MPI_Allgather had hard-coded MPI_BYTE (not the data type)

- a latent bug since it is currently only passed char data anyhow
2023-05-22 17:18:35 +02:00
b687c4927c ENH: update UPstream communicator handling
UPstream::allocateCommunicator
  - with contiguous sub-procs. Simpler, more compact handling, ranks
    are guaranteed to be monotonic

UPstream::commWorld(label)
  - ignore placeholder values, prevents accidental negative values

- make communicator non-optional for UPstream::broadcast(), which
  means it has three mandatory parameters and thus always fully
  disambiguated from Pstream::broadcast().

ENH: relax size checking on gatherList/scatterList

- only fatal if the List size is less than nProcs.
  Can silent ignore any trailing elements: they will be untouched.
2023-05-22 17:13:41 +02:00
b45ea8c2aa ENH: centralise communicator clearing (GAMG) 2023-05-22 17:09:50 +02:00
a64357983c BUG: uniformMixed fields not always full initialised (#2703)
- calling the mixed BC dictionary construct with NO_READ leaves the
  fields properly sized, but not initialised.

ENH: add mixed BC constructor zero initialise
2023-05-22 11:51:04 +02:00
302eb7b560 REGRESSION: createBaffles : incorrect dictionary lookup
- was introduced with f7a7f1c14c, only affected very recent develop
2023-05-20 18:59:20 +02:00
6d76b31f29 TUT: provide more git history context for tutorials/Alltest
- sometimes the last commit is not enough information about
  the tested state (especially with extensive rebasing).
  Also provide the short context of some previous commits.
2023-05-20 18:58:37 +02:00
bc51caac32 ENH: remove sign from SHA1Digest cdata_bytes(), data_bytes()
- this refinement of commit 81807646ca makes these methods
  consistent with other objects/containers.

  The 'unsigned char' access is still available via cdata()
2023-05-19 15:54:23 +02:00
28ac15f933 ENH: minor adjustment to BitOps and PackedList
- extend toc/sortedToc wrappers to bitSet and labelHashSet to allow
  use of BitOps::toc(...) in templated code

- size_data() method to return the number of addressed integer blocks
  similar to size_bytes() does, but for int instead of char.
2023-05-19 00:48:14 +02:00
f41d1879b9 STYLE: prefer isHeaderClass<Type>() check instead of Type::typeName
- use typeHeaderOk<regIOobject>(false) for some generic file existence
  checks. Often had something like labelIOField as a placeholder, but
  that may be construed to have a particular something.
2023-05-19 00:48:14 +02:00
bdd384c767 ENH: reset headerClassName within typeHeaderOk
- ensures that read failures can be properly detected

COMP: include refPtr.H instead of autoPtr.H in IOobject.H

- ensures inclusion of autoPtr/refPtr/tmp/stdFoam

ENH: add IOobject::resetHeader() method

- when re-using an IOobject for repeated read operations it enforces
  resetting of headerClassName, scalar/label sizes etc prior to
  reading. Permits convenient resetting of the name too (optional).

  Example,

      IOobject rio("none", ..., IOobject::LAZY_READ);

      rio.resetHeader("U")
      if (returnReduceOr(rio.typeHeaderOk<volVectorField>(false)))
          ...

      io.resetHeader("p")
      if (returnReduceOr(rio.typeHeaderOk<volScalarField>(false)))
         ...
2023-05-19 00:48:14 +02:00
87cb811db2 COMP: fix library linkage (#2784), silence some unused variable warnings 2023-05-19 00:46:52 +02:00
a5d9ad3a5c STYLE: use noexcept creation of InfoProxy and dereference as '*iproxy'
- this removes the 'magic' use of the exposed t_ member in favour
  of a generic dereference
2023-05-18 18:23:46 +02:00
a0005c3a54 ENH: make InfoProxy noexcept, add 'operator*' dereference
- conforms better to general use of '*' dereference.
2023-05-17 11:46:57 +02:00
f7a7f1c14c ENH: reduced warnings about createBaffles on processor patches (#2781)
- coupled patches are treated distinctly and independently of
  internalFacesOnly, it makes little sense to report them with a
  warning about turning off boundary faces (which would not work
  anyhow).

STYLE: update code style for createBaffles
2023-05-17 11:46:57 +02:00
a581a8cb8d ENH: disallow implicit cast of autoPtr to non-const pointer
- permitting a cast to a non-const pointer adds uncertainty of
  ownership.

- adjust PtrDynList transfer. Remove the unused 'PtrDynList::remove()'
  method, which is better handled with pop().
2023-05-17 11:46:57 +02:00
521043094e ENH: replace autoPtr<bool> with Switch (#2777)
- initialise with Switch::INVALID and then test if good() to
  trigger the initial update.

  This avoids some overhead, but primarily avoids ambiguity with
  implicit casting to a 'bool' that autoPtr<bool> has.
2023-05-17 11:46:57 +02:00
687a9528b0 DOC: include 'Environment' as filtered doxygen paragraph 2023-05-17 11:46:57 +02:00
5aeb02e23d Merge branch 'feature-forces-fo-performance' into 'develop'
ENH: forces: avoid redundant volumetric operations

See merge request Development/openfoam!598
2023-05-15 16:19:09 +00:00
59b1cf080e ENH: Tensor/SymmTensor: add devSymm and devTwoSymm funcs to avoid intermediates 2023-05-15 17:05:10 +01:00
f98ecb38dc ENH: forces: avoid redundant volumetric operations 2023-05-15 17:05:10 +01:00
fe50b745ae Merge branch 'feature-particle-coulomb-force' into 'develop'
ENH: Coulomb: new particle electric force model calculating Coulomb forces

See merge request Development/openfoam!602
2023-05-15 15:35:10 +00:00
8dee603193 ENH: Coulomb: new particle electric force model calculating Coulomb forces 2023-05-15 15:34:06 +00:00
c7e5e7f4a2 ENH: electricPotential: enable electric field calculations 2023-05-15 15:34:06 +00:00
efe8220a26 STYLE: electricPotential: simplify read function
- change 'fieldName' to 'Vname' for better clarity
2023-05-15 15:34:06 +00:00
7269cc1d3b ENH: electricPotential: replace operandField with getOrReadField 2023-05-15 15:34:06 +00:00
d92583f4b6 BUG: extrudePatchMesh: disable walking across non-manifold. See #2780
This code can be removed if nInternalEdges excludes non-manifold ones
2023-05-15 16:17:27 +01:00
e9160673a1 CONFIG: update paraview patch version. From 5.11.0 to 5.11.1 2023-05-10 19:14:59 +02:00
d069ffa16a SUBMODULE: removed catalyst handling for paraview 5.5 and earlier 2023-05-10 19:14:51 +02:00
c7fc4891ae COMP: adapt solveScalar to scalar for GAMG residual calculation
STYLE: use tmp<xyz>::New factory in matrix operations

COMP: fix bad non-access tmp access (in unused faceH method)
2023-05-10 18:23:13 +02:00
62a68eeea0 ENH: free/nullify of PtrList and UPtrList
- Allows clearing or freeing pointers without touching the underlying
  list size. Was previously only for PtrDynList, but now available on
  UPtrList, PtrList as well.

- add transfer() method to PtrDynList to avoid potential slicing.
2023-05-10 18:23:13 +02:00
139a8fc6ff STYLE: use SPDX-style for scripts 2023-05-10 18:23:13 +02:00
e8bcf4cb1b ENH: additional uniform boundary conditions (#2703)
- provide uniformMixed conditions for finite-area and finite-volume.

  These are intended to replace the exprMixed condition but allow
  the full range of different PatchFunction1 and Function1 types.

- add uniformFixedGradient to finite-area for completeness.

Note:
   - still some possible difficulties with the order of evaluation.
   - eg, using an expression within the 'U' field that depends
     of the surface 'phi' field before that is constructed.
     In this case, the 'value' entry is really needed.
2023-05-09 19:30:58 +02:00
3d091a0d6a ENH: separate nonBlocking send/receive mapDistribute (#2775) 2023-05-09 19:30:58 +02:00
b3fa59db92 ENH: additional handling for multiply-connected finite-area edges (#2771)
- multiply-connected edges can arise at the centre of a "star"
  connection or because the patch faces are actually baffles.

- In the serial case these internal edges are also rather dubious in
  terms of modelling. However, when they are split across multiple
  processors there can only be a single processor-to-processor
  connectivity.

  We don't necessary have enough information to know how things should
  be connected, so connect pair-wise as the first remedial solution

- Any extra dangle edges are relegated to an 'ignore' faPatch
  to tag as needing different handling.
2023-05-09 19:30:58 +02:00
b62e4b06fa ENH: add finite-area 'ignore' boundary condition
- this is a placeholder boundary BC for using with bad or illegal
  edges. It is currently functionally identical to zero-gradient.
  Naming and definition still subject to change.
2023-05-09 19:30:58 +02:00
783934ccad ENH: add global topology check in checkMesh and makeFaMesh (#2771)
- detect when boundary patches are multiply connected across edges

STYLE: initialize some faMesh values
2023-05-09 19:30:58 +02:00
1bef57d018 ENH: optional saving of illegal edges in patch surfaceType() check
- reduce some intermediate storage in looping

STYLE: explicit iterator dereference in syncTools
2023-05-09 19:30:58 +02:00
31600c96d4 ENH: output finiteArea patchID with foamToVTK -with-ids
- can be quite useful for debugging/orientation with complex
  geometries
2023-05-09 19:30:58 +02:00
f462a850ce ENH: added polyBoundaryMesh patchID(meshFacei) method
- this complements the whichPatch(meshFacei) method [binary search]
  and the list of patchID() by adding internal range checks.

  eg,
     Before
     ~~~~~~
     if (facei >= mesh.nInternalFaces() && facei < mesh.nFaces())
     {
         patchi = pbm.patchID()[facei - mesh.nInternalFaces()];
         ...
     }

     After
     ~~~~~
     patchi = pbm.patchID(facei);

     if (patchi >= 0)
     {
         ...
     }
2023-05-09 19:30:58 +02:00
dfa5c05a16 ENH: use New factory methods for Dimensioned/Geometric functions (#2723) 2023-05-09 19:30:58 +02:00
1685e8e418 INT: objectRegistry: optionally caching temporary objects (#2723)
- functionality introduced by openfoam.org to support selective
  caching of temporary fields. The purpose is two-fold: to enable
  diagnostics and to allow more places to use unregistered fields by
  default.

  For example to cache the grad(k) field in

    cacheTemporaryObjects
    (
        grad(k)
    );

  If the name of a field which in never constructed is added to the
  cacheTemporaryObjects list a waning message is generated which
  includes a useful list of ALL the temporary fields constructed
  during the time step

  Multiple regions are also supported by specifying individual region
  names in a cacheTemporaryObjects dictionary.

    cacheTemporaryObjects
    {
        porous
        (
            porosityBlockage:UNbr
        );
    }

    functions
    {
        writePorousObjects
        {
            type        writeObjects;
            libs        (utilityFunctionObjects);

            region      porous;
            writeControl writeTime;
            writeOption anyWrite;

            objects     (porosityBlockage:UNbr);
        }
    }
2023-05-09 19:30:58 +02: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
8e32db2b5f STYLE: more explicit use of REGISTER when storing fields
ENH: add phaseScopedName convenience method

- unites IOobject::scopedName + phasePropertyName
2023-05-09 19:30:57 +02:00
16591012e9 ENH: add -verbose option to surface conversion, cleanup
- by default, reduce the amount of output

ENH: support default text description for -verbose option

- simplifies use in more places.
2023-05-09 19:30:57 +02:00
bddda09a08 ENH: earlier exit from interface polling in updateMatrixInterfaces
- exit the wait-some polling loop when no interfaces are left
  to be updated
2023-05-09 19:30:57 +02:00
98c42479f6 ENH: relax processorField waiting requirements
- for interface polling previously required that both send and recv
  requests were completed before evaluating (values or matrix update).
  However, only the recv needs to be complete, which helps disentangle
  the inter-rank waiting.

  NB: this change is possible following (1f5cf3958b) that replaced
      UPstream::resetRequests() call in favour of UPstream::waitRequests()
2023-05-09 19:30:57 +02:00
52b225b6d5 STYLE/COMP: include cyclic patch headers earlier 2023-05-09 19:30:57 +02:00
c6f528588b ENH: use Mprobe/Mrecv for IPstream constructor
- retains the queried message without secondary polling.
2023-05-09 19:30:54 +02:00
2eb1f5678d ENH: use Improbe/Mrecv for NBX size exchange
- retains the queried message without secondary polling.
  Purported to be slightly faster. Better thread-safety.
2023-05-09 14:51:43 +02:00
50f4d0444c ENH: avoid synchronization on UPstream::shutdown with error (#2774)
- UPstream exit with a non-zero return code is raised by things like
  exit(FatalError) which means there is no reason to believe that
  any/all of the buffered sends, requests etc have completed.

  Thus avoid detaching buffers, freeing communicators etc in this
  situation. This makes exit(1) behave much more like abort(), but
  without any stack trace. Should presumably help with avoiding
  deadlocks on exit.
2023-05-09 14:51:43 +02:00
639b800049 ENH: clearer separation of MPI initialize/finalize stages (#2774)
ENH: support transfer from a wrapped MPI request to global list

- allows coding with a list UPstream::Request and subsequently either
  retain that list or transfer into the global list.
2023-05-09 14:51:43 +02:00
9d2ae3da67 CONFIG: remove optional 'value' entry from setConstraintTypes template
- processor types automatically handle a missing 'value' as
  patchInternalField, so no need having it in the setConstraintTypes
  template as well.
2023-05-09 14:51:43 +02:00
d22c206226 STYLE: fix truncated error message for non-constraint patch types 2023-05-09 14:51:43 +02:00
fd1a70f933 BUG: effectivenessTable: fix the sign for secondary outlet temperature (fixes #2772) 2023-05-09 08:26:43 +01:00
868d6dd778 BUG: VTK write pointSet fails in parallel (fixes #2773)
- de-referenced autoPtr with () instead of ref() will fail on
  non-master ranks.
2023-05-05 15:17:31 +02:00
3e382aadea Revert "BUG: Fixing ray dAve and omega for 1D and 2D cases"
This reverts commit 5848b0afd5.
2023-05-05 13:24:23 +01:00
964cb140e2 Merge branch 'feature-parProfiling' into 'develop'
ENH: parProfiling: profile linear solver only

See merge request Development/openfoam!603
2023-05-03 19:04:10 +00:00
b0b3ec0d8e ENH: parProfiling: profile linear solver only 2023-05-03 19:04:10 +00:00
0ae31d4c00 Merge branch 'optimizationBranch' into 'develop'
Optimization to ldu Matrix

See merge request Development/openfoam!601
2023-05-02 16:17:56 +00:00
4f7aa70ad6 ENH: new FPCG solver (faster PCG)
- this should be faster than the regular PCG on larger systems
  since it combines two global reductions
2023-05-02 18:00:50 +02:00
47bb79cb75 ENH: use residual method in GAMGSolverSolve: fuses Amul with b-Amul 2023-05-02 17:54:23 +02:00
b664eea712 ENH: remove redundant distribution in backward sweep (symGaussSeidel) 2023-05-02 17:54:16 +02:00
287025d2df COMP: remove explicit specialisations for CSV reading (fixes #2764)
- can use traits to distinguish label vs scalar types and
  setComponents to properly index into single or multi-component
  types without needing template specialisations for the task.

  This avoids the need for a concrete translation unit and the
  reported problem of multiply-defined specialisations when the header
  is included in different places.
2023-05-02 13:34:12 +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
7a5ecd70b8 BUG: misleading error message in finiteArea construct
- the default (uninitialised) value for edge connections of -1
  could be confused with a tagged finiteArea patch, which used
  (-patchid-1) encoding. This would lead to messages about erroneous
  processor-processor addressing, but is in fact an mismatched edge
  connection.

  Now tag the finiteArea patch as (-patchid-2) to avoid this ambiguity
  and correctly generate an "Undefined connection:" message instead.

  Properly flush the VTP writers before raising a FatalError
  to ensure that they are not prematurely truncated.

Open Point:

  The base problem of "Undefined connection:" is largely related to
  multiply-connected face edges (ie, from the underlying volume mesh).
  Not easily remedied in the finiteArea generation.

TUT: basic finiteArea setup on motorBike
2023-04-25 13:45:08 +02:00
ee39e3d276 STYLE: use explicit REGISTER option when storing fields 2023-04-25 13:45:08 +02:00
d9533e561b ENH: allow null pointer when reading binary block
- have read(nullptr, count) and readRaw(nullptr, count) act like a
  forward seek instead of failing.
  This lets it be used to advance through a file without needing to
  allocate (and discard) storage space etc.
2023-04-25 13:44:33 +02:00
ce282dfbbf ENH: correct the selfComm procNo relative to world communicator
STYLE: qualify worldComm as UPstream instead Pstream

STYLE: PPCG::gSumMagProd() as static function
2023-04-24 15:46:04 +02:00
a7c4c184b8 ENH: respect value of dimensionSet::checking() for pow() function
STYLE: remove unused/meaningless pow(dimensionScalar, dimensionSet)
2023-04-24 15:46:04 +02:00
5042d1296f ENH: consistent UniformDimensionedField naming
- construct from components, or use word::null to ensure
  consistent avoid naming between IOobject vs dimensioned type.

- support construct with parameter ordering as per DimensionedField

ENH: instantiate a uniformDimensionedLabelField

- eg, for registering standalone integer counters
2023-04-24 15:46:04 +02:00
1d39cdaa17 STYLE: support READ_MODIFIED <-> MUST_READ_IF_MODIFIED as aliases 2023-04-24 15:46:04 +02:00
2b1061420c STYLE: remove trailing space, tabs 2023-04-24 15:37:33 +02:00
7bef18a274 STYLE: document const-ness of isA, refCast 2023-04-21 15:49:27 +02:00
35c2b4b603 BUG: splash model - correction and code refactoring 2023-04-20 13:11:42 +01:00
424f913fdd Merge branch 'feature-multiLevel-scotch' into 'develop'
ENH: multiLevel: native scotch implementation of multi-level

See merge request Development/openfoam!599
2023-04-19 13:02:32 +00:00
32df7c2e92 ENH: multiLevel: native scotch implementation of multi-level 2023-04-19 13:02:13 +00:00
8434931c29 CONFIG: support call of 'openfoam' wrapper in other in-project locations
- directory discovery originally designed for a sub-dir location
  (eg, etc/openfoam) but failed if called from within the sub-dir
  itself.

  Now simply assume it is located in the project directory or the etc/
  sub-dir, so that it can also be relocated into the project directory
  in the future (pending changes to RPM and debian packaging)
2023-04-18 20:19:29 +02:00
b12e47d9ab CONFIG: increment API level to 2302 2023-04-18 14:08:39 +02:00
66a7f0c9db ENH: provide UPstream::finishedRequests() support
- for querying all outstanding requests:

     if (UPstream::finishedRequests(startRequest)) ...
     if (UPstream::finishedRequests(startRequest, -1)) ...

- for querying slice of outstanding requests:

     if (UPstream::finishedRequests(startRequest, 10)) ...
2023-04-18 14:08:39 +02:00
80bc1db5b7 ENH: provide UPstream intra-host and inter-host communicators
- simplifies communication structuring with intra-host communication.
  Can be used for IO only, or for specialised communication.

  Demand-driven construction. Gathers the SHA1 of host names when
  determining the connectivity. Internally uses an MPI_Gather of the
  digests and a MPI_Bcast of the unique host indices.

  NOTE:
    does not use MPI_Comm_splt or MPI_Comm_splt_type since these
    return MPI_COMM_NULL on non-participating process which does not
    easily fit into the OpenFOAM framework.

    Additionally, if using the caching version of
    UPstream::commInterHost() and UPstream::commIntraHost()
    the topology is determined simultaneously
    (ie, equivalent or potentially lower communication).
2023-04-18 14:08:39 +02:00
9d3427e0b4 ENH: consolidate UPstream::commsStruct code
- make sizing of commsStruct List demand-driven as well
  for more robustness, fewer unneeded allocations.

- fix potential latent bug with allBelow/allNotBelow for proc 0
  (linear communication).

ENH: remove unused/unusable UPstream::communicator optional parameter

- had constructor option to avoid constructing the MPI backend,
  but this is not useful and inconsistent with what the reset or
  destructor expect.

STYLE: local use of UPstream::communicator

- automatically frees communicator when it leaves scope
2023-04-18 14:08:39 +02:00
b277b913cf ENH: add guards for partially populated communicators
- these are primarily when encountering sparse (eg, inter-host)
  communicators. Additional UPstream convenience methods:

  is_rank(comm)
    => True if process corresponds to a rank in the communicators.
       Can be a master rank or a sub-rank.

  is_parallel(comm)
    => True if parallel algorithm or exchange is used on the process.
       same as

           (parRun() && (nProcs(comm) > 1) && is_rank(comm))
2023-04-18 14:08:39 +02:00
74db18a9c3 ENH: add interface code for MPI_Allgather
COMP: incorrect macro declaration for mpiGather/mpiScatter
2023-04-18 14:08:39 +02:00
2cf200aef4 ENH: more consistent min edge lengths (finite-area)
- for robustness with small edges (which can occur with snappy meshes),
  the Le() and magLe() are limited to SMALL (commit a0f1e98d24).
  Now use factor sqrt(1/3) in the components to maintain magnitude of 1.

ENH: add fvMesh::unitSf() and faMesh::unitLe() methods

- simple wrappers around Sf()/magSf() and Le()/magLe() but with
  the potential for additional/alternative corrections.

STYLE: thisDb() in faMesh code to simplify future changes in storage

ENH: do not register finite-area geometric fields

- consistent with finite-volume treatment
2023-04-18 14:01:17 +02:00
a96dcf706b ENH: robuster handling of inv() of fields with singular tensors (#2724)
- replace the "one-size-fits-all" approach of tensor field inv()
  with individual 'failsafe' inverts.

  The inv() field function historically just checked the first entry
  to detect 2D cases and adjusted/readjusted *all* tensors accordingly
  (to avoid singularity tensors and/or noisy inversions).

  This seems to have worked reasonably well with 3D volume meshes, but
  breaks down for 2D area meshes, which can be axis-aligned
  differently on different sections of the mesh.
2023-04-18 13:59:09 +02:00
3947f3c441 STYLE: use zeroGradientType() instead of hard-coded or typeName 2023-04-13 20:54:50 +02:00
09dd913077 ENH: use primitive fields when calculating triSurface fields (#2758) 2023-04-13 20:54:50 +02:00
6b16a614ca BUG: incorrect function introducer for mixedExpr with point field
- was primed with toPoint(..) expression call instead of point(...)
2023-04-13 20:54:50 +02:00
3d2df7cdf6 COMP: remove unused variables, etc in Cloud 2023-04-13 20:54:50 +02:00
89e1d8c269 ENH: restrict use of MPI_Group to local scope
- don't need to retain group references globally.
  Just retrieve parent group reference on-demand and discard
  immediately afterwards.
2023-04-11 16:00:12 +02:00
1f5cf3958b ENH: add request-driven polling/consumption of processor interfaces
- with (nPollProcInterfaces < 0) it does the following:

  - loop, waiting for some requests to finish
  - for each out-of-date interface, check if its associated
    requests have now finished (ie, the ready() check).
  - if ready() -> call updateInterfaceMatrix()

  In contrast to (nPollProcInterfaces > 0) which loops a specified
  number of times with several calls to MPI_Test each time, the
  (nPollProcInterfaces < 0) variant relies on internal MPI looping
  within MPI_Waitsome to progress communication.

  The actual dispatch still remains non-deterministic (ie, waiting for
  some requests to finish does not mean that any particular interface
  is eligible for update, or in any particular order). However, using
  Waitsome places the tight looping into the MPI layer, which results
  in few calls and eliminates behaviour dependent on the value of
  nPollProcInterfaces.

TUT: add polling to windAroundBuildings case (for testing purposes)
2023-04-11 15:54:32 +02:00
e1cb12509e GIT: remove unused/spurious Amultiplier definition 2023-04-11 14:53:02 +02:00
9fbc484cdf ENH: use bundled MPI_Test when checking processor interface ready()
- fewer calls, potentially more consistent

ENH: update sendRequest state after recvRequest wait

- previously had this type of code:

    // Treat send as finished when recv is done
    UPstream::waitRequest(recvRequest_);
    recvRequest_ = -1;
    sendRequest_ = -1;

  Now refined as follows:

    // Require receive data. Update the send request state.
    UPstream::waitRequest(recvRequest_);
    recvRequest_ = -1;
    if (UPstream::finishedRequest(sendRequest_)) sendRequest_ = -1;

  Can potentially investigate with requiring both,
  but this may be over-contrained.
  Example,

    // Require receive data, but also wait for sends too
    UPstream::waitRequestPair(recvRequest_, sendRequest_);
2023-04-11 14:07:36 +02:00
11065bb029 ENH: MPI_Waitany / MPI_Waitsome interface for internal list of requests
- checks requests from completion, returning true when some requests
  have completed and false when there are no active requests.
  This allows it to be used in a polling loop to progress MPI
  and then respond when as requests become satisfied.

  When using as part of a dispatch loop, waitSomeRequests() is
  probably more efficient than calling waitAnyRequest() and can help
  avoid biasing which client requests are serviced.

  Takes an optional return parameter, to retrieve the indices,
  but more importantly to avoid inner-loop reallocations.

  Example,

      DynamicList<int> indices;
      while (UPstream::waitSomeRequests(startRequest, &indices))
      {
          // Dispatch something ....
      }

      // Reset list of outstanding requests with 'Waitall' for safety
      UPstream::waitRequests(startRequest);

  ---

  If only dealing with single items and an index is required for
  dispatching, it can be better to use a list of UPstream::Request
  instead.

  Example,

      List<UPstream::Request> requests = ...;

      label index = -1;
      while ((index = UPstream::waitAnyRequest(requests)) >= 0)
      {
          // Do something at index
      }

ENH: pair-wise wrappers for MPI_Test or MPI_Wait

- for send/recv pairs of requests, can bundle both together and use a
  single MPI_Testsome and MPI_Waitall instead of two individual
  calls.
2023-04-11 11:58:05 +02:00
aa002122c2 ENH: simplify handling of pushed/freed requests
- previously had an additional stack for freedRequests_,
  which were used to 'remember' locations into the list of
  outstandingRequests_ that were handled by 'waitRequest()'.

  This was principally done for sanity checks on shutdown,
  but we now just test for any outstanding requests that
  are *not* MPI_REQUEST_NULL instead (much simpler).

  The framework with freedRequests_ also had a provision to 'recycle'
  them by popping from that stack, but this is rather fragile since it
  would only triggered by some collectives
  (MPI_Iallreduce, MPI_Ialltoall, MPI_Igather, MPI_Iscatter)
  with no guarantee that these will all be properly removed again.
  There was also no pruning of extraneous indices.

ENH: consolidate internal reset/push of requests

- replace duplicate code with inline functions
  reset_request(), push_request()

ENH: null out trailing requests

- extra safety (paranoia) for the UPstream::Request versions
  of finishedRequests(), waitAnyRequest()

CONFIG: document nPollProcInterfaces in etc/controlDict

- still experimental, but at least make the keyword known
2023-04-08 18:46:39 +02:00
700156b4c5 DEFEATURE: remove unused UPstream allocateTag(), freeTag() routines
- mechanism has been unused for at least a decade or more
  (or was never used). Message tags are assigned on an ad hoc basis
  locally when collision avoidance is necessary.
2023-04-08 18:33:52 +02:00
d826f9259f ENH: properly trap any sub-rank changes in allocatePstreamCommunicator
- not currently used, but it is possible that communicator allocation
  modifies the list of sub-ranks. Ensure that the correct size is used
  when (re)initialising the linear/tree structures.

STYLE: adjust MPI test applications

- remove some clutter and unneeded grouping.
  Some ideas for host-only communicators
2023-04-08 18:33:52 +02:00
d51967d728 ENH: faceAgglomerate: more robust. Fixes #2741
- feature angle compared to real angle
- stop agglomerating if number of marked edges does not change
2023-04-06 13:35:30 +01:00
5de59417f8 ENH: improve suspend/resume handling of Pstream profiling (#2737)
- allow reporting even when profiling is suspended

- consolidate reporting into profilingPstream itself
  (avoids code scatter).

Example of possible advanced use for timing only one section of
code:

    ====
    // Profile local operations
    profilingPstream::enable();

    ... do something

    // Don't profile elsewhere
    profilingPstream::suspend();
    ====
2023-04-05 18:49:58 +02:00
9577a0f6b5 ENH: extend parProfiling (#2737)
- separate broadcast times from reduce/gather/scatter time
- separate wait times from all-to-all time
- support invocation counts, split off requests time/count
  from others to avoid flooding the counts

- support 'detail' switch to increase the output information.
  Format may change in the future
2023-04-05 11:33:39 +02:00
475ed5cc32 STYLE: readOnProc/writeOnProc instead of 'valid' for IO 2023-04-04 15:04:26 +02:00
188e61af16 STYLE: use readValueEntry in BCs. Assign Zero for refValue/refGrad 2023-04-04 09:56:55 +02:00
f8e05934f1 BUG: incorrect dictionary contruction of alphatPhaseChange mDotL 2023-04-03 17:35:07 +02:00
e5e1440020 ENH: align use of extrapolatedCalculated in faMatrix with fvMatrix
STYLE: prefer GeometricField::New factory methods
2023-04-03 15:43:04 +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
bd1e1ec9c7 ENH: uniformFixedValue: avoid unallocated autoPtr error 2023-03-31 08:59:31 +01:00
ddf9d528e2 COMP: TensorI.H: missing ; 2023-03-29 14:32:08 +01:00
b339be2459 BUG: GAMG: avoid inter-level interpolation. Fixes #2710 2023-03-29 09:55:23 +01:00
ed89d97627 BUG: LES: enable sigma model for compressible flows (fixes #2727) 2023-03-24 08:23:51 +00:00
f903707e4a STYLE: Allwmake report api/patch directly from META-INFO
- avoid dependency on etc/openfoam (location may change)
2023-03-23 12:22:00 +01:00
66cae2b9d1 ENH: robuster handling inv() of singular tensor for finite-area LSQ (#2724)
- with the current handling of small edges (finite-area), the LSQ
  vectors can result in singular/2D tensors. However, the regular
  2D handling in field inv() only detects based on the first element.

  Provide a 'failsafe' inv() method for symmTensor and tensor that
  follows a similar logic for avoiding zero determinates, but it is
  applied on a per element basis, instead of deciding based on the
  first field element.

  The symmTensor::inv(bool) and tensor::inv(bool) methods have a
  fairly modest additional overhead.

- unroll the field inv() function to avoid creating an intermediate
  field.  Reduce the number of operations when adjusting/re-adjusting
  the diagonal.
2023-03-23 12:12:44 +01:00
4994456a28 ENH: add 2D det() / inv() methods for Tensor/SymmTensor (#2724)
- for cases where a 3D tensor is being used to represent 2D content,
  the determinant is zero. Can use inv2D(excludeDirection) to compensate
  and invert as if it were only 2D.

ENH: consistent definitions for magSqr of symmTensors, diagSqr() norm

COMP: return scalar not component type for magSqr

- had inconsistent definitions with SymmTensor returning the component
  type and Tensor returning scalar. Only evident with complex.
2023-03-23 10:31:54 +01:00
726787b0d2 BUG: remove overly optimistic short-cut when reading BCs
- had an optimisation to skip attempted reading for zero-sized
  patches. But this leads to inconsistency in the code branching, thus
  removing it.
2023-03-23 10:31:54 +01:00
f6969631a6 ENH: support optional upper limit for printStack
- when only a partial stacktrace is desirable.

ENH: add stack trace decorators

- the 0-th frame is always printStack(), so skip that and emit
  some headers/footers instead. Eg,

  [stack trace]
  =============
  #1  Foam::SymmTensor<double> Foam::inv<double>(...)
  #2  Foam::inv(Foam::UList<Foam::SymmTensor<double>> const&) ...
  ...
  =============
2023-03-23 10:31:54 +01:00
81807646ca ENH: additional SHA1Digest constructors and methods
- data_bytes(), size_bytes() methods to support broadcasting or
  gather/scatter content. Additional construct from raw bytes
  to support transmitting content.
2023-03-23 10:31:54 +01:00
80a416d253 ENH: support construct Geometric field from separate value/dimensions
- can be easier to specify than copying into a dimensioned type.

  Eg,
      volSymmTensorField(io, mesh, Zero, dimLength);

      fluxFieldType
      (
          io
          mesh,
          Zero,
          Uf.dimensions()*dimArea/dimTime
      );

  vs
      volSymmTensorField
      (
          io,
          mesh,
          dimensionedSymmTensor("0", dimLength, Zero)
      );

      fluxFieldType
      (
          io
          mesh,
          dimensioned<typename flux<Type>::type>
          (
              Uf.dimensions()*dimArea/dimTime, Zero
          )
      );
2023-03-23 10:31:54 +01:00
e68acbe314 STYLE: check tmp with is_reference() or movable(), instead of isTmp()
- missed consistency in a few places.

- return nullptr (with automatic conversion to tmp) on failures
  instead of tmp<....>(nullptr), for cleaner coding.

INT: add support for an 'immovable' tmp pointer

- this idea is from openfoam.org, to allow creation of a tmp that is
  protected from having its memory reclaimed in field operations

ENH: tmp NewImmovable factory method, forwards as immovable/movable
2023-03-23 10:31:54 +01:00
13bd644cf4 BUG: regionSizeDistribution: correct droplet volume calculation (fixes #2699) 2023-03-22 17:00:37 +00:00
34e36b83ab ENH: initEvaluate()/evaluate() for faePatchField, fvsPatchField
- no-op implementations, but makes the call to
  GeometricBoundaryField::evaluate() less dependent on PatchField type

- add updated()/manipulatedMatrix() methods to faePatchField,
  fvsPatchField etc. These are mostly no-ops, but provide name
  compatible with fvPatchField etc.
2023-03-16 11:15:35 +01:00
1d81190881 ENH: consistent reported topoSet counts (#2719) 2023-03-10 17:02:19 +00:00
25bc7d65f7 STYLE: prefer REGISTER/NO_REGISTER instead of true/false for IOobject
- self-documenting
2023-03-10 14:16:32 +00:00
20566a87f5 ENH: provide getter/setter interface to standard communicators
- similar to UPstream::parRun(), the setter returns the previous value.

  The accessors are prefixed with 'comm':
  Eg, commGlobal(), commWarn(), commWorld(), commSelf().
  This distinguishes them from any existing variables (eg, worldComm)
  and arguably more similar to MPI_COMM_WORLD etc...

  If demand-driven communicators are added in the future, the function
  call syntax can help encapsulate that.

  Previously:

      const label oldWarnComm = UPstream::warnComm;
      const label oldWorldComm = UPstream::worldComm;
      UPstream::warnComm = myComm;
      UPstream::worldComm = myComm;
      ...

      UPstream::warnComm = oldWarnComm;
      UPstream::worldComm = oldWorldComm;

  Now:
      const label oldWarnComm = UPstream::commWarn(myComm);
      const label oldWorldComm = UPstream::commWorld(myComm);
      ...

      UPstream::commWarn(oldWarnComm);
      UPstream::commWorld(oldWorldComm);

STYLE: check (warnComm >= 0) instead of (warnComm != -1)
2023-03-09 16:01:04 +00:00
06df44a588 COMP: protect against null tmp field (freestream BC) 2023-03-09 09:43:29 +00:00
b519a8e128 ENH: add finite-area uniformFixedValue
- deprecate timeVaryingUniformFixed (now redundant)
2023-03-08 15:32:34 +00:00
26400d7534 ENH: add finite-area extrapolatedCalculated BC 2023-03-08 15:31:01 +00:00
b17422ef1a ENH: use readValueEntry, readMixedEntries for simpler program control 2023-03-08 15:30:04 +00:00
42dba36832 ENH: consistent handling of "value" for faePatchField
- base level now explicity equivalent to LAZY_READ with overriding as
  required

- clearer documentation for reading of "value" for faPatchField
2023-03-08 12:02:41 +00:00
063227baed ENH: support readOption handling for patch fields (base level)
- constructing with valueRequired as a bool is still supported,
  but now also support more refined requirements
  (eg, NO_READ, MUST_READ, LAZY_READ)

- continue with LAZY_READ for finite-area fields
2023-03-07 17:24:28 +00:00
7e9b5dbc78 TUT: adjust height limiter and outflow BC for drippingChair 2023-03-03 20:55:10 +01:00
94df19a93a ENH: add finiteArea outletInlet patch type
STYLE: use readValueEntry and Field assign to simplify code
2023-03-03 18:53:58 +01:00
2ef89bf9d3 Merge branch 'primitiveMeshOptimization' into 'develop'
ENH: improved point-cell and cell-point topology methods (#2715)

See merge request Development/openfoam!597
2023-03-03 16:36:55 +00:00
074749a722 ENH: improved point-cell and cell-point topology methods (#2715) 2023-03-03 16:36:54 +00:00
820f93c3b4 ENH: simplify box mesh construction (PDRblockMesh)
ENH: construct or reset boundBox from zero_one for a 0-1 unit cube

ENH: add some testing timings (for !596 and #2715)
2023-03-03 16:23:42 +01:00
4dff2bfad1 STYLE: PtrList emplace_set for symmetry with HashPtrTable method naming 2023-03-03 12:17:25 +01:00
d5c0852de1 ENH: improve diagnostic fields for checkFaMesh -write-vtk
ENH: support VTK output of procIDs for point data for some writers

TUT: areaWrite for drippingChair
2023-03-02 20:50:52 +01:00
4284d02c99 CONFIG: accept -decompose-dict=xyz for Run functions and mpirunDebug
- interpret as '-decomposeParDict xyz' for simpler scripting:
  A empty value ("") as well as "none" or "false" values are ignored.

  Eg,
      unset decompDict
      if some_condition; then decompDict=decomposeParDict-12; fi

      runParallel -decompose-dict=$decompDict ...

ENH: more generous when scanning decomposeParDict for numberOfSubdomains

- assume file is in system/ directory if not otherwise found
2023-03-02 20:50:52 +01:00
82c0b360c6 ENH: support run-time PstreamBuffers algorithm selection (advanced option)
- this helps isolate selection of PEX vs NBX, for potential migration
  to a hybrid PEX
2023-03-02 20:50:48 +01:00
99bf27cbee STYLE: use PstreamBuffers allProcs() addressing in zoneDistribute
STYLE: more generous handling of procIDs on non-master (globalIndex)
2023-03-02 15:31:50 +01:00
d3867a2d34 SUBMODULE: minor updates for external-solver 2023-03-02 12:37:06 +01:00
f75af788c1 ENH: add factory method readContents to IO containers
- useful when regular contents are to be read via an IOobject and
  returned.

  Eg,  dictionary propsDict(IOdictionary::readContents(dictIO));
  vs.  dictionary propsDict(static_cast<dictionary&&>(IOdictionary(dictIO)));

  Commonly these would have simply been constructed directly as the
  IO container:

  eg,  IOdictionary propsDict(dictIO);

  However, that style may not ensure proper move semantics for return
  types.

  Now,
  =====
      labelList decomp(labelIOList::readContents(io));
      ... something
      return decomp;
  =====

  Previously,
  =====
      labelIOList decomp(io);

      // Hope for the best...
      return decomp;

      // Or be explicit and ensure elision occurs...
      return labelList(std::move(static_cast<labelList&>(decomp)));
  =====

  Note:
       labelList list(labelIOList(io));

       looks like a good idea, but generally fails to compile
2023-02-28 15:43:26 +01:00
5614a571f2 COMP: code adjustments for gcc-13 (#2714) 2023-02-28 11:49:58 +01:00
4136b686ba BUG: infinite template recursion in boundaryData readField 2023-02-28 10:02:15 +01:00
790a5c26f9 ENH: range-for and updated accessors in primitiveMesh
STYLE: split off primitiveMesh::calcCellPoints internal

- for easier reworking (#2715)
2023-02-28 09:48:52 +01:00
9729617ae3 ENH: PtrList iterate over non-null entries (#2702)
- the iterator/const_iterator now skip any nullptr entries,
  which enables the following code to work even if the PtrList
  contains nullptr:

  for (const auto& intf : interfaces)
  {
      // Do something
      ...
  }

- this is a change in behaviour compared to OpenFOAM-v2212 and earlier,
  but is non-breaking:
  * Lists without null entries will traverse exactly as before.
  * Lists with null entries will now traverse correctly without
    provoking a FatalError.
2023-02-27 20:03:02 +01:00
afee861af9 DEFEATURE: remove PtrList random access iterators (#2702)
- random access was unused.
  Retaining it would impede reimplementing iterators to only iterate
  across non-null items.
2023-02-27 20:03:02 +01:00
72d2ff8249 ENH: PtrList detail level iteration of null/non-null entries (#2702)
- naming as per bitSet (ie, find_first, find_next) that work with list
  indices.
- relocate bounds checked access into detail. Add at() accessor
2023-02-27 20:03:02 +01:00
0ab0ecb541 ENH: change refCount (internal) from count() to use_count()
- allows unambiguous of count() for other classes.
  Naming as per std::shared_ptr.

STYLE: qualify use_count() and unique() methods with the refCount base

- clearer/consistent meaning
2023-02-27 20:03:02 +01:00
00f499d714 ENH: more noexcept methods for edge, avoid some intermediates
STYLE: document edge parameters as 'vertex' (not point)

- edge is also used for graph edges or connection edges etc.
2023-02-27 20:03:02 +01:00
0fc2c817e1 STYLE: emplace_back/push_back instead of append in tree algorithms 2023-02-27 20:03:02 +01:00
117173aaba ENH: use min/max instead of first/last for int/slice ranges
- consistent with MinMax tuple etc.
- cull unused before(), after() methods
2023-02-27 15:41:25 +01:00
b33b26ad34 STYLE: replace zero::null usage with zero
- the null output adapter was previously used for the HashTables API
  when HashSet actually stored key/value. Now that the node only
  contains the key, having suppressed output is redundant, as is the
  zero::null class (reduces clutter)

STYLE: replace one::minus dispatch in extendedEdgeMesh

GIT: remove Foam::nil typedef (deprecated since May-2017)
2023-02-27 15:41:25 +01: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
28b492bd54 ENH: unroll loops for complexVector functions
STYLE: prefer STL naming real(), imag() instead of Re(), Im()
2023-02-27 15:41:25 +01:00
f0a196a908 STYLE: include primitivePatch.H (instead of PrimitivePatch.H)
- further de-clutter in the future

ENH: PrimitivePatchInterpolation with unique_ptr for memory management
2023-02-27 15:41:25 +01:00
d51aa5a74d STYLE: merge EdgeMap definition into edgeHashes.H
STYLE: combine some list typedefs, add documentation comments

GIT: relocate some compat includes
2023-02-27 15:41:25 +01:00
e623e6a865 STYLE: favour include word.H instead of string.H
- in many places the string.H include is redundant anyhow.
  May wish to change to foamString.H (or equiv) in the future
2023-02-27 15:41:25 +01:00
d88272f031 ENH: relocate zero_one to pTraits, allows reuse for scalar clamping
ENH: add pTraits and IO for std::int8_t

STYLE: cull some implicitly available includes

- pTraits.H is included by label/scalar etc
- zero.H is included by UList

STYLE: cull redundant forward declarations for Istream/Ostream
2023-02-27 15:41:25 +01:00
f3d447579a ENH: provide explicit literal/regex for dictionary findEntry 2023-02-27 15:41:25 +01:00
7246b49eac ENH: downgrade finiteArea processor edge-length checks
- now simply warn (on FULLDEBUG) instead of Fatal.
  Avoids spurious errors on small edges.
2023-02-27 15:41:25 +01:00
8a2cd2edfb STYLE: use nProcs check on PstreamBuffers 2023-02-27 15:41:25 +01:00
9938a13b2a ENH: simplify generic patch field code 2023-02-27 15:41:22 +01:00
899d59686c CONFIG: increment API level to 2301 2023-02-21 14:28:19 +01:00
0b7c0844f4 TUT: replace calc with eval for wallMountedHump (faster!) 2023-02-21 14:27:33 +01:00
d006339c9a ENH: remove restricted precision for calc/eval (#2635)
- in earlier versions: used 'fixed' notation
  to force floating point numbers to be printed with at least
  some decimal digits. However, in the meantime we are more
  flexible with handling float/int input so remove this constraint.

- use ITstream::toString, which makes the string expansion of ${var}
  and the expression expansion of $[var] consistent.
2023-02-21 14:20:02 +01:00
74d65ed018 CONFIG: additional test for mpfr library in cgal config (#2664)
- other systems (eg, ARM64 linux with clang) do not have a separate
  mpfr library configured so also check for mpfr (gmp is assumed to be
  the same) and return corresponding cgal flavour (eg, header-no-mpfr)
2023-02-21 10:22:53 +01:00
68bbd8f3a8 Merge remote-tracking branch 'origin/master' into develop 2023-02-21 10:21:31 +01:00
40bdab1c1a Merge branch 'feature-field-functions-SIMD' into 'develop'
Field functions for lerp and clamp. Add clamping as Field methods

See merge request Development/openfoam!593
2023-02-21 09:17:57 +00:00
f180740b03 STYLE: lerp and emplace_back to simplify streamline coding 2023-02-21 10:10:43 +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
4d45cfd5a9 ENH: lerp for patch/neighbour weights 2023-02-21 10:10:43 +01:00
128516b874 ENH: use lerp for valueFraction (mixed BCs) and field relaxation
Note:
  in some borderline cases (eg, PDRFoam) the multiplication order
  and rounding imposed by the lerp function may affect the
  results slightly.

  eg,  (valueFraction_ * this->patch().deltaCoeffs()*refValue_)
  vs.  (valueFraction_ * (this->patch().deltaCoeffs()*refValue_))
2023-02-21 10:10:36 +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
e1a710014c ENH: define lerp field functions
- defined for lerp between two fields,
  either with a constant or a field of interpolation factors.

  * plain Field, DimensionedField, FieldField, GeometricFields

- using a field to lerp between two constants is not currently
  supported
2023-02-21 10:05:27 +01:00
ab10b4a05c EHN: add FieldFunction interface for 0/1 clamping
- enables clamp(field, zero_one{}) returning a tmp Field
2023-02-21 10:05:27 +01:00
6f68ce5239 ENH: update field function macros and 'reuse' field handling
- clearer, more consistent parameter naming, which helps when
  maintaining different field function types (eg, DimensionedFields,
  GeometricFields)

- provide reuseTmpGeometricField::New taking a reference (not a tmp),
  with forwarding. This helps centralise naming and acquisition etc

- split binary function macros into transform/interface
  for easier support of different transform loops.

- initial field macros for looping over ternaries
2023-02-21 10:05:26 +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
4d7180ae7c COMP: rename field methods clamp() -> clamp_range()
- this is slightly longer to write (but consistent with clamp_min
  etc). The main reason is that this allows easier use of the clamp()
  free function.

STYLE: skip checks for bad/invalid clamping ranges

- ranges are either already validated before calling, the caller logic
  has already made the branching decision.
2023-02-21 10:05:26 +01:00
a7d77391fa BUG: selfComm had 0 instead of parent rank for UPstream::procID (#2706) 2023-02-21 09:29:44 +01:00
2569405383 ENH: implement NBX with recovery of sizes and non-blocking receives 2023-02-20 19:00:31 +01:00
fb2bf77e8e TUT: update keyword coordinateRotation -> rotation 2023-02-20 19:00:31 +01:00
446aff1350 ENH: add DeprecatedInFunction macro
- run-time warning about deprecated features. For example,

  DeprecatedInFunction(2212)
     << "Prefer using xyz boundary condition. "
     << "This boundary condition will be removed in the future." << endl;

CONFIG: mark exprFixedValue as deprecated

- same functionality is possible with uniformFixedValue and an
  expression PatchFunction1, which can also be easily changed to any
  other PatchFunction1
2023-02-20 18:59:48 +01:00
c9081d5daf BUG: globalIndex gather/scatter fails with multi-world (fixes #2706)
- was using UPstream::procIDs(), which returns the sub-ranks with
  respect to the parent communicator. This is normally just an
  identity list (single-world) but with multi-world the indexing
  is incorrect.  Use UPstream::allProcs() instead.
2023-02-20 16:15:44 +01:00
c038a9447c STYLE: remove unneeded UPstream::listEq
- was only used in Pstream::combineReduce(...) with a full list,
  which should have been avoided in most cases anyhow.
  Much more efficient to simply gather the sizes directly
2023-02-20 11:34:29 +01:00
fdd7e4d87f STYLE: use push_back when walking cell queues
STYLE: use push_back for OTstream
2023-02-20 11:32:54 +01:00
0767e21d8c ENH: more consistent convenience macros for creating patchFields 2023-02-20 11:18:29 +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
b71a05a72f ENH: add Function1::NewIfPresent without a redirect type
- simplifies handling, consistent with PatchFunction1

STYLE: use Function1 NewIfPresent instead of separate found/New
2023-02-20 11:12:59 +01:00
aef990f8df SUBMODULE: update avalanche (compilation change only) 2023-02-17 13:24:29 +01:00
cbb153372e ENH: robuster finite-area least squares gradient
- avoid division by zero for small edges
2023-02-16 14:37:34 +01:00
58e4cfbc8a REGRESSION: PstreamBuffers gather was clearing 'send-to-self' on master 2023-02-16 13:26:52 +01:00
a597c044c7 BUG: inconsistent faceArea on processor boundaries (fixes #2683)
- was missing evaluateCoupled on the initial faceAreaNormals field
  (related to #2507)

ENH: simplify/consistent geometry updating
2023-02-15 17:22:12 +01:00
d8c6b6b811 CONFIG: disable reporting of ensight type checks (unless in debug)
- avoids flooding the log file with warnings when reading in data
  sets that were not generated with OpenFOAM utilities
2023-02-15 14:07:25 +01:00
521bdf0f07 ENH: improve UPtrList sorting
- adjust nullptr checks to discourage flip-flop when confronted with
  multiple null values.

     Old:   (a && b) ? (*a < *b) : bool(a);
     New:   (a && b) ? (*a < *b) : !b;

  comparing (non-null < null) and (null < non-null) behaves
  identically, but comparing (null < null) now tests as true
  (ie, already sorted) whereas before it would have been false
  (ie, needs a swap)

- add UPtrList trimTrailingNull(), which reduces the effective
  (addressable) list size to ignore any trailing null pointers, but
  without reallocation. This is particularly useful when creating a
  UPtrList list view. For example,

     UPtrList<some_iterator> validValues(container.size());

     ...Loop to add valid entries, by some criteria...

     // Shorten list to hide null entries
     validValues.trimTrailingNull();

   This list view now only needs a single allocation, whereas using
   a resize (as was previously necessary) could invoke a second
   allocation, as well as recopying.
2023-02-15 11:05:12 +01:00
f215ad15d1 ENH: skip zero data sends via PstreamBuffers
- in several cases can use the PstreamBuffers recvDataCount(proci)
  on the receiving part of the logic
2023-02-14 23:32:58 +01:00
fb69a54bc3 ENH: avoid prior communication when using mapDistribute
- in most cases can simply construct mapDistribute with the sendMap
  and have it take care of communication and addressing for the
  corresponding constructMap.

  This removes code duplication, which in some cases was also using
  much less efficient mechanisms (eg, combineReduce on list of
  lists, or an allGatherList on the send sizes etc) and also
  reduces the number of places where Pstream::exchange/exchangeSizes
  is being called.

ENH: reduce communication in turbulentDFSEMInlet

- was doing an allGatherList to populate a mapDistribute.
  Now simply use PstreamBuffers mechanisms directly.
2023-02-14 23:22:55 +01:00
1ce7a62209 ENH: Pstream::exchange with Map<Container> data
- dynamic sparse data exchange using Map to hold data and sizes.

  Still uses the personalised exchange paradigm, but with non-blocking
  consensus exchange to obtain the sizes and regular point-to-point
  for the data exchange itself. This avoids an all-to-all but still
  keeps the point-to-point for overlapping communication, data
  chunking etc.
2023-02-14 23:22:55 +01:00
b6af124b80 ENH: add Pstream chunked transfer detail
- to service both List and Map exchanges with limited message sizes
  (termed 'data chunking' here) add a PstreamDetail for walking and
  dispatching.  Like other Detail components, the API is subject
  to (possibly breaking) changes in the future at any time.

  The regular exchangeBuf detail has this type of signature:

  PstreamDetail::exchangeBuf
  (
      const UList<std::pair<int, stdFoam::span<const Type>>>& sends,
      const UList<std::pair<int, stdFoam::span<Type>>>& recvs,
      ...
  )

    Where [rank, span] is the tuple pack.

  The basic idea is to pre-process the send/receive buffers and
  marshall them into a flat list of [rank, span] tuples.

  The originating buffers could be any type of container (List or Map)
  which is then marshalled into this given sequence that can be
  processed in source-agnostic fashion.

  If data chunking is required (when UPstream::maxCommsSize > 0)
  it is possible to make a cheap copy of the rank/address information
  and then walk different slices or views.

ENH: replace private static methods with PstreamDetail functions

- simpler to update locally.
2023-02-14 23:22:55 +01:00
83740ad408 ENH: avoid clearStorage for persistent PstreamBuffers
- added persistent buffer for zoneDistribute
- additional handling for clearing buffers
2023-02-14 23:22:55 +01:00
a16f09b10c ENH: refine resizing of zero-sized DynamicList/DynamicField
- since List is being used to manage the storage content for
  DynamicList, it needs to free old memory for zero-sized lists first.

  Consider this case (slightly exaggerated):

      line 0:  DynamicList<label> list;
      line 1:  list.reserve(100000);
      line 2:  list.reserve(200000);

  After line 0:
     - list has size=0, capacity=0 and data=nullptr

  After line 1:
     - list has size=0, capacity=1e+5 and data != nullptr

  After line 2:
     - list has size=0, capacity=2e+5 and data != nullptr

  ---

  The internal resizing associated with line 1 corresponds to what the
  List resize would naturally do. Namely allocate new storage, copy/move
  any overlapping elements (in this case none) before freeing the old
  storage and replacing with new storage.

  Applying the same resizing logic for line 2 means, however, that the
  old memory (1e5) and new memory (2e5) are temporarily both
  accessible - leading to an unnecessary memory peak.

  Now: if there is no overlap, just remove old memory first.
2023-02-14 23:22:55 +01:00
702225c249 ENH: add stdFoam::span container
- basic functionality similar to std::span (C++20).
  Holds pointer and size: for lightweight handling of address ranges.

- implements cdata_bytes() and data_bytes() methods for similarity
  with UList. For span, however, both container accesses are const
  but the data_bytes() method is only available when the
  underlying pointer is non-const.

  No specializations of std::as_bytes() or std::as_writeable_bytes()
  as free functions, since std::byte etc are not available anyhow.
2023-02-13 21:41:14 +01:00
375a4792f9 ENH: HashSet, HashTable, HashPtrTable merge() method
- name and functionality similar to std::unordered_map (C++17).
  Formalizes what had been previously been implemented in IOobjectList
  but now manages without pointer deletion/creation.
2023-02-13 21:22:20 +01:00
aafcd0b9e0 TUT: use slash-scoped dictionary references 2023-02-13 21:18:57 +01:00
27a7ae2d1d ENH: use simpler lookupPatchField form 2023-02-13 20:08:48 +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
2db3e2b64f STYLE: simplify ensightMeshReader with emplace_back/push_back
STYLE: emplace for mesh zones
2023-02-11 09:21:43 +01:00
1ab9dca2ab ENH: reduce all-to-all communication in mesh wave algorithms
- use persistent PstreamBuffers between iterations, restrict size
  information exchange to the processor neighbours (which is what the
  algorithm is handling there anyhow).
2023-02-10 19:43:43 +01:00
74fd94dff3 REGRESSION: overly aggressive handling of MPI groups
- attempted reduction in bookkeeping (commit: 068ab8ccc7) meant that
  the worldComm didn't have a group from which sub-communicators could
  be spun off.

- do not force reset of PstreamBuffers positions

STYLE: UPstream::globalComm instead of '0'
2023-02-10 19:43:43 +01:00
1dbb54c391 ENH: refine definition of PtrList emplace() and HashPtrTable emplace_set()
- like emplace_back(), return a reference to the new element
2023-02-10 19:43:43 +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
750381bd99 ENH: HashTable/HashSet contains(key) method
- functionality provided as 'found(key)' in OpenFOAM naming, since
  there was no stl equivalent at the time. Now support contains(),
  which is the equivalent for C++20 maps/sets.

STYLE: general contains() method for containers

STYLE: treat Enum and Switch similarly as hash-like objects
2023-02-10 17:11:15 +01:00
ed39ee6afe Merge branch 'update-pstream' into 'develop'
Pstream improvements for more flexibility. Non-blocking consensus exchange

See merge request Development/openfoam!592
2023-02-09 12:33:58 +00:00
422654a9ea ENH: added UPstream::waitAnyRequest(UList<UPstream::Request>&)
- waits for completion of any of the listed requests and returns the
  corresponding index into the list.
  This allows, for example, dispatching of data when the receive is
  completed.
2023-02-09 11:11:36 +01:00
add61ca273 ENH: support UOPstream and UIPstream as formatters with an external buffer
- can split serialise/de-serialise and send/recv actions
2023-02-09 10:44:42 +01:00
70d310329c ENH: PstreamBuffers consistency improvements
- make nProcs() independent of internal storage mechanism.
- reset receive positions with finished sends

- use size of received buffers to manage validity instead of
  an separate additional gather operation.
2023-02-08 14:22:29 +01:00
4ec75d538f ENH: clear Map entries, but not Map itself for NBX exchange
- clearing the receive 'slots' is preferrable to clearing out the map
  itself since this can potentially preserve allocated space (eg
  DynamicList entries) between calls.

BUG: remove stray MPI barrier in exchange code
2023-02-08 10:24:58 +01:00
df61104ef5 ENH: add Pstream non-blocking consensus exchange infrastructure
- can be beneficial with increasing number of ranks
2023-02-07 23:02:02 +01:00
068ab8ccc7 ENH: add separate tracking of MPI_Comm_free, MPI_Group_free pending
- permits distinction between communicators/groups that were
  user-created (eg, MPI_Comm_create) versus those queried from MPI.
  Previously simply relied on non-null values, but that is too fragile

ENH: support List<Request> version of UPstream::finishedRequests

- allows more independent algorithms

ENH: added UPstream::probeMessage(...). Blocking or non-blocking
2023-02-07 22:39:00 +01:00
ab4c5f25ac ENH: add PstreamBuffers access routines for friend classes
- allows the possibility of using demand-driven internal buffers
  and/or different storage mechanisms.

  Changes:

    * old: sendBuf_[proci]    -> accessSendBuffer(proci)
    * old: recvBuf_[proci]    -> accessRecvBuffer(proci)
    * old: recvBufPos_[proci] -> accessRecvPosition(proci)

  only affects internals of UIPstreamBase and UOPstreamBase

BUG: reduceOr in PstreamBuffers uses world communicator

- should respect the value of the communicator defined within
  PstreamBuffers
2023-02-07 22:39:00 +01:00
173c9ac163 ENH: reduce storage and startup communication for processorTopology
- previously built the entire adjacency table (full communication!)
  but this is only strictly needed when using 'scheduled' as the
  default communication mode. For blocking/nonBlocking modes this
  information is not necessary at that point.

  The processorTopology::New now generally creates a smaller amount of
  data at startup: the processor->patch mapping and the patchSchedule.

  If the default communication mode is 'scheduled', the behaviour is
  almost identical to previously.

- Use Map<label> for the processor->patch mapping for a smaller memory
  footprint on large (ie, sparsely connected) cases. It also
  simplifies coding and allows recovery of the list of procNeighbours
  on demand.

- Setup the processor initEvaluate/evaluate states with fewer loops
  over the patches.

========
BREAKING: procNeighbours() method changed definition

- this was previously the entire adjacency table, but is now only the
  processor-local neighbours. Now use procAdjacency() to create or
  recover the entire adjacency table.

  The only known use is within Cloud<ParticleType>::move and there it
  was only used to obtain processor-local information.

  Old:
      const labelList& neighbourProcs =
          mesh.globalData().topology().procNeighbours()[Pstream::myProcNo()];

  New:
      const labelList& neighbourProcs =
          mesh.globalData().topology().procNeighbours();

      // If needed, the old definition (with communication!)
      const labelListList& connectivity =
          mesh.globalData().topology().procAdjacency();
2023-02-07 22:39:00 +01:00
3e024d622b STYLE: relocate hashing and IO for std::pair to Pair.H (from Tuple2.H)
- makes it more universally available
2023-02-07 22:39:00 +01:00
d2ab9e9abf Merge branch 'feature-wallDistAddressing' into 'develop'
ENH: wallDistAddressing: wall distance which stores addressing.

See merge request Development/openfoam!590
2023-02-06 14:39:41 +00:00
e790e1c4ba ENH: wallDistAddressing: wall distance which stores addressing. 2023-02-06 14:38:41 +00:00
cc6ba5c1a0 Merge branch 'fix-ATC-extraConvection' into 'master'
BUG: extraConvection in ATC missing a multiplication with ATClimiter

See merge request Development/openfoam!591
2023-02-03 15:36:17 +00:00
26420a88d7 BUG: extraConvection in ATC missing a multiplication with ATClimiter
In the 'standard' and 'UaGradU' options for the ATC term of the adjoint
equations, there is an option to add 'aritificial dissipation', by
adding and subtracting a multiple of the adjoint convection term with
different discretizations. The implicit part was not multiplied with the
ATClimiter whereas the explicit one was, leading to mismatched
contributions in the areas affected by the ATClimiter, which could
affect the sensitivity derivatives.
2023-02-03 15:35:49 +00:00
ff13cdd39d BUG: ensightWrite not reading "excludeFields" (fixes #2696)
- field blocking/exclusion added in commit d9ab5d54ef,
  but was incorrectly doing a lookup for "blockField" for ensight
  although "excludeFields" was documented (and expected).

  Now corrected to use "excludeFields"
2023-02-02 15:17:24 +01:00
f713f74855 ENH: overPotentialFoam: Make consistent. see #1749.
- createFields extends potentialFoam
- (so registers 'p' field, same as potentialFoam)
- writephi is optional as in potentialFoam
2023-02-02 10:34:47 +00:00
7c6232b8b3 BUG: FaceCellWave: support data with transformations. Fixes #2693
transformation support in-place modifies the data (e.g. to
add a transform). This might cause the neighbour side patch
to pick up owner side information.
2023-02-01 16:32:26 +00:00
56bf73d37d Merge branch 'feature-named-MeshObject' into 'develop'
ENH: MeshObject: specify name (instead of typeName)

See merge request Development/openfoam!589
2023-02-01 15:32:14 +00:00
c0e63a8de7 ENH: MeshObject: specify name (instead of typeName) 2023-02-01 15:32:14 +00:00
8b63f64503 STYLE: use std::ostringstream instead of std::to_string for complex
- std::to_string(double) is locale sensitive.
2023-01-31 15:55:21 +01:00
1471d292bf TUT: add dripping chair test 2023-01-31 15:29:26 +01:00
b93f038ea3 TUT: replace exprFixedValue with uniformFixedValue
- wish to deprecate and remove exprFixedValue in the future since the
  same functionality is possible using patch expressions with a
  uniformFixedValue condition.
2023-01-31 13:45:21 +01:00
a6b3a31b28 ENH: add patch expression support for face unit normal (#2691)
- make available as normal()
2023-01-31 13:13:16 +01:00
8ee7595a77 ENH: foamToVTK improvements for (-no-internal, -no-boundary)
- skip loading of fields with -no-internal, -no-boundary

- suppress reporting fields with -no-internal, -no-boundary

- cache loaded volume field for reuse with point interpolation.
  Trade off some memory overhead against reading twice.

  NOTE: this issue will not be evident with foamToEnsight since there
  it only handles cell data *or* point data (not both), so a field is
  only ever loaded/processed once.
2023-01-31 12:45:39 +01:00
72bfaa2be9 ENH: Field assign and construct from dictionary with readOption
- This simplifies definition of 'lazier' (READ_IF_PRESENT)
  construction or assignment.

  For construction:
    - For MUST_READ and key not found: FatalIOError.
    - For LAZY_READ and key not found: initialise field with Zero.
    - For NO_READ and key not found: simply size the field.

  For assignment:
    - If len == 0 : a no-op and return True.
    - For NO_READ : a no-op and return False.
    - For MUST_READ and key not found : FatalIOError
2023-01-31 12:45:39 +01:00
bebc6195a8 ENH: IOobjectOption isAnyRead() for checking against NO_READ
- encompasses isReadOptional or isReadRequired check

STYLE: allow LAZY_READ as a shorter synonym for READ_IF_PRESENT

- add helper for downgrading MUST_READ... to LAZY_READ
2023-01-31 12:45:38 +01:00
c8a2d82094 BUG: inconsistent faceArea on processor boundaries (fixes #2683)
- was missing evaluateCoupled on the initial faceAreaNormals field
  (related to #2507)
2023-01-31 12:45:38 +01:00
39cabfca9c ENH: use fvPatchFieldBase::readDict
- replaces getOrDefault/readIfPresent for "patchType"
2023-01-31 12:45:38 +01:00
0190fed56b ENH: support slicing for finiteArea fields 2023-01-31 12:45:38 +01:00
c206b12c80 ENH: patch boundarySlice() for extraction from a flat boundary list
- remove redundant raw patch slice and non-const patchSlice, which
  were only used internally by finiteArea.

STYLE: noexcept on more patch methods
2023-01-31 12:45:38 +01:00
911c28f17d STYLE: use vector::magSqr when checking size 2023-01-31 12:45:34 +01:00
2faf361354 BUG: faMesh geometryOrder=1 blocks in parallel
- with geometryOrder=1, edge normal calculation is done directly from
  the faces, whereas geometryOrder=2 they are calculated based on the
  point normals of each end.

  In both cases, the geometry calculation uses processor communication
  (with corresponding waitRequests etc).

  Since the final correction and the halo face normals also need
  collective communication, these routines must be triggered on all
  processors or they will block. Thus also include edgeAreaNormals()
  triggering in addition to pointAreaNormals() triggering.
2023-01-31 12:36:41 +01:00
312037d4ea ENH: simplify coding logic for calculating Le() vectors.
- handle lower geometryOrder values directly within edgeAreaNormals()
  and reuse the results within Le().

- direct nonBlocking recv/send of edge normals instead using the
  intermediate processorLduInterface buffers
2023-01-31 12:36:41 +01:00
5672bb296f ENH: use cmptMag, cmptMultiply instead of replacing field components 2023-01-31 12:36:41 +01:00
ea2bedf073 ENH: add coupledFaPatch::delta()
- symmetrical evaluation for processor patches, eliminates
  scalar/vector multiply followed by projection.

STYLE: use evaluateCoupled instead of local versions
2023-01-31 12:36:41 +01:00
988ec18ecc COMP: backslash instead of slash in Make/options 2023-01-30 11:55:35 +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
7c60c80edd ENH: new/revised emplace_back() [for DynamicList/List/PtrDynList/PtrList]
- returns reference as per C++17 std::vector

STYLE: drop unused, redundant DynamicField remove() method
2023-01-27 09:50:45 +01:00
c1cdacc0b4 COMP: missing default parameters for UIPstream::read
ENH: support UIPstream::read, UOPstream::write with UList, SubList
2023-01-27 09:49:16 +01:00
0339e5ee0d BUG: expression field functionObject 'store' keyword ignored 2023-01-26 21:49:59 +01:00
07c69fdf0d COMP: add static libgcc, libstdc++ linking for mingw (fixes #2680)
- this solves some 'dangling' dependency problems that plagued earlier
  versions (when MS-MPI was not also installed).
2023-01-24 18:21:05 +01:00
94a79ef24f STYLE: explicit reference to mesh db for schemes, interfaceTracking etc 2023-01-23 15:05:04 +01:00
0c756cc676 ENH: define linear interpolations for scalar, complex, vector, tensor...
- vector, tensor versions are defined component-wise
  to avoid intermediates.

  The base version uses the form "(1-t)*a + t*b" without any bounds
  checking (ie, will also extrapolate).
2023-01-23 14:55:08 +01:00
ba153df8db ENH: improved handling for clamping
- proper component-wise clamping for MinMax clamp().

- construct clampOp from components

- propagate clamp() method from GeometricField to FieldField and Field

- clamp_min() and clamp_max() for one-sided clamping,
  as explicit alternative to min/max free functions which can
  be less intuitive and often involve additional field copies.

- top-level checks to skip applying invalid min/max ranges
  and bypass the internal checks of MinMax::clamp() etc.
2023-01-23 14:52:29 +01:00
3888bfa17f ENH: UList iterators at offset from begin
- simplifies addressing within sub-ranges.
  Clamps the access range directly
2023-01-23 14:52:29 +01:00
8a70c898ae STYLE: make IOobject time() noexcept. Use explicit REGISTER/NO_REGISTER 2023-01-23 14:52:29 +01:00
1f5a75c3c2 ENH: internal checkTypes method for orientedType
- reuse dimensionSet checking for dimensionedType

STYLE: unfriend some functions for complex
2023-01-23 14:52:29 +01:00
ecaa55295b ENH: add dimensionedLabel typedef
GIT: primitives/compat with compatibility includes
GIT: primitives/traits with pTraits, contiguous, zero, one etc.

COMP: relocate base equal(a,b) definition from scalar.H -> label.H
- make more universally available

STYLE: replace occasional use of notEqual(a,b) with !equal(a,b)
2023-01-23 11:38:54 +01:00
a50d32b587 ENH: define transform(symmTensor, int/float) as no-op
- avoids implicit promotion of label to scalar for no-op,
  or alternatively promotion of symmTensor to tensor for no-op
  (ie, ambiguous).

- fix incorrect transform(.., symmTensor, ...) declarations.
2023-01-23 11:38:54 +01:00
0fa129e83c COMP: add compressed send/recv placeholder (instantiation for integrals) 2023-01-23 10:02:31 +01:00
03ab6c1a9d COMP: remove commented Make/options item (#2668)
COMP: update include for CGAL-5.5 (#2665)

  old:  Robust_circumcenter_filtered_traits_3
  new:  Robust_weighted_circumcenter_filtered_traits_3

COMP: adjust CGAL rule for OSX (#2664)

- since CGAL is now header-only, the previous OSX-specific rules have
  become redundant
2023-01-23 09:39:30 +01:00
e62b031f26 BUG: Casson coefficients not re-read (fixes #2681) 2023-01-22 18:28:00 +01:00
33f0ff8145 BUG: limitVelocity: specify default entry for U (fixes #2679) 2023-01-13 15:33:19 +00:00
2641dc4c3a ENH: direct, non-blocking transfer for finiteArea processor patch
STYLE: pTraits::rank instead of std::is_arithmetic to suppress transform

- more consistent with doTransform() coding, potentially useful for
  complex
2023-01-12 21:19:12 +01:00
b15638a2d2 ENH: consistent use of resize_nocopy for processor transfers
STYLE: rename some internal buffers with the data types

  low-level  : byteSendBuf_, byteRecvBuf_
  field level: sendBuf_, recvBuf_
  solve level: scalarSendBuf_, scalarRecvBuf_
2023-01-12 21:19:12 +01:00
bf2f87f7e3 ENH: use isolated request wait in PPCG solver 2023-01-12 21:19:12 +01:00
bf99c104eb ENH: avoid faPatch/fvPatch patchInternalField ambiguity
- with alternative faceCell addressing, use the three-parameter
  version only. This avoids potential future ambiguity with the
  two-parameter version (eg, with a label type)

ENH: add faPatchField patchInternalField() for symmetry with fvPatchField

ENH: direct reference to mesh thisDb instead of inferring

ENH: pointMesh::boundaryMesh() method (eg, similar to fvMesh)
2023-01-12 21:19:12 +01:00
bd0ad07d40 ENH: restrict scope of waitRequests() in LduMatrix update
- Only wait for locally invoked requests.
  Reflects behaviour of lduMatrix update.
2023-01-12 21:19:12 +01:00
568ced68e2 ENH: support independent handling of MPI requests (#2674)
- UPstream::Request wrapping class provides an opaque wrapper for
  vendor MPI_Request values, independent of global lists.

ENH: support for MPI barrier (blocking or non-blocking)
ENH: support for MPI sync-send variants

STYLE: deprecate waitRequests() without a position parameter

- in many cases this can indicate a problem in the program logic since
  normally the startOfRequests should be tracked locally.
2023-01-12 21:19:12 +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
94a7945be3 ENH: make lduInterfaceField::updatedMatrix mutable
- simplifies code, consistent with other matrix transfer functions.
  Use a setter method.

STYLE: AMIInterpolation::upToDate(bool) setter method

ENH: add guards to avoid float-compressed transfer of integral types

STYLE: drop unused debug member from abstract interface classes
2023-01-12 21:19:12 +01:00
06f479fbd4 ENH: improve handling of wait/finished requests
- now simply a no-op for out-of-range values (instead of an error),
  which simplifies the calling code.

  Previously
  ==========

      if (request_ >= 0 && request_ < UPstream::nRequests())
      {
          UPstream::waitRequest(request_);
      }

  Updated
  =======

      UPstream::waitRequest(request_);

- when 'recycling' freed request indices, ensure they are actually
  within the currently addressable range

- MPI finalization now checks outstanding requests against
  MPI_REQUEST_NULL to verify that they have been waited or tested on.
  Previously simply checked against freed request indices

ENH: consistent initialisation of send/receive bookkeeping
2023-01-12 21:19:11 +01:00
35c5306544 Merge remote-tracking branch 'origin/master' into develop 2023-01-12 21:18:37 +01:00
166164da93 BUG: vtk::coordSetWriter produces incorrect VTK legacy format (fixes #2678)
- has a special purpose beginPiece() method, but was missing an update
  on the numberOfPoints, numberOfCells values required by the base class.
2023-01-12 17:10:13 +01:00
248e5ff86f ENH: simpler logic for doTransform() check
- test pTraits rank first (compile-time) and then parallel()
2023-01-11 13:16:14 +01:00
33c9df7741 ENH: construct DynamicField, DynamicList from subset of elements
STYLE: inline some size(), empty() members
2023-01-11 13:15:56 +01:00
1f68e7f9b3 CONFIG: bump patch level 2023-01-11 13:00:30 +01:00
e346620a62 BUG: inconsistent finiteArea proc-boundary contributions (fixes #2672) 2023-01-11 12:31:16 +01:00
f08392010f ENH: label version of neg0(). Add noexcept to sign/pos/neg etc. 2023-01-11 11:46:55 +01:00
df808ad3f2 BUG: overset: fix layerRelax input.Fixes #2670 2023-01-04 17:13:59 +00:00
51ed7a6034 TUT: Added simpleFoam/rotatingCylinders validation case - fixes #2563 2023-01-03 21:20:48 +00:00
0031cb1efa CONFIG: set API level to 2212 2022-12-28 09:36:06 +00:00
d74572cae8 CONFIG: set API level to 2212 2022-12-28 09:33:42 +00:00
1cd47839ac CONFIG: Reset version post-release 2022-12-23 13:53:49 +00:00
66908158ae RELEASE: Updated version to v2212 2022-12-21 16:16:18 +00:00
7e61f36c12 RELEASE: Updated headers to v2212 2022-12-21 16:16:18 +00:00
4cccd5f854 COMP: smoothSurfaceData was building into FOAM_USER_APPBIN 2022-12-21 16:16:17 +00:00
b1e919dbbb STYLE: UList::null() for default empty list 2022-12-21 09:33:14 +01:00
c273ee4697 Merge remote-tracking branch 'origin/master' into develop 2022-12-20 13:31:41 +00:00
aebd79ff59 BUG: parallel blocking writing surface noise output (fixes #2663)
- old logic (v2206 and earlier) always disabled writing on non-master,
  but other parts of the code were more recently updated to use lazy
  evaluation of surface data (with parallel communication)

- now retain full write/no-write logic identically on all ranks. Take
  care of master/non-master at the final output stage.
2022-12-19 18:00:07 +01:00
0a01492397 CONFIG: revert scotch version to 6.1.0
- some regressions (especially with ptscotch) noted with scotch-7.0.1
2022-12-19 16:26:02 +01:00
8d2165e7f4 ENH: topoSet: add new topoSet options 2022-12-19 14:49:16 +00:00
5fa37fb41c BUG: fvMatrix: avoiding dupolicate adjustment. Fixes #2658 2022-12-19 11:49:25 +00:00
87cff55f9e CONFIG: improve handling of debian multi-arch
- no guarantee that dpkg-architecture command is actually available,
  so revert to a reasonable guess from 'uname -m' and 'uname -s'
2022-12-19 11:13:53 +01:00
4dafaa8cfe STYLE: dump debug interpolation files to processor-specific names 2022-12-16 10:51:00 +01:00
ec77d3152b Merge branch 'feature-pureZoneMixture' into 'develop'
ENH: pureZoneMixture: different mixture properties according to cellZone

See merge request Development/openfoam!586
2022-12-14 15:39:16 +00:00
fa7f0e1b67 ENH: pureZoneMixture: different mixture properties according to cellZone 2022-12-14 15:07:00 +00:00
02ca7868d5 BUG: tutorial: missing run script invocation 2022-12-14 14:28:50 +00:00
029c5a24fe BUG: snappyMultiRegionHeaterImplicit: fix decomposition. Fixes #2657 2022-12-14 13:25:24 +00:00
b41ddc43c3 Merge branch 'feature-chtMultiRegionFoam-frozenFlow' into 'develop'
ENH: chtMultiRegionFoam - add frozenFlow option

See merge request Development/openfoam!564
2022-12-14 10:59:00 +00:00
48973bad83 ENH: chtMultiRegionFoam - add frozenFlow option
Also for 'chtMultiRegionSimpleFoam' and 'chtMultiRegionTwoPhaseEulerFoam'.
2022-12-14 10:54:40 +00:00
7d97b6f791 Merge branch 'feature-finite-area-numerics' into 'develop'
Misc. changes in finite-area methods

See merge request Development/openfoam!585
2022-12-14 10:19:05 +00:00
a0f1e98d24 ENH: finiteArea: improve robustness in code sections vulnerable to math errors
It has been observed that the finite-area framework is prone to numerical
issues when zero-valued edge lenghts, edge/face normals and face areas exist.

To improve exception handling at identified code sections to gracefully
overcome math errors, the problematic entities are lower-bounded by SMALL.
2022-12-14 10:18:23 +00:00
d5b7200295 ENH: edgeInterpolation: make skewness-correction optimisation compile-time optional 2022-12-14 10:18:23 +00:00
952d42512d BUG: regionFaModels: report min/max for all processors (fixes #2655) 2022-12-14 10:18:23 +00:00
0de1df7309 BUG: processorFaPatch: fix the sign of compound assignment 2022-12-14 10:18:23 +00:00
d58e06494d REVERT: leastSquaresFaVectors: pseudo-inverse shows instabilities for 2-D cases 2022-12-14 10:18:23 +00:00
b7b78a3052 COMP: unneeded move on return (mingw) 2022-12-13 19:49:36 +01:00
6ad25ef293 CONFIG: set API level to 2212 (pre-release state)
- README updated to v2212
2022-12-13 19:49:36 +01:00
c551ef3b01 CONFIG: update completion cache (csh) 2022-12-13 19:49:36 +01:00
24e97c6b91 CONFIG: update versions
- paraview (5.11.0), petsc (3.18.2), adios (2.8.3), scotch (7.0.1)
2022-12-13 11:18:54 +01:00
bd41ad1842 SUBMODULE: updates for adios, cfmesh, OpenQBMM, external-solver 2022-12-13 11:18:54 +01:00
ed5690ffbc STYLE: volSurfaceMapping is const 2022-12-13 11:18:16 +01:00
05322608a2 ENH: Pstream waitRequest ignore placeholder (negative) requests 2022-12-13 10:45:44 +01:00
4b94ac97c2 ENH: dimensioned/dimensionedSet handle optional read as per dictionary 2022-12-13 10:09:46 +01:00
1888bc62ab ENH: x/y, y/x comparison operators for Vector2D
STYLE: init label variants with std::sqrt + double (compile-time invariant)
2022-12-13 10:09:46 +01:00
95a6e8b419 BUG: boundaryRadiationProperties - check ptr exists before using 2022-12-13 06:16:52 +00:00
c3b0742e03 ENH: advancing front AMI - use area in direction of face normal 2022-12-12 18:07:31 +00:00
7c235371ff ENH: ConeNozzleInjection - added option to include an angular velocity (rad/s)
Specified using the optional 'omega' entry (Function1 type), e.g. for a constant
value:

      omega           12.56;

Note that the swirl contribution is applied in addition to the velocity set by
the 'flowType' option. For example, for the 'constantVelocity' option, parcels
are initially set the velocity according to the UMag and direction/cone angle;
the swirl velocity is then added.
2022-12-12 16:24:06 +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
09f4d8513f ENH: processorAgglomerator: test nMasters 2022-12-12 13:29:37 +00:00
36f66606a2 Merge branch 'feature-contact-line-movement' into 'develop'
ENH: dynamicContactAngleForce: new finite-area contact-angle force model

See merge request Development/openfoam!584
2022-12-09 13:09:21 +00:00
91a62ca05a STYLE: contactAngleForce: modernise code 2022-12-09 13:09:11 +00:00
993b7af513 BUG: contactAngleForce: avoid suppresing the film entering the domain (fixes #2651) 2022-12-09 13:09:11 +00:00
6f2c609a14 ENH: contactAngleForce: add optional contact-line movement force 2022-12-09 13:09:11 +00:00
885456f9a4 ENH: dynamicContactAngleForce: new finite-area contact-angle force model
DEFEATURE: merge fa-perturbedTemperatureDependent into dynamicContactAngle
2022-12-09 13:09:11 +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
9e6123b5a4 Merge branch 'feature-clouds-log-output' into 'develop'
ENH: added option to control log frequency of lagrangian calculations

See merge request Development/openfoam!583
2022-12-09 10:05:40 +00:00
3a429894b1 STYLE: lagrangian intermediate library - renamed log_ to logToFile_ to disambiguate against output to Info 2022-12-09 11:01:06 +01:00
d8f33c626a ENH: lagrangian intermediate library - added logging controls 2022-12-09 11:01:06 +01:00
9c9088f191 ENH: CloudSubModelBase - added info() function to set log flag 2022-12-09 11:01:06 +01:00
1f393aefa8 ENH: subModelBase - added log data member 2022-12-09 11:01:06 +01:00
b94bf625a5 ENH: cloudSolution - added log/Info output control 2022-12-09 11:01:06 +01:00
161fab8d60 COMP: messageStream - use this->log 2022-12-09 11:01:06 +01:00
8afd6ff729 ENH: support format readOptions for surfaceReader types (#2609)
- similar to surface writing formats, also support optional
  dictionary of reading options. The main beneficiary of this is the
  ensight surface reader:

  readOptions
  {
      ensight
      {
          masterOnly true;
      }
  }

  This will restrict reading to the master rank. Surfaces and values
  read will be broadcast to the other ranks, with the intention of
  reducing load on the filesystem.

ENH: add writing of Dimensioned fields for areaWrite functionObject

- can be useful for examining finite-area source terms
2022-12-09 10:59:36 +01:00
b69db76b67 ENH: bundle together freed/outstanding MPI request handling
- improve communicator wrapping
- avoid indexing errors when using partial subranks
- UPstream::is_subrank (for testing partial subranks)
2022-12-09 10:59:32 +01:00
d5e82f072e CONFIG: handle string splitting [zsh] (#2640) 2022-12-08 14:04:13 +01:00
a8b0ec0c4e STYLE: remove stray forward declaration 2022-12-08 14:04:13 +01:00
d7de6a2772 Merge branch 'feature-fvOptions-writeFile' into 'develop'
ENH: fvOptions: add writeFile functionality

See merge request Development/openfoam!577
2022-12-08 11:37:56 +00:00
48f8680941 ENH: fvOptions: add writeFile functionality
- velocityDampingConstraint
- limitTemperature
- limitVelocity
2022-12-08 11:37:33 +00:00
4c8fc9dc6e ENH: writeFile: add new flags to write/reset files 2022-12-08 11:37:33 +00:00
5844463ba4 Merge branch 'feature-evapotranspiration' into 'develop'
ENH: Evapotranspiration utilities

See merge request Development/openfoam!571
2022-12-08 11:36:28 +00:00
9479ab98eb ENH: solarLoad: remove unused vertical-direction object
STYLE: solarLoad: replace uppercase index variables with lowercase
2022-12-08 11:35:39 +00:00
c29e67e5e5 ENH: solarCalculator: consolidate diffuseSolarRad calculations 2022-12-08 11:35:39 +00:00
eaffe4c2cf ENH: solarLoadBase: new base class to access various solar-load data 2022-12-08 11:35:39 +00:00
0fde8ac91d ENH: faceShading: enable hit-face calculations for face zones
This change enables face zones creating shades and interacting with shades.

ENH: solarLoad: initialise hit faces in ctor level
2022-12-08 11:35:39 +00:00
d0061d6f54 ENH: cellToFaceZone: new topoSetSource 2022-12-08 11:35:39 +00:00
c439968390 ENH: cellToFace: new selection option 'outside'
The new selection option 'outside' can be used to select
faces with only one neighbour in the specified cellSet.
2022-12-08 11:35:39 +00:00
5fb0cd77f1 ENH: atmopshericModels: avoid storing common fields in fvOptions 2022-12-08 11:35:39 +00:00
b50591166e STYLE: rename atmospheric-field names, plantCd->Cd and leafAreaDensity->LAD 2022-12-08 11:35:39 +00:00
ce10cc54c2 Merge branch 'feature-newObjectiveFunctions' into 'develop'
ENH: new objective functions for adjoint-based optimisation

See merge request Development/openfoam!578
2022-12-08 11:16:21 +00:00
599b009b18 TUT: tutorials for the new objective functions
TUT: moved the nutSqr objective tutorial to the proper directory
2022-12-08 11:15:26 +00:00
80f385a3b0 ENH: added new objective functions
- flowRate: volume flow-rate through given patches
- flowRatePartition: distribution of the inlet flow-rate to certain
  outlet patches, with given percentages
- uniformityPatch: uniformity of the velocity field at given (outlet) patches,
  expressed as (half) the variance of the velocity field
- uniformityCellZone: same as uniformityPatch, but defined over
  cellZones
- powerDissipation: the fluid power dissipation taking place within
  given cellZones. In the absence of viscous stress at the "inlets" and
  "outlets" of the cellZones, this corresponds to the volume flow-rate
  weighted total pressure losses through the cellZones

ENH: updated nutSqr so it can be used with adjointkOmegaSST too
2022-12-08 11:15:26 +00:00
8127ec6a05 ENH: added some auxiliary functions in objective
to help allocate pointers related to contributions to the adjoint
turbulence model PDEs, populate them and check the validity of the
cellZones provided for cellZone-based objectives
2022-12-08 11:15:26 +00:00
c9a10055e8 ENH: adjointRASModel now also returns the Jacobian of nut w.r.t. U 2022-12-08 11:15:26 +00:00
9018c94b90 Merge branch 'feature-parallelFvGeometryScheme' into 'develop'
ENH: Added new parallelFvGeometryScheme

See merge request Development/openfoam!576
2022-12-08 11:14:30 +00:00
d6204acd0e ENH: Added new parallelFvGeometryScheme 2022-12-08 11:14:30 +00:00
3e260b84db ENH: vanDriest: change calcInterval to updateInterval 2022-12-07 16:15:53 +00:00
9fbe2ef0b3 ENH: leastSquaresFaVectors: use pseudo inverse instead of direct inverse 2022-12-07 13:17:32 +00:00
9b379398c5 ENH: tensor-symmTensor: new pseudo-inverse function
REVERT: add heuristic handling of tensor-field inverses - simplify algorithm
2022-12-07 13:17:26 +00:00
b50850de56 COMP: DiagonalMatrix: avoid clang's over-eager optimisation (fixes #2650) 2022-12-07 13:17:03 +00:00
3ab182b1ae STYLE: prefer std::unique_ptr instead of (aliased) Foam::unique_ptr 2022-12-01 16:40:52 +00:00
3151dacccc ENH: include <algorithm> in stdFoam.H
- was already included in many places (via UList.C templates), but now
  formalise by placing in stdFoam.H
2022-12-01 15:52:48 +00:00
8ae2e5a969 ENH: fail-safe access of ITstream tokens as front(), back()
- more standard naming than peekFront() etc
2022-12-01 14:51:19 +00:00
bbd6bfbb7f ENH: additional 'other' category for profilingPstream
- eg, for user MPI operations that are to be tracked separately
2022-12-01 14:51:19 +00:00
8d4e32da22 COMP: fixup test applications 2022-12-01 14:51:19 +00:00
f9191b9377 Merge branch 'feature-fa-Brun-dripping-film-injection' into 'develop'
ENH: Brun dripping film injection

See merge request Development/openfoam!580
2022-12-01 13:58:33 +00:00
59811983db ENH: BrunDrippingInjection: new injection model for liquid films 2022-12-01 13:56:39 +00:00
dff4c3da05 ENH: limitHeight: new faOption to limit film height 2022-12-01 13:55:27 +00:00
e60d0997e6 Merge branch 'feature-conditional-absorption-kinematic-film' into 'develop'
ENH: KinematicSurfaceFilm: add option to specify interacting parcel types

See merge request Development/openfoam!581
2022-12-01 12:52:05 +00:00
ea44944037 ENH: KinematicSurfaceFilm: add option to specify interacting parcel types
This pack adds a new entry 'parcelTypes' which can specify the list of
parcel type IDs interacting with a surface film. If the entry
is omitted, all particle types are considered.

```
    surfaceFilmModel kinematicSurfaceFilm;

    kinematicSurfaceFilmCoeffs
    {
        interactionType absorb;

        // Optional list of participating parcel IDs
        parcelTypes     (10);
    }
```

To set the parcel type by injector, 'injectorID' entry can be used
when specifying the injector models, e.g.

```
injectionModels
{
    model1
    {
        type            <injectionModelType>;

        // Optional injector ID
        // - if ommitted, parcels use '-1'
        injectorID      10;

        ...
    }
}
```
2022-12-01 12:47:40 +00:00
4a01979fa8 Merge branch 'feature-fa-interpolation-scheme' into 'develop'
ENH: leastSquaresEdgeInterpolation: new edge interpolation method

See merge request Development/openfoam!575
2022-12-01 12:24:44 +00:00
689b2ab2a9 ENH: leastSquaresEdgeInterpolation: new edge interpolation method 2022-12-01 12:24:27 +00:00
fbd14e42a2 Merge branch 'update-Pstream-comms-fileHandler' into 'develop'
Cleaner separation global/local/self communication, cleaner responsibility for fileHandler ownership

See merge request Development/openfoam!582
2022-12-01 12:18:50 +00:00
9711b7f1b9 ENH: more consistent single-ownership when swapping fileHandlers
- make fileHandler deletion mechanism more
  transparent by providing a nullptr signature. A nullptr parameter
  is already being used in the argList destructor for shutdown, but that
  relied on an implicit conversion to autoPtr to trigger things.

- improved handling of file handler replacement.

  Previously had a very basic check on old vs new handlers using their
  type() values (string comparison!!), which would unfortunately
  prevent proper swapping of the contents.
  Check the actual pointers instead.

  As part of the change, treat any empty autoPtr as no-op instead of as
  deletion (which is handled explicitly as nullptr instead).

  In addition to making the internal logic simpler, it means that the
  current file handler always changes to a valid state without
  inadvertently removing everything and falling back to creating a new
  default handler (again).

  This handling of no-ops also simplifies call code. For example,

  <code>
      autoPtr<fileHandler> oldHandler;
      autoPtr<fileHandler> writeHandler;
      word handlerName;

      if (arg.readIfPresent("writeHandler", handlerName))
      {
          writeHandler = fileOperation::New(handlerName);
      }

      oldHandler = fileHandler(std::move(writeHandler));

      ... do something

      writeHandler = fileHandler(std::move(oldHandler));
  </code>

  If the "writeHandler" is not specified, each call is a no-op.
  If it is specified, the handlers are swapped out each time.

- the management of the fileHandler communicators is now encapsulated
  privately (managedComm_) with the final layer being responsible for
  cleaning up after itself. This makes delegation/inheritance clearer
  and avoids the risk of freeing an MPI communicator twice.

STYLE: uniformFile static check relocated to fileOperation layer
2022-12-01 12:18:38 +00:00
ffeef76d8f ENH: cleaner separation of global and local world naming
- UPstream::globalComm constant always refers to MPI_COMM_WORLD but
  UPstream::worldComm could be MPI_COMM_WORLD (single world)
  or a dedicated local communicator (for multi-world).

- provide a Pstream wrapped version of MPI_COMM_SELF,
  references as UPstream::selfComm

- UPstream::isUserComm(label)
  test for additional user-defined communicators
2022-12-01 12:18:38 +00:00
7fe8bdcf99 Merge branch 'feature-fa-least-squares' into 'develop'
ENH: inv: fall back to pseudo-inverse for singular tensors

See merge request Development/openfoam!574
2022-12-01 12:09:05 +00:00
e190df9033 ENH: inv: fall back to pseudo-inverse for singular tensors
- remove heuristic handling of tensor-field inverses
2022-11-30 12:24:32 +00:00
0b83d39500 BUG: removed stickiness of readFields function object in postProcess mode. Fixes #2647 2022-11-30 10:34:49 +00:00
8495b86d8e BUG: solidIsothermalReactionRate: redefine the latent energy (fixes #2646) 2022-11-30 10:15:26 +00:00
09a6049f50 BUG: snappyHexMesh: revert to old behaviour. Fixes #2637
Curvature detection was switched on even without curvatureLevel
switched on. Now reverts to v2206 behaviour.
2022-11-29 15:02:21 +00:00
6b6d4c10a3 Merge branch 'feature-solidIsothermalReactionRate' into 'develop'
ENH: solidIsothermalReactionRate: new solid reaction rate model

See merge request Development/openfoam!579
2022-11-29 14:31:15 +00:00
8bfbda8c71 ENH: solidIsothermalReactionRate: new solid reaction rate model
STYLE: solidArrheniusReactionRate: modernise code
2022-11-29 14:27:42 +00:00
bdb437ab10 STYLE: also mention -help-full on usage errors 2022-11-26 01:13:53 +01:00
286c6ce7d8 ENH: Foam::readLink(..)
- recover the target of symbolic links.
  This is needed when re-creating a file tree on another rank.

ENH: handle checkGzip, followLink flags in fileHander filePath()

- previously just relied on the backend defaults, now pass through
- separate init(...) for common constructor init steps
2022-11-26 01:13:53 +01:00
478c1b2312 ENH: add atomic file creation support into masterOFstream (#2631) 2022-11-26 01:13:53 +01:00
69be54107d ENH: IOobject headerClassName now initialised to empty value
- was previously populated with "IOobject" (the typeName) but then
  cannot easily detect if the object was actually read.
  Also clear the headerClassName on a failed read

BUG: parallel inconsistency in regIOobject::readHeaderOk

- headerOk() checked with master, but possible parallel operations
  within it
2022-11-25 12:48:45 +01:00
e401e8f132 COMP: RASModelBase adjustments
- naming more consistent with DESModelBase etc for 'isA' dynamic
  casting
2022-11-25 12:48:45 +01:00
3f87aec01a ENH: improve construct UniformDimensionedFields from components
- ensure that the name is non-empty.
- allow construct from IOobject, dimensions and value

ENH: gravity lookup accessors
2022-11-25 12:48:45 +01:00
efc4649f12 BUG: corrected mappedPatchBase error for multiworld introduced by 945405c32d 2022-11-25 10:04:06 +00:00
360af221fe BUG: [fa|fv]Matrix setValuesFromList - corrected loops. Fixes #2642 2022-11-25 09:24:31 +00:00
adf95d483c BUG: redistributePar: softlink uniform. Fixes #163 2022-11-24 14:58:07 +00:00
8c02820db6 COMP: EigenMatrix: remove unused iter variable 2022-11-24 13:47:08 +00:00
9d212dfd32 Merge branch 'feature-filtered-mapfile' into 'develop'
Add spatial filtering and ensight support to MappedFile and external file source (#2609)

See merge request Development/openfoam!568
2022-11-24 12:31:08 +00:00
126d831f6e TUT: use filter/mapping with ensight data (#2609) 2022-11-24 13:30:16 +01:00
cb4e026aed ENH: add support for additional filter/mapping (#2609)
- comprises a few different elements:

FilterField (currently packaged in PatchFunction1Types namespace)
~~~~~~~~~~~

  The FilterField helper class provides a multi-sweep median filter
  for a Field of data associated with a geometric point cloud.

  The points can be freestanding or the faceCentres (or points)
  of a meshedSurface, for example.

  Using an initial specified search radius, the nearest point
  neighbours are gathered and addressing/weights are built for them.
  This currently uses an area-weighted, linear RBF interpolator
  with provision for quadratic RBF interpolator etc.

  After the weights and addressing are established,
  the evaluate() method can be called to apply a median filter
  to data fields, with a specified number of sweeps.

boundaryDataSurfaceReader
~~~~~~~~~~~~~~~~~~~~~~~~~

- a surfaceReader (similar to ensightSurfaceReader) when a general
  point data reader is needed.

MappedFile
~~~~~~~~~~
- has been extended to support alternative surface reading formats.
  This allows, for example, sampled ensight data to be reused for
  mapping.  Cavaet: multi-patch entries may still needs some work.

- additional multi-sweep median filtering of the input data.
  This can be used to remove higher spatial frequencies when
  sampling onto a coarse mesh.

smoothSurfaceData
~~~~~~~~~~~~~~~~~
- standalone application for testing of filter radii/sweeps
2022-11-24 13:30:16 +01:00
2984d1e3e7 Merge branch 'feature-updated-core' into 'develop'
Feature updated core

See merge request Development/openfoam!573
2022-11-24 12:21:37 +00:00
98598ba0bb ENH: use simpler constructor forms for treeData types 2022-11-24 12:21:01 +00:00
fc0b980333 BUG: avoid infinite recursion in AABBTree (fixes #2616)
- since bounding boxes overlap, need to verify the splitting actually
  did something. Problem only really evident with higher tree depths.
2022-11-24 12:21:01 +00:00
ffbad65538 ENH: replace triangleFuncs::intersectBb usage with boundBox::intersect 2022-11-24 12:21:01 +00:00
38b663b6a8 ENH: add boundBox/triangle intersection test to boundBox
- replaces edge by edge tests with separating axis tests
2022-11-24 12:21:01 +00:00
ac4f580d09 ENH: cleanup treeData items (#2609)
Changes / Improvements

- more consistent subsetting, interface

  * Extend the use of subset and non-subset collections with uniform
    internal getters to ensure that the subset/non-subset versions
    are robustly handled.

  * operator[](label) and objectIndex(label) for standardized access
    to the underlying item, or the original index, regardless of
    subsetting or not.

  * centres() and centre(label) for representative point cloud
    information.

  * nDim() returns the object dimensionality (0: point, 1: line, etc)
    these can be used to determine how 'fat' each shape may be
    and whether bounds(labelList) may contribute any useful information.

  * bounds(labelList) to return the full bound box required for
    specific items. Eg, the overall bounds for various 3D cells.

- easier construction of non-caching versions. The bounding boxes are
  rarely cached, so simpler constructors without the caching bool
  are provided.

- expose findNearest (bound sphere) method to allow general use
  since this does not actually need a tree.

- static helpers

  The boxes() static methods can be used by callers that need to build
  their own treeBoundBoxList of common shapes (edge, face, cell)
  that are also available as treeData types.

  The bounds() static methods can be used by callers to determine the
  overall bound-box size prior to constructing an indexedOctree
  without writing ad hoc code inplace.

  Not implemented for treeDataPrimitivePatch since similiar
  functionality is available directly from the PrimitivePatch::box()
  method with less typing.

========
BREAKING: cellLabels(), faceLabels(), edgeLabel() access methods

- it was always unsafe to use the treeData xxxLabels() methods without
  subsetting elements. However, since the various classes
  (treeDataCell, treeDataEdge, etc) automatically provided
  an identity lookup, this problem was not apparent.

  Use objectIndex(label) to safely de-reference to the original index
  and operator[](index) to de-reference to the original object.
2022-11-24 12:21:01 +00:00
f638db48c7 ENH: octree findBox, findSphere with external storage of results
- more memory efficient within loops

- octree/boundBox overlaps().
  Like findBox(), findSphere() but early exit if any shapes overlap.

ENH: additional query for nLeafs()
2022-11-24 12:21:01 +00:00
b8d01a88ea ENH: setter/getter for octree permutation tolerance
- make template invariant
2022-11-24 12:21:01 +00:00
3d7dc6a870 ENH: reduce some internal overhead when splitting octree nodes (#2609)
- don't need separate scratch arrays (avoids possible reallocations
  when split is imbalanced)

ENH: upgrade dynamicIndexedOctree to use DynamicList directly

- with C++11 move semantics don't need lists of autoPtr
  for efficient transfers
2022-11-24 12:21:01 +00:00
b129446221 ENH: simplify sub-octant bound-box search
- basic support for splitting into two at a given position and face to keep
2022-11-24 12:21:01 +00:00
fc9311ba0d STYLE: octree pushPoint with local constexpr (more readable code) 2022-11-24 12:21:01 +00:00
3384747f9b ENH: split off template-invariant part of indexedOctree node indexing
- code reduction, reinherit for dynamicIndexedOctree

ENH: additional OBJ writing, statistics
2022-11-24 12:21:01 +00:00
e5006a62d7 ENH: use simpler boundBox handling
- use default initialize boundBox instead of invertedBox
- reset() instead of assigning from invertedBox
- extend (three parameter version) and grow method
- inflate(Random) instead of extend + re-assigning
2022-11-24 12:21:01 +00:00
1339c3357b ENH: general boundBox/treeBoundBox improvements
- null() static method
  * as const reference to the invertedBox with the appropriate casting.

- boundBox inflate(random)
  * refactored from treeBoundBox::extend, but allows in-place modification

- boundBox::hexFaces() instead of boundBox::faces
  * rarely used, but avoids confusion with treeBoundBox::faces
    and reuses hexCell face definitions without code duplication

- boundBox::hexCorners() for corner points corresponding to a hexCell.
  Can also be accessed from a treeBoundBox without ambiguity with
  points(), which could be hex corners (boundBox) or octant corners
  (treeBoundBox)

- boundBox::add with pairs of points
  * convenient (for example) when adding edges or a 'box' that has
    been extracted from a primitive mesh shape.

- declare boundBox nPoints(), nFaces(), nEdges() as per hexCell

ENH: return invertedBox instead of FatalError for empty trees

- similar to #2612

ENH: cellShape(HEX, ...) + boundBox hexCorners for block meshes

STYLE: cellModel::ref(...) instead of de-reference cellModel::ptr(...)
2022-11-24 12:21:01 +00:00
0ba458fdbc ENH: add primitiveMesh cellBb()
- the boundBox for a given cell, using the cheapest calculation:

  - cellPoints if already available, since this will involve the
    fewest number of min/max comparisions.

  - otherwise walk the cell faces: via the cell box() method
    to avoid creating demand-driven cellPoints etc.
2022-11-24 12:21:01 +00:00
27c2cdc040 ENH: vector mag(), magSqr() methods - complementary to dist(), distSqr()
ENH: use direct access to pointHit as point(), use dist(), distSqr()

- if the pointHit has already been checked for hit(), can/should
  simply use point() noexcept access subsequently to avoid redundant
  checks. Using vector distSqr() methods provides a minor optimization
  (no itermediate temporary), but can also make for clearer code.

ENH: copy construct pointIndexHit with different index

- symmetric with constructing from a pointHit with an index

STYLE: prefer pointHit point() instead of rawPoint()
2022-11-24 12:21:01 +00:00
5ec435aca3 ENH: base classes for wave algorithms (manage non-templated parts)
ENH: use DynamicList instead of List + size for point wave

- consistent with previous updates for the other algorithms

STYLE: unique_ptr instead of raw pointer in wave algorithms
2022-11-24 12:21:01 +00:00
c33167dc0e STYLE: use stack-like naming for ifEntry handling
STYLE: unique_ptr instead of autoPtr for holding std::thread
2022-11-24 12:21:01 +00:00
e4139898d2 ENH: face::connected() method
- return true if two faces share a common vertex.

  Same idea as the existing edge::connected() method
  (previously spelled 'connects()')
2022-11-24 12:21:01 +00:00
d3e285b48b ENH: add FixedList templated get<unsigned>() methods
- provides fast compile-time indexing for FixedList
  (invalid indices trigger a compiler error).

  This enables noexcept access, which can propagate into various
  other uses (eg, triFace, triPoints, ...)

ENH: add triangle edge vectors
2022-11-24 12:21:01 +00:00
c7e6ae30bf ENH: add front(), back() methods to List containers
- traditionally used first(), last() methods,
  but front(), back() are well-known from std::vector etc
  which makes the access more familiar.

- support push_back() method for containers that already had append().
  This increases name familiar and can help when porting between
  different C++ code bases.

- support pop_back() method for List containers.
  This is similar to std::vector
2022-11-24 12:21:01 +00:00
db88265163 ENH: use CircularBuffer instead SLList for FIFO-style handling
- PrimitivePatch localPointOrder
- enrichedPatch
- polyMeshZipUpCells
2022-11-24 12:21:01 +00:00
f3ba6c6da0 ENH: linked-lists accept more familiar STL method names
- ie, front(), back(), push_front(), push_back(), pop_front()

ENH: add CircularBuffer flattening operator() and list() method

- useful if assigning content to a List etc

BUG: CircularBuffer find() did not return logical index
2022-11-24 12:21:01 +00:00
9f9b8fb662 Merge branch 'feature-resolution-index' into 'develop'
ENH: resolutionIndex: new function object to evaluate LES/DES resolution

See merge request Development/openfoam!569
2022-11-23 18:24:06 +00:00
8ba1156a56 ENH: resolutionIndex: new function object to evaluate LES/DES resolution
Grid independency studies and grid adaptation for implicit LES/DES are
nontrivial and intractable due to the inherent coupling between spatial
resolution and subgrid-scale modelling.

To enable assessments for LES/DES resolution, a function object of
single-mesh resolution index with three submodels is introduced.
2022-11-23 13:41:20 +00:00
13606d4e09 ENH: RASModelBaseName: new type name for RANS models 2022-11-23 13:41:20 +00:00
90b61429f6 ENH: multiComponentMixture: fixes #2206
- added bit of tolerance
- write difference
2022-11-23 12:20:04 +00:00
d69ac516e8 ENH: allow configurable field send/receive for surfaceNoise (#2639)
- replaced PstreamBuffers mechanism with globalIndex for both gather
  and scatter operations. Use scheduled communication by default, but
  is selectable.

- reduced communication with ensemble averaging and no-write
2022-11-22 17:07:40 +01:00
9114e01de9 STYLE: align faceZone handling (functionObjects, sampling)
- pattern as per surfaceFieldValue::setFaceZoneFaces()

  1. define faceId, facePatchId assuming an internal face
  2. if actually a boundary face:
     - get facePatchId
     - ignore if emptyPolyPatch or coupledPolyPatch (neighbour side)
     - get patch relative faceId

  This currently seems to be the least amount of code clutter.

ENH: recover some memory my shrinking lists in fluxSummary

BUG: potentially trailing rubbish in the heatExchangerModel lists

- the final resize to length actually used was missing.
  Does not affect any released versions
2022-11-22 13:14:53 +01:00
a8f369fd2b ENH: region support for foamRestoreFields (#2638) 2022-11-22 13:14:53 +01:00
b5e6a42ded Merge branch 'feature-htc-facezone' into 'develop'
ENH: faceZoneReferenceTemperature: new heatTransferCoeff model

See merge request Development/openfoam!561
2022-11-21 15:59:45 +00:00
b18a6675cb STYLE: heatTransferCoeff: minor cleanup of models
TUT: solidQuenching2D: correct libs for reactingEulerHtcModel
2022-11-21 15:58:58 +00:00
354767c694 ENH: faceZoneReferenceTemperature: new heatTransferCoeff model 2022-11-21 15:58:58 +00:00
88e1932145 Merge branch 'feature-mappedPatchBase' into 'develop'
BUG: avoid excessive recalculation of map for moving meshes

See merge request Development/openfoam!572
2022-11-21 13:21:56 +00:00
945405c32d BUG: avoid excessive recalculation of map for moving meshes 2022-11-21 13:17:56 +00:00
013f3cccc4 ENH: improve handling of finiteArea mesh with distributed roots
- in makeFaMesh, the serial fields are now only read on the master
  process and broadcast to the other ranks. The read+distribute is
  almost identical to that used in redistributePar, except that in
  this case entire fields are sent and not a zero-sized subset.

- improved internal faMesh checking for files so that the TryNew
  method works with distributed roots.
2022-11-20 19:59:52 +01:00
8993af73ac CONFIG: bump patch level 2022-11-20 18:16:53 +01:00
21e7ce8f42 STYLE: place HashTable trivial methods in the header (reduce clutter) 2022-11-20 16:55:58 +01:00
94c7e180fb ENH: more fault-tolerance in makeFaMesh decomposition
- if the volume faceProcAddressing is missing, it is not readily
  possible to determine equivalent area procAddressing.

  Instead of throwing an error, be more fault-tolerant by having it
  create with READ_IF_PRESENT and then detect and warn
  if there are problems.
2022-11-19 20:49:12 +01:00
67b58c28c0 ENH: IOobjectList simpler construction of unregistered
- accept IOobjectOption::registerOption with (MUST_READ, NO_WRITE)
  being implicit. Direct handling of IOobjectOption itself, for
  consistency with IOobject.

  The disabling of object registration is currently the only case
  where IOobjectList doesn't use default construction parameters,
  but it was previously a bit awkward to specify.
2022-11-19 20:48:54 +01:00
db57c456f6 ENH: tutorials/Alltest -backup option
- for repeated tests (eg, during bisection) can be used to preserve
  the existing directory as tutorialsTest.bak01,
  tutorialsTest.bak02, ... (max of 10).

- preserve the commit information as tutorialsTest/commit-info
  to help document the current or backup test results.
2022-11-19 13:44:01 +01:00
1b11e4b3ac CONFIG: restrict wmakeLnInclude to header/template files
- source-code (.c, .cpp etc) only adds to clutter in the lnInclude
  directory
2022-11-19 12:41:55 +01:00
5e0a23edd5 STYLE: compacter help information for -debug-switch etc. 2022-11-18 21:24:17 +01:00
d7bf2d400d BUG: string wrapping (eg, argList help) truncates character (#2625)
- had an off-by-one in the accounting for some corner caes,
  partly because the logic was a bit convoluted

ENH: improved string wrapping (#2625)

- reworked logic (like a state machine) to handle backtracking
  with fallback of splitting near punctuation characters.

  Still doesn't compete with nroff or TeX, but does avoid long lines
  and many funny splits.  With this change the help for mapFieldsPar
  now like this:

  =====
      Specify the mapping method
      (direct|mapNearest|cellVolumeWeight|
      correctedCellVolumeWeight)
  =====

  Since the list of options is very long without any spaces, it takes
  '|' as the best split point, which definitely reads better
2022-11-18 21:14:22 +01:00
d9ab5d54ef ENH: ensightWrite, vtkWrite support for excluding fields and patches
- functionality similar to that provided by foamToEnsight, foamToVTK
  which allows blocking out patches (eg, outer walls, inlet/outlet)
  that are not particularly interesting to visualize
2022-11-18 15:28:14 +01:00
ec1d66d640 TUT: keyword updates 2022-11-18 10:31:00 +01:00
3b0af86448 STYLE: add notes where files are added into global/globals.C
ENH: use dictionary findDict() directly for debugSwitches

- the isDict() method is just a wrapper around the pointer anyhow
2022-11-17 15:26:51 +01:00
d009cb8bc1 CONFIG: set API level to 2208 to distinguish from previous release 2022-11-17 15:19:44 +01:00
1dafe5d393 ENH: use full scratch buffer capacity for ensight output
- improves overall buffering ability across parts
2022-11-17 14:03:25 +01:00
225f548d2d ENH: pointHistory: cooperate with collated file format. Fixes #2636 2022-11-17 10:32:35 +00:00
6cb8337345 BUG: faceReflecting: initialisation. Fixes #2634 2022-11-16 16:30:11 +00:00
3d81dd6277 COMP: forward declarations for uniformDimensionedFields 2022-11-16 14:14:59 +01:00
90c4ee7e12 ENH: support wmakeLnInclude of C++ template files (.tcc, .tpp, .txx)
- can be used to avoid confusion with source files

ENH: improve handling of '--' option termination (wmake scripts)
2022-11-16 13:11:40 +01:00
5714a3606e Merge branch 'feature-atomic-stream' into 'develop'
Updates for ensight writing

See merge request Development/openfoam!570
2022-11-15 17:02:04 +00:00
0fabbcb404 ENH: direct ensight output of float/double
- since ensight format is always float and also always written
  component-wise, perform the double -> float narrowing when
  extracting the components.  This reduces the amount of data
  transferred between processors.

ENH: avoid vtk/ensight parallel communication of empty messages

- since ensight writes by element type (eg, tet, hex, polyhedral) the
  individual written field sections will tend to be relatively sparse.
  Skip zero-size messages, which should help reduce some of the
  synchronization bottlenecks.

ENH: use 'data chunking' when writing ensight files in parallel

- since ensight fields are written on a per-element basis, the
  corresponding segment can become rather sparsely distributed. With
  'data chunking', we attempt to get as many send/recv messages in
  before flushing the buffer for writing. This should make the
  sequential send/recv less affected by the IO time.

ENH: allow use of an external buffer when writing ensight components

STYLE: remove last vestiges of autoPtr<ensightFile> for output routines
2022-11-15 17:26:09 +01:00
5338e56c73 ENH: add support for OFstream atomic file creation (#2631)
- with ATOMIC, an intermediary file is created - eg, (fileAbc~tmp~)
  where all of the output is written to. When the stream goes out of
  scope, this intermediary file is moved/renamed to the actually
  output name - eg, (fileAbc~tmp~) -> (fileAbc).

  This adds some safety if the simulation crashes while writing the
  file, since it will the partial (corrupt) file will be left
  behind as (fileAbc~tmp~) and not as (fileAbc), which means it will
  will be treated as a backup file and not loaded again on restart.

ENH: provided enumeration for APPEND/NON_APPEND

- clearer than using bool (with comments).
  Since append mode is primarily only used by masterOFstream etc
  this change is unlikely to affect user coding.

ENH: use file atomic for ensight file creation

- avoids corrupt (truncated) files being referenced by the ensight
  case file if the simulation crashes while writing the ensight file.
2022-11-15 14:10:01 +01:00
9f7cfa9419 ENH: support libz disabling via WM_COMPILE_CONTROL (as ~libz)
- eg, for partially incomplete systems (without libz devel header)

ENH: clearer binding of dummy Pstream in OpenFOAM/Make/options

- link of dummy stub Pstream now contingent on linking libOpenFOAM as
  well. This makes the purpose slightly clearer

ENH: cleaner option naming/handling in wmake script

- allow special purpose -no-openfoam option.
  Eg, compiling test programs without OpenFOAM and Pstream libraries
  but using the rest of the wmake system.

ENH: add +openmp support into WM_COMPILE_CONTROL (#2633)

- this adds compile/link flags for openmp.
  For single-use, can also use 'wmake -openmp'.

  If both +openmp and ~openmp are specified in WM_COMPILE_CONTROL
  the ~openmp will have priority.

  This is actually done indirectly since ~openmp will set empty
  COMP_OPENMP, LINK_OPENMP internal variables, which the +openmp then
  adds to the c++FLAGS and linkexe targets (ie, won't actually add
  anything).

ENH: add +ccache or ccache=... support into WM_COMPILE_CONTROL (#2633)

- with the first version (+ccache), simply use ccache from the path
  without any extra options.

- with the second version (ccache=...), can be more specific about
  what is called.

  Using "+ccache" is identical to "ccache=ccache", but the later could
  be used in other ways. For example,

     ccache=/strange/install/path/ccache
     ccache=</path/my-tooling --option>

  Have the choice of unquoted, single or double quoted or '< >' quoted

STYLE: relocate FOAM_EXTRA_LDFLAGS in general makefile

- removes clutter for different linkers (eg, gold, mold, ldd)
  making it easier to extend for other linkers.

STYLE: protect makefile checks with 'strip' function
2022-11-15 14:00:18 +01:00
e15b103003 COMP: remove wmake rules for ARM7 (discontinued) arch 2022-11-15 14:00:18 +01:00
c2af76337e COMP: remove wmake rules for discontinued IA64 (itanium) arch 2022-11-15 14:00:18 +01:00
edc12c9ad9 COMP: remove fast-math and unsafe-math-optimizations for Fujitsu (#2564)
- was found to cause issues (snappyHexMesh specifically)
  on Fugaku. Reported by @azami
2022-11-15 14:00:18 +01:00
25e874a4f0 ENH: provide MPI native minOp, maxOp reduce multiple values
- consistent with sumOp

ENH: globalIndex with gatherNonLocal tag, and use leading dispatch tags

- useful for gather/write where the master data can be written
 separately.  Leading vs trailing dispatch tags for more similarity to
 other C++ conventions.
2022-11-15 14:00:18 +01:00
beea22b2f0 Merge branch 'feature-histogram-extension' into 'develop'
ENH: functionObjects: refactor and extend histogram

See merge request Development/openfoam!563
2022-11-14 17:34:54 +00:00
0624fb0181 STYLE: use MinMax for handling histogram ranges 2022-11-14 17:34:06 +00:00
941cd7fef4 ENH: functionObjects: refactor and extend histogram
- new submodels:
  - 'equalBinWidth': groups data into bins of equal widths (previous behaviour)
  - 'unequalBinWidth': groups data into bins of unequal widths

- output files per time-step are replaced with a single output file

- silently deprecates the input entries: 'setFormat' and 'formatOptions'
2022-11-14 17:34:06 +00:00
fd75d38757 Merge branch 'feature-overset-coupledPatch' into 'develop'
overset modifications: allow overset pacthes overlap, allow fringe faces walk, mass conservation update

See merge request Development/openfoam!555
2022-11-14 15:48:58 +00:00
d5a973419a STYLE: overset: change massCorrection to fluxCorrection
COMP: overset: fixes for SPDP, int64
2022-11-14 15:41:40 +00:00
ab6615c060 BUG: overset: support GAMG. Fixes #2559
Note that there is no support for using GAMG with mass-correction.
2022-11-11 10:19:52 +00:00
b48fd4f38a TUT: overset: add new tutorials and update existing tutorials 2022-11-11 10:19:51 +00: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
8c0679d25f BUG: Lagrangian: sync IO call. Fixes #2627 2022-11-09 15:31:20 +00:00
a4d235af6b BUG: porousBafflePressure: read fixedJump entries - apply under-relaxation (fixes #2626) 2022-11-09 14:18:06 +00:00
6c6c8c5008 BUG: distributedTriSurfaceMesh: locally empty surface. Fixes #2612 2022-11-09 08:55:06 +00:00
7fa4f1ef76 Merge branch 'feature-mpi-updates' into 'develop'
More consistent use of combineReduce, simpler and/or reductions

See merge request Development/openfoam!566
2022-11-08 16:48:21 +00:00
5b29ff0e42 ENH: consolidate 'formatOptions' handling for coordSetWriter/surfaceWriter
- replaced ad hoc handling of formatOptions with coordSetWriter and
  surfaceWriter helpers.

  Accompanying this change, it is now possible to specify "default"
  settings to be inherited, format-specific settings and have a
  similar layering with surface-specific overrides.

- snappyHexMesh now conforms to setFormats

  Eg,

      formatOptions
      {
          default
          {
              verbose     true;
              format      binary;
          }
          vtk
          {
              precision   10;
          }
     }

     surfaces
     {
         surf1
         {
             ...

             formatOptions
             {
                 ensight
                 {
                     scale   1000;
                 }
             }
         }
     }
2022-11-08 16:48:08 +00:00
b7592c1ee8 ENH: preserve globalIndex merge information within mergedSurf
- for later reuse with fields (for example)

ENH: use 'scheduled' for surfaceWriter field merging (#2402)

- in tests with merging fields (surfaceWriter), 'scheduled' was
  generally faster than 'nonBlocking' for scalars, minorly faster for
  vectors.
  Thus make 'scheduled' the default for the surfaceWriter but with a
  user-option to adjust as required. Previously simply relied on
  whichever default globalIndex had (currently nonBlocking).

  Reuse globalIndex information from mergedSurf instead of
  globalIndex::gatherOp to avoid an extra MPI call to gather sizes
  each time.

  These changes will not be noticable unless surface sampling is done
  very frequently (eg, every iteration) and with large core counts.
2022-11-08 16:48:08 +00:00
799d247142 ENH: PatchTools::gatherAndMerge with recovery of the globalIndex
- support globalIndex for points/faces as an output parameter,
  which allows reuse in subsequent field merge operations.

- make pointMergeMap an optional parameter. This information is not
  always required. Eg, if only using gatherAndMerge to combine faces
  but without any point fields.

ENH: make globalIndex() noexcept, add globalIndex::clear() method
2022-11-08 16:48:08 +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
473e14418a ENH: more consistent use of broadcast, combineReduce etc.
- broadcast           : (replaces scatter)
  - combineReduce       == combineGather + broadcast
  - listCombineReduce   == listCombineGather + broadcast
  - mapCombineReduce    == mapCombineGather + broadcast
  - allGatherList       == gatherList + scatterList

  Before settling on a more consistent naming convention,
  some intermediate namings were used in OpenFOAM-v2206:

    - combineReduce       (2206: combineAllGather)
    - listCombineReduce   (2206: listCombineAllGather)
    - mapCombineReduce    (2206: mapCombineAllGather)
2022-11-08 16:48:08 +00:00
b9c15b8585 COMP: missing linkage for ensightToFoam (ldd linker) 2022-11-08 17:13:46 +01:00
18216a4639 BUG: zoneMotion: supply optional coeffs dict. Fixes #2630 2022-11-08 12:38:44 +00:00
99780bd7cd Merge branch 'feature-ensightToFoam' into 'develop'
ENH: ensightToFoam: Ensight Gold mesh converter

See merge request Development/openfoam!567
2022-11-07 21:26:37 +00:00
5163e52974 ENH: ensightToFoam: Ensight Gold mesh converter 2022-11-07 21:22:18 +00:00
35aa6140cc Merge branch 'feature-grey-area-turbulence' into 'develop'
Integration of grey area turbulence models from Upstream CFD

See merge request Development/openfoam!560
2022-11-07 11:33:31 +00:00
e510321a26 TUT: wallMountedHump: new DES tutorial 2022-11-07 10:59:18 +00:00
3a4537abc9 STYLE: various simplifications and changes
BUG: DEShybrid: reintroduce e28bed59
2022-11-07 10:59:18 +00:00
493bfdbdc4 ENH: DEShybrid - code refactoring/simplification 2022-11-07 10:59:18 +00:00
32507b3251 TUT: vortexShed case - added turbulenceFields example 2022-11-07 10:59:18 +00:00
81f783286c ENH: turbulenceFields FO - added LESRegion and DES shielding function, fd 2022-11-07 10:59:18 +00:00
7db69fc22e ENH: DES models - added access function for shielding function, fd 2022-11-07 10:59:18 +00:00
9557cde880 STYLE: Minor code formatting 2022-11-07 10:59:18 +00:00
c039a09e71 ENH: DEShybrid - restored inputs for backwards compatibility 2022-11-07 10:59:17 +00:00
e0f3993045 ENH: scalar - added readOrDefault(is, defaultValue) function 2022-11-07 10:59:17 +00:00
12ba22bebf ENH: DESModel - stabilisation of Ssigma function
- Code supplied by Marian Fuchs, Upstream CFD GmbH
2022-11-07 10:59:17 +00:00
07a9ee86f3 ENH: Code refactoring 2022-11-07 10:59:17 +00:00
9563607e01 ENH: Turbulence IDDES models - added option to switch fe term in dTilda calc
Default is fe = true, yielding the original form given be Shur (2008)
2022-11-07 10:59:17 +00:00
5b1c060e9e ENH: kOmegaSSTDES - added convenience functions for RAS|LES length scales 2022-11-07 10:59:17 +00:00
53397e6f3f ENH: Added deprecation warnings for SpalartAllmaras and kOmegaSST DES variants 2022-11-07 10:59:17 +00:00
67ba5acf18 ENH: Spalart-Allmaras model - added user switch for ft2 term (default = off) 2022-11-07 10:59:17 +00:00
e5cf96b0f9 INT: Integration of Upstream CFD's SLADelta - use hmaxPtr
- Initial code supplied by Marian Fuchs, Upstream CFD GmbH
- Code cleaned/refactored/integrated by OpenCFD
2022-11-07 10:59:17 +00:00
62f37b2a43 INT: Integration of Upstream CFD's sigma LES model
- Initial code supplied by Marian Fuchs, Upstream CFD GmbH
- Code cleaned/refactored/integrated by OpenCFD
2022-11-07 10:59:17 +00:00
619ddc2355 INT: Integration of Upstream CFD's DeltaOmegaTilde delta function
- Initial code supplied by Marian Fuchs, Upstream CFD GmbH
- Code cleaned/refactored/integrated by OpenCFD
2022-11-07 10:59:17 +00:00
4fc34c8a63 INT: Integration of Upstream CFD's DESHybrid updates
- Initial code supplied by Marian Fuchs, Upstream CFD GmbH
- Code cleaned/refactored/integrated by OpenCFD
2022-11-07 10:59:17 +00:00
2cc96ad7f4 INT: Integration of Upstream CFD's grey-area sigma into kOmegaSST models
- Initial code supplied by Marian Fuchs, Upstream CFD GmbH
- Code cleaned/refactored/integrated by OpenCFD
2022-11-07 10:59:17 +00:00
541b6eb28a INT: integration of Upstream CFD's grey-area sigma into S-A models
- Initial code supplied by Marian Fuchs, Upstream CFD GmbH
- Code cleaned/refactored/integrated by OpenCFD
2022-11-07 10:59:17 +00:00
10b724b10d INT: integration of Upstream CFD's grey-area sigma into base DESModel
- Initial code supplied by Marian Fuchs, Upstream CFD GmbH
- Code cleaned/refactored/integrated by OpenCFD
2022-11-07 10:59:17 +00:00
d2f2ab6d25 ENH: kOmegaSST - code refactoring and clean-up 2022-11-07 10:59:16 +00:00
b92fbd8f73 ENH: Refactored Spalart-Allmaras turbulence models
- Added a new S-A base class: SpalartAllmarasBase
- RAS and DES models derived from new base class
- Removed code duplication
2022-11-07 10:59:16 +00:00
3c214e99df ENH: propellerInfo - protection against Uref = 0 2022-11-03 09:43:39 +00:00
913c45afff ENH: faMatrix - added dot operator functions 2022-11-03 09:43:39 +00:00
fc19ca39f3 BUG: integratedNonUniformTable: correct offsets (fixes #2614) 2022-11-01 14:47:08 +00:00
2202995f5c ENH: expose IntRange {begin,end}_value() methods
- end_value() corresponds to the infrequently used after() method, but
  with naming that corresponds better to iterator naming conventions.

  Eg,

     List<Type> list = ...;
     labelRange range = ...;

     std::transform
     (
         (list.data() + range.begin_value()),
         (list.data() + range.end_value()),

         outIter,
         op
     );

- promote min()/max() methods from labelRange to IntRange base class

STYLE: change timeSelector from "is-a" to "has-a" scalarRanges.
2022-10-31 18:36:15 +01:00
21f037e3a0 ENH: single/double value reset method for MinMax
- resets min/max to be identical to the specified value,
  which can be more convenient (and slightly more efficient) than doing
  a full reset followed by add()

- additional MinMax intersects() query, which works like overlaps()
  but with exclusive checks at the ends

- provide MinMax::operator&=() to replace (unused) intersect() method

ENH: single/double value reset method for boundBox

- boundBox::operator&=() to replace (rarely used) intersect() method.
  Deprecate boundBox::intersect() to avoid confusion with various
  intersects() method

COMP: provide triangleFwd.H
2022-10-31 18:36:14 +01:00
c973066646 ENH: supplementary vector comparison methods
- background: for some application it can be useful to have fully
  sorted points. i.e., sorted by x, followed by y, followed by z.

  The default VectorSpace 'operator<' compares *all*
  components. This is seen by the following comparisons

  1.  a = (-2.2 -3.3 -4.4)
      b = (-1.1 -2.2 3.3)

      (a < b) : True
      Each 'a' component is less than each 'b' component

  2.  a = (-2.2 -3.3 -4.4)
      b = (-2.2 3.3 4.4)

      (a < b) : False
      The a.x() is not less than b.x()

  The static definitions 'less_xyz', 'less_yzx', 'less_zxy'
  instead use comparison of the next components as tie breakers
  (like a lexicographic sort).
  - same type of definition that Pair and Tuple2 use.

      a = (-2.2 -3.3 -4.4)
      b = (-2.2 3.3 4.4)

      vector::less_xyz(a, b) : True
      The a.x() == b.x(), but a.y() < b.y()

   They can be used directly as comparators:

      pointField points = ...;

      std::sort(points.begin(), points.end(), vector::less_zxy);

ENH: make VectorSpace named access methods noexcept.

   Since the addressing range is restricted to enumerated offsets
   (eg, X/Y/Z) into storage, always remains in-range.
   Possible to make constexpr with future C++ versions.

STYLE: VectorSpace 'operator>' defined using 'operator<'

- standard rewriting rule
2022-10-31 18:36:14 +01:00
371795840c ENH: bounding sphere calculation for PrimitivePatch face
- useful when a characteristic per-face search dimension is required.
  With PrimitivePatch we are certain to have consistent evaluations
  of the face centre.

STYLE: tag PrimitivePatch compatibility headers as such
2022-10-31 18:36:14 +01:00
7a43cac55a ENH: component/element access for zero/one return themselves
STYLE: more consistent access for uniform list/fields
2022-10-31 18:36:14 +01:00
9433898941 ENH: support construction of pointIndexHit from pointHit
STYLE: combine templated/non-templated headers (reduced clutter)

STYLE: use hitPoint(const point&) combined setter

- same as setHit() + setPoint(const point&)

ENH: expose and use labelOctBits::pack method for addressing
2022-10-31 18:36:14 +01:00
454f7960b0 STYLE: expand use of ListLoop macros (#2624)
- the old List_FOR_ALL macro only remained in use in relatively few
  places. Replace with the expanded equivalent and move the looping
  parameter out of the macro and give an explicit name (eg, loopLen)
  which simplifies the addition of any loop pragmas in the various
  TFOR_ALL... macros (for example).
2022-10-31 18:36:14 +01:00
9db3547bd3 ENH: support optional average value when reading rawIOField
ENH: simplify bookkeeping within MappedFile
2022-10-31 18:36:14 +01:00
278378031e ENH: add syncState() method to serial streams (#2623)
- in places where direct reading from the std::stream is used,
  this method can be used to ensure that the OpenFOAM Sstream state
  is properly updated from the std::stream.

ENH: restrict stream renaming to ISstream

- non-const access was previously declared at the top-level (IOstream)
  but that not only added in potentially odd setting of the static
  fileName, but also meant that the OFstream name() could potentially
  be altered after opening a file and thus be inconsistent with the
  underlying file that had been opened.

  Now restrict name modification to ISstream (and ITstream
  counterpart). Does not affect any existing valid code.

STYLE: non-default OFstream destructor (for future file staging)
2022-10-31 09:34:37 +01:00
bd000d89e9 COMP: include fileFormats, surfMesh for faOptions, fvOptions 2022-10-27 16:13:41 +02:00
ac25608fbd BUG: viewFactor: smoothing when zero visible faces. Fixes #2622 2022-10-27 11:58:36 +01:00
37e90dbad7 ENH: limitTemperature: obey 'active' flag. Fixes #2621 2022-10-27 10:00:00 +01:00
2c7a7b27a3 ENH: distributedTriSurfaceMesh: support distributed running 2022-10-26 17:15:51 +01:00
7a67c1e72b DOC: redistributePar: better warning 2022-10-26 17:15:51 +01:00
b145e59049 STYLE: viewFactorsGen with std::vector (reserve) instead of std::list 2022-10-26 18:04:56 +02:00
24ffc5236d COMP: simplify openmp handling (#2617)
- remove old, unneeded -DUSE_OMP define.
- wmake -no-openmp option to add '~openmp' to WM_COMPILE_CONTROL

ENH: add bash completion handling for wmake
2022-10-26 18:04:56 +02:00
fd55151a12 SUBMODULE: cfmesh update handling of -DUSE_OMP (openmp)
- defined locally, independent of wmake rules
2022-10-26 18:02:26 +02:00
3caeeb1f51 BUG: functionObjectProperties: prevent restart failures (fixes #2618)
- regression in develop, not other branches
2022-10-26 14:49:21 +01:00
0c3a938810 Merge branch 'feature-masterCoarsest-multi-masters' into 'develop'
Feature master coarsest multi masters

See merge request Development/openfoam!565
2022-10-20 09:14:23 +00:00
62244c6caf Feature master coarsest multi masters 2022-10-20 09:14:22 +00:00
3a6a76044d BUG: objective: avoid double name registration in localIOdictionary (fixes #2596) 2022-10-18 13:08:56 +01:00
5a9dbcdadf BUG: incorrect tag/communicator order in debugSurfaceWriter 2022-10-13 18:15:21 +02:00
dffac4d887 BUG: distributedTriSurfaceMesh: locally empty surface. Fixes #2612 2022-10-13 11:57:27 +01:00
65dc440f3c COMP: silence clang -Wbitwise-instead-of-logical (triggered by boost/cgal) 2022-10-12 19:44:01 +02:00
4585a2d229 COMP: fix bad constructor resolution
STYLE: simpler initialization
2022-10-12 19:32:56 +02:00
18eeba116a ENH: use boundBox building blocks in misc places 2022-10-12 13:19:48 +02:00
61deacd24d ENH: boundBox improvements (#2609)
- construct boundBox from Pair<point> of min/max limits,
  make sortable

- additional bounding box intersections (linePointRef), add noexcept

- templated access for boundBox hex-corners
  (used to avoid temporary point field).
  Eg, unrolled plane/bound-box intersection with early exit

- bounding box grow() to expand box by absolute amounts
  Eg,

      bb.grow(ROOTVSMALL);   // Or: bb.grow(point::uniform(ROOTVSMALL));
  vs
      bb.min() -= point::uniform(ROOTVSMALL);
      bb.max() += point::uniform(ROOTVSMALL);

- treeBoundBox bounding box extend with two or three parameters.
  The three parameter version includes grow(...) for reduced writing.
  Eg,

      bb = bb.extend(rndGen, 1e-4, ROOTVSMALL);

  vs
      bb = bb.extend(rndGen, 1e-4);
      bb.min() -= point::uniform(ROOTVSMALL);
      bb.max() += point::uniform(ROOTVSMALL);

  This also permits use as const variables or parameter passing.
  Eg,

      const treeBoundBox bb
      (
          treeBoundBox(some_points).extend(rndGen, 1e-4, ROOTVSMALL)
      );
2022-10-12 13:19:44 +02:00
81b1c5021f ENH: provide low-level bound box() methods for meshShapes
- box method on meshShapes (cell,edge,face,triangle,...)
  returns a Pair<point>.

  Can be used directly without dependency on boundBox,
  but the limits can also passed through to boundBox.

- Direct box calculation for cell, which walks the cell-faces and
  mesh-faces.  Direct calculation for face (#2609)
2022-10-12 12:54:39 +02:00
96ff2f32e5 ENH: support direct calculation of finiteArea edgeNormals (#2592)
- with geometryOrder=1, calculate the edge normals from the adjacent
  faces (area-weighted, inverse distance squared) and also
  use that for the Le() calculation.

  Includes the contributions from processor edge neighbours, so it
  should be consistent on both sides.

  This new method (consider as 'beta') contrasts with the current
  standard method that first calculates area-weighted point normals
  and uses the average of them for the edge normal.

  Enable for testing either with a controlDict OptimisationSwitch entry
  "fa:geometryOrder", or on the command-line:

      solverName -opt-switch=fa:geometryOrder=1
2022-10-11 18:02:23 +02:00
9434972261 ENH: use fallback value if calculated Le() is degenerate (#2592)
- the Le vector is calculated from (edgeVec ^ edgeNorm)
  and should be oriented in direction (faceCentre -> edgeCentre).

  If, however, the edgeNorm value is bad for any reason, the
  cross-product falls apart and Le vector is calculated as a zero
  vector!

  For these cases, revert to using (faceCentre -> edgeCentre)
  as a better approximation than a zero vector.

  In the future, will very likely switch calculating the edge normals
  directly from the attached faces, instead of from the attached
  points as is currently done, which should improve robustness.

ENH: expose fa:geometryOrder as a registered OptimisationSwitch

ENN: reuse polyMesh data (eg, faceCentres) if possible in faMesh

STYLE: add code lambdas and static functions to isolate logic
2022-10-11 18:02:23 +02:00
d5cdc60a54 BUG: processorMeshes removeFiles does not remove collated (fixes #2607)
ENH: extend rmDir to handle removal of empty directories only

- recursively remove directories that only contain other directories
  but no other contents. Treats dead links as non-content.
2022-10-11 17:58:22 +02:00
779a2ca084 ENH: adjust fileName methods for similarity to std::filesystem::path
- stem(), replace_name(), replace_ext(), remove_ext() etc

- string::contains() method - similar to C++23 method

  Eg,
      if (keyword.contains('/')) ...
  vs
      if (keyword.find('/') != std::string::npos) ...
2022-10-11 17:58:22 +02:00
98a510c317 GIT: relocate treeDataEdge, treeDataPoint into OpenFOAM
- similar to treeDataCell, doesn't need any meshTools components
- AABBTree under algorithms (like indexedOctree)
2022-10-11 17:56:57 +02:00
0c89f38312 ENH: additional DimensionedField, GeometricField factory methods
- construct based on db and mesh information from an existing field

- check movable() instead of isTmp() when reusing fields

STYLE: isolate check for reuse GeometricField into Detail namespace
2022-10-06 12:54:06 +02:00
bcd461926c BUG: invalid pointer reference for optional coordinate system lookup
- code remnant from separate lookup + construct of coordinateSystem
  (7b2bcfda0b).
  Apply consistent use of coordinateSystem::NewIfPresent to avoid
  these types of coding mishaps
2022-10-06 12:50:06 +02:00
793433da72 DOC: snappyHexMeshDict: updated comment for blockLevel 2022-10-05 12:15:19 +01:00
34d69cad23 ENH: snappyHexMesh. Avoid excessive intermediate. Fixes #2600 2022-10-05 11:45:44 +01:00
a246a97b12 ENH: add debug surfaceWriter
- enables special purpose debugging.
  Its definition and behaviour are subject to change at any time.
2022-10-04 15:51:27 +02:00
7b2bcfda0b ENH: improved handling of coordinateSystems
- in continuation of #2565 (rotationCentre for surface output formats)
  it is helpful to also support READ_IF_PRESENT behaviour for the
  'origin' keyword.

  This can be safely used wherever the coordinate system definition
  is embedded within a sub-dictionary scope.

  Eg,
      dict1
      {
          coordinateSystem
          {
              origin (0 0 0);  // now optional here
              rotation ...;
          }
      }

   but remains mandatory if constructed without a sub-dict:

      dict2
      {
          origin (0 0 0);   // still mandatory
          e1  (1 0 0);
          e3  (0 0 1);
      }

   With this change, the "transform" sub-dictionary can written
   more naturally:

       formatOptions
       {
           vtk
           {
               scale 1000;  // m -> mm
               transform
               {
                   rotationCentre  (1 0 0);
                   rotation axisAngle;
                   axis    (0 0 1);
                   angle   -45;
               }
           }
       }

ENH: simplify handling of "coordinateSystem" dictionary lookups

- coordinateSystems::NewIfPresent method for optional entries:

    coordSysPtr_ = coordinateSystem::NewIfPresent(mesh, dict);

  Instead of

    if (dict.found(coordinateSystem::typeName, keyType::LITERAL))
    {
        coordSysPtr_ =
            coordinateSystem::New
            (
                mesh_,
                dict,
                coordinateSystem::typeName
            );
    }
    else
    {
        coordSysPtr_.reset();
    }

ENH: more consistent handling of priorities for binModels, forces (#2598)

- if the dictionaries are overspecified, give a 'coordinateSystem'
  entry a higher prioriy than the 'CofR' shortcuts.

  Was previously slightly inconsistent between the different models.
2022-10-04 15:51:27 +02:00
7eda6de6f4 ENH: use readOption to fine-tune dictionary reading
- previously had 'mandatory' (bool) for advanced control of reading
  dictionary entries but its meaning was unclear in the calling code
  without extra code comments.

  Now use IOobjectOption::readOption instead, which allows further
  options (ie, NO_READ) and is more transparent as to its purpose in
  the code than a true/false bool flag was.

  This is a minor breaking change (infrequent, advanced usage only)

- minor code cleanup in dictionary lookup methods
2022-10-04 15:51:26 +02:00
d938e01d7a ENH: refactor IOobject options
- IOobjectOption class encapsulates read/write, storage flags for
  lightweight handling, independent of objectRegistry etc.

ENH: add IOobject isReadRequired() and isReadOptional() queries

- encapsulates test of MUST_READ, MUST_READ_IF_MODIFIED,
  READ_IF_PRESENT for convenience / less clutter.

Example,

    if (isReadRequired() || (isReadOptional() && headerOk()))
    {
        ...
    }

Instead of

    if
    (
        (
            readOpt() == IOobject::MUST_READ
         || readOpt() == IOobject::MUST_READ_IF_MODIFIED
        )
     || (readOpt() == IOobject::READ_IF_PRESENT && headerOk())
    )
    {
        ...
    }
2022-10-04 15:51:26 +02:00
623c0624fb ENH: simplify stream construction
- with IOstreamOption there are no cases where we need to construct
  top-level streams (eg, IFstream, OFstream) with additional information
  about the internal IOstream 'version' (eg, version: 2.0).

  Makes it more convenient to open files with a specified
  format/compression combination - no clutter of specifying the
  version
2022-10-04 15:51:26 +02:00
36d7954004 ENH: refPtr/tmp is_reference() to complement is_pointer() method
STYLE: return nullptr instead of tmp<...>() for failure
2022-10-04 15:51:26 +02:00
159a7a5a38 ENH: simplify parallel/serial checks in ensight output
BUG: inadvertant type conversion in ensightFileTemplates::writeLabels
2022-10-04 15:51:26 +02:00
55f5f8774b ENH: use dictionary findDict() instead of isDict() + subDict()
- avoids redundant dictionary searching

STYLE: remove dictionary lookupOrDefaultCompat wrapper

- deprecated and replaced by getOrDefaultCompat (2019-05).
  The function is usually specific to internal keyword upgrading
  (version compatibility) and unlikely to exist in any user code.
2022-10-04 15:51:26 +02:00
9d5a3a5c54 STYLE: remove duplicate dimensionSet dictionary read constructor
STYLE: make dimensionedTypes access inline noexcept
2022-10-04 15:51:26 +02:00
ee9119f436 ENH: rationalize expression string reading
- read construct from dictionary.
  Calling syntax similar to dimensionedType, dimensionedSet,...

  Replaces the older getEntry(), getOptional() static methods

- support readIfPresent
2022-10-04 15:51:26 +02:00
3a6e427409 ENH: simplify dictionary search for value/refValue in BCs
- in expressions BCs in particular, there is various logic handling
  for if value/refValue/refGradient etc are found or not.

  Handle the lookups as findEntry and branch to use Field assign
  or other handling, depending on its existence.

STYLE: use wordList instead of wordRes for copy/filter dictionary
2022-10-04 15:51:26 +02:00
ea51c2c0e4 STYLE: return orientedType, Switch directly instead of const reference
- noexcept on some Time methods

ENH: pass through is_oriented() method for clearer coding

- use logical and/or/xor instead of bitwise versions (clearer intent)
2022-10-04 15:51:26 +02:00
867b5e9060 Merge branch 'feature-noise-writeFile' into 'develop'
ENH: noiseModels - replaced graph usage by writeFile

See merge request Development/openfoam!562
2022-10-04 13:50:32 +00:00
7c2311aae6 ENH: noiseModels - replaced graph usage by writeFile
Header information now includes, e.g.

    f [Hz] vs P(f) [Pa]
    Lower frequency: 2.500000e+01
    Upper frequency: 5.000000e+03
    Window model: Hanning
    Window number: 2
    Window samples: 512
    Window overlap %: 5.000000e+01
    dBRef       : 2.000000e-05
    Area average: false
    Area sum    : 6.475194e-04
    Number of faces: 473

Note: output files now have .dat extension
2022-10-04 13:10:39 +00:00
f87f0040b8 ENH: writeFile - add newFile function
ENH: writeFile - renamed createFile functions
     to newFileAtTime and newFileAtStartTime
2022-10-04 13:10:39 +00:00
c59b6db3c4 ENH: viewFactorsGen: re-enable 2D. See #2560
This reverts the v2206 behaviour so does not include
the edge-integration (2LI) optimisation - it uses
the exact same code as v2206.
2022-10-03 16:54:58 +01:00
5677e10d90 ENH: checkMesh: report overlapping zones. See #2521 2022-10-03 11:41:42 +01:00
38d68824b3 ENH: uniformInterpolatedDisplacement: Delay evaluation. Fixes #2605
If a `value` field is present use it and don't look for time
directories since this messes up the construct-from-dictionary
2022-10-03 10:31:40 +01:00
8283599c31 ENH: meshQualityDict: disable minEdgeLength by default (fixes #2599) 2022-09-29 14:16:44 +01:00
f276366a05 ENH: snappyHexMesh: add mesh-quality control for edge lengths 2022-09-28 08:57:43 +01:00
a7ef33da6b ENH: add finite-area support to setFields (#2591)
- for example,

    defaultFieldValues
    (
        areaScalarFieldValue h 0.00014
    );

    regions
    (
        clipPlaneToFace
        {
            point  (0 0 0);
            normal (1 0 0);

            fieldValues
            (
                areaScalarFieldValue h 0.00015
            );
        }
    );

ENH: additional clipPlaneTo{Cell,Face,Point} topo sets

- less cumbersome than defining a semi-infinite bounding box
2022-09-26 18:03:23 +02:00
56e9f7bf4b BUG: blockMesh mergePatchPairs fails with edge-shared points (fixes #2589)
- remedy by performing the attach() action sequentially (as per
  stitchMesh changes). This ensures that the current point addressing
  is always used and avoids references to the already-merged points
  (which is what causes the failure).

ENH: improve handling of empty patch removal

- only remove empty *merged* patches, but leave any other empty
  patches untouched since they may intentional placeholders for other
  parts of a workflow.

- remove any empty point/face zones created for patch merging
2022-09-26 18:03:23 +02:00
9fa37ba068 ENH: add static centre(), {area,unit}Normal() methods to triangle
- commonly used calculations

ENH: add faPatch::patchRawSlice method

- slices using the nEdges() instead of the virtual size(),
  which provides similar functionality as finite-volume has with
  its distinction between polyPatch vs fvPatch patchSlice

- use patchInternal for obtaining faPatch, fvPatch information
2022-09-26 18:03:23 +02:00
5130c7bcbc STYLE: use polyPatchList instead of List<polyPatch*> in more places 2022-09-26 18:03:23 +02:00
3c7088b6c0 STYLE: provide GeometricField internalFieldRef()
- similar to boundaryFieldRef(), primitiveFieldRef() for providing
  write access. Complimentary naming to internalField(). Identical to
  ref() but more explicitly named, and less likely to be confused with
  a tmp::ref(), for example.

- prefer .primitiveFieldRef() over .ref().field()

- mark some access methods noexcept
2022-09-26 09:53:22 +02:00
4710528448 ENH: reduce allocations/overhead when reading PtrList
- replace SLList with direct handling (like a hand-rolled DynamicList)

ENH: support PtrList transfer for polyMesh::addZones
2022-09-26 09:52:59 +02:00
cbace69896 ENH: more consistent naming of MPI reductions
- combineReduce     (older: combineAllGather)
- listCombineReduce (older: listCombineAllGather)
- mapCombineReduce  (older: mapCombineAllGather)
2022-09-23 19:19:03 +02:00
39fc7cc957 GIT: missing tutorial files 2022-09-23 12:35:07 +02:00
dc28dbc3ad TUT: add multi-patch versions using regionFaModels 2022-09-22 17:24:21 +02:00
b1a8bb1b12 STYLE: remove old/fragile volSurfaceMapping mappings 2022-09-22 17:18:20 +02:00
a00997f32f ENH: extend regionFaModels to handle multiple volume patches 2022-09-22 16:09:14 +02:00
0302ba4418 ENH: construct fa::options from fvMesh instead of fvPatch
- these were previously constructing from an fvPatch (for simpler
  integration with regionFaModel) but this unnecessarily restricts
  the finiteArea to a single volume patch.

- adjusted derived faOptions to support multiple patches
2022-09-22 16:09:14 +02:00
fe7dd51258 BUG: incorrect local face addressing for fa::faceSetOption subset
- list of faces() was using mesh-faces, not area-faces

ENH: provision for patch and faceSet selection in fa::faceSetOption

- adjust most of the faOptions to respect subset of faces

ENH: support Function1 for externalHeatFluxSource

BUG: incorrect handling of fixedPower (externalHeatFluxSource)

- used local areas instead of global total area
2022-09-22 16:09:14 +02:00
c59dc00623 STYLE: update code style for regionFaModels, optionsList 2022-09-22 16:09:14 +02:00
a8057c4bc6 ENH: avoid undefined method in temperatureCoupledBase
- old constructor interface allowed arbitrary strings to specify the
  method enumeration. If actually used at runtime, they could/would
  raise a FatalError (unknown enumeration).
  Define a simpler default constructor instead.
2022-09-22 16:09:14 +02:00
1695f2f5b9 TUT: use simpler faMeshDefinition 2022-09-22 16:09:14 +02:00
84db37f62f ENH: improved bookkeeping for finite-area to volume mesh correspondence
- whichPolyPatches() = the polyPatches related to the areaMesh.

  This helps when pre-calculating (and caching) any patch-specific
  content.

- whichPatchFaces() = the poly-patch/patch-face for each of the faceLabels.

  This allows more convenient lookups and, since the list is cached on
  the area mesh, reduces the number of calls to whichPatch() etc.

- whichFace() = the area-face corresponding to the given mesh-face

ENH: more flexible/consistent volume->area mapper functions
2022-09-22 16:09:14 +02:00
e8863cd091 ENH: extend polyBoundaryMesh patch/face query
- whichPatchFace() returns the (patchi, patchFacei) tuple,
  whichPatch() simply wraps whichPatchFace()

- groupNames() : similar to zones

ENH: simplify calls to faPatch/fvPatch patchField, lookupPatchField

- make second (ununsed) template parameter optional.
  Was previously needed for old compilers (2008 and earlier).
2022-09-22 16:09:14 +02:00
4393ffa8dc ENH: template invariant base classes for {fa,fae,fv,fvs,point}PatchField
- simplifies construction/inheritance

ENH: add {fa,fv}PatchField::zeroGradientType() static

- can be used to avoid literal "zeroGradient" in places

STYLE: adjust naming of pointPatch runtime selection table

- simply use 'patch' as per fa/fv fields

STYLE: add zero-size guard to patch constraintType(const word&)
2022-09-22 16:09:14 +02:00
88f5be479e ENH: support assign or construct Field from primitiveEntry
For example, instead of

   if (dict.found("value"))
   {
       fvScalarField::operator=
       (
           Field<scalar>("value", dict, p.size())
       );
   }

can use more precise specifications, and also eliminate searching
the dictionary multiple times:

   const auto* eptr = dict.findEntry("value", keyType::LITERAL);

   //or:  dict.findCompat("value", {{"oldName" ... }}, keyType::LITERAL);

   if (eptr)
   {
       fvScalarField::assign(*eptr, p.size());
   }

STYLE: combine declaration of FieldBase into Field.H
2022-09-22 16:09:14 +02:00
88061f3b28 ENH: improved argList handling of libs, functionObjects
- include -no-libs option by default, similar to '-lib',
  which makes it available to all solvers/utilities.
  Add argList allowLibs() method to query it.

- relocate with/no functionObjects logic from Time to argList
  itself as argList allowFunctionObjects()

- add libs/functionObjects override handling to decomposePar etc

ENH: report the stream relativeName for IOerrors (see c9333a5ac8)
2022-09-22 16:08:52 +02:00
c031f7d00a ENH: improve autoPtr/refPtr/tmp consistency (#2571)
- disallow inadvertant casting and hidden copy constructions etc
2022-09-22 11:50:51 +02:00
052d8b13e3 ENH: support tuple (pair) indexing into FieldField
- can use a (patchi, elemi) pair to access an element of a FieldField
2022-09-22 11:50:51 +02:00
a0282c7e41 ENH: prefer PtrList set/get/test instead of PtrList::operator() access
- clearer coding intent. Mark operator() as 'deprecated'

- add bounds checking to get(label) and set(label) methods.

  This gives failsafe behaviour for get() that is symmetric with
  HashPtrTable, autoPtr etc and aligns the set(label) methods
  for UPtrList, PtrList and PtrDynList.

- use top-level PtrList::clone() instead of cloning individual elements

ENH: support HashPtrTable set with refPtr/tmp (flexibility)
2022-09-22 11:50:51 +02:00
b9ca63b118 ENH: use pointer checks for dynamicCast, refCast
- avoids try/catch exception handling

STYLE: prefer refCast (shorter) to dynamicCast where possible
2022-09-22 11:50:51 +02:00
512f558549 COMP: native MPI reduce not triggered (fixes #2569)
- define returnReduce *after* defining all specializations for reduce
  so that the compiler does not take the generic templated reduce.

ENH: add UPstream::reduceAnd, UPstream::reduceOr

- direct wrapper of MPI_LAND, MPI_LOR intrinsics

ENH: provide special purpose returnReduce for logical operations

- returnReduceAnd(bool), returnReduceOr(bool) as a inline wrappers
  for returnReduce with andOp<bool>(), orOp<bool>() operators,
  respectively.

  These forms are more succinct and force casting of the parameter
  into a bool. Using MPI bool operations allows vendor/hardware MPI
  optimisations.

  * Test for existence on any rank:

      1.  if (returnReduceOr(list.size()) { ... }
      1b. if (returnReduceOr(!list.empty()) { ... }

      2.  if (returnReduce(bool(list.size(), orOp<bool>())) { ... }
      3.  if (returnReduce(list.size(), sumOp<label>()) != 0) { ... }
      3b. if (returnReduce(list.size(), sumOp<label>()) > 0) { ... }

  * Test for non-existence on all ranks:

      1.  if (returnReduceAnd(list.empty()) { ... }
      1b. if (!returnReduceOr(list.size()) { ... }

      2.  if (returnReduce(list.empty(), andOp<bool>())) { ... }
      3.  if (returnReduce(list.size(), sumOp<label>()) == 0) { ... }

  Notes:
      Form 1. succinct
      Form 2. may require explicit bool() for correct dispatch
      Form 3. more expensive sumOp<label> just for testing size!
      There are also some places using maxOp<label> instead of sumOp<label>
2022-09-22 11:50:51 +02:00
968c1db1af ENH: use combined &=, |=, ^= forms for bitAndEqOp, bitOrEqOp, bitXorEqOp
- these also work for bitSet, HashSet with slightly lower overhead

ENH: locate FOAM_NODISCARD attribute macro in stdFoam.H
2022-09-22 11:50:50 +02:00
47e172e6ef ENH: add internal parRun guards to some UPstream methods
- simplifies coding
  * finishedRequest(), waitRequest(), waitRequests() with parRun guards
  * nRequests() is noexcept

- more consistent use of UPstream::defaultCommsType in branching
2022-09-22 11:50:50 +02:00
716d330547 COMP: link finiteArea whenever regionFaModel is used 2022-09-22 11:50:50 +02:00
6f764c8d02 ENH: checkMesh: check patches across processors 2022-09-22 09:24:01 +01:00
1a15bd08f7 BUG: viewFactor: incorrect number of unknowns. Fixes #2585 2022-09-20 11:34:27 +01:00
afffec446a DOC: snappyHexMeshDict: more comment 2022-09-14 13:38:41 +01:00
51dbc84ddb ENH: coded bc: evaluate if no 'value' supplied. Fixes #2561 2022-09-14 13:37:01 +01:00
a964c364b6 ENH: viewFactorsGen: stabilise calculation. Fixes #2583 2022-09-14 13:26:05 +01:00
ff4c776b8b BUG: tetDecomposer: illegal tet face. Fixes #2580 2022-09-12 16:35:30 +01:00
f9b85dbfbb BUG: bad detection of Ensight binary/ascii (fixes #2579)
- related to #2535
2022-09-09 11:55:33 +02:00
c841aaed83 ENH: use atomic move in wmkdepend
- avoids truncated files if dependency generation is interrupted
2022-09-09 11:55:33 +02:00
793f4e3a37 CONFIG: add support for WM_COMPILE_OPTION='Dbg'
- uses '-g -DFULLDEBUG' (like Debug), but with -O3 (like Opt).

  This adds in debug symbols and FULLDEBUG code segments (good for
  code development) but retains -O3 optimizations and code paths and
  avoids the much slower -O0 associated with 'Debug'.

- add in central wmake/General/common/{c,c++}XXX tuning,
  which helps reduce the number of nearly identical files

ENH: add support for wmake -debug-Og
2022-09-09 11:55:33 +02:00
0ed79f3bc1 COMP: pass phase-change YInf by reference not by copy
- copying was inadvertently added by 85a2ae6eaa
2022-09-09 11:55:33 +02:00
c624590e26 ENH: stricter handling of missing timeActivatedFileUpdate files (#2573)
- previously threw FatalError, which downgrades to a Warning only when
  loading the functionObject. Now throw a FatalIOError so that missing
  control files are treated as a critical error.
2022-09-07 16:25:45 +02:00
2a9e68c2bf ENH: add -opt-switch support for strings (eg, named enums) - issue #2222 2022-09-07 16:25:45 +02:00
500ec9dd12 ENH: more consistent order of ITstream constructor parameters 2022-09-07 16:25:45 +02:00
097008544c STYLE: adjust range check in Foam::factorial (FULLDEBUG)
STYLE: consistent use of $(LIB_SRC) in Make/options
2022-09-07 16:25:45 +02:00
0b37234804 Merge remote-tracking branch 'origin/master' into develop 2022-09-07 16:24:54 +02:00
f1da147925 CONFIG: bump patch level 2022-09-07 16:02:10 +02:00
d3123a1107 BUG: redistributePar fails with some area fields (fixes #2574)
- this is especially evident in -reconstruct mode when
  the fields have several processor boundaries.

  Testing for an existing patch edge mapping must use the `test`
  method (with range-checking) instead of the more common `set`
  method since the source field will likely have many more boundaries
  than physical edge mappings.
2022-09-07 16:00:54 +02:00
4965dc4cfb COMP: declare forceCoeffs operator<< in Foam namespace (fixes #2576) 2022-09-07 16:00:50 +02:00
a39b50d783 COMP: incorrect type in valueAverageBase (fixes #2568)
- caused inadvertent truncation of label types
2022-09-07 16:00:50 +02:00
0f5cc77b61 Merge branch 'feature-sorption-wall-function' into 'develop'
ENH: sorptionWallFunction: new wall boundary condition

See merge request Development/openfoam!559
2022-09-07 13:58:39 +00:00
9bc46bc0d7 ENH: sorptionWallFunction: new wall boundary condition
The sorptionWallFunction is a wall boundary condition to
specify scalar/concentration gradient for turbulent and laminar flows.
2022-09-07 13:57:52 +00:00
941dd0bec7 Merge branch 'feature-heat-exchangers' into 'develop'
ENH: fvOptions: refactor and extend effectivenessHeatExchangerSource

See merge request Development/openfoam!557
2022-09-07 13:55:01 +00:00
332026644d ENH: fvOptions: refactor and extend effectivenessHeatExchangerSource
- rename effectivenessHeatExchangerSource -> heatExchangerSource
- introduce submodels:
  - effectivenessTable (previous behaviour)
  - referenceTemperature
- the referenceTemperature submodel uses a reference temperature
  which is either a scalar or calculated from a 2D interpolation
  table in order to calculate the heat exchange.
2022-09-07 13:54:38 +00:00
2a007b007e BUG: PPCR: check outstanding request. Fixes #2577
If the exit is through maxIter it should still wait
for outstanding requests
2022-09-07 14:16:43 +01:00
4730c381ef COMP: avoid cpp replacement of linux,unix,... in Make/options (fixes #2548)
- the cpp command is used to process Make/{files,options}, but builtin
  defines such as `linux` will cause problems (macro replacement) if
  these is present in the Make/{files,options}.

  Solve by undefining -Ulinux, -Uunix macros, which will leave directory
  names such as "/usr/lib/x86_64-linux-gnu/..." intact.

  Directories with _linux, __linux__ content (for example), could
  still pose future issues.
2022-08-19 15:01:43 +02:00
7ea185b0b5 ENH: support rotationCentre for surface output formats (#2565)
- as an alternative output transform (supplementary to the regular
  coordinate system specification - issue #2505) it is now possible to
  specify the rotation centre directly.

  Example:

      formatOptions
      {
          vtk
          {
              scale 1000;  // m -> mm
              transform
              {
                  origin  (0 0 0);
                  rotationCentre  (1 0 0);
                  rotation axisAngle;
                  axis    (0 0 1);
                  angle   -45;
              }
          }
      }

   This behaves like the transformPoints and surfaceTransformPoints
   '-centre' option (formerly '-origin') in that it removes the
   specified amount from the point locations, applies the rotation and
   finally adds the specified amount back to the newly rotated point
   locations.

   The results of specifying a `rotationCentre` and a non-zero
   coordinate system `origin` may not be intuitively evident.
2022-08-19 12:52:29 +02:00
e827c117e3 CONFIG: fixes for MacOS (#2555)
- introduce a FOAM_LD_LIBRARY_PATH variable to shadow
  DYLD_LIBRARY_PATH on MacOS.

  The DYLD_LIBRARY_PATH and LD_LIBRARY_PATH cannot be modified via sub
  shells etc when SIP is active. This helps circumvent these
  restrictions, which is obviously a hack, but seems to be required.

COMP: disable -ftrapping-math in geompack for MacOS
2022-08-19 12:52:11 +02:00
5218bfd721 Merge remote-tracking branch 'origin/master' into develop 2022-08-19 12:50:50 +02:00
b6a6e40c27 BUG: incorrect order for output scaling (transformPoints, ...)
- the output write scaling should be applied *after* undoing the
  effects of the specified rotation centre. Fixes #2566

ENH: update option names for transformPoints and surfaceTransformPoints

- prefer  '-auto-centre' and '-centre', but also accept the previous
  options '-auto-origin' and '-origin' as aliases.

  Changing to '-centre' avoids possible confusion with
  coordinate system origin().
2022-08-18 11:46:08 +02:00
1e02a4ae92 ENH: faceAgglomerate: read patch-based agglomeration. Fixes #2558.
Read from optional subdictionary.
2022-08-11 11:12:55 +01:00
bc3bff8ef5 BUG: binModels: ensure main processor writes out binned data (fixes #2530) 2022-08-09 16:03:55 +01:00
b0cd2ea991 BUG: binModels: read and use writeFile settings (fixes #2553) 2022-08-09 16:03:48 +01:00
f249022bfe ENH: binModel: make decomposePatchValues entry optional (#2530)
DOC: forceCoeffs: correct the header file content (#2530)
2022-08-09 15:58:40 +01:00
c418c28c66 ENH: snappyHexMesh : refine based on curvature
See https://develop.openfoam.com/Development/openfoam/-/merge_requests/558
Fix up of per-region specificiation.
2022-08-08 12:50:23 +01:00
5ea365a2be Merge branch 'feature-ep_1823_curvature_refinement' into 'develop'
snappyHexMesh : refine based on curvature

See merge request Development/openfoam!558
2022-08-04 17:09:39 +00:00
27c3d0c23b snappyHexMesh : refine based on curvature 2022-08-04 17:09:38 +00:00
227727d413 Merge branch 'feature-vf-ext' into 'develop'
Update of view factor generation using 2AI and 2LI methods plus CGAL for ray tracing

See merge request Development/openfoam!551
2022-08-04 14:18:23 +00:00
c08fc5ecd9 ENH: viewFactorGen: revert to v2206 without CGAL 2022-08-04 14:59:12 +01:00
994addc543 ENH: Changing key entry name to GaussQuadTol 2022-08-04 14:59:12 +01:00
f2f71f6847 ENH: viewFactor: compile without lib 2022-08-04 14:59:12 +01:00
c652af4b82 STY: Minor style changes 2022-08-04 14:59:12 +01:00
bfef08a89f ENH: Using globalIndex to create full triSurface 2022-08-04 14:59:12 +01:00
3b40ee8f6b ENH: Updating tutorials for view factors generation 2022-08-04 14:59:12 +01:00
f5598706c5 ENH: Making agglomeration optional for viewFactor model 2022-08-04 14:59:11 +01:00
457979a7b7 ENH: Adding new viewFactor utility using CGAL 2022-08-04 14:59:11 +01:00
565c68f454 ENH: Adding intersection margen 2022-08-04 14:59:11 +01:00
b9507c21f9 ENH: Adding viewFactorsGenExt which uses pbrt for ray tracing 2022-08-04 14:59:11 +01:00
88da2d5877 ENH: interfaceProperties: add smoother for interfacial curvatures (closes #2531)
The new algorithm introduces an optional entry 'nAlphaSmoothCurvature',
and aims to smooth interface curvatures to reduce spurious currents.
2022-08-04 14:39:33 +01:00
77ecc4c6e0 BUG: sortedToc: reference to copy. Fixes #2554 2022-08-03 15:05:25 +01:00
542fc0c1d1 ENH: lnGradSchemes: new uncorrectLnGrad scheme 2022-08-03 13:28:51 +01:00
9ccc2d8fd5 ENH: edgeInterpolation: avoid division-by-zero errors in skew corrections 2022-08-03 13:28:44 +01:00
9f40db8977 BUG: forceCoeffs: correct the order of pressure and viscous components (fixes #2552) 2022-08-02 16:59:41 +01:00
c2cae92fc5 ENH: changeDictionary: support collated format. Fixes #2533 2022-08-01 15:16:28 +01:00
a72d4a1708 BUG: externalHeatFluxSource: memory leakage (fixes #2545) 2022-07-27 13:11:21 +01:00
5894874920 TUT: faSchemes: replace snGradSchemes with lnGradSchemes (fixes #2543)
When a finite-area case could not find an entry for "lnGradSchemes"
in the "faSchemes" file, the "corrected" scheme has been picked up
by default. Therefore, any changes in "snGradSchemes" entry will not
be read by finite-area models.
2022-07-25 15:06:51 +01:00
71a612085b BUG: caseDicts: fix pressureDifferencePatch and pressureDifferenceSurface scripts (fixes #2482) 2022-07-25 14:41:31 +01:00
6320bab2b5 STYLE: IOstreams with float/double instead of floatScalar/doubleScalar
- consistent with defining IO of int32_t/int64_t and with recent
  changes to ensightFile. Using the primitives directly instead of
  typedefs to them makes the code somewhat less opaque.
2022-07-22 15:43:37 +02:00
a4a8f77b7b STYLE: more consistent use of CGAL_LIBS for surfaceBooleanFeatures 2022-07-21 17:23:07 +02:00
64f4745277 STYLE: various 'defineTemplate2...' macros are redundant
- they are/were identical to versions without an embedded '2'
2022-07-21 17:07:16 +02:00
ac83b41aaf ENH: improve demangled symbol names for safePrintStack
- parse out symbols and use abi::__cxa_demangle for more readable
  names in safePrintStack.

- shorten prefixed /path/openfoam/platforms/lib/... to start
  with "platforms/lib/..." to avoid unreadably long lines.

- improved file-scope localization of helper functions.

STYLE: use std::ios_base::basefield instead of dec|oct|hex for masking
2022-07-21 11:29:49 +02:00
20f1afd9f7 ENH: tutorial: add comment 2022-07-20 13:38:31 +01:00
873f7aac2d BUG: multi-world: avoid on-the-fly comms. Fixes #2529
Probably can get away with less tetBasePtIs() triggering
2022-07-20 13:38:31 +01:00
66ddf0a104 BUG: multi-world: only switch on warnComm if needed. See #2529 2022-07-20 13:38:30 +01:00
42150cf3fe ENH: support output of face area-normals for boundaryData writer 2022-07-19 11:18:44 +02:00
5630db5493 ENH: robuster handling of mapMethod naming (#2535)
- align timeVaryingMappedFixedValuePointPatchField keywords with
  MappedFile

STYLE: minor cleanup of pointToPointPlanarInterpolation

BUG: incorrect keyword for timeVaryingMappedFixedValuePointPatchField

- lookup should be "fieldTable" (not "fieldTableName") for consistency
  with the output and other BCs. (Bug introduced by a623ab42a3)
2022-07-19 11:17:52 +02:00
dfdbe7efd0 ENH: add instance searching routines
- find start index
- find index range spanning a time
2022-07-19 11:17:52 +02:00
b4612b4c04 ENH: cleanup ensight surface reader (#2535)
- some central (core) bits under fileFormats,

- general surface reading relocated from sampling to surfMesh since it
  does not use any sampling-specific components and will permit
  re-use in meshTools (for example)

- remove old mask, subDir methods from ensightFile which were
  previously relocated to ensightCase

- improve handling of 'undef' values when generating and reading,
  respect Ensight component ordering when reading.
2022-07-19 11:17:52 +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
dea31e9b4a ENH: consistent member access for triFace / triangle etc.
- can access the vertices/points as a(), b(), c()
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
8b1514c99b GIT: relocate rawIOField to src/OpenFOAM (closer to IOField classes)
STYLE: RunFunctions - missed message for failure to find nFaces
2022-07-13 19:23:27 +02:00
1afd27db6c BUG: incorrect ensight filename references (fixes #2532)
- Ensight places restrictions both on variable names and on file
  names. When generating the variable to file name correspondence for
  use in the Ensight case file, previously used the less stringent
  variable name for both sides of the variable table.

  This would lead to situations where the (valid) variable name
  referred to the wrong file name. Now apply the file-name restriction
  consistently when creating the variable table. This is especially
  necessary since the stem of the filename additionally has
  specific characters (eg, ":<>[]") that can be problematic for the
  shell or file-system.

ENH: avoid repeated '_' in qualified ensight names.

- when replacing undesirable characters (eg, ":<>[]") with '_', avoid
  duplicates.

  Eg, "PaSR<psiReactionThermo>:Qdot" becomes
      "PaSR_psiReactionThermo_Qdot" instead of
      "PaSR_psiReactionThermo__Qdot"

ENH: additional ensightCase::padded static method
2022-07-13 19:21:11 +02:00
d222cb1cee ENH: moveMesh -endTime option to restrict duration of motion testing 2022-07-13 19:09:44 +02:00
ff33bfda96 COMP: lduMatrix::defaultTolerance as variable instead of constexpr
- gcc48 has linkage errors with constexpr floats (sometimes?)
2022-07-13 19:07:15 +02:00
6e393ccbc8 ENH: runTime selectable disabling of matrix norm (#2500)
For example,

    T
    {
        solver          PBiCGStab;
        preconditioner  DILU;
        tolerance       1e-6;
        norm            none;
    }

STYLE: define defaultMaxIter, defaultTolerance directly in lduMatrix
2022-07-08 11:40:53 +02:00
ba49415d68 ENH: support dictionary syntax for PatchFunction1 constant
- previously only supported specification as a primitive entry,
  can now use a dictionary specification:

  entry
  {
      type    constant;
      value   100;
  }
2022-07-08 11:13:00 +02:00
cee6524c34 ENH: delay writing of ensight case until after geometry/fields (#2512)
- in situations where the simulation diverges, the ensight writing can
  be incomplete. If the case file is updated prior to writing geometry
  or fields, the generated case may refer to incomplete entries (which
  make loading problematic).

  NOTE: if multiple fields are sampled and written, this change cannot
  entirely prevent case files addressing corrupt fields. For example,

  1a. write U field, update case file with new times/fields
  1b. write p field, update case file with new times/fields
  2a. write U field, update case file with new times
  2b. write p field, but fails

  Since 2a already updates the case file with a new time-step entry
  (for the U field), the case glob patterns will automatically include
  the not-yet-written 'p' field. If this write fails with an
  incomplete/corrupt field, the case file will still be addressing it!
2022-07-08 11:13:00 +02:00
f16f3da645 ENH: streamline improvements
- barycentric coordinates in interpolation (instead of x/y/z)

- ease U (velocity) requirement.
  Needn't be named in the sampled fields.

- default tracking direction is 'forward'
2022-07-08 11:13:00 +02:00
71246b94b7 ENH: minor update of particle methods 2022-07-08 11:13:00 +02:00
b4a482751b ENH: simplify tetrahedron and triangle handling
- combine header definitions, more pass-through methods

- face/triFace: support += operator (vertex offset)
2022-07-08 11:13:00 +02:00
a27c8560a8 DOC: update contributors list: reflect MPI changes from RIST
- Tetsuo AOYAGI, Yoshiaki INOUE, Akira AZAMI

  See merge request Development/openfoam!528 and issue #2371
2022-07-08 11:13:00 +02:00
8e017fa63c STYLE: specify "U[IO]Pstream" instead of "[IO]Pstream" for (read|write)
- consistency. Replace some instances of 'slave' with proc
2022-07-08 11:13:00 +02:00
92f38b589a BUG: solidBodyMotionFunction: avoid reading model name from subdictionary (fixes #2526) 2022-07-08 09:20:51 +01:00
da0b241de6 STY: Deleting unused reference to Field in lduCalculatedProcessorField 2022-07-07 15:44:50 -07:00
490f02fad4 BUG: Modifying approach for external radiation with layers. Fixes #2476 2022-07-05 14:44:21 -07:00
5589108d73 Merge branch 'feature-oscillatingLinearMotion' into 'develop'
ENH: oscillatingLinearMotion: add optional phase- and vertical-shift entries

See merge request Development/openfoam!553
2022-07-04 15:27:57 +00:00
ce486da6bd Merge branch 'issue-2527-setTurbulenceFields' into 'master'
BUG: setTurbulenceFields: update processor boundaries (fixes #2527)

Closes #2527

See merge request Development/openfoam!554
2022-07-04 15:26:53 +00:00
de21a6bc0e BUG: setTurbulenceFields: update processor boundaries (fixes #2527) 2022-07-04 13:34:13 +01:00
62ac69688f ENH: oscillatingLinearMotion: add optional phase- and vertical-shift entries
ENH: oscillatingLinearMotion: change types of input entries to Function1

TUT: sloshingCylinder: exemplify new entries of oscillatingLinearMotion
2022-07-01 15:57:56 +01:00
d058600b21 Merge branch 'feature-multifieldvalue-divide' into 'develop'
ENH: multiFieldValue: add divide and cmptDivide operations

See merge request Development/openfoam!552
2022-07-01 11:04:08 +00:00
1ce0cb407a ENH: multiFieldValue: add divide and cmptDivide operations
TUT: cavity: new examples for multiFieldValue divide/cmptDivide ops
2022-06-29 15:29:02 +01:00
7de07fd8ba BUG: cyclicACMI: update face areas on lower levels. Fixes #2394
In movePoints had some duplicated code but did not update the
lower level (polyPatch) areas. This caused scaling to be applied
multiple times (so only 1.0 would not be affected)
2022-06-29 10:03:56 +01:00
97c78a78f3 ENH: cyclicACMI: debug printing triggers evaluation
Makes it hard to debug ACMI with scaling.
2022-06-29 09:49:15 +01:00
76d719d1e6 RELEASE: Updated version to v2206 2022-06-24 15:41:02 +01:00
7c4bb57949 RELEASE: updated completion cache 2022-06-24 15:41:02 +01:00
7792501a01 RELEASE: Updated headers for v2206 2022-06-24 15:41:02 +01:00
3c64283364 BUG: redistributePar -reconstruct lagrangian trashes fields (fixes #2494)
- the file removal cleanup, which makes reasonable sense for
  redistribute mode, always forced the removal of the reconstructed
  lagrangian fields (since all of the non-master fields are empty by
  definition)!

  Detect reconstruct mode (by using constructSize from the map) to
  circumvent this logic.
2022-06-24 14:49:14 +02:00
39d8964851 BUG: distributed roots cause redistributePar failure (fixes #2523)
- zero-sized faMeshSubset and fvMeshSubset had READ_IF_PRESENT instead
  of simply copying the schemes/solution setting from the baseMesh
2022-06-24 13:18:41 +02:00
7b94573add BUG: distributed roots cause redistributePar failure (fixes #2523)
- fvMeshSubset zero constructor triggers readIfPresent for
  fvSchemes/fvSolution: causing mismatched parallel communication
2022-06-23 18:26:28 +02:00
f99baa83c3 SUBMODULE: updates 2022-06-23 18:26:25 +02:00
58850f3145 ENH: surfaceBooleanFeatures -no-cgal option
- use hand-rolled interesction routines instead of CGAL routines.
  Ignored if compiled without CGAL support.
2022-06-23 18:26:25 +02:00
57c4b27b8b TUT: simple test for redistributePar with distributed roots
TUT: prefer 'subtract' instead of old 'delete'

TUT: enable multiFieldValue function object, update topoSet action
2022-06-23 18:26:25 +02:00
21680e93cc BUG: stabilityBlendingFactor - indicator field to be owned by mesh. See #2511 2022-06-23 11:31:55 +01:00
4850f1dca1 ENH: cpuCabinet: remove excess cellZone. Fixes #2516 2022-06-23 11:26:10 +01:00
b51e0d4c1c STYLE: verbose point field decompose/reconstruct (#120)
TUT: use redistributePar for multiphase/interFoam/RAS/DTCHull
2022-06-22 19:45:08 +02:00
e84c2d84ad COMP: adjust link parameters (mingw) 2022-06-22 14:32:47 +02:00
365b391bd2 CONFIG: set API level to 2206 (now in pre-release state)
- relevant docs updated to v2206
2022-06-21 15:32:11 +02:00
4afd9c3b1d CONFIG: update completion cache 2022-06-21 15:32:08 +02:00
dd438ffd3f TUT: add cloudInfo example to reactingParcelFoam/filter (#2390) 2022-06-21 14:15:00 +02:00
48a50fec51 BUG: foamJob does not detect collated format (#2514) 2022-06-21 14:15:00 +02:00
2b86a22f56 BUG: inconsistent ifdef detection for application -listXXX options
- as part of the style change, include guards are increasingly
  prefixed with 'Foam_'
2022-06-21 13:50:40 +02:00
80b0f5f740 DOC: adjust wording
STYLE: replace stray 'Web:' entries with 'Website:'
2022-06-21 13:50:40 +02:00
307e380f8f BUG: forces/forceCoeffs - fields to be owned by mesh. See #2511 2022-06-21 12:09:24 +01:00
ebac6c9b94 Merge branch 'feature-icoMulti-FOs' into 'develop'
General enhancement to icoReactingMultiphaseInterFoam solver, sub-models and FO's

See merge request Development/openfoam!542
2022-06-21 09:30:43 +00:00
c0581fe8eb TUT: poolEvaporationMultiComponent: new tutorial for icoReactingMultiphaseInterFoam
TUT: icoReactingMultiphaseInterFoam: various changes in settings
2022-06-21 09:30:02 +01:00
618aee84a5 ENH: diffusionGasEvaporation: new diffusion based mass transfer model
ENH: saturationModels: new library for saturation models
2022-06-21 09:30:02 +01:00
d91fe9a6ac ENH: multiphaseInter: ensure consistent Hf treatment for phases
TUT: icoReactingMultiphaseInterFoam: update thermophysicalProperties.liquid
2022-06-21 09:30:02 +01:00
0f0a5c5c0f BUG: interfaceHeatResistance: remove max condensation limiter 2022-06-21 09:30:02 +01:00
8f8612fd0c BUG: multiphaseInterSystem: fix kappaEff functions 2022-06-21 09:30:02 +01:00
ddb3e394ec ENH: functionObjects: rearrange the location of phaseSystemModels function objects
phaseSystemModels function objects are relocated within
functionObjects in order to enable broader usage.

ENH: multiphaseInterHtcModel: new heatTransferCoeff function object model
COMP: createExternalCoupledPatchGeometry: add new dependencies
COMP: alphaContactAngle: avoid duplicate entries between multiphaseEuler and reactingEuler
TUT: damBreak4Phase: rename alphaContactAngle as multiphaseEuler::alphaContactAngle
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
e96990c8bf DOC: Doxygen corrections 2022-06-17 11:49:23 +01:00
8ac11f1079 BUG: (un)refinement: combine topochange+motion. Fixes #2492
This is on
- incompressible/pimpleFoam/laminar/mixerVesselAMI2D/mixerVesselAMI2D-topologyChange
- redistributePar -reconstruct
where the fvMesh::updateMesh does an early trigger of
mesh.phi() calculation
2022-06-15 17:53:32 +01:00
913f844eb6 BUG: reconstructPar: do not locate positions. See #2205.
Specific to the VOF-to-lagrangian FO is to generate particles
which potentially do not relate to the mesh. So here they
are preserved instead of trying to locate them on the
reconstructed mesh. Note: this has the same effect
of actually copying the file...
2022-06-15 17:46:29 +01:00
e5cb375ab7 BUG: (un)refinement: combine topochange+motion. Fixes #2492 2022-06-15 13:28:34 +01:00
c76c817045 Merge branch 'feature-vf-ext-qr-parallel' into 'develop'
s2s linear system solution using lduMatrix

See merge request Development/openfoam!550
2022-06-15 12:26:27 +00:00
c8538ee49e ENH: Adding iterative solver to S2S equations
ENH: Adding report after matrix smoothing
2022-06-15 12:25:58 +00:00
343854ab31 TUT: avoid redundant -finite-area option for foamToEnsight, foamToVTK
TUT: remove paraFoam hints from tutorials (mostly only need paraview now)

STYLE: remove reference to paraview _SM plugins (OpenFOAM-v1912 and earlier)
2022-06-15 12:52:20 +02:00
ed621480ac COMP: NURBS3DVolume was masking the write function of IOdictionary 2022-06-15 11:36:37 +02:00
dfc8c047b1 ENH: simplify patchCellsSource name handling, enforce single field name
BUG: inconsistent "U" name on re-read (buoyancyEnergy)

STYLE: fix spelling inconsistencies
2022-06-15 11:11:50 +02:00
c6c4ced741 COMP: non-existent directories (#2509) 2022-06-14 15:51:53 +02:00
ea91261f59 CONFIG: update compiler versions 2022-06-14 15:23:08 +02:00
96ece1ef35 ENH: foamRunTutorials -dry-run option
- for tracing tutorials execution
2022-06-14 15:23:08 +02:00
601f541091 Merge branch 'feature-setTurbulenceFields' into 'develop'
ENH: setTurbulenceFields: new automatic initialisation method for turbulence fields

See merge request Development/openfoam!545
2022-06-14 13:22:17 +00:00
8c03201cd1 TUT: planeChannel: add setTurbulenceFields example
TUT: cylinder: fix the order in Allclean
2022-06-14 13:21:53 +00:00
a371f1792b ENH: setTurbulenceFields: new automatic initialisation method for turbulence fields 2022-06-14 13:21:53 +00:00
c5be97a52a Merge branch 'feature-sorption-conditions' into 'develop'
species and heat adsorption BC's and fvOption source

See merge request Development/openfoam!548
2022-06-14 11:28:41 +00:00
3636876e68 TUT: groundAbsorption: new tutorial for speciesSorption and enthalpySorption BCs 2022-06-14 11:35:45 +01:00
98f11e4bd0 ENH: enthalpySorption: new temperature boundary condition 2022-06-14 11:35:42 +01:00
a5bba64035 ENH: Adding speciesSorption BC and patchCellsSource fvOption
speciesSorption is a zeroGradient BC which absorbs mass given by a first
order time derivative, absoprtion rate and an equilibrium value
calculated based on internal species values next to the wall.

patchCellsSource is a source fvOption which applies to the corresponding
species and apply the source calculated on the speciesSorption BC.

A new abstract virtual class was created to group BC's which
don't introduce a source to the matrix (i.e zeroGradient) but calculate
a mass sink/source which should be introduced into the matrix. This
is  done through the fvOption patchCellsSource.
2022-06-14 11:35:38 +01:00
33f381c052 SUBMODULE: realign visualization commit 2022-06-13 16:06:01 +02:00
1e37ab4b44 DOC: update dictionary doxygen 2022-06-13 16:06:01 +02:00
cf61b0ab88 ENH: ParticleZoneInfo cloud FO - reworked for restarts 2022-06-13 14:55:48 +01:00
b0b9aa6def ENH: subModelBase - return bool from getModelProperty to identify read success 2022-06-13 14:09:00 +01:00
10d08c28e5 GIT: tutorials: cleanup 2022-06-13 09:59:15 +01:00
fb727bab35 Merge branch 'feature-surfaceWriter-coordinateTransform' into 'develop'
support surface writer output transform (#2505)

See merge request Development/openfoam!549
2022-06-13 08:26:06 +00:00
ad0235a751 ENH: support surface writer output transform (#2505)
- this allows the "relocation" of sampled surfaces. For example,
  to reposition into a different coordinate system for importing
  into CAD.

- incorporate output scaling for all surface writer types.

  This was previously done on an adhoc basis for different writers,
  but with now included in the base-level so that all writers
  can automatically use scale + transform.

  Example:

  formatOptions
  {
      vtk
      {
          scale 1000;  // m -> mm
          transform
          {
              origin  (0.05 0 0);
              rotation axisAngle;
              axis    (0 0 1);
              angle   -45;
          }
      }
  }
2022-06-13 08:22:52 +00:00
675c168014 Merge remote-tracking branch 'origin/master' into develop.mol 2022-06-10 17:57:05 +02:00
c509e1c9b2 SUBMODULE: update to current heads 2022-06-10 17:55:49 +02:00
63cfb77fa5 ENH: use vector removeCollinear/normalise in NVDscheme 2022-06-10 15:50:49 +02:00
10d8761026 Merge branch 'adjoint-code-review' into 'develop'
ENH: adjoint code review

See merge request Development/openfoam!518
2022-06-10 13:01:58 +00:00
f6897a595f ENH: cref for grad(Ua) in the adjoint library
Necessary when grad(Ua) is cached
2022-06-10 13:00:52 +00:00
a5f59cd903 BUG: nearWallDist not updated throughout optimisation loops
Partially fixes #2502 (see discussion there)
2022-06-10 13:00:52 +00:00
03b2023db8 BUG: the functions reporting the existance of turbulence fields
in RASModelVariables were doing this by checking whether the
corresponding pointer was allocated. In some cases, however, even if the
field does not exist, the pointer is not null, leading to the wrong
output. Made the correspding functions virtual and overwritten their
return values in the derived classes. Kept the initial implementation in
base to facilitate the clone function.
2022-06-10 13:00:52 +00:00
d16ff0a0a5 ENH: useSolverNameForFields is now set to true automatically
in cases with more than one primal or adjoint solvers

TUT: removed all occurances of useSolverNameForFields
from the optimisation tutorials since it is now set
automatically.
2022-06-10 13:00:52 +00:00
06cde7916c TUT: added a tutorial showcasing the use of the nutSqr objective 2022-06-10 13:00:52 +00:00
ab40d502a7 TUT: updated the BFGS continuation tutorial
to be in line with the changes in 00f46a2c52 and added the same tutorial
which performs the optimisation in one-go, for comparison.
2022-06-10 13:00:52 +00:00
22d4f5fc20 ENH: made the boundControlPointMovement method of
volBSplinesBase const, since the no private/protected
variable is changed there.
2022-06-10 13:00:52 +00:00
803caa4078 ENH: when using (E)SI sensitivities and a symmetry(Plane) is included
in the sensitivity patches, symmetry::evaluate() needs access to the
internalField which does exist, leading to wrong memory access.

Fixed by specifying a calculated type fvPatchField for all patches when
creating a boundaryField<Type>

Using a symmetry(Plane) as a sensitivity patch is quite rare and
borderline wrong, but this provides a fix nonetheless.
2022-06-10 13:00:52 +00:00
36ca117192 ENH: changes reducing the peak memory consumption of shape sensitivities
The multiplier of grad(dxdb) is a volTensorField which, by itself, is
memory consuming. The function computing it though was sloppy in terms
of memory management, constituting the peak memory consumption during an
adjoint optimisation. Initial changes to remedy the problem include the
deallocation of some of the volTensorFields included in the computation
of grad(dxdb) once unneeded, the utilisation of volSymmTensorFields
instead of volTensorFields where possible and avoiding allocating some
unnecessary intermediate fields.

Actions to further reduce memory consumption:

- For historical reasons, the code computes/stores the transpose of
  grad(dxdb), which is then transposed when used in the computation of
  the FI or the ESI sensitivity derivatives.  This redundant
  transposition can be avoid, saving the allocation of an additional
  volTensorField, but the changes need to permeate a number of places in
  the code that contribute to grad(dxdb) (e.g.  ATC, adjoint turbulence
  models, adjoint MRF, etc).
- Allocation of unnecessary pointers in the objective class should be
  avoided.
2022-06-10 13:00:52 +00:00
5d584be42f ENH: adjustments to the efficiency of the adjoint code
- ATCstandard, ATCUaGradU:
  the ATC is now added as a dimensioned field and not as an fvMatrix
  to UaEqn. This get rid of many unnecessary allocations.

- ATCstandard:
  gradU is cached within the class to avoid its re-computation in
  every adjoint iteration of the steady state solver.

- Inlined a number of functions within the primal and adjoint solvers.
  This probably has a negligible effect since they likely were inlined
  by the compiler either way.

- The momentum diffusivity at the boundary, used by the adjoint boundary
  conditions, was computed for the entire field and, then, only the
  boundary field of each adjoint boundary condition was used. If many
  outlet boundaries exist, the entire nuEff field would be computed as
  many times as the number of boundaries, leading to an unnecessary
  computational overhead.

- Outlet boundary conditions (both pressure and velocity) use the local
  patch gradient to compute their fluxes. This patch gradient requires
  the computation of the adjacent cell gradient, which is done on the
  fly, on a per patch basis. To compute this patch adjacent gradient
  however, the field under the grad sign is interpolated on the entire
  mesh. If many outlets exist, this leads to a huge computational
  overhead. Solved by caching the interpolated field to the database and
  re-using it, in a way similar to the caching of gradient fields (see
  fvc::grad).

WIP: functions returning references to primal and adjoint boundary
fields within boundaryAdjointContributions seem to have a non-negligible
overhead for cases with many patches. No easy work-around here since
these are virtual and cannot be inlined.

WIP: introduced the code structure for caching the contributions to
the adjoint boundary conditions that depend only on the primal fields
and reusing. The process needs to be completed and evaluated, to make
sure that the extra code complexity is justified by gains in
performance.
2022-06-10 13:00:52 +00:00
c9ca6b9f19 ENH: the adjoint eikonal equation grabs the epsilon value
from the equivalent entry of the primal eikonal equation solver, unless
specified in the corresponding adjoint dictionary.
2022-06-10 13:00:52 +00:00
0b0b308db2 ENH: the adjoint grid displacement field (ma)
is now appended by the name of the adjoint solver, if more than one
exist. This was necessary for an accurate continuation since, before
these changes, only the ma field of the last solver was written. As a
result, when restarting the first adjoint solver was reading the ma
field of the last one. No changes are needed in fvSolution and fvSchemes
w.r.t. the previous code version.
2022-06-10 13:00:52 +00:00
148815265c ENH: enable writing volumetric B-Splines control points in binary
as a step towards machine-accuracy continuation of the optimisation
loop.

Additionally, control points are now written under the time/uniform
folder, to be in-line with rest of the code structure for continuation.
As a side-effect, the controlPointsDefinition in
constant/dynamicMeshDict does not need to be changed to 'fromFile'
anymore in order to perform the continuation. The 'fromFile' option is
still valid if the user wants to supply the control points manually but,
as with all other controlPointsDefinitions, it will be disregarded if the
proper file exists under the time/uniform/volumetricBSplines folder.
2022-06-10 13:00:52 +00:00
66b90b0c0f ENH: refactoring of the sensitivity classes
Before the commit, the sensitivity classes were receiving references of
the (incompressible) primal and adjoint variables.  However, if
additional physics was added (energy equation, multiphase, etc), the
infrastructure wasn't convenient for accommodating (new terms in the FI
and E-SI formulations, new terms in the sensitivity map, etc).

Now, the sensitivity classes receive a reference to an
incompressibleAdjointSolver and receive the terms for the FI and
sensitivity maps through there. The latter is still WIP.

Modified adjointSimple to incorporate these changes as well.
2022-06-10 13:00:52 +00:00
6d2c7ff96b ENH: changes towards a machine-accurate continuation
Each solver now writes its sensitivity derivatives to its dictionary,
enabling also a binary format. If present, the sensitivities are then
re-read from the dictionary, avoiding thus possible loss of information
due to re-computation.

As a side-effect, sensitivities are computed after the completion of
each adjoint solver, instead of being computed after all adjoint solvers
have been completed.
2022-06-10 13:00:52 +00:00
116309a704 TUT: added tutorials for the adjointkOmegaSST turbulence model
- computation of lift sensitivity derivatives for the NACA0012 airfoil
- optimisation of an s-bend duct for min. total pressure losses
2022-06-10 13:00:52 +00:00
8f7fc54c27 ENH: added the adjoint to the kOmega SST turbulence model
for incompressible flows. The typical convention of appending the primal
field name with 'a' to form the adjoint field is followed for the
adjoint turbulent kinetic energy (i.e. 'ka') but since this would produce
an ugly variable name for the adjoint to omega (i.e. omegaa), the latter
is abbreviated to 'wa'.

The work is based on

\verbatim
    Kavvadias, I., Papoutsis-Kiachagias, E.,
    Dimitrakopoulos, G., & Giannakoglou, K.  (2014).
    The continuous adjoint approach to the k–$omega$ SST turbulence model with
    applications in shape optimization
    Engineering Optimization, 47(11), 1523-1542.
    https://doi.org/10.1080/0305215X.2014.979816
\endverbatim

with changes in the discretisation of
a number of differential operators and the formulation of the adjoint to
the wall functions employed by the primal model.

Regarding the latter, the code assumes (and differentiates) the default
behaviour of nutkWallFunction (i.e. nutWallFunction::blendingType::STEPWISE)
and omegaWallFunction (i.e. omegaWallFunction::blendingType::BINOMIAL2).

Due to the availability of a number of terms required for the
formulation of the wall function for ka, the latter is implemented
within adjointkOmegaSST itself, with contributions from objective functions
implemented within kaqRWallFunction. Wall functions for wa are
implemented within waWallFunction.

The initial implementation of the above-mentioned reference was
performed by Dr. Ioannis Kavvadias
2022-06-10 13:00:52 +00:00
b550a23acb ENH: add the infrastructure for computing and utilising
the Jacobian of an objective function, defined at the boundary, wrt nut
and gradU. Also modified the current objectives that include such
contributions
2022-06-10 13:00:52 +00:00
080567375f ENH: exposed wallFunctionCoefficients in nutWallFunction 2022-06-10 13:00:52 +00:00
6e1fca0e46 CONFIG: bump patch level 2022-06-10 12:25:10 +02:00
c6eab6aeba CONFIG: update paraview version to 5.10.1 (minor/bugfix release) 2022-06-09 18:16:08 +02:00
8efa44734a BUG: regression in handling of finiteArea processor boundaries (#2507)
- update the area-centres processor/processor information as part of
  faMesh::init() after all of the global data and geometry data is
  setup.

- improve flattenEdgeField helper to properly handle empty patches.
  This change removes the false fails when testing edge-centre
  redistribution (FULLDEBUG mode).

TUT: add filmPanel (rivulet) tutorial
2022-06-09 15:34:17 +02:00
7f748bd5fd ENH: CleanFunctions refinements
- include constant/faMesh cleanup (cleanFaMesh) as part of standard
  cleanCase

- simplify cleanPolyMesh function to now just warn about old
  constant/polyMesh/blockMeshDict but not try to remove anything

- cleanup cellDist.vtu (decomposePar -dry-run) as well

ENH: foamRunTutorials - fallback to Allrun-parallel, Allrun-serial

TUT: call m4 with file argument instead of redirected stdin

TUT: adjust suffixes on decomposeParDict variants
2022-06-09 15:34:17 +02:00
d878ca3248 ENH: snappyHexMesh: early exit of leak detection. See #2403
Reverted edfault behaviour
2022-06-09 14:24:12 +01:00
098e195245 BUG: cyclicACMI: lagrangian+ACMI. Fixes #2504. 2022-06-09 14:03:08 +01:00
7b5cfbd1b0 COMP: Gcc 11+ potential fix - see #2434 2022-06-09 12:58:22 +02:00
d2d976bda8 BUG: (un)refinement: combine topochange+motion. Fixes #2492
Explicitly unset the mesh.moving flag whilst doing the topo change.
2022-06-09 11:34:32 +01:00
c5cede38aa ENH: snappyHexMesh: early exit of leak detection. See #2403
Changed behaviour to make it the default
2022-06-09 11:34:32 +01:00
4f0166397e Merge branch 'feature-forces-forcecoeffs' into 'develop'
ENH: binField: new function object for data binning

See merge request Development/openfoam!433
2022-06-09 09:33:21 +00:00
be8cf2ad5c TUT: binField: changes for binData 2022-06-09 09:32:53 +00:00
de5f75eb13 COMP: Updated dependent code following changes to forces/forceCoeffs FOs 2022-06-09 09:32:53 +00:00
6a4f7c9c68 ENH: forces/forceCoeffs: refactor function objects
- enables runtime selection of operand coefficients by 'coefficients' entry
- removes binning - now handled using the new 'binField' FO

Co-authored-by: Kutalmis Bercin <kutalmis.bercin@esi-group.com>
2022-06-09 09:32:53 +00:00
78c984f8f4 ENH: binField: new field function object
The new 'binField' function object calculates binned data,
where specified patches are divided into segments according to
various input bin characteristics, so that spatially-localised
information can be output for each segment.

Co-authored-by: Kutalmis Bercin <kutalmis.bercin@esi-group.com>
2022-06-09 09:32:53 +00:00
a7d01a7d43 ENH: writeFile: add writeValue function 2022-06-09 09:32:53 +00:00
726ce59b66 BUG: Checking range of Tmin and Tmax. Fixes #2506 2022-06-08 18:37:16 -07:00
37bb5b684d ENH: reconstructPar: showcase reconstructing synthesised particles 2022-06-08 17:07:04 +01:00
9a75ce8434 ENH: support coordinateSystem/transform for sampled planes
- previously only defined for cell-cutting version, now for
  iso-surface version too

TUT: remove old transform/coordinateSystem syntax
2022-06-08 16:43:05 +02:00
fbaadf3a94 ENH: make 'planeType' optional for dictionary construct of a plane
- simpler to write for sampled cutting planes etc.
  For example,

      slice
      {
          type        cuttingPlane;
          point       (0 0 0);
          normal      (0 0 1);
          interpolate true;
      }

  instead of

      slice
      {
          type        cuttingPlane;
          planeType   pointAndNormal;
          pointAndNormalDict
          {
              point   (0 0 0);
              normal  (0 0 1);
          }
          interpolate true;
      }

STYLE: add noexcept to some plane methods
2022-06-08 16:43:05 +02:00
da157dca47 GIT: snappyHexMesh: extraneous merge removal 2022-06-08 15:39:31 +01:00
75133c5973 Merge branch 'feature-dmd-multi-patch-extension' into 'develop'
ENH: DMD: add multi-patch input functionality

See merge request Development/openfoam!547
2022-06-08 13:23:08 +00:00
f12399c39b ENH: DMD: add multi-patch input functionality 2022-06-08 13:22:42 +00:00
d2e2533546 STYLE: DMD: simplify various parts of the class 2022-06-08 13:22:42 +00:00
e3d8b36c63 ENH: DMDModel: move nComponents function to an upper level 2022-06-08 13:22:42 +00:00
44ba2d868d ENH: DMD: apply various optimisations 2022-06-08 13:22:42 +00:00
cf3c4f26ce Merge branch 'feature-anisotropic-solid-material-conductivity' into 'develop'
ENH: new tabulated anisotropic solid transport model

See merge request Development/openfoam!546
2022-06-08 12:59:50 +00:00
408e6b55e9 TUT: simplify setups.orig cases
DOC: Curle: fix typo in header file (fixes #2498)

TUT: airfoil2D: apply standard freestream conditions for nuTilda and nut
2022-06-08 13:53:01 +01:00
9cf6ac4145 ENH: new tabulated anisotropic solid transport model 2022-06-08 12:26:17 +01:00
c54ea62aa4 ENH: InterfaceCompositionModels: add tabulated (fluid) - icoTabulated (solid) options 2022-06-08 12:26:17 +01:00
853f2fcaf3 ENH: solidThermos: add icoTabulated-solidThermo option 2022-06-08 12:26:17 +01:00
05ca60cf45 Merge branch 'feature-elliptic-blending-reynolds-stress-model' into 'develop'
ENH: EBRSM: new elliptic-blending Reynolds-stress turbulence model

See merge request Development/openfoam!544
2022-06-08 10:41:00 +00:00
7c59abef60 TUT: planeChannel: new verification case for RANS turbulence models 2022-06-08 10:06:20 +01:00
c1311bc785 ENH: EBRSM: new elliptic-blending Reynolds-stress turbulence model 2022-06-08 08:52:33 +01:00
86178cfd24 Merge branch 'feature-synthetic-turbulence-methods' into 'develop'
ENH: turbulentDigitalFilter: Synthetic fluctuations of scalars

See merge request Development/openfoam!532
2022-06-07 20:12:34 +00:00
ec96010ffb TUT: oneCellThickPlaneChannel/planeChannel: update the tutorial 2022-06-07 20:12:03 +00:00
745fc42dee ENH: turbulentDFSEMInlet: improve Reynolds-stress realizability checks
ENH: turbulentDFSEMInlet: new realizability checking function for scalar fields
2022-06-07 20:12:03 +00:00
29acac9f97 ENH: turbulentDigitalFilter: refactor the boundary condition
- Previous state of the condition was largely inoperative
due to bugs and lack of functionalities
- New state of the condition is more versatile, elegant, robust and faster

ENH: turbulentDigitalFilter: add new scalar-based synthetic turbulence condition

- Realistic temperature and/or concentration fluctuations
can be generated based on given input statistics
2022-06-07 20:12:03 +00:00
7184de50df ENH: simplify coordinate rotation specification (#2505)
- can specify rotations that are not "axes" in a compact form:

      transform
      {
          origin  (0 0 0);
          rotation none;
      }

      transform
      {
          origin  (0 0 0);
          rotation axisAngle;
          axis    (0 0 1);
          angle   45;
      }

   An expanded dictionary form also remains possible:

      transform
      {
          origin  (0 0 0);
          rotation
          {
              type  axisAngle;
              axis  (0 0 1);
              angle 45;
          }
      }

STYLE: verbose deprecation for "coordinateRotation" keyword

- the "coordinateRotation" keyword was replaced by the "rotation"
  keyword (OpenFOAM-v1812 and later) but was handled silently.
  Now elevated to non-silent.

STYLE: alias lookups "axesRotation", "EulerRotation", "STARCDRotation"

- these warn and report the equivalent short form, which aids in
  upgrading. Previously had silent lookups.
2022-06-07 17:25:30 +02:00
460b29b8c7 STYLE: missing quote when reporting selection table aliases 2022-06-07 15:01:40 +02:00
cc47a37ed1 ENH: add external surface handling to meshedSurfRef (#2505)
- previously just handled surface components
- move/scale mesh points (copy)

STYLE: pass in dummy faces/points to writer

STYLE: use tensor is_identity()
2022-06-03 17:26:38 +02:00
264c09c365 Merge remote-tracking branch 'origin/master' into develop 2022-06-03 14:11:00 +02:00
68599d552d ENH: minor code cleanup for SHA1 calculation
- append single character
- make append() methods void: methods are never chained anyhow
- refactor digest comparison (code reduction)

COMP: add overflow handling for OSHA1stream
2022-06-03 11:18:08 +02:00
40cadfd2f2 COMP: references to temporaries
COMP: include <limits>
2022-06-03 10:04:38 +02:00
91198eaf6a COMP: gcc-12 buffer check bypasses xsputn (#2481, #2496)
- add overflow() method to the SHA1 streambuf. Previously could rely
  on xsputn for adding to sha1 content, but streams now check pptr()
  first to test for the buffering range and thus overflow() is needed.
2022-06-03 10:04:35 +02:00
2c77514417 CONFIG: support wmake -debug-O0, -debug-O1 etc.
- rearranged order of flags so that FOAM_EXTRA_CXXFLAGS is added
  after the WARN/OPT/DBUG flags

CONFIG: drop wmake rules for PGI compiler (defunct)
2022-06-02 22:37:00 +02:00
a465e4db85 ENH: support Euler rotation rollPitchYaw/yawPitchRoll ordering
- can be more intuitive to specify for some cases:

      rotation
      {
          type    euler;
          order   rollPitchYaw;
          angles  (0 20 45);
      }

- refactor starcd rotation to reuse Euler ZXY ordering
  (code reduction)

ENH: add -rotate-x, -rotate-y, -rotate-z for transformPoints etc

- easier to specify for simple rotations
2022-06-02 16:47:40 +02:00
eba7a485ba ENH: quaternion ROLL_PITCH_YAW and YAW_PITCH_ROLL aliases/lookups
COMP: define labelSphericalTensor::I

- remove spurious 'labelI' global constant (labelSphericalTensor::I)

STYLE: replace use of deprecated Tensor vectorComponent

STYLE: avoid bit-wise assignment of bool (VectorSpace compare ops)
2022-06-02 11:14:10 +02:00
8b63b8cdfe ENH: add hashedWordList find, appendUniq methods
- aligns calling signatures with wordList, for possible future
  replacement

- drop construct from const char** (can use initializer_list instead)

ENH: replace hashedWordList with plain wordList in triSurfaceLoader

- additional hashing optimisation (and overhead) is not worth it for
  the comparatively small lists of surfaces used.
2022-06-02 11:14:10 +02:00
49d0e82842 ENH: patchSeed: fix debug message 2022-06-02 09:21:37 +01:00
903f45dcdc ENH: snappyHexMesh: early exit of leak detection. See #2403 2022-06-01 15:30:11 +01:00
11b0d70b2d COMP: use the template disambiguator for dependent names (clang-9.0.1) 2022-06-01 10:00:50 +01:00
9b30e4fd81 Merge branch 'feature-qrmatrix' into 'develop'
ENH: QRMatrix: refactor the QR decomposition algorithms

See merge request Development/openfoam!540
2022-05-31 16:59:51 +00:00
aaa25d105b ENH: STDMD: apply QRMatrix changes 2022-05-31 16:11:20 +00:00
1ef855cf0b ENH: QRMatrix: refactor the QR decomposition algorithms (fixes #2212) 2022-05-31 16:11:20 +00:00
cf492d42a1 ENH: Matrix: improve row access in inner/outer products 2022-05-31 16:11:20 +00:00
98b4779793 ENH: Rectangular/SquareMatrix: add move assignment 2022-05-31 16:11:20 +00:00
96cb473305 ENH: Matrix: add non-conjugate transpose function 2022-05-31 16:11:20 +00:00
addfcf1bc2 ENH: handle chemical equations parsing errors (#2440)
- catch extra punctuation tokens in chemical equations
- catch unknown species

- simplify generation of reaction string (output)

ENH: allow access of solid concentrations from sub-classes (#2441)
2022-05-31 17:52:16 +02:00
796145ee4c CONFIG: set API level to 2204
- redistributePar, expression sources, objectRegistry::sorted(),
  wallFunctions, solid motion updates, etc
2022-05-31 17:19:49 +02:00
37e1da82ff CONFIG: add ARM64 nvidia rules
CONFIG: revise Pstream/OpenFOAM linkage (nvidia)

- double-pass linkage seems to be unnecessary
2022-05-31 17:19:49 +02:00
8081fc7234 ENH: refactor cell selections into cellBitSet
- ensightWrite, vtkWrite, fv::cellSetOption

ENH: additional topoSet "ignore" action

- this no-op can be used to skip an action step, instead of removing
  the entire entry
2022-05-31 13:04:43 +02:00
1845c28ee4 BUG: ensightWrite has out-of-date subMesh reference (fixes #2499)
- triggered with cell selections (especially with manifold cells).
  The ensightMesh was still holding an old subMesh reference.
2022-05-31 13:04:43 +02:00
520001bafb TUT: use "sources" for SemiImplicit in a few places
TUT: removed xxxCoeffs clutter for atmospheric sources

GIT: renamed liquidFilmStepWithSprinklers
2022-05-31 13:04:43 +02:00
d2e10bca40 ENH: support exprField specification for SemiImplicitSource
- this allows more flexibility when defining the location or intensity
  of sources.

  For example,

  {
      type            scalarSemiImplicitSource;
      volumeMode      specific;
      selectionMode   all;

      sources
      {
          tracer0
          {
              explicit
              {
                  type       exprField;

                  functions<scalar>
                  {
                      square
                      {
                          type square;
                          scale 0.0025;
                          level 0.0025;
                          frequency 10;
                      }
                  }

                  expression
                  #{
                      (hypot(pos().x() + 0.025, pos().y()) < 0.01)
                    ? fn:square(time())
                    : 0
                  #};
              }
          }
      }
  }

ENH: SemiImplicitSource: handle "sources" with explicit/implicit entries

- essentially the same as injectionRateSuSp with Su/Sp,
  but potentially clearer in purpose.

ENH: add Function1 good() method to define if function can be evaluated

- for example, provides a programmatic means of avoiding the 'none'
  function
2022-05-31 13:04:39 +02:00
ef743147ea GIT: relocate coordinate from meshTools -> OpenFOAM
- supports use of coordinate systems in fileFormats, surfMesh etc.

GIT: remove remnant dependency check placeholders
2022-05-31 10:05:17 +02:00
11d5677368 ENH: snappyHexMesh: better messages. See #2403. 2022-05-30 11:57:43 +01:00
1a6e9030fa ENH: fvMesh: maintain mesh.phi(). See #2492 2022-05-30 11:57:42 +01:00
4ea3944ab9 Merge branch 'issue-2070-drag-forces' into 'develop'
Improve the Lagrangian drag models

See merge request Development/openfoam!495
2022-05-30 08:25:58 +00:00
6acbd98231 STYLE: DragForce: modernise the code content 2022-05-30 09:15:28 +01:00
eab0a11079 DOC: DragForce: improve header file documentation 2022-05-30 09:06:08 +01:00
b7a1975ecd BUG: PlessisMasliyahDragForce: remove redundant CdRe function 2022-05-30 09:06:07 +01:00
96cc6024c0 ENH: handle uniform Su/Sp/SuSp source terms directly
- avoid any operations for zero sources

- explicit sources are applied to the entire mesh can be added directly,
  without an intermediate DimensionedField

- update some legacy faMatrix/fvMatrix methods that used Istream
  instead of dictionary or dimensionSet for their parameters.
  Simplify handling of tmps.

- align faMatrix methods with the updated their fvMatrix counterparts
  (eg, DimensionedField instead of GeometricField for sources)
2022-05-29 20:39:34 +02:00
21234ae296 ENH: support zip/unzip rows of symmTensor (#2487)
- was previously only implemented for tensor
2022-05-27 17:58:37 +02:00
082a0e687a ENH: support zone group selection for volRegion function objects 2022-05-27 17:50:29 +02:00
5461001d05 ENH: retain wordRe zone matching for porosity models
- parameter passing previously stripped it down to 'word' instead of
  'wordRe'
2022-05-27 15:52:21 +02:00
937b4898ae ENH: geometric selection mode for cellSetOption
- similar to the geometric decomposition constraint,
  allows a compositing selection of cells based on topoSet sources
  which also include various searchableSurface mechanisms.

  This makes for potentially easier placement of sources without
  resorting to defining a cellSet.

ENH: support zone group selection for fv::cellSetOption and fa::faceSetOption
2022-05-27 15:40:39 +02:00
f0f893c4b8 ENH: support multi-zone motion (#2484)
- select motion for the entire mesh, or restrict to a subset
  of points based on a specified cellSet or cellZone(s).

  Can now combine cellSet and cellZone specifications
  (uses an 'or' combination).

- move consistent use of keyType and wordRe to allow regex selection,
  possibly using zone groups

STYLE: remove duplicate code in solidBodyMotionSolver
2022-05-27 15:35:25 +02:00
525db80889 BUG: zones inGroup entry not read from dictionary (fixes #2485)
ENH: add ZoneMesh groupNames method
2022-05-27 15:33:28 +02:00
0efa5f062a ENH: DimensionedFields::New static constructors 2022-05-27 14:15:12 +02:00
93dcf732dd COMP: make ZeroConstant clonable 2022-05-27 14:15:03 +02:00
500c7047b2 TUT: remove superfluous 'sourceInfo' (topo sets)
- update annotated dicts, remove tabs

- use point1/point2 for cylinder sources
2022-05-27 14:10:31 +02:00
832fbd954f ENH: simplify code for searchableSurface topo sources
- shorter lookup names for more consistency

ENH: accept point1/point2 as alternative to p1/p2 for sources

- better alignment with searchable specification

- refactor so that cylinderAnnulus sources derive directly from
  cylinder sources (which handle an annulus as well).
  Accept radius or outerRadius as synonyms.

STYLE: noexcept on topoBitSet access methods

DOC: update description for geometricConstraint
2022-05-27 14:10:31 +02:00
ba10afea77 ENH: add 'filtered' polyMesh regionName() method
- in various situations with mesh regions it is also useful to
  filter out or remove the defaultRegion name (ie, "region0").

  Can now do that conveniently from the polyMesh itself or as a static
  function. Simply use this

      const word& regionDir = polyMesh::regionName(regionName);

  OR  mesh.regionName()

  instead of

      const word& regionDir =
      (
           regionName != polyMesh::defaultRegion
         ? regionName
         : word::null
      );

  Additionally, since the string '/' join operator filters out empty
  strings, the following will work correctly:

      (polyMesh::regionName(regionName)/polyMesh::meshSubDir)

      (mesh.regionName()/polyMesh::meshSubDir)
2022-05-27 14:10:31 +02:00
f00f236cb3 STYLE: use zero-gradient for cellDist field (reconstructParMesh)
- consistent with what decomposePar and redistributePar create
2022-05-27 14:10:31 +02:00
61f2f179a6 COMP: mismatch return value for fvMesh::checkImplicit - now return bool 2022-05-27 14:10:31 +02:00
5e3295e596 Merge branch 'feature-norm-function-object' into 'develop'
ENH: norm: add new field function object

See merge request Development/openfoam!539
2022-05-27 11:58:43 +00:00
d8f0858a0b TUT: cavity: add an example for the norm function object 2022-05-27 12:51:51 +01:00
14c8c312e8 ENH: norm: add new field function object
The 'norm' function object normalises an input field
with a chosen norm, and outputs a new normalised field.
2022-05-27 12:51:51 +01:00
77ab7510a8 ENH: dimensionedScalar: add stabilise function 2022-05-27 12:51:51 +01:00
293df98df9 Merge branch 'feature-lagrangian-dose-FO' into 'develop'
Adding external heat to greyDiffusive BC and new Doses FO

See merge request Development/openfoam!543
2022-05-27 09:15:35 +00:00
e022e522ba ENH: Adding external heat to greyDiffusive BC and new ParticleDose FO
DOC: greyDiffusiveRadiationMixed: improve header documentation
2022-05-27 09:15:07 +00:00
cb4930d81f ENH: Changing implicit lduAssembly name. 2022-05-26 14:20:54 -07:00
c6d9c0317d Merge branch 'feature-function-objects-2206' into 'develop'
New function objects

See merge request Development/openfoam!541
2022-05-25 23:18:20 +00:00
5cb0dc9d8a ENH: Added new particleZoneInfo cloud function object.
Reports cloud information for particles passing through a specified cell
zone.

Example usage:

    cloudFunctions
    {
        particleZoneInfo1
        {
            type            particleZoneInfo;
            cellZone        leftFluid;

            // Optional entries
            //writer          vtk;
        }
    }

Results are written to file:
- \<case\>/postProcessing/lagrangian/\<cloudName\>/\<functionName\>/\<time\>

    \# cellZone        : leftFluid
    \# time            : 1.0000000000e+00
    \#
    \# origID    origProc    (x y z)    time0    age    d0    d    mass0    mass

Where
- origID : particle ID
- origProc : processor ID
- (x y z) : Cartesian co-ordinates
- time0 : time particle enters the cellZone
- age : time spent in the cellZone
- d0 : diameter on entry to the cellZone
- d : current diameter
- mass0 : mass on entry to the cellZone
- mass : current mass

If the optional \c writer entry is supplied, cloud data is written in the
specified format.

During the run, output statistics are reported after the cloud solution,
e.g.:

    particleZoneInfo:
        Cell zone                       = leftFluid
        Contributions                   = 257

Here, 'Contributions' refers to the number of incremental particle-move
contributions recorded during this time step. At write times, the output
is extended, e.g.:

    particleZoneInfo:
        Cell zone                       = leftFluid
        Contributions                   = 822
        Number of particles             = 199
        Written data to "postProcessing/lagrangian/reactingCloud1/

TUT: filter: add an example for the particleZoneInfo function object
2022-05-25 23:17:57 +00:00
8d90b16518 ENH: multiFieldValue - extended to operate on general function objects
- Previously, the multiFieldValue function object was limited to operate on
  lists of fieldValue function objects.
- Any function objects that generate results can now be used, e.g.

pressureAverage
{
    type    multiFieldValue;
    libs    (fieldFunctionObjects);

    operation   average;

    functions
    {
        inlet
        {
            type            surfaceFieldValue;
            operation       areaAverage;
            regionType      patch;
            name            inlet;
            fields          (p);

            writeFields     no;
            writeToFile     no;
            log             no;
            resultFields    (areaAverage(inlet,p));
        }
        outlet
        {
            type            surfaceFieldValue;
            operation       areaAverage;
            regionType      patch;
            name            outlet;
            fields          (p);

            writeFields     no;
            writeToFile     no;
            log             no;
        }
        average
        {
            type            valueAverage;
            functionObject  testSample1;
            fields          (average(p));

            writeToFile     no;
            log             no;
        }
    }
}

TUT: cavity: add an example for the multiFieldValue function object
2022-05-25 23:17:57 +00:00
34ef9ae342 ENH: controlDict: include missing library.
With libs it can run with disallowGeneric
2022-05-25 15:31:39 +01:00
50d99578b7 Merge branch 'feature-redistributePar' into 'develop'
redistributePar support for point fields and area fields

See merge request Development/openfoam!538
2022-05-25 13:13:03 +00:00
d58b811030 ENH: TUT: misspelled patch name
(happened to fall back to the 'empty' boundary condition)
2022-05-25 13:12:38 +00:00
69db18138d TUT: Cs: use PBiCGStab for tight tolerance 2022-05-25 13:12:38 +00:00
cc1e6c12bb ENH: redistributePar support for finiteArea (#2436) 2022-05-25 13:12:38 +00:00
6644cf8ddb ENH: cleanup/reorganize parts of redistributePar
- separate out lagrangian routines etc

- align names with regular decompose/reconstruct methods
2022-05-25 13:12:38 +00:00
f976a02bd0 ENH: redistributePar - add support for pointFields (#2436) 2022-05-25 13:12:38 +00:00
4c5c15664e ENH: faMeshDistributor for handling redistribution of finiteArea (#2436) 2022-05-25 13:12:38 +00:00
15535b8970 ENH: mapDistributeBase compaction based on a subset of elements (#2436)
- now have both compactData(),compactLocalData(), compactRemoteData()
  depending on where the compaction information is actually known.

  The compactData() performs a consistent union of local and remote
  values, which eliminates the danger of mapping to non-existent
  locations but does require a double communication to setup.
  Typically needed for point maps (for example).

  The compactLocalData() and compactRemoteData() work on the
  assumption that the source or target values are sufficent for
  creating unique compact maps.

  Can be used, for example, when compacting cell maps since there is
  no possibility of a source cell being represented on different
  target processors (ie, each cell is unique and only occurs once).

  The existing compact() is equivalent to compactRemoteData()
  and is now simply a redirect.

- use bitSet for defining compaction, but the existing compact()
  continues to use a boolList (for code compatibility).

BUG: compaction in non-parallel mode didn't compact anything.

STYLE: compact ascii output for procAddressing
2022-05-25 13:12:38 +00:00
3b6761afed ENH: code modernization for decompose/reconstruct
- simplify procAddressing read/write

- avoid accessing points in faMeshReconstructor.
  Can rely on the patch meshPoints (labelList), which does not need
  access to a pointField

- report number of points on decomposed mesh.
  Can be useful additional information.
  Additional statistics for finite area decomposition

- provide bundled reconstructAllFields for various reconstructors

- remove reconstructPar checks for very old face addressing
  (from foam2.0 - ie, older than OpenFOAM itself)

- bundle all reading into fieldsDistributor tools,
  where it can be reused by various utilities as required.

- combine decomposition fields as respective fieldsCache
  which eliminates most of the clutter from decomposePar
  and similfies reuse in the future.

STYLE: remove old wordHashSet selection (deprecated in 2018)

BUG: incorrect face flip handling for faMeshReconstructor

- a latent bug which is not yet triggered since the faMesh faces are
  currently only definable on boundary faces (which never flip)
2022-05-25 13:12:38 +00:00
eccc998ed2 ENH: solidFoam: cleanup of sample case 2022-05-24 12:43:06 +01:00
4f4d333539 TUT: liquidFilmFoam - corrected cylinder h boundary condition 2022-05-23 09:42:42 +01:00
e7fbb7e557 BUG: snappyHexMesh: unset moving flag. Fixes #2477
We want to use movePoints to update all the geometry
but do not want to have a meshPhi
2022-05-20 17:35:04 +01:00
daca02dfd1 BUG: snappyHexMesh: unset moving flag. Fixes #2477 2022-05-20 17:11:25 +01:00
ee6c241b69 BUG: atmBoundaryLayer: replace global groundMin with local min (fixes #2471) 2022-05-20 10:05:23 +01:00
a11b5f2310 Merge branch 'feature-solid-body-mesh-motion-optimisation' into 'develop'
New solid body motion mesh update optimisations

See merge request Development/openfoam!537
2022-05-19 16:19:47 +00:00
b6390c2b75 COMP: resolved compiler warning 2022-05-19 15:48:31 +00:00
3a8a7cc6d4 ENH: snappyHexMesh: remove any left-over mesh data before topo change 2022-05-19 15:48:31 +00:00
6a8ddbb296 ENH: Added new solidBodyFvGeometryScheme
Geometry calculation scheme that performs geometry updates only in regions
where the mesh has changed, identified by comparing current and old points.

Example usage in fvSchemes:

    geometry
    {
        type            solidBody;

        // Optional entries

        // If set to false, update the entire mesh
        partialUpdate   yes;

        // Cache the motion addressing (changed points, faces, cells etc)
        cacheMotion     yes;
    }
2022-05-19 15:48:31 +00:00
f1dfaa90a7 ENH: Updated cyclicACMIPolyPatch following changes to geometry updates
The cell volumes are no longer deleted if already present; instead, cells
next to the patch are updated locally.
2022-05-19 15:48:31 +00:00
2493102044 ENH: added updateMesh(mpm) callback for surfaceInterpolation/fvGeometryScheme 2022-05-19 15:48:31 +00:00
823641ab9b ENH: refactored mesh movePoints to enable meshPhi update in the fvGeometryScheme 2022-05-19 15:48:31 +00:00
5a1307f41a STYLE: Code clean-up 2022-05-19 15:48:31 +00:00
0dc1faa2be ENH: primitiveMeshTools - added partial geometry update functions
Added new functions:
- updateFaceCentresAndAreas : update faces in faceIDs list
- updateCellCentresAndVols  : update cells in cellIDs list
2022-05-19 15:48:31 +00:00
ef14a415a9 ENH: ListOps - added uniqueSort function 2022-05-19 15:48:31 +00:00
053727d2d9 ENH: Enable Time objects for writeObjects FO 2022-05-19 15:48:31 +00:00
73d6fc9e91 ENH: Added profiling for dynamic mesh updates 2022-05-19 15:48:31 +00:00
6e644a1e8b ENH: solidFoam: energyCoupling tests 2022-05-19 14:28:45 +01:00
468f0a028a Merge branch 'feature-soft-wall-in-sixdof' into 'develop'
ENH: sixDoFRigidBodyMotion: add new softWall restraint

See merge request Development/openfoam!536
2022-05-19 10:58:40 +00:00
eb55af49dc ENH: sixDoFRigidBodyMotion: add new softWall restraint 2022-05-19 11:48:36 +01:00
da4827d7d2 Merge branch 'feature-extension-effectivenessHeatExchangerSource' into 'develop'
ENH: effectivenessHeatExchangerSource: add writeFile functionality

See merge request Development/openfoam!534
2022-05-18 16:08:05 +00:00
a2959b7586 STYLE: effectivenessHeatExchangerSource: modernise code
- removed redundant protected scope
- removed undefined 'calculateTotalArea' function
- reordered the constructor list

DOC: effectivenessHeatExchangerSource: improve header documentation
2022-05-18 16:07:25 +00:00
5bcf9b7997 ENH: effectivenessHeatExchangerSource: add secondaryOutletT functionality 2022-05-18 16:07:25 +00:00
9118ffb31e ENH: effectivenessHeatExchangerSource: add writeFile functionality 2022-05-18 16:07:25 +00:00
796715b029 Merge branch 'issue-1457-refcast' into 'develop'
ENH: Improve the handling of wall-function coefficients and blenders

See merge request Development/openfoam!486
2022-05-18 16:05:20 +00:00
b2610f19db ENH: wall functions: remove redundant and inconsistent virtual specifiers 2022-05-18 16:07:56 +01:00
e2a1076129 STYLE: wall functions: use more modern coding practices
The most frequent changes have been as follows.

from:

    tmp<scalarField> tuTau(new scalarField(patch().size(), Zero));
    scalarField& uTau = tuTau.ref();

to:

    auto tuTau = tmp<scalarField>::New(patch().size(), Zero);
    auto& uTau = tuTau.ref();

- Other changes involved the addition of - wherever approapriate -:

    const
    noexcept
    auto
2022-05-18 16:07:56 +01:00
dcfbdd2cad DOC: wall functions: update header-file documentation 2022-05-18 16:07:56 +01:00
876fc94bc8 ENH: wall functions: new class for wall-function blending methods 2022-05-18 16:07:53 +01:00
c7836f9d83 BUG: nutWallFunction: prevent casting errors (fixes #1457, #1966)
Previously, a nutWallFunctionFvPatchScalarField ref should be
created in epsilon, k, and omega wall functions to fetch various
common wall-function coefficients necessary to carry out and complete
local operations inside these wall functions.

However, this arrangement required the use of a nut wall function,
even when unnecessary, when any of non-nut wall functions are being used.
Therefore, some users had been redundantly restrained and
obstructed with rather obscure casting-error messages.

Also, the wall-function coefficients Cmu, kappa and E have been obtained
from the specified nutWallFunction in order to ensure that each patch
possesses the same set of values for these coefficients.

Although the motivation sounds reasonable, it has also been putting redundant
restraints on users and disregarding the specifics of each wall-function.
For example, the variation of epsilon in near-wall regions is usually very
steep and non-monotonic specific - an expert user may therefore want to use
an epsilon-specific coefficient, and this was not allowed by the previous
arrangement.

This commit introduces a new class (i.e. wallFunctionCoefficients) comprising
all common wall-function coefficients and yPlus calculations.
2022-05-18 14:54:26 +01:00
486be34631 BUG: wall functions: ensure consistent writing of traits
Previously, a number of wall functions were not not writing
their boundary-condition entries in the defacto order
(i.e. from type to value) while writing a field. For example:

    <patchName>
    {
        lowReCorrection 1;
        blending    stepwise;
        n           2;
        type        epsilonWallFunction; <!-- expected to be the first entry
        value       uniform 1;           <!-- expected to be the last entry
    }

Also, various wall functions have been writing out entries that
have not been being used by the wall function. For example:

    <patchName>
    {
        type        nutUSpaldingWallFunction;
        ...
        blending    stepwise;     <!-- no blending treatment in nutUSpaldingWF
        ...
    }

Additionally, various derived wall functions (e.g. atmOmegaWallFunction)
have been failing to write some of the inherited entries even though
these entries have been being used in carrying out wall-function calculations.

Taken these into consideration, wall functions have been reworked to obtain
reliable and consistent way of writing their traits while writing out a field.

- writeLocalEntries uses writeIfDifferent if constructed with getOrDefault.
2022-05-18 14:54:22 +01:00
6f4196ae62 BUG: totalFlowRateAdvectiveDiffusive: missing autoMap. Fixes #2475 2022-05-18 12:19:33 +01:00
06b353f8cd ENH: add faMeshTools for new/load mesh, proc addressing etc
ENH: simple faMeshSubset (zero-sized meshes only)

ENH: additional access methods for faMesh, primitive geometry mode

- wrapped walking of boundary edgeLabels as list of list
  (similar to edgeFaces).

- primitive finiteArea geometry mode with reduced communication:
  primarily interesting for decomposition/redistribution (#2436)

ENH: extra vtk debug outputs for checkFaMesh

- report per-processor sizes in the mesh summary
2022-05-17 17:36:34 +02:00
68b692fdfc ENH: combine loadOrCreateMesh from redistributePar into fvMeshTools.
- similar functionality as newMesh etc.
  Relocated to finiteVolume since there are no dynamicMesh dependencies.

- use simpler procAddressing (with updated mapDistributeBase).
  separated from redistributePar
2022-05-17 17:35:51 +02:00
b712e7289e ENH: use typed lookup versions instead of xyz::typeName literals 2022-05-17 17:35:51 +02:00
95e2a2e887 ENH: add sorted() to objectRegistry and IOobjectList
- returns UPtrList view (read-only or read/write) of the objects

- shorter names for IOobject checks: hasHeaderClass(), isHeaderClass()

- remove unused IOobject::isHeaderClassName(const word&) method.
  The typed versions are preferable/recommended, but can still check
  directly if needed:

     (io.headerClassName() == "foo")
2022-05-17 17:35:51 +02:00
f1098673c0 STYLE: compare Dynamic{Field,List} by casting address to common class
- previously used cdata() comparison but that tends to obscure what is
  going on
2022-05-17 17:35:51 +02:00
87f3866f20 ENH: support move append lists for PtrList and UPtrList 2022-05-17 17:35:51 +02:00
60e07d1f93 ENH: refine mapDistribute methods
- additional distribute/reverseDistribute with specified commsType.
  Improves flexibility.

- distribute with nullValue

- support move construct mapDistribute from mapDistributeBase

- refactor handling of schedules (as whichSchedule method) to
  simplify code.

- renumberMap helper for working with compact sub maps
  and renumberVisit for handling walk-ordered compaction.

COMP: make mapDistributeBase data private

- accessor methods are available - direct access is unnecessary
- mapDistribute : inherit mapDistributeBase constructors

STYLE: use List<labelPair>::null() for schedule placeholders

- clearer that they are doing nothing
2022-05-17 17:35:51 +02:00
ae0ef3efed COMP: make Function1 writeEntries virtual 2022-05-17 17:35:51 +02:00
9e2214131c COMP: Removed unused variable 2022-05-17 16:20:32 +01:00
edb0c5880b ENH: surfaceNoise - added optional areaAveraging for 1/3 octave data 2022-05-17 16:20:32 +01:00
6cafe441f8 ENH: valueAverageBase - added support for averaging label values 2022-05-17 16:20:32 +01:00
5d9456187d ENH: zero tag for constructing various IO types
- for int64 compilations this disambiguates between '0' as int32 (size)
  or as bool 'false' for local processor validity

  Eg,

     IOList list(io, 0);     <- With label-size 64: is this bool or label?
     IOList list(io, Zero);  <- Size = 0 (int32/int64), not a bool
2022-05-12 13:47:03 +02:00
812f4c4f09 BUG: globalIndex fails non-blocking gather of indirect list (fixes #2467)
- for indirect lists we use element-wise output streaming and read
  back as a regular list. This approach cannot however work with
  non-blocking mode - the receive buffers will simply not be filled
  before attempting to read from them.

  For contiguous data, the lowest overhead solution is to locally
  flatten the indirect list and use the regular gather routines
  for non-blocking mode. For non-contiguous data, can continue to
  use the element-wise output, but cannot use non-blocking for it.

STYLE: use non-blocking consistently as default for globalIndex gather(s)

- most of the front-facing code was already using non-blocking,
  but there were a few low-level routines defaulting to scheduled
  (but never relied upon in the code).
2022-05-12 11:29:38 +02:00
809fc70166 BUG: redistributePar: reconstruct mesh 2022-05-11 16:06:52 +01:00
efe057897f ENH: foamToVTK attempt finite-area write if -with-ids is specified
- previously filtered on the existence of area fields, but with
  faMesh::TryNew this is not required anymore.

STYLE: enable -verbose for various parallel utilities (consistency)
2022-05-11 11:34:04 +02:00
9c727abb84 COMP: increment lemon sources, fix stray comment char (wmkdepend)
COMP: compile utilites before solvers

- there are no inter-dependencies,
  so favour getting utilities working first
2022-05-11 09:53:58 +02:00
0ed0856593 COMP: avoid Istream/List operator() ambiguity (gcc-4.8.5)
- introduced UList<bool>::operator()(label) as part of bf0b3d8872
  but with gcc-4.8.5 this participates in operator resolution even
  for non-bool lists!!
  Partial revert until this predicate handling is really required.
2022-05-11 08:57:05 +02:00
dd560a6e3c ENH: reduce allocations/sorting when setting time (#2461)
- use DynamicList instead of List in the cache, which reduces the
  number of allocations occuring each time.

- since the cached times are stored in sorted order, first check if the
  new time is greater than the last list entry. Can then simply append
  without performing a binary search and can obviously also skip any
  subsequent sorting.

STYLE: add noexcept to Instant methods, declare in header (like Tuple2)
2022-05-10 21:16:09 +02:00
525f77f8bb TUT: add constraint types for finiteArea tutorials
STYLE: accept '-proc' as shortcut in restore0Dir function
2022-05-10 21:16:09 +02:00
de59875147 BUG: probes not written to probes/0 output (fixes #2452)
- as part of #2358 the writing was changed to be lazy.
  Which means that files are only created before they are actually
  written, which helps avoid flooding the filesystem if sample-only
  is required and also handles case such as "rho.*" where the sampled
  fields are not known from the objectRegistry at startup.

- now create any new files using the startTime value, which means they
  are easier to find but still retains the lazy construct.

  Don't expect any file collisions with this, but there could be some
  corner cases where the user has edited to remove fields (during
  runtime) and then re-edits to add them back in. In this case the
  file pointers would be closed but reopened later and overwriting
  the old probed values. This could be considered a feature or a bug.

BUG: bad indexing for streamlines (fixes #2454)

- a cut-and-paste error
2022-05-10 21:16:09 +02:00
762c095f4e COMP: WM_SCHEDULER breaks compilation (fixes #2439)
- only wrap compiler calls (not things like flex/bison)
- avoid single quoted '&&' (causes syntax errors)

STYLE: report WM_COMPILE_CONTROL value in top-level Allwmake
2022-05-10 21:15:39 +02:00
ebc634a425 Merge branch 'feature-reorganise' into 'develop'
code style, bug fixes

See merge request Development/openfoam!535
2022-05-10 11:07:46 +00:00
42de624344 ENH: consolidate processorTopology handling for volume and area meshes
- relocate templating to factory method 'New'.
  Adds provisions for more general re-use.

- expose processor topology in globalMesh as topology()

- wrap proc->patch lookup as processorTopology::procPatchLookup method
  (failsafe). May consider using Map<label> for its storage in the
  future.
2022-05-10 10:47:01 +02:00
dea2f23afd COMP: combine uindirectPrimitivePatch.H into indirectPrimitivePatch.H
- similarly combine typedef headers for primitiveFacePatch,
  foamVtkUIndPatchWriter, foamVtkUIndPatchGeoFieldsWriter etc
  (reduce file clutter)
2022-05-10 10:47:01 +02:00
33693f32b6 ENH: wrapped IOField, IOList, IOmapDistributePolyMesh
- Uses a refPtr to reference external content.
  Useful (for example) when writing data without copying.
  Reading into external locations is not implemented
  (no current requirement for that).

    * IOFieldRef -> IOField
    * IOListRef -> IOList
    * IOmapDistributePolyMeshRef -> IOmapDistributePolyMesh

  Eg,

    labelList addressing = ...;

    io.rename("cellProcAddressing");
    IOListRef<label>(io, addressing).write();

  Or,
    primitivePatch patch = ...;
    IOFieldRef<vector>(io, patch.localPoints()).write();
2022-05-10 10:47:01 +02:00
036abb8ecb BUG: bitSet &= operation does not mask out non-overlapping (#2456)
- the values from non-overlapping blocks were simply ignored,
  which meant that ('111111111111' & '111111') would not mask out
  the unset values at all.

- similar oddities in other operations (|=, ^= etc)
  where the original implementation tried hard to avoid touching the
  sizing at all, but now better resolved as follows:

  - '|=' : Set may grow to accommodate new 'on' bits.
  - '^=' : Set may grow to accommodate new 'on' bits.
  - '-=' : Never changes the original set size.
  - '&=' : Never changes the original set size.
           Non-overlapping elements are considered 'off'.

  These definitions are consistent with HashSet behaviour
  and also ensures that (a & b) == (b & a)

ENH: improve short-circuiting within bitSet ops

- in a few places can optimise by checking for none() instead of
  empty() and avoid unnecessary block operations.

ENH: added bitSet::resize_last() method

- as the name says: resizes to the last bit set.
  A friendlier way of writing `resize(find_last()+1)`
2022-05-10 10:47:01 +02:00
a34357b1a6 ENH: additional IndirectList static methods
- uniq() : creates an IndirectList with duplicated entries
  filtered out

- subset() : creates an IndirectList with positions that satisfy
  a condition predicate.

- subset_if() : creates an IndirectList with values that satisfy a
  given predicate.

  An indirect subset will be cheaper than creating a subset copy
  of the original data, and also allows modification.

STYLE: combine UIndirectList.H into UIndirectList.H (reduce file clutter)
2022-05-10 10:47:01 +02:00
7afebef509 ENH: HashTable sorted() method
- the sorted() method fills a UPtrList with sorted entries. In some
  places this can provide a more convenient means of traversing a
  HashTable in consistent order, without the extra step of creating
  a sortedToc(). The sorted() method with a UPtrList will also have
  a lower overhead than creating any sortedToc() or toc() since it is
  list of pointers and not full copies of the keys.

  Instead of this:

      HashTable<someType> table = ...;

      for (const word& key : table.sortedToc())
      {
          Info<< key << " => " << table[key] << nl;
      }

  can write this:

      for (const auto& iter : table.sorted())
      {
          Info<< iter.key() << " => " << iter.val() << nl;
      }

STYLE:

- declare hash entry key 'const' since it is immutable
2022-05-10 10:47:01 +02:00
d68902f4a7 ENH: relocate Foam::sort from PtrListOps to UPtrList.H
- can sort directly without ListOps or other intermediates
  (eg labelList order).

- PtrListOps::less/greater wrappers -> UPtrList::less/greater
2022-05-10 10:04:27 +02:00
cb6f908798 STYLE: IOobject/regIOobject - noexcept methods, isolate local functions
- local writeHeaderEntry helper was not marked as file-scope static.

- use do/while to simplify handling of padding spaces

ENH: IOobject - copy construct, resetting name and local component

- when copying with a new local component, this is simpler than
  constructing from all of the components, which was previously the
  only possibility for setting a new local component.
2022-05-09 14:52:47 +02:00
bf0b3d8872 ENH: relocate sortedOrder from ListOps.H to List.H
- commonly used, only depends on routines defined in UList
  (don't need the rest of ListOps for it).

ENH: implement boolList::operator() const

- allows use as a predicate functor, as per bitSet and labelHashSet

GIT: combine SubList, UList into List directory (intertwined concepts)

STYLE: default initialize DynamicList instead of with size 0
2022-05-09 14:52:47 +02:00
0e01e530a8 ENH: add optional agglomeration coefficent to random decomposition
- specifies the number of consecutive cells to assign to the same
  randomly chosen processor. Can be used to have a less extremely
  random distribution for testing possible breaking points.

Eg,
    method random;

    coeffs
    {
        agglom  4;
    }

- Add finiteArea cellID (actually face ids) / faceLabel and procID
  for foamToVTK with -write-ids. Useful when this type of information
  is needed.
2022-05-09 14:52:47 +02:00
8ee4efc64b ENH: checkMesh: weights on AMI patches. 2022-05-09 13:46:05 +01:00
f8dc192941 CONFIG: sourcing etc/cshrc twice unset the environment (fixes #2458) 2022-05-07 15:53:55 +02:00
2c7621116e COMP: missing linkage to regionFaModels (fixes #2449)
- needed for the lld linker (eg, AMD aocc compiler)
2022-05-06 19:32:34 +02:00
2ba2814c50 ENH: mpirunDebug: preserve ". Fixes #2459 2022-05-06 18:09:54 +01:00
de1aa80593 BUG: SprayParcel - set the child origProc. Fixed #1857 2022-05-06 10:54:39 +01:00
df63b47fbc BUG: masterCoarsest: do not agglomerate: Fixes #2455.
If the initial mesh does not have enough levels
do not do any agglomeration
2022-05-04 17:57:22 +01:00
579883354a BUG: ManualInjection - corrected for non-zero SOI. See #2096 2022-05-04 12:39:03 +01:00
d00445ace9 Merge branch 'feature-multiple-outletMappedUniformInlet' into 'develop'
ENH: outletMappedUniformInlet: add multiple fraction, offset and time delays

See merge request Development/openfoam!531
2022-04-29 20:00:22 +00:00
0a6e368289 TUT: airRecirculationRoom: update the tutorial 2022-04-29 19:59:41 +00:00
009f8dd1e8 ENH: outletMappedUniformInlet: add multiple fraction, offset and time delays
- Arbitrary number of outlets can be connected to a single inlet
  - Each inlet can be connected to different and arbitrary
    combination of outlets
- Each outlet-inlet connection has:
  - Optional filtration fraction as a Function1 type
  - Optional offset as a Function1 type (i.e. adding/substracting a substance)
  - Optional time delay (from outlet to inlet) as a Function1 type
- Each inlet has an optional base inlet-field as a PatchFunction1 type
2022-04-29 19:59:41 +00:00
32d3fabcfe ENH: scalarTransport: transfer write control from controlDict to function object 2022-04-29 19:59:41 +00:00
ab976a5ac0 ENH: interpolateXY: enable UList parameters for wider applications 2022-04-29 19:59:41 +00:00
7460fb259b Merge branch 'issues-2022-1.kbc' into 'develop'
BUG: 2022-1: Various bug fixes

See merge request Development/openfoam!530
2022-04-29 19:59:18 +00:00
f5ef5dc371 COMP: snappyLayerDriver: remove 64-bit label ambiguity 2022-04-29 19:55:44 +00:00
2296d91423 BUG: nutUBlendedWallFunction: avoid pressure spikes (fixes #2299) 2022-04-29 19:55:44 +00:00
7552608e08 BUG: linearTsubDiameter: fix the definition of bubble diameter (fixes #2312) 2022-04-29 19:55:44 +00:00
85786c6989 INT: TDACChemistryModel: avoid redundant MPI communications (#2337) 2022-04-29 19:55:44 +00:00
583fc4fb0d ENH: atmPlantCanopyUSource: improve implicit behaviour (fixes #2343) 2022-04-29 19:55:44 +00:00
123fe09fda BUG: activePressureForceBaffleVelocity: fix calculated area (fixes #2360)
This patch provides the correct behavior of
the boundary condition and its opening values.
2022-04-29 19:55:44 +00:00
c323cbd35b TUT: verticalChannel: add limitTemperature to avoid negative temperatures (fixes #2391)
TUT: propeller: remove duplicate log entry (fixes #1967)

TUT: verticalChannelLTS: update input to avoid runtime errors (fixes #2426)

TUT: Keyword updates
2022-04-29 19:55:44 +00:00
f118d9a2a2 BUG: humidityTemperature: fix dropwise condensation expression (fixes #2422) 2022-04-29 19:55:44 +00:00
e28bed59e2 BUG: DEShybrid: store the factor field on the mesh (fixes #2425)
The blendingFactor function object overwrites the DEShybrid:Factor
field internally when blendedSchemeBase debug flag is active.
However, users are allowed to write out the original DEShybrid:Factor
field by executing the writeObjects function object before
any blendingFactor function object execution.
2022-04-29 19:55:44 +00:00
a5f7fb6ad2 BUG: blendingFactor: fix DEShybrid blending-factor inconsistency (fixes #2419) 2022-04-29 19:55:44 +00:00
abc38e1cfc Merge branch 'feature-reorganise' into 'develop'
Code changes and reorganisation preliminary to redistributePar updates (#2436)

See merge request Development/openfoam!533
2022-04-29 19:46:08 +00:00
a4ef891594 COMP: missing linkage, unneeded linkage
- dynamicMesh, finiteVolume, regionFaModels, thermophysicalProperties
2022-04-29 13:26:36 +02:00
cf7dbf4d42 ENH: relocate/refactor fvMeshSubset
- direct construct and reset method for creating a zero-sized (dummy)
  subMesh. Has no exposed faces and no parallel synchronization
  required.

- core mapping (interpolate) functionality with direct handling
  of subsetting in fvMeshSubset (src/finiteVolume).
  Does not use dynamicMesh topology changes

- two-step subsetting as fvMeshSubsetter (src/dynamicMesh).
  Does use dynamicMesh topology changes.
  This is apparently only needed by the subsetMesh application itself.

DEFEATURE: remove deprecated setLargeCellSubset() method

- was deprecated JUL-2018, now removed (see issue #951)
2022-04-29 11:44:29 +02:00
6e21d6f78c ENH: refactor/centralize handling of direct and distributed mappers (#2436)
- added templating level to avoid code duplication and provide future
  extensibility
2022-04-29 11:44:29 +02:00
b68193088c ENH: add GeometricBoundaryField evaluateCoupled method (#2436)
- allows restricted evaluation to specific coupled patch types.
  Code relocated/refactored from redistributePar.

STYLE: ensure use of waitRequests() also corresponds to nonBlocking

ENH: additional copy/move construct GeometricField from DimensionedField

STYLE: processorPointPatch owner()/neighbour() as per processorPolyPatch

STYLE: orientedType with bool cast operator and noexcept
2022-04-29 11:44:29 +02:00
7bdd355ef7 ENH: additional controls for faMesh construction (#2436)
- move construct from components. Construct with optional IO control

- separate init() method (as per polyMesh) to delay evaluation of
  globalData and base geometry.

- faMesh removeFiles method

ENH: faBoundaryMeshEntries for reading faBoundary files without a mesh

ENH: adjust debug output for {fa,fae,fv,fvs}patchField::New

- add alternative constraint type selection for faePatchField.

- unify handling of "patchType" reading.
  Make less noisy when reporting dictionary defaults.
2022-04-29 11:44:28 +02:00
60b31fc8e2 ENH: add primitiveMeshTools support for face lists
- allows reuse by finiteArea, for example.
- simplify edge looping with face thisLabel/nextLabel method

ENH: additional storage checks for mesh weights (faMesh + fvMesh)

- allow finite-area field decomposition without edge weights.

STYLE: use tmp New in various places. Simpler updateGeom check
2022-04-29 11:44:28 +02:00
6a0ec18f26 DEFEATURE: remove old faMesh point/area calculations (#2233)
STYLE: remove spurious (no-op) processor boundary evaluations

- boundary fields for faceAreaCentres and edgeCentres had no-op
  initEvaluate/evaluate pair on processor boundaries.
  Now consistent with each other and with how finiteVolume is defined.

STYLE: add comments about which private methods trigger communication
2022-04-29 11:44:28 +02:00
94f201f956 ENH: add parallel sync checks for finite-area
- reduce the amount of communication when checking zones and patches
  by performing the synchonization check on the gathered strings
  (master only) and reduce or broadcast the result.

STYLE: simplify coupled() checks depending only on parRun
2022-04-29 11:44:28 +02:00
90ba706b06 ENH: make op names unambiguous
* lessEqOp    -> lessEqualOp
  * greaterEqOp -> greaterEqualOp

  to avoid ambiguitity with other forms such as 'plusEqOp' where the
  'Eq' implies an assigment. The name change also aligns better with
  C++ <functional> names such as std::less_equal, std::greater_equal

ENH: simple labelRange predicates gt0/ge0/lt0/le0

- mirrors scalarRange tests.
  Lower overhead than using labelMinMax::ge(0) etc since it does not
  create an intermediate (is stateless) and can be used as a constexpr
2022-04-29 11:44:28 +02:00
4cbe0a81ac ENH: consolidate read handling within various regIOobjects 2022-04-29 11:44:28 +02:00
35106b60c6 GIT: relocate uniformFixedValuePointPatchField to meshTools
- was in fvMotionSolver, but only requires PatchFunction1 capabilities
  (from within meshTools).

GIT: relocate IOmapDistributePolyMesh (from dynamicMesh to OpenFOAM)
2022-04-29 11:44:28 +02:00
430281bced ENH: align fileOperations/masterUncollatedFileOperation findInstance()
- adds handling of negative start times for masterUncollatedFileOperation
  as well (#1112).

- handle failures *after* restoring non-parRun mode.
  This ensures exit(FatalError) will exit MPI properly as well.

STYLE: replace "polyMesh" with polyMesh::meshSubDir

STYLE: adjust IOobject read/write enumerated values

- provision for possible bitwise handling
2022-04-29 11:44:28 +02:00
18e0d7e4d6 ENH: bundle broadcasts (#2371)
- additional Pstream::broadcasts() method to serialize/deserialize
  multiple items.

- revoke the broadcast specialisations for std::string and List(s) and
  use a generic broadcasting template. In most cases, the previous
  specialisations would have required two broadcasts:
    (1) for the size
    (2) for the contiguous content.

  Now favour reduced communication over potential local (intermediate)
  storage that would have only benefited a few select cases.

ENH: refine PstreamBuffers access methods

- replace 'bool hasRecvData(label)' with 'label recvDataCount(label)'
  to recover the number of unconsumed receive bytes from specified
  processor.  Can use 'labelList recvDataCounts()' to recover the
  number of unconsumed receive bytes from all processor.

- additional peekRecvData() method (for transcribing contiguous data)

ENH: globalIndex whichProcID - check for isLocal first

- reasonable to assume that local items are searched for more
  frequently, so do preliminary check for isLocal before performing
  a more costly binary search of globalIndex offsets

ENH: masterUncollatedFileOperation - bundled scatter of status
2022-04-29 11:44:28 +02:00
a27af5e369 ENH: add optional control to use clang lld linker (#2449)
Eg,
    export WM_COMPILER=Clang130
    export WM_COMPILE_CONTROL="version=13.0 +lld"

- also support the mold linker (+mold) for clang

STYLE: report as 'link' stage instead of 'ld' in short messages
2022-04-29 11:44:28 +02:00
442c309dca BUG: cut/paste error in searchableExtrudedCircle
- use vector::removeCollinear a few places

COMP: incorrect initialization order in edgeFaceCirculator

COMP: Silence boost bind deprecation warnings (before CGAL-5.2.1)
2022-04-29 11:43:58 +02:00
8e6f2ca5de ENH: additional Field normalise method (#2444)
- for most field types this is a no-op, but for a field of floatVector
  or doubleVector (eg, vector and solveVector) it will normalise each
  element with divide-by-zero protection.

  More reliable and efficient than dividing a field by the mag of itself
  (even with VSMALL protection).
  Applied to FieldField and GeometricField as well.

  Eg,
      fld.normalise();
  vs.
      fld /= mag(fld) + VSMALL;

ENH: support optional tolerance for vector::normalise

- for cases where tolerances larger than ROOTVSMALL are preferable.
  Not currently available for the field method (a templating question).

ENH: vector::removeCollinear method

- when working with geometries it is frequently necessary to have a
  normal vector without any collinear components. The removeCollinear
  method provides for clearer, compacter code.

  Eg,
      vector edgeNorm = ...;

      const vector edgeDirn = e.unitVec(points());

      edgeNorm.removeCollinear(edgeDirn);
      edgeNorm.normalise();

  vs.
      vector edgeNorm = ...;

      const vector edgeDirn = e.unitVec(points());

      edgeNorm -= edgeDirn*(edgeDirn & edgeNorm);
      edgeNorm /= mag(edgeNorm);
2022-04-28 15:31:44 +02:00
b59a5b1188 ENH: additional BitOps::toc, BitOps::sortedToc
- for obtaining set entries from a boolList

- BitOps::select to mirror bitSet constructor but returning a boolList

- BitOps::set/unset for boolList

ENH: construct bitSet from a labelRange

- useful, for example, when marking up patch slices

ENH: ListOps methods

- ListOps::count_if to mirror std::count_if but with list indexing.
- ListOps::find_if to mirror std::find_if but with list indexing.

ENH: UPtrList::test() method.

- includes bounds checks, which means it can be used in more places
  (eg, even if the storage is empty).
2022-04-28 15:29:21 +02:00
7399dbfee8 BUG: Fixing sign on the linear source term for C < 0 for Lee model KSp 2022-04-25 09:35:17 -07:00
539d9e83af BUG: Fixing kappaLayers on coupled T BC. Fixes #2398 2022-04-22 10:43:54 -07:00
21a9076441 ENH: Correcting mass rate output 2022-04-22 10:43:54 -07:00
4f7019edc3 ENH: Create output for Su VollerPrakash 2022-04-22 10:43:54 -07:00
ecd27ad4a4 ENH: triSurfaceMesh: detect inconsistent orientation. Fixes #2447 2022-04-19 15:32:12 +01:00
8b50f8db25 BUG: Correct treatment of contactAngleForce near boundaries 2022-04-14 11:09:11 -07:00
c78101a9ae ENH: chtMultiRegionFoam: support for -dry-run. Fixes #2446 2022-04-14 15:47:39 +01:00
bc2299ed5f ENH: array: check input. See #2445. 2022-04-14 10:29:19 +01:00
ab02e851cc STYLE: bcs: do not write default values 2022-04-14 09:17:49 +01:00
2336e4a4e6 ENH: topoSet: added comment 2022-04-14 09:17:48 +01:00
02b8862de7 BUG: Making surfaceFilmProperties optional for postProcessing. Fixes #2372 2022-04-13 15:55:29 -07:00
6ff486e55b COMP: Adding missing header for tabulated thermo 2022-04-13 11:25:49 -07:00
6b02f5f4ea BUG: Reverting change made in commit d4cd87830d
Previous commit solved: "mixture rho to volume-based in rhoThermo."
This proved to work correctly for rho=constant EoS but not for
idealGas. Fixes #2304. The previous gitlab issue was #1812.
2022-04-12 14:37:45 -07:00
e5bf7d89d2 ENH: Adding thermo types to Lee model 2022-04-12 14:29:13 -07:00
d7c873902c COMP: Silence boost bind deprecation warnings (before CGAL-5.2.1) 2022-04-08 10:26:48 +02:00
6dac06dd38 ENH: solidFoam: allow time-step control. Fixes #2415. 2022-04-07 13:57:21 +01:00
0e5dfb1f64 BUG: atmosphericModels: add missing clone functions (fixes #2428) 2022-04-01 08:56:25 +01:00
ecf8d260c4 DOC: fixed documented use of expression functions
- `functions<scalar>` and `functions<vector>` were erroneously
   documented in header as `lookup<scalar>` etc.

INT: handle fluent square brackets (fixes #2429)

- patch applied from openfoam.org
2022-03-31 18:53:04 +02:00
c7f4ba1969 ENH: memory/efficiency improvements: renumbering, bandCompression (#2430)
- support direct processing of CompactListList instead of requiring
  a conversion to labelListList for bandCompression and renumbering
  methods.

- manage FIFO with CircularBuffer instead of SLList (avoids
  allocations in inner loops). Invert logic to use a bitSet of
  unvisited cells, which improves looping as the matrix becomes more
  sparse.

- fix missed weighting in bandCompression (same as #1376).
  In polyTopoChange, handle removed cells immediately to simplify
  the logic and align more closely with bandCompression.

STYLE: enclose bandCompression within meshTools namespace

ENH: PrimitivePatch pointFaces with DynamicList instead of SLList
2022-03-31 16:01:41 +02:00
3721a61fe0 COMP: link twoPhaseProperties library (#2424) 2022-03-31 16:01:41 +02:00
6fa23bd7a6 ENH: extend globalIndex mpiGather to use scalar/label components
- MPI_Gatherv requires contiguous data, but a byte-wise transfer can
  quickly exceed the 'int' limits used for MPI sizes/offsets. Thus
  gather label/scalar components when possible to increase the
  effective size limit.

  For non-contiguous types (or large contiguous data) now also
  reverts to manual handling

ENH: handle contiguous data in GAMGAgglomeration gather values

- delegate to globalIndex::gatherValues static method (new)
2022-03-31 16:01:31 +02:00
87e3b196b0 ENH: extend wrapping of MPI calls to more data types
- supports gatherv of label and scalar types

- combine blocking and non-blocking interfaces in UPstreamWrapping
  (code reduction).

DEFEATURE: remove unused UPstream allToAllv wrapping

- backend interface preserved in UPstreamWrapping

COMP: add genericListBroadcast - simplifies code
2022-03-31 16:01:07 +02:00
d38de84d21 ENH: bundle Pstream:: AllGather methods
- bundles frequently used 'gather/scatter' patterns more consistently.

  - combineAllGather     -> combineGather + broadcast
  - listCombineAllGather -> listCombineGather + broadcast
  - mapCombineAllGather  -> mapCombineGather + broadcast
  - allGatherList        -> gatherList + scatterList
  - reduce               -> gather + broadcast (ie, allreduce)

- The allGatherList currently wraps gatherList/scatterList, but may be
  replaced with a different algorithm in the future.

STYLE: PstreamCombineReduceOps.H is mostly unneeded now
2022-03-31 15:56:04 +02:00
e98acdc4fc ENH: extend type aliases to include geometric boundary fields (#2348)
STYLE: LduInterfaceFieldPtrsList as alias instead of a class

STYLE: define patch lists typedefs when defining the base patch

- eg, polyPatchList typedef within polyPatch.H

INT: relocate GeometricField::Boundary -> GeometricBoundaryField

- was internal to GeometricField but moving it outside simplifies
  forward declarations etc. Code adapted from openfoam.org
2022-03-30 16:36:03 +02:00
39064f65e9 ENH: snappyHexMesh: consistent trigger logic. See #2379 2022-03-30 14:56:55 +01:00
35fef5faa6 STY: Updating headers 2022-03-25 11:09:18 -07:00
cae9b6b868 BUG: Added missing GbyNu name - see #2409 2022-03-24 14:27:08 +00:00
7ad164d535 TUT: Keyword updates 2022-03-24 14:07:16 +00:00
1ed88ddc3a STYLE: distributionModels - corrected compat version 2022-03-24 13:47:02 +00:00
5157016b23 ENH: Added missing turbulence switch 2022-03-24 13:36:33 +00:00
529f6aa022 COMP: Resolved compiler warnings 2022-03-24 13:36:06 +00:00
b9d6a84314 BUG: Ensure T can be checked-out on destruction of thermo. See #1619 2022-03-24 09:17:19 +00:00
aa9e870f28 STYLE: cpuCabinet: remove excess entries 2022-03-23 17:37:03 +00:00
2ee0757364 BUG: processorLOD: handle 0 cells. Fixes #2421 2022-03-23 10:31:35 +00:00
ea2bf0414d COMP: PatchTools: unused typedef 2022-03-17 16:01:23 +00:00
9c7d265e4b ENH: distributedTriSurfaceMesh: work with flipped shells. Fixes #2405
Two problems:
- flipping inside snappyHexMesh is not done in a parallel
consistent way. So e.g. the octree-cached inside/outside information
has already been calculated. For now flipping of
distributedTriSurfaceMesh is disabled.
- octree-cached inside/outside information was using already
cached information and would only work for outwards pointing
volumes
2022-03-17 15:57:03 +00:00
55f287cd83 ENH: limitVelocity, report count and percent of cells/faces (#2414)
- percent of cells is taken relative to selection size.
- percent of faces is taken relative to the number of boundary faces
  that do not fix velocity themselves.

ENH: avoid correctBoundaryConditions() if values were not limited
2022-03-16 17:16:13 +01:00
4495db0302 ENH: avoid redundant IOobjectList use
- areaWrite and fileFieldSelection
2022-03-16 14:06:46 +01:00
24c0b30d48 ENH: mergePoints and patch gatherAndMerge improvements (#2402)
- when writing surface formats (eg, vtk, ensight etc) the sampled
  surfaces merge the faces/points originating from different
  processors into a single surface (ie, patch gatherAndMerge).

  Previous versions of mergePoints simply merged all points possible,
  which proves to be rather slow for larger meshes. This has now been
  modified to only consider boundary points, which reduces the number
  of points to consider. As part of this change, the reference point
  is now always equivalent to the min of the bounding box, which
  reduces the number of search loops. The merged points retain their
  original order.

- inplaceMergePoints version to simplify use and improve code
  robustness and efficiency.

ENH: make PrimitivePatch::boundaryPoints() less costly

- if edge addressing does not already exist, it will now simply walk
  the local face edges directly to define the boundary points.

  This avoids a rather large overhead of the full faceFaces,
  edgeFaces, faceEdges addressing.

  This operation is now more important since it is used in the revised
  patch gatherAndMerge.

ENH: topological merge for mesh-based surfaces in surfaceFieldValue
2022-03-16 13:44:58 +01:00
bf46b589cf ENH: add CircularBuffer container 2022-03-15 14:04:34 +01:00
079d5f2771 ENH: add triFace valid() method
- similar to edge valid(), true if vertices are unique, non-negative
2022-03-15 14:02:19 +01:00
46a1e7e21e GIT: missed change (rebase) to ensight manifold cell handling (#2396) 2022-03-13 22:53:33 +01:00
a22784ef52 CONFIG: set API level to 2202
- Pstream changes, coordSetWriters etc.
2022-03-13 22:38:26 +01:00
fd2544b27e Merge remote-tracking branch 'origin/master' into develop 2022-03-13 22:37:22 +01:00
963c98a65e SUBMODULE: update for external-solver (PETSc) compilation issues 2022-03-13 22:35:25 +01:00
327c43f3e8 ENH: identityOp as equivalent to std::identity (C++20)
- similar to how noOp was defined, but with perfect forwarding

STYLE: combine Swap into stdFoam

STYLE: capitalize FileOp, NegateOp template parameters
2022-03-13 22:35:18 +01:00
ed73bcbc33 TUT: update keywords, fix spurious annotated dictionary item (#2401) 2022-03-13 22:34:57 +01:00
f7cbb0672b ENH: globalIndex gather for PatchTools::gatherAndMerge (#2402)
- lower memory overhead, simpler code and eliminates need for
  ListListOps::combineOffset()

- optional handling of local faces/points for re-using in different
  contexts

STYLE: labelUList instead of labelList for globalMesh mergePoints

STYLE: adjust verbose information from mergePoints

- also report the current new-point location
2022-03-13 22:34:52 +01:00
6e509c10fc ENH: handle manifold cells in VTK, Ensight output (#2396)
- also disables PointData if manifold cells are detected.
  This is a partial workaround for volPointInterpolation problems
  with handling manifold cells.
2022-03-12 21:16:30 +01:00
2d7f2c26be ENH: MeshObject for handling manifold mesh connectivity (#2396) 2022-03-12 21:16:30 +01:00
c4d4becbac ENH: -exclude-fields, -no-fields options for foamToEnsight, foamToVTK
- additional verbosity option for conversions

- ignore old `-finite-area` option and always convert available
  finiteArea mesh/fields unless `-no-finite-area` is specified (#2374)

ENH: simplify point offset handling for ensight output

- extend writing to include compact face/cell lists
2022-03-12 21:16:30 +01:00
730ce92b68 ENH: handle try-construct faMesh (#2399)
- a try/catch approach is not really robust enough (or even possible)
  since read failures likely do not occur on all ranks simultaneously.
  This leads to situations where the master has thrown an exception
  (and thus exiting the current routine) while other ranks are still
  waiting to receive data and the program blocks completely.

  Since this primarily affects data conversion routines such as
  foamToEnsight etc, treat similarly to lagrangian: check for the
  existence of essential files before proceeding or not. This is
  wrapped into a TryNew factory method:

      autoPtr<faMesh> faMeshPtr(faMesh::TryNew(mesh));
      if (faMeshPtr) ...
2022-03-12 21:16:30 +01:00
62fc3bbc33 STYLE: broadcast instead of combineScatter/listCombineScatter/mapCombineScatter
- these are the same thing now and 'broadcast' expresses the intention
  more directly/consistently
2022-03-12 21:16:30 +01:00
de8ef5332d ENH: additional gather/scatter modes for PstreamBuffers
- gather/scatter types of operations can avoid AllToAll communication
  and use simple MPI gather (or scatter) to establish the receive sizes.

  New methods: finishedGathers() / finishedScatters()
2022-03-12 21:16:30 +01:00
a674c9d373 ENH: use broadcasting streams to distribute uniform file content
BUG: masterUncollatedFileOperation checking of file-size

- used Foam:fileSize check to decide on scheduled/nonBlocking but this
  was being done on all ranks and subsequently broadcast.
  Now avoid unnecessary filesystem access on non-master ranks.
2022-03-12 21:16:30 +01:00
e9dbe60b60 ENH: improve read handling of schemes/solution
- both schemes and solutions data are treated as MUST_READ_IF_MODIFIED
  even if the requested readOption is nominally MUST_READ or
  READ_IF_PRESENT, but now delay this change.
2022-03-12 21:16:30 +01:00
e59ca1226e ENH: interface consistency in CStringList
- in preparation for broadcasting versions
2022-03-12 21:16:30 +01:00
71772f17ab ENH: use PstreamBuffers for finiteArea handling (as per volume) 2022-03-12 21:16:30 +01:00
0e2ef5db3b ENH: support finiteArea patch groups and constraint types (#2397)
- allows simpler handling of processor conditions etc.

ENH: modernize constructor for better alignment with polyPatch
2022-03-12 21:16:30 +01:00
bd37f0b441 ENH: reduce duplicate code for float/double Vector/Tensor
STYLE: pass value not reference to pTraits for basic types

STYLE: add solveVector typedef to vector.H
2022-03-12 21:16:29 +01:00
42fe95a6a9 ENH: minor de-clutter of List, DynamicList, DynamicField (#2385)
- do not need contruct or move assign from SortableList.
  Rarely (never) used and can simply treat like a normal list
  by applying shrink beforehand.

- make append() methods return void instead of returning self, which
  makes it easier to derive from. Having them return self was a bit of
  an original design mistake.
  Chaining appends do not actually occur anywhere. Even if they were
  to be used, would not want to rely on them (fear of slicing on any
  derived classes).

BUG: IndirectList iterator comparison loses constness
2022-03-12 21:16:29 +01:00
47cd988296 ENH: eliminate code duplication in Circulator/ConstCirculator 2022-03-12 21:16:29 +01:00
c1eb5413d5 ENH: IOobject hasHeaderClassName() method
- simple wrapper for (!headerClassName().empty()) when checking if
  reading was successful.
2022-03-12 21:16:29 +01:00
323daeda3c ENH: update CompactListList code
- eliminate redundant size_ accounting

- drop extra 'Container' template parameter and replace functionality
  with more flexible pack/unpack methods.
  There is also a pack() method that handles indirect lists of lists
  that can be used, for example, to pack a patch slice of faces.

  Drop the 'operator()' method in favour of unpack to expose and properly
  document the conversion. Should revisit the corresponding code in
  some places for optimization potential.

- align some method names with globalIndex:
  totalSize(), maxSize() etc
2022-03-12 21:16:29 +01:00
0cf02eb384 ENH: globalIndex with direct gather/broadcast
- less communication than gatherList/scatterList

ENH: refine send granularity in Pstream::exchange

STYLE: ensure PstreamBuffers and defaultCommsType agree

- simpler loops for lduSchedule
2022-03-12 21:16:29 +01:00
b8c3dc4e49 ENH: selection mechanism for cloudInfo function object (#2390)
- can restrict calculation of D32 and other spray properties to a
  subset of parcels. Uses a predicate selection mechanism similar to
  vtkCloud etc.

ENH: code cleanup in scalar predicates

- pass by value not reference in predicates
- additional assign() method to refactor common code
2022-03-12 21:16:29 +01:00
3ea8492a7c ENH: Adding hTabulated solid thermo 2022-03-11 10:58:44 -08:00
3f586f76f3 Merge branch 'feature-coordSets' into 'develop'
refactor coordSet writers (#2347)

See merge request Development/openfoam!524
2022-03-10 19:36:00 +00:00
010ebadb68 ENH: support 'probes' style of ensemble output for sampledSets (#2389)
- with the special setFormat "probes", all of the sampled sets are
  treated more similarly to probes, with an ensemble output to raw
  probed format.

  This is of course less useful when the number of sampled points
  becomes very large.
2022-03-10 19:45:20 +01:00
8a7221cf50 TUT: update tutorials to use dictionary-style sets
- can now specify sampled sets as dictionary entries instead of a list
  entry.
    can now use:  sets { ... }
    instead of:   sets ( ... );

  This is similar to sampled surfaces and makes it easier to
  manage with dictionary manipulation tools.

TUT: update to use writeTime instead of outputTime
2022-03-10 19:45:20 +01:00
87db3ce4d4 ENH: ensemble results for sampleSets (#2388)
- in v2112 the functionObject results were only delivering values from
  the last set listed (ie, overwritten).

  Now that the values are properly scoped by the name of the set itself
  Eg, `average(lines,p)` for the average for 'lines' set, existing
  workflows will break.

  It thus makes reasonble sense to also handle results without a
  qualifier as ensemble values.

      average(p)    // Ensemble average of all listed sets
2022-03-10 19:45:20 +01:00
c3e14ffdd5 ENH: refactor coordSet writers (#2347)
- the very old 'writer' class was fully stateless and always templated
  on an particular output type.

  This is now replaced with a 'coordSetWriter' with similar concepts
  as previously introduced for surface writers (#1206).

  - writers change from being a generic state-less set of routines to
    more properly conforming to the normal notion of a writer.

  - Parallel data is done *outside* of the writers, since they are used
    in a wide variety of contexts and the caller is currently still in
    a better position for deciding how to combine parallel data.

ENH: update sampleSets to sample on per-field basis (#2347)

- sample/write a field in a single step.

- support for 'sampleOnExecute' to obtain values at execution
  intervals without writing.

- support 'sets' input as a dictionary entry (as well as a list),
  which is similar to the changes for sampled-surface and permits use
  of changeDictionary to modify content.

- globalIndex for gather to reduce parallel communication, less code

- qualify the sampleSet results (properties) with the name of the set.
  The sample results were previously without a qualifier, which meant
  that only the last property value was actually saved (previous ones
  overwritten).

  For example,
  ```
    sample1
    {
        scalar
        {
            average(line,T) 349.96521;
            min(line,T)     349.9544281;
            max(line,T)     350;
            average(cells,T) 349.9854619;
            min(cells,T)    349.6589286;
            max(cells,T)    350.4967271;
            average(line,epsilon) 0.04947733869;
            min(line,epsilon) 0.04449639927;
            max(line,epsilon) 0.06452856475;
        }
        label
        {
            size(line,T)    79;
            size(cells,T)   1720;
            size(line,epsilon) 79;
        }
    }
  ```

ENH: update particleTracks application

- use globalIndex to manage original parcel addressing and
  for gathering. Simplify code by introducing a helper class,
  storing intermediate fields in hash tables instead of
  separate lists.

ADDITIONAL NOTES:

- the regionSizeDistribution largely retains separate writers since
  the utility of placing sum/dev/count for all fields into a single file
  is questionable.

- the streamline writing remains a "soft" upgrade, which means that
  scalar and vector fields are still collected a priori and not
  on-the-fly.  This is due to how the streamline infrastructure is
  currently handled (should be upgraded in the future).
2022-03-10 19:41:22 +01:00
8a9ae839ce ENH: snappyHexMesh: leak closure testcase 2022-03-10 15:50:46 +00:00
7fab29c8b1 BUG: snappyHexMesh: distributedTriSurfaceMesh. Fixes #2405 2022-03-10 14:49:50 +00:00
5e2d8d6ed2 ENH: snappyHexMesh: multi-stage layer addition, automatic hole closure
Automatic hole closure:
- introduces 'holeToFace' topoSet source
- used when detecting a 'leak-path'
- creates additional baffles to close the leak

Multi-stage layer addition:
- Can add layers in multiple passes

See issues: #2403, #2404
2022-03-10 14:20:07 +00:00
0eb52766c0 BUG: dynamicRefineFvMesh: work without mesh motion. See #2395. 2022-03-08 12:36:11 +00:00
ed2216182c Merge branch '2395-dynamic-mesh-un-refinement-compatible-with-mesh-motion' into 'develop'
dynamic mesh (un)refinement: compatible with mesh motion

See merge request Development/openfoam!529
2022-03-07 16:07:20 +00:00
fcd5373a7f ENH: interFoam: added mesh motion. Fixes #2395. 2022-03-07 15:24:34 +00:00
83628e9298 STYLE: dictionary: optionalSubDict returns reference 2022-03-07 10:10:33 +00:00
83c46c813c Merge branch 'feature-Pstream-updates' into 'develop'
Pstream performance and handling improvements

See merge request Development/openfoam!528
2022-03-04 17:49:45 +00:00
0867816490 ENH: additional protection against zero-sized graph offset lists
- for metis-like graphs there is no guarantee that a zero-sized graph
  has an offsets list with size 1 or size 0, so always use

     numCells = max(0, xadj.size()-1)

  this was already done in most places, but missed in the
  decomposeGeneral method

STYLE: use sumOp<label>() instead of plusOp<label>()
2022-03-04 17:49:23 +00:00
e11fde900c ENH: direct support for broadcast of bitSet
- the internal data are contiguous so can broadcast size and internals
  directly without an intermediate stream.

ENH: split out broadcast time for profilingPstream information

STYLE: minor Pstream cleanup

- UPstream::commsType_ from protected to private, since it already has
  inlined noexcept getters/setters that should be used.

- don't pass unused/unneed tag into low-level MPI reduction templates.
  Document where tags are not needed

- had Pstream::broadcast instead of UPstream::broadcast in internals
2022-03-04 17:49:23 +00:00
341d9c402d BUG: incorrect chunk handling in Pstream::exchange (fixes #2375)
- used Pstream::maxCommsSize (bytes) for the lower limit when sending.
  This would have send more data on each iteration than expected based
  on maxCommsSize and finish with a number of useless iterations.

  Was generally not a serious bug since maxCommsSize (if used) was
  likely still far away from the MPI limits and exchange() is primarily
  harnessed by PstreamBuffers, which is sending character data
  (ie, number of elements and number of bytes is identical).
2022-03-04 17:49:23 +00:00
4540b064ee ENH: reduce overhead for particle transfer
- For v2112 and earlier: pre-assembled lists of particles
  to be transferred and target patch on a per processor basis.
  Apart from memory overhead of assembling the lists this adds
  allocations/de-allocation when building linked-lists.

- Now stream particle transfer tuples directly into PstreamBuffers.
  Use a local cache of UOPstream wrappers for the formatters
  (since there are potentially many particles being shifted about).
  On the receiving size, read out tuple-wise.

- Communication on transfers now restricted to the immediate
  neighbours instead of using an all-to-all to exchange sizes.

  Applied to Cloud::move and RecycleInteraction
2022-03-04 17:49:23 +00:00
2b54d86152 ENH: improve processor topology handling in zoneDistribute (#2371)
- now largely encapsulated using PstreamBuffers methods,
  which makes it simpler to centralize and maintain

- avoid building intermediate structures when sending data,
  remove unused methods/data

TUT: parallel version of depthCharge2D

STYLE: minor update in ProcessorTopology
2022-03-04 17:49:23 +00:00
14631984df ENH: additional control and access methods for PstreamBuffers
- PstreamBuffers nProcs() and allProcs() methods to recover the rank
  information consistent with the communicator used for construction

- allowClearRecv() methods for more control over buffer reuse
  For example,

      pBufs.allowClearRecv(false);

      forAll(particles, particlei)
      {
          pBufs.clear();

          fill...

          read via IPstream(..., pBufs);
       }

  This preserves the receive buffers memory allocation between calls.

- finishedNeighbourSends() method as compact wrapper for
  finishedSends() when send/recv ranks are identically
  (eg, neighbours)

- hasSendData()/hasRecvData() methods for PstreamBuffers.

  Can be useful for some situations to skip reading entirely.
  For example,

      pBufs.finishedNeighbourSends(neighProcs);

      if (!returnReduce(pBufs.hasRecvData(), orOp<bool>()))
      {
          // Nothing to do
          continue;
      }
      ...

  On an individual basis:

      for (const int proci : pBufs.allProcs())
      {
          if (pBufs.hasRecvData(proci))
          {
             ...
          }
      }

  Also conceivable to do the following instead (nonBlocking only):

      if (!returnReduce(pBufs.hasSendData(), orOp<bool>()))
      {
          // Nothing to do
          pBufs.clear();
          continue;
      }

      pBufs.finishedNeighbourSends(neighProcs);
      ...
2022-03-04 17:49:23 +00:00
bfca84d11a ENH: implement OPstream rewind() to support reuse of output streams
- a somewhat specialized use case, but can be useful when there are
  many ranks with sparse communication but for which the access
  pattern is established during inner loops.

      PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
      pBufs.allowClearRecv(false);

      PtrList<OPstream> output(Pstream::nProcs());

      while (condition)
      {
          // Rewind existing streams
          forAll(output, proci)
          {
              auto* osptr = output.get(proci);
              if (osptr)
              {
                  (*osptr).rewind();
              }
          }

          for (Particle& p : myCloud)
          {
              label toProci = ...;

              // Get or create output stream
              auto* osptr = output.get(toProci);
              if (!osptr)
              {
                  osptr = new OPstream(toProci, pBufs);
                  output.set(toProci, osptr);
              }

              // Append more data...
              (*osptr) << p;
          }

          pBufs.finishedSends();

          ... reads
      }
2022-03-04 17:49:23 +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
c086f22298 ENH: extend/improve broadcast handling
- split off a Pstream::genericBroadcast() which uses UOPBstream during
  serialization and UOPBstream during de-serialization.
  This function will not normally be used directly by callers, but
  provides a base layer for higher-level broadcast calls.

- low-level UPstream broadcast of string content.
  Since std::string has length and contiguous content, it is possible
  to handle directly by the following:
     1. broadcast size
     2. resize
     3. broadcast content when size != 0

  Although this is a similar amount of communication as the generic
  streaming version (min 1, max 2 broadcasts) it is more efficient
  by avoiding serialization/de-serialization overhead.

- handle broadcast of List content distinctly.
  Allows an optimized path for contiguous data, similar to how
  std::string is handled (broadcast size, resize container, broadcast
  content when size != 0), but can revert to genericBroadcast (streamed)
  for non-contiguous data.

- make various scatter variants simple aliases for broadcast, since
  that is what they are doing behind the scenes anyhow:

    * scatter()
    * combineScatter()
    * listCombineScatter()
    * mapCombineScatter()

  Except scatterList() which remains somewhat different.
  Beyond the additional (size == nProcs) check, the only difference to
  using broadcast(List<T>&) or a regular scatter(List<T>&) is that
  processor-local data is skipped. So leave this variant as-is.

STYLE: rename/prefix implementation code with 'Pstream'

- better association with its purpose and provides a unique name
2022-03-04 17:49:23 +00:00
f3674eee36 ENH: simpler use of broadcast (via Pstream::scatter)
- avoids worrying about forgetting a (Pstream::parRun()) guard
  and reduces code. The Pstream::scatter does the same thing under the
  hood.
2022-03-04 17:49:23 +00:00
5368b38b8d ENH: broadcast lumpedPointState with Foam::scatter instead of manual code 2022-03-04 17:49:23 +00:00
05b1bc9e79 STYLE: minor code cleanup of commSchedule
- obtain sorted order directly without SortableList,
  relocate private method to static local.
2022-03-04 17:49:23 +00:00
f4ebc90a02 ENH: simplify gather code for decompositionMethods
- use globalIndex for gather/scatter. Reuse code patterns from globalIndex
  for handling of the xadjcy arrays.
2022-03-04 17:49:23 +00:00
a6d1f47943 ENH: use globalIndex gather for simpler code and less communication
- checkTools, PatchTools::gatherAndMerge, SprayCloud penetration
2022-03-04 17:49:23 +00:00
c178fe8ec1 ENH: globalIndex gather/scatter scheduled (not nonBlocking) for non-contiguous
- reduces later surprises and simplifies effort for the caller

- more flexible globalIndex scatter with auto-sized return field.

- Avoid communication for scattering into zero-sized fields.
2022-03-04 17:49:23 +00:00
ff4998d364 ENH: avoid all-to-all communication in isoAdvection (#2371)
- the data front for isoAdvection can be particularly sparse and at
  higher processor counts there is an advantage to avoiding all-to-all
  communication for the PstreamBuffers exchange

Based on code changes from T.Aoyagi(RIST), A.Azami(RIST)
2022-03-04 17:49:23 +00:00
1348cd7e7b ENH: use broadcasting Pstreams for one-to-all sends 2022-03-04 17:49:23 +00:00
d37cb64efe ENH: broadcast for Foam::scatter() instead of manual tree communication
- use MPI_Bcast intrinsic instead of manual tree to reduce the overall
  number of messages.

  Old behaviour can be re-enabled with

      `#define Foam_Pstream_scatter_nobroadcast`
2022-03-04 17:49:23 +00:00
8478595a15 ENH: new broadcast version of Pstreams (#2371)
- The idea of broadcast streams is to replace multiple master to
  subProcs communications with a single MPI_Bcast.

    if (Pstream::master())
    {
        OPBstream toAll(Pstream::masterNo());
        toAll << data;
    }
    else
    {
        IPBstream fromMaster(Pstream::masterNo());
        fromMaster >> data;
    }

    // vs.
    if (Pstream::master())
    {
        for (const int proci : Pstream::subProcs())
        {
            OPstream os(Pstream::commsTypes::scheduled, proci);
            os << data;
        }
    }
    else
    {
        IPstream is(Pstream::commsTypes::scheduled, Pstream::masterNo());
        is >> data;
    }

  Can simply use UPstream::broadcast() directly for contiguous data
  with known lengths.

Based on ideas from T.Aoyagi(RIST), A.Azami(RIST)
2022-03-04 17:49:23 +00:00
a9cdaa1bae ENH: additional exchangeSizes, PstreamBuffers methods (#2371)
- allows restriction of exchange sizes to specified send/recv procs

Based on code supplied by T.Aoyagi(RIST), A.Azami(RIST)
2022-03-04 17:49:23 +00:00
b0ef650a12 ENH: Pstream specialization for float/scalar, FixedList (#2351)
- native MPI min/max/sum reductions for float/double
  irrespective of WM_PRECISION_OPTION

- native MPI min/max/sum reductions for (u)int32_t/(u)int64_t types,
  irrespective of WM_LABEL_SIZE

- replace rarely used vector2D sum reduction with FixedList as a
  indicator of its intent and also generalizes to different lengths.

  OLD:
      vector2D values;  values.x() = ...;  values.y() = ...;
      reduce(values, sumOp<vector2D>());

  NEW:
      FixedList<scalar,2> values;  values[0] = ...;  values[1] = ...;
      reduce(values, sumOp<scalar>());

- allow returnReduce() to use native reductions. Previous code (with
  linear/tree selector) would have bypassed them inadvertently.

ENH: added support for MPI broadcast (for a memory span)

ENH: select communication schedule as a static method

- UPstream::whichCommunication(comm) to select linear/tree
  communication instead of ternary or
  if (Pstream::nProcs() < Pstream::nProcsSimpleSum) ...

STYLE: align nProcsSimpleSum static value with etc/controlDict override
2022-03-04 17:49:23 +00:00
b95b24e4e7 ENH: improved isolation of MPI access in Pstreams
- refactor as an MPI-independent base class.

  Add bufferIPC{send,recv} private methods for construct/destruct.
  Eliminates code duplication from two constructor forms and reduces
  additional constructor definitions in dummy library.

- add PstreamBuffers access methods, refactor common finish sends
  code, tweak member packing

ENH: resize_nocopy for processorLduInterface buffers

- content is immediately overwritten

STYLE: cull unneeded includes in processorFa*

- handled by processorLduInterface
2022-03-04 17:49:23 +00:00
1bbe558dc5 ENH: Changing checkImplicit function to account for implicit patches 2022-03-04 09:29:35 -08:00
b94ffe93f1 ENH: Adding lower and upper bounds to nonUniformTable index 2022-03-03 09:17:57 -08:00
3c2db201b7 BUG: createPatch: make tutorial run parallel. See #2386 2022-03-02 14:49:50 +00:00
eb676f08a1 BUG: access of non-const tmp value in surface writers
- was inadvertently introduced with the previous commit.
  Affected non-parallel use of the surface writers.
2022-03-02 15:12:59 +01:00
666e5f6dc4 GIT: remove stray file, fix server documentation path 2022-03-02 15:12:59 +01:00
a74b9ca763 ENH: createPatch: handle multiple regions. Fixes #2386
Also #1361.
2022-03-02 13:14:30 +00:00
80318542e1 CONFIG: bump patch level 2022-03-01 11:00:00 +01:00
1a55829ef9 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.
2022-02-28 19:08:39 +01:00
cb10045094 ENH: add createNamedPolyMeshes.H file 2022-02-28 19:03:40 +01:00
02f57f8a36 ENH: use '<constant>' and '<system>' tags when creating relative names
- symmetric with expand()
2022-02-28 09:31:59 +01:00
fc43ed9d68 GIT: adjust for rebase edit of feature-runTimeControl-recycle 2022-02-28 09:22:06 +01:00
3c1da487f2 Merge branch 'feature-runTimeControl-recycle' into 'develop'
ENH: runTimeControl - enable resetting the trigger to an earlier instant

See merge request Development/openfoam!523
2022-02-25 16:18:01 +00:00
3d134167dd ENH: Refactored valueAverage FO and average runTimeCondition 2022-02-25 16:08:47 +01:00
bb04f5759d ENH: runTimeControl - enable resetting the trigger to an earlier instant
The runTimeControl function object can activate further function objects using
triggers. Previously the trigger index could only advance; this change set
allows users to set smaller values to enable function object recycling, e.g.

Repeat for N cycles:
1. average the pressure at a point in space
2. when the average stabilises, run for a further 100 iterations
3. set a new patch inlet velocity
  - back to (1)

- Removes old default behaviour that only permitted an increase in the
  trigger level. This type of 'ratcheting' mechanism (if required) is
  now the responsibility of the derived function object.
2022-02-25 15:39:26 +01:00
53c2eae543 ENH: runTimeControl - added 'none' condition as a no-op 2022-02-25 15:39:22 +01:00
942c354b59 BUG: atmTurbulentHeatFluxTemperature BC - added missing clone() calls for Function1. See #2370 2022-02-25 13:01:04 +00:00
fcb328332b Merge branch 'feature-clipped-AMIMethod' into 'develop'
ENH: cyclicAMI: extend faceAreaWeight to filter. See #2378

See merge request Development/openfoam!527
2022-02-24 11:56:53 +00:00
f46c398372 ENH: cyclicAMI: extend faceAreaWeight to filter. See #2378 2022-02-24 11:56:52 +00:00
ff8518a89a ENH: snappyHexMesh: express small regions. Fixes #2379
Extend selection of small cells to use absolute cell count
2022-02-24 09:44:53 +00:00
3d7e99b7a7 BUG: timeActivatedFileUpdate file check on non-master (fixes #2377)
ENH: report relative paths for output for easier reading
2022-02-23 12:48:18 +01:00
5386dd56db ENH: avoid read/write of empty slots for globalIndex gather 2022-02-21 19:53:21 +01:00
59dbee741f STYLE: use globalIndex localSize(), totalSize() in more places
- more explicit meaning than offset(), size() - respectively.
2022-02-21 19:53:21 +01:00
055a7b29e0 ENH: ensure indices are properly reset in SortList
- use more ListOps functions, add uniqueSort() method
2022-02-21 19:53:21 +01:00
711e1142ed BUG: FixedList/Pair writeEntry not re-readable (fixes #2351)
- notably affects writing continuous data in binary. If generating a
  compound token (eg, List<label>), need to add in the size prefix
  otherwise it cannot actually be parsed properly as a List.

BUG: bad fallthrough for compound reading (FixedList)

- the branch was likely never reached, but would have attempted to
  read twice due to a bad fall-through condition.
2022-02-21 19:53:21 +01:00
2a25b356b9 ENH: use GeometricField type aliases in sampling and expressions 2022-02-21 19:53:21 +01:00
a67f6bf7ae ENH: direct support of wordRes::filter in stringListOps 2022-02-21 19:53:21 +01:00
42f426f6c4 ENH: relocate graph writers to meshTools (not reqd by core OpenFOAM lib)
GIT: relocate globalIndex (is independent of mesh)

STYLE: include label/scalar Fwd in contiguous.H

STYLE: unneed commSchedule include in GeometricField
2022-02-21 19:53:21 +01:00
58f76ccc5f ENH: checkMesh: correct AMI weight directory. See #2356. 2022-02-21 16:14:08 +00:00
cc65f5f0f0 TUT: coded functionObject called on execute instead of write
- generated too much output that also missed topology changes,
  which prevents proper post-processing
2022-02-18 10:41:17 +01:00
ad6f17652b BUG: uninitialized file pointer in thermoCoupleProbes (fixes #2365)
- as a side-effect of changes to probes, the file pointers are not
  automatically creating when reading the dictionary but delayed
  until prepare(WRITE_ACTION) is called.
  This nuance was missed in thermoCoupleProbes.
2022-02-17 12:44:56 +01:00
eb2b9b2823 ENH: createPatch: sample dictionary. See #1361. 2022-02-17 10:34:13 +00:00
d5644058b2 ENH: checkMesh: output AMI weights on mapped. Fixes #2356.
Also output target weights
2022-02-17 09:31:20 +00:00
3d842aac93 BUG: decomposeParDict: operate with masterUncollated. Fixes #2368. 2022-02-16 16:43:33 +01:00
34a3e0abe3 BUG: cyclicAMI: optional settings not written. Fixes #2363 2022-02-16 16:43:25 +01:00
504f5a8a14 BUG: decomposeParDict: operate with masterUncollated. Fixes #2368. 2022-02-16 09:59:03 +00:00
8e552bd2b4 ENH: snappyHexMesh: parallel consistency. Fixes #2331.
Coupled boundary faces should behave as internal faces
2022-02-14 16:02:19 +00:00
bdb9a54bed BUG: cyclicAMI: optional settings not written. Fixes #2363 2022-02-11 18:38:49 +00:00
24bee96db2 ENH: avoid unnecessary disk access in writeDictionary (#2362)
- added in special handling for monitoring controlDict.

  Since controlDict is an unwatchedIOdictionary (not IOdictionary) and
  not registered either, the usual objectRegistry caching is not
  available. Instead, access directly from Time.

  Left the balance of the file handling largely intact (for handling
  unregistered dictionaries) but could potentially revisit in the
  future and attempt master-only file access if required. However,
  most other IOdictionary types will be registered, otherwise the
  READ_IF_MODIFIED mechanism would not really work properly.
2022-02-11 17:52:34 +01:00
3a6c0d7fb0 BUG: sample/store surface field triggers dimension check (fixes #2361)
- when used for example with wallShearStress, the stress field is
  initially created as incompressible but later updated with the
  correct compressible/incompressible dimensions.

  If this field is sampled as a surface and stored on the registry
  the dimensions should be reset() and not '=' assigned, since that
  causes a dimension check which will obviously fail.
2022-02-11 14:27:00 +01:00
cbc86d6a88 DEFEATURE: remove deprecated/obsolete sample/store onto surfMesh
- was a stop-gap measure until field/registry storage on
  polySurface was introduced (FEB-2019)
2022-02-10 19:42:06 +01:00
1be63cd378 ENH: update coding for VTK fileFormats, make open() virtual
- add writer support for VERTICES

- updated use of globalIndex

ENH: add base vtk writer for points/verts/lines

STYLE: noexcept, explicit constructors etc
2022-02-10 19:28:51 +01:00
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
731e276e21 ENH: extend command-line options for particleTracks
- can specify format, stride without modifying a dictionary
  (increases flexibility, eases testing)
2022-02-10 19:28:51 +01:00
df18b8bb3c DEFEATURE: remove alpha-field support (partly broken) from gltf output
- when used with *any* alphaField and normalised (the usual case)
  would largely give a 0-1 corresponding to the min/max of the first
  component, but could also yield negative values.

- if the alpha field corresponds identically to colour field, it is
  readily possible to combine as into RGBA sequences. However, if the
  fields are different it potentially means referencing an opacity
  field that has not yet been sampled.  This impedes using the format
  for a streaming sampler without additional overhead and/or rewriting
  the alpha channel later.
2022-02-10 19:28:51 +01:00
2a61606251 ENH: improve gltf handling
- scene

  - write with fileName, additional getMesh accessor

  - addColourToMesh accepts an alpha field size 1 as a constant
    alpha value

  - sceneWriter wrapper

ENH: improve gltf handling of colour and alpha specification

- accept plain input directly.
  Eg,
      colour  (1 0 1);
  vs
      colour      uniform;
      colourValue (1 0 1);

- use field magnitude for colouring of non-scalar fields.

  Eg, having three different colour maps for a vector field simply
  does not help much with visualisation.
2022-02-10 19:28:51 +01:00
06ade9515e GIT: relocate coordSet from fileFormats to meshTools
- meshTools is the first layer in which coordSet is actually needed

STYLE: rename writer implementations in advance of upcoming changes (#2347)

- simplifies tracing of code changes (git blame)
2022-02-10 19:28:51 +01:00
0511aebd86 ENH: add probes sampleOnExecute option (#2358)
- supports sampling/probing of values to obtain min/max/average/size
  at execution intervals without writing any output or generating
  output directories.

- 'verbose' option for additional output
2022-02-10 19:28:51 +01:00
e147ac52e9 ENH: probes and patchProbes - added caching of results (#2358)
- min, max, average and sample size results now stored in
  functionObjectProperties similar to sampledSets, e.g. for field p

  - min(p)
  - max(p)
  - average(p)
  - size(p)
2022-02-10 19:28:50 +01:00
e806d18612 ENH: consolidate allow/deny wordRes filtering
- wrap as wordRes::filter functor

- support allow/deny when loading cloud fields to a registry
2022-02-10 19:28:50 +01:00
fb4fe06306 ENH: simplify component handling
- raw writer, components functionObject
2022-02-10 19:28:50 +01:00
7db2a29413 ENH: type aliases for common GeometricField forms (#2348)
ENH: provide fieldTypes::surface names (as per fieldTypes::volume)

ENH: reduce number of files for surface fields

- combine face and point field declarations/definitions,
  simplify typeName definitions
2022-02-10 19:28:50 +01:00
4f8b8258fc ENH: simplify construction of 'one-sided' globalIndex
- uses globalIndex::gatherOnly / globalIndex::gatherNone dispatch tags

  Eg,
      globalIndex(send.size(), globalIndex::gatherOnly{});

  vs.

      globalIndex
      (
          UPstream::listGatherValues(send.size()),
          globalIndex::SIZES
      );
2022-02-10 16:46:13 +01:00
ddcc04dadc BUG: vtk write of uniform field in parallel (fixes #2349)
- used low-level MPI gather, but the wrapping routine contains an
  additional safety check for is_contiguous which is not defined for
  various std::pair<..> combination.

  So std::pair<label,vector> (which is actually contiguous, but not
  declared as is_contiguous) would falsely trip the check.

  Avoid by simply gathering unbundled values instead.
2022-02-10 16:46:13 +01:00
7a6891905e ENH: make tetIndices contiguous, noexcept, sortable, comparable
ENH: make interpolation constructors explicit etc
2022-02-10 16:46:13 +01:00
2919c9b675 STYLE: minor changes
- do not need STRINGIFY macros in ragel code
- remove wordPairHashTable.H and use equivalent wordPairHashes.H instead

STYLE: replace addDictOption with explicit option

 - the usage text is otherwise misleading

GIT: combine Pair/Tuple2 directories
2022-02-10 16:46:13 +01:00
62ec2f2ddf COMP: deprecate domainName and full hostName (#2280)
- unused in regular OpenFOAM code
- POSIX version uses deprecated gethostbyname()
- Windows version never worked

COMP: localize, noexcept on internal OSspecific methods

STYLE: support fileName::Type SYMLINK and LINK as synonyms
2022-02-10 16:46:12 +01:00
debbcfb7df BUG: redistributePar: handle cyclicA(C)MI cleaner. See #1558.
Should test on patch, not patch field
2022-02-10 13:46:21 +00:00
13b6898661 ENH: tutorials: added dummy fv* files
(createPatch now operates on fvMesh)
2022-02-10 13:45:21 +00:00
3902ac2857 BUG: singleProcessorFaceSets: fix parallel/. Fixes #2359.
The logic was not maintaining consistent sets of constraints
on different processors. A single processor with a full
match (very easy with 0 local faces) would invalidate
adding the constraint.
2022-02-10 12:10:00 +00:00
ad6d3a088e ENH: createPatch: update fields. Fixes #1361.
- adds 'patchFields' subdictionary to specify fvPatchFields
  similar to createBaffles
- implements automatic matching across multiple regions
2022-02-09 15:54:24 +00:00
7fa44e3c19 BUG: redistributePar: handle cyclicA(C)MI cleaner. See #1558. 2022-02-09 14:17:17 +00:00
f14263e019 ENH: checkMesh: output AMI weights on mapped. Fixes #2356. 2022-02-07 16:21:08 +00:00
19398ded1c CONFIG: align adios2 settings with shipped ThirdParty version (#2353) 2022-02-04 09:01:32 +01:00
88b64ab054 Merge branch 'feature-core-changes' into 'develop'
bugfixes and style changes

See merge request Development/openfoam!522
2022-02-01 10:18:20 +00:00
e1f06bf38e ENH: globalIndex gather ops with reduced communication (#2332)
- for contiguous data, added mpiGatherOp() to complement the
  gatherOp() static method

- the gather ops (static methods) populate the globalIndex on the
  master only (not needed on other procs) for reduced communication

- rename inplace gather methods to include 'inplace' in their name.
  Regular gather methods return the gathered data directly, which
  allows the following:

      const scalarField mergedWeights(globalFaces().gather(wghtSum));

  vs.
      scalarField mergedWeights;
      globalFaces().gather(wghtSum, mergedWeights());

  or even:

      scalarField mergedWeights;
      List<scalarField> allWeights(Pstream::nProcs());
      allWeights[Pstream::myProcNo()] = wghtSum;
      Pstream::gatherList(allWeights);
      if (Pstream::master())
      {
          mergedWeights =
              ListListOps::combine<scalarField>
              (
                  allWeights, accessOp<scalarField>()
              );
       }

- add parRun guards on various globalIndex gather methods
  (simple copies or no-ops in serial) to simplify the effort for callers.
2022-01-31 20:09:49 +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
61aef196ed STYLE: use single-parameter SubList where applicable (reduces clutter) 2022-01-31 20:08:52 +01:00
6a87dbcbcd ENH: encapsulate wordRe regex with pointer
- reduces overall size and other overhead when wordRe represents
  a literal.
2022-01-31 20:08:52 +01:00
8b9dfbfe1f STYLE: combine files, explicit constructors (Dictionary) 2022-01-31 20:08:52 +01:00
ab065cd5d3 BUG: avoid memory slicing in LList (#2300)
ENH: reduce code effort for clearing linked-lists

ENH: adjust linked-list method name

- complement linked-list append() method with prepend() method
  instead of 'insert', which is not very descriptive
2022-01-31 20:08:52 +01:00
511431d6df BUG: snappyHexMesh: excessive memory blockLevel. Fixes #2345
Assumes that gap is formed when both surfaces agree i.e.
it takes the minimum distance of the two. This means that
any wave only needs to be propagated according to the
originating surface.
2022-01-31 16:43:00 +00: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
35cf639fe8 COMP: noexcept for label/scalar component access
- qualify include guards for primitives
2022-01-24 12:26:38 +01:00
c3703226c1 SUBMODULE: update OpenQBMM for autoPtr::set() deprecation 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
3b1f6e867c STYLE: add std:: qualifier to unique_ptr for additional clarity, noexcept 2022-01-21 09:19:51 +01:00
97f452d53a COMP: isolate include for coordSet writer 2022-01-21 09:19:50 +01:00
b874dc74b0 DEFEATURE: remove support for jplot (defunct) 2022-01-20 17:13:28 +01:00
0d3e84eb10 BUG: Time: correct the user-time operation for time-precision adaptations (fixes #2328) 2022-01-20 10:04:18 +00:00
62982ffad6 ENH: snappyHexMesh: parallel consistency. Fixes #2331. 2022-01-19 14:23:09 +00:00
2e81c80527 BUG: fix typo in comfort functionObject, minor style changes (#2325) 2022-01-18 16:42:11 +01:00
3eb3b74c1e ENH: MappedFile: allow multiple fieldTables. Fixes #2324 2022-01-17 16:11:30 +00:00
15c481204d ENH: comfort function object - added operative temperature. See #2325 2022-01-17 09:40:06 +00:00
74e3306454 ENH: PairModel: add none option 2022-01-14 17:21:35 +00:00
f5eace394b DOC: Corrected online doxygen links. Fixes #2326 2022-01-14 14:33:45 +00:00
befbcfce24 ENH: simpler coordinateSystem writeEntry with single parameter 2022-01-13 13:58:23 +01:00
4b7f92935e BUG: fixedJump: calculate jump in he. Fixes #2327 2022-01-13 10:17:37 +00:00
2047a69115 BUG: reconstructPar: delay locating positions. Fixes #2205. 2022-01-12 11:36:05 +00:00
fa5d79d0e5 ENH: redistributePar: add comment 2022-01-12 09:16:04 +00:00
83ef7aa5d2 ENH: velocityDampingConstraint - updated to operate on a cell section. See #2301 2022-01-11 17:13:29 +00:00
7825d24de1 TUT: Adjusting settings for hPoly thermo for phase change 2022-01-11 14:14:09 +00:00
d44c8318f0 COMP: use automatic cleanup for run-time compat table (fixes #2314)
- occurs with newer gcc on ubuntu impish (gcc-11.2.0), but may perhaps
  actually be related to `-flto=auto` or to the destruction order of
  the static variables (race condition?).

  Leaving the compat table around for automatic cleanup does not
  impact on other lookups (which are nullptr checked anyhow).
2022-01-11 11:39:57 +01:00
91b5525749 CONFIG: incorrect lib-name handling (fixes #2322) 2022-01-11 11:24:24 +01:00
48562b8649 BUG: KinematicReynoldsNumber: enable cloud function object (fixes #2317)
TUT: hopperEmptying: add an example for KinematicReynoldsNumber
DOC: ThermoReynoldsNumber/KinematicReynoldsNumber: correct the usage examples
2022-01-11 11:24:24 +01:00
99b2550af2 ENH: processorField: provision for mesh changes. Fixes #2319 2022-01-06 10:21:44 +00:00
145f29cc9a Merge branch 'develop' 2021-12-21 19:19:38 +00:00
34e226dfe3 RELEASE: updated completion cache 2021-12-20 18:57:43 +00:00
14aeaf8dab RELEASE: Updated version to v2112 2021-12-20 18:57:43 +00:00
a2014242cf RELEASE: Updated headers for v2112 2021-12-20 14:18:01 +00:00
281f136f38 DOC: Fixed some doxygen complaints 2021-12-20 14:17:59 +00:00
af864cdcd1 ENH: Adding option mesh flux correction to solidFoam 2021-12-16 11:59:36 -08:00
83243cf01e COMP: non-group-local communicator for MS-MPI (mingw)
- partial revert for 13740de427 (#2158)

  MS-MPI does not currently have a MPI_Comm_create_group(),
  so keep using MPI_Comm_create() there.

  Only affects multi-world simulations.

CONFIG: retain dummy version of libPstream.dll

- retain as libPstream.dll-dummy so that it is available for
  manual replacement of the regular libPstream.dll (#2290)

  Keep extra copy of libPstream.dll as libPstream.dll-msmpi
  (for example) for manual replacement.
2021-12-16 14:44:28 +01:00
c2368e3775 COMP: fix regionFaModels linkage (mingw) 2021-12-16 12:41:45 +01:00
1a4975a021 CONFIG: set API level to 2112 (now in pre-release state) 2021-12-15 19:15:07 +01:00
b0748af9f6 CONFIG: update versions
- ADIOS2-2.7.1      latest
- CGAL-4.14.3       latest without c++14 requirement
- ParaView-v5.10.0  final (or RC2)
- boost_1_74_0      newest is 1_77_0 but had problems with gcc-4.8.5
- fftw-3.3.10       bugfix
- openmpi-4.1.2     latest
- scotch_6.1.0 (no change) - dgraph regression in 6.1.2
- kahip-3.14        latest
2021-12-15 19:14:44 +01:00
a526dcb305 SUBMODULE: use OpenFOAM-v2112 tagged OpenQBMM version 2021-12-15 19:13:27 +01:00
2f07de03ff COMP: add -pthread for AMD compiler rule
- https://github.com/spack/spack/pull/27949

COMP: respect FOAM_BUILDROOT for wmake -queue

STYLE: fix stray paraview setting
2021-12-15 19:13:27 +01:00
b632e7b500 STYLE: specify pointer type 2021-12-15 19:13:27 +01:00
ec3cdf57bb ENH: have expression dupZeroField respect defaultBoundaryType
- this is now consistent with what the internal
  "get(Vol|Surface|Point)Field" methods deliver
  (ie, zero-gradient for volume, calculated otherwise).

  Still some slight inconsistencies with what the internal
  "new(Vol|Surface|Point)Field" methods deliver however.
  There they are always "calculated"
2021-12-15 19:13:27 +01:00
223e06dfb8 BUG: Adding virtual function Cp to SpecieMixture 2021-12-15 09:57:29 -08:00
79c23b0d23 BUG: energyTransport: delete own storage. Fixes #2302 2021-12-15 13:48:24 +00:00
ae708e67b5 Merge branch 'feature-lagrangian-additions' into 'develop'
Lagrangian modelling updates/new features

See merge request Development/openfoam!521
2021-12-15 10:46:57 +00:00
c4cc33b748 ENH: Added new FaceInteraction cloudFunctionObject
Enables particles to interact with mesh faces (decsribed using faceZones).

    faceInteraction1
    {
        type            faceInteraction;
        faceZones
        (
            (blockageFaces    stick)
//            (blockageFaces    escape)
//            (blockageFaces    rebound) // not applicable for this test case (!)
        );

        dMin            0;
        dMax            1;
    }

The faceZones entry is a list of (faceZoneName interactionType), where
interaction type is either stick, escape or rebound.
2021-12-15 10:46:34 +00:00
f64e2864f7 TUT: Lagrangian - added example showing moving injector 2021-12-15 10:46:34 +00:00
c754c1ccbf ENH: ConeNozzleInjection - enabled direction to change as f(time)
- Now only has the options 'point' and 'disk' (deprecated movingPoint)
  - moving state is based on the type of Function1

- The position and direction entries are Function1-types, e.g. for the 'table'
  type the entries could be:

        position        table
        (
            (  0 (0.1 0.5 0.5))
            (0.2 (0.5 0.9 0.5))
            (0.4 (0.9 0.5 0.5))
            (0.6 (0.5 0.1 0.5))

            (0.8 (0.5 0.5 0.9))
            (1.0 (0.5 0.9 0.5))
            (1.2 (0.5 0.5 0.1))
            (1.4 (0.5 0.1 0.5))

            (1.6 (0.1 0.5 0.5))
            (1.8 (0.5 0.5 0.9))
            (2.0 (0.9 0.5 0.5))
            (2.2 (0.5 0.5 0.1))
        );

        direction       table
        (
            (  0 ( 1  0  0))
            (0.2 ( 0 -1  0))
            (0.4 (-1  0  0))
            (0.6 ( 0  1  0))

            (0.8 ( 0  0 -1))
            (1.0 ( 0 -1  0))
            (1.2 ( 0  0  1))
            (1.4 ( 0  1  0))

            (1.6 ( 1  0  0))
            (1.8 ( 0  0 -1))
            (2.0 (-1  0  0))
            (2.2 ( 0  0  1))
        );
2021-12-15 10:46:34 +00:00
0260643c67 ENH: PatchInjectionModel - added new parcel initial velocity options
The parcel initial velocity can now be set using the new `velocityType`
entry, taking one of the following options:

- fixedValue   : (default) same as earlier versions, requires U0
- patchValue   : velocity set to seed patch face value
- zeroGradient : velocity set to seed patch face adjacent cell value

Example usage:

        model1
        {
            type            patchInjection;
            massTotal       1;
            SOI             0;
            parcelBasisType mass;
            patch           cylinder;
            duration        10;
            parcelsPerSecond 100;
            velocityType    patchValue;
            //velocityType    zeroGradient;
            //U0              (-10 0 0);
            flowRateProfile constant 1;
            sizeDistribution
            {
                type        normal;
                normalDistribution
                {
                    expectation 1e-3;
                    variance 1e-4;
                    minValue 1e-5;
                    maxValue 2e-3;
                }
            }
        }

See the new $FOAM_TUTORIALS/lagrangian/kinematicParcelFoam/spinningDisk tutorial
2021-12-15 10:46:34 +00:00
0e7920efc3 Merge branch 'feature-acceleration-relaxation' into 'develop'
ENH: rigidBodyMotion: new Function1-type accelerationRelaxation

See merge request Development/openfoam!520
2021-12-15 10:17:11 +00:00
208aee14af TUT: liquidFilmStepWithSprinkles: add shearStress entry 2021-12-15 10:17:04 +00:00
c47eb2fe80 TUT: replace turbulentTemperatureCoupledBaffleMixed boundary condition
The turbulentTemperatureCoupledBaffleMixed boundary condition
has been superseded by the turbulentTemperatureRadCoupledMixed condition

TUT: injectorPipe: remove an unused entry

TUT: waveMakerFlap: remove uncompressed entry
2021-12-15 10:17:04 +00:00
beea7ba62f TUT: nonOrthogonalChannel/skewnessCavity: migrate under verificationAndValidation
TUT: nonOrthogonalChannel: refactor productionRate computation (fixes #2285)
2021-12-15 10:17:04 +00:00
4c2728a45c ENH: rigidBodyMotion: new Function1-type accelerationRelaxation
TUT: floatingObject: add Function1-type accelerationRelaxation example
2021-12-15 10:17:04 +00:00
18dd013e22 Merge branch 'feature-sub-cooling-ext' into 'develop'
Additional sub-cooling heat transfer correlations for liquid H2

See merge request Development/openfoam!509
2021-12-15 10:16:49 +00:00
cd2e69923e STY: Function names and arguments order 2021-12-15 10:16:20 +00:00
e5b64f7740 ENH: Calculating L from saturation states. 2021-12-15 10:16:20 +00:00
43f904ba9c STYLE: phaseSystemModels: modernise code style
BUG: LemmertChawla: add missing write function

BUG: alphatPhaseChangeJayatillekeWallFunction:
     remove unused maxExp, Tw, and Tp objects

BUG: alphatFixedDmdtWallBoilingWallFunction: add missing ctor entries
2021-12-15 10:16:20 +00:00
50137a483d DOC: phaseSystemModels: improve header-file documentation 2021-12-15 10:16:20 +00:00
94b3e5b406 ENH: alphatBoilingWallFunction: add nucleating model
ENH: Copying alphatLiquid value to alphatVapour for boiling regimes.

When using correlations for boiling regimes the phases next to the
wall are not relevant to these. Therefore the alphat is copied
accordingly from the alphat for liquid.
Only in the sub-cooling RPI model the partition of heat flux
between vapour and liquid is considered.
2021-12-15 10:16:20 +00:00
29f2eddf80 ENH: Shirai: new TDNB model 2021-12-15 10:16:20 +00:00
63e294c55c ENH: Tatsumoto: new CHF sub-cooling model 2021-12-15 10:16:20 +00:00
c51fc0175e ENH: exponential: new nucleate flux model 2021-12-15 10:16:20 +00:00
1f0671694f ENH: Kutaledze: new nucleate flux model 2021-12-15 10:16:20 +00:00
6615699801 ENH: BreenWestwater: new film boiling model 2021-12-15 10:16:20 +00:00
17657673b2 ENH: Updating wall boiling models for new rho and Cp functions 2021-12-15 10:16:20 +00:00
f309319c06 BUG: Fixing Href for hPolynomialThermo.
Tref, Href , Sref and Pref are optional inputs to set the enthalpy
at Href for Tref. Pref is needed for the departure function EoS::H
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
b18dd0cb43 Merge branch 'feature-dynamic-solvers' into 'develop'
ENH: Adding dynamic-mesh motion capabilities to various solvers

See merge request Development/openfoam!505
2021-12-15 10:16:08 +00:00
18bc876c93 ENH: rhoCentralFoam: add dynamic-mesh motion capabilities
ENH: discard rhoCentralDyMFoam by merging it with rhoCentralFoam
2021-12-15 10:15:37 +00:00
445baaf277 ENH: buoyantPimpleFoam: add dynamic-mesh motion capabilities 2021-12-15 10:15:37 +00:00
19705bdd64 ENH: buoyantBoussinesqPimpleFoam: add dynamic-mesh motion capabilities 2021-12-15 10:15:37 +00:00
ee36fe8c0f ENH: Adding optional output fields for Tdew and HR 2021-12-14 10:32:48 -08:00
bc192e249c Merge branch 'feature-propeller-info' into 'develop'
Added new propellerInfo function object

See merge request Development/openfoam!519
2021-12-14 16:45:31 +00:00
fd257cb011 TUT: propeller - added example use of propellerInfo function object 2021-12-14 16:45:03 +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
692734bc69 BUG: Consistent addition of coefficients on mappedPAtch. Fixes #2294 2021-12-13 14:04:40 -08:00
7438aa6c01 Merge branch 'feature-interIsoFoam-update' into 'develop'
Update of interIsoFoam and isoAdvection extending to work with porous media

See merge request Development/openfoam!511
2021-12-13 17:11:34 +00:00
7b6572b483 ENH: geometricVoF: added profiling 2021-12-13 17:09:10 +00:00
5fa2bc030d TUT: discInConstantPorousFlow/porousDamBreak: new tutorials for interIsoFoam
TUT: create verificationAndValidation/multiphase
     directory and migrate StefanProblem into this
2021-12-13 17:09:10 +00:00
b7af3ff891 TUT: interIsoFoam: remove redundant entries 2021-12-13 17:09:10 +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
d2c1eac501 Merge branch 'feature-age-comfort' into 'develop'
INT: age/comfort: New field function objects

See merge request Development/openfoam!512
2021-12-13 17:07:00 +00:00
97081969b4 INT: comfortHotRoom: new tutorial for age and comfort function objects 2021-12-13 17:04:53 +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
644bd11a93 BUG: GAMG: manual processorAgglomerator incorrect input. See #2281. 2021-12-13 14:24:53 +00:00
eb3c806ff9 COMP: dynamicCode: add missing default constructor
Used copy constructor for dictionary. Probably not
necessary.
2021-12-13 13:20:04 +00:00
818a5c3dc2 BUG: swirlFanVelocity: incorrect writing. Fixes #2298. 2021-12-13 09:26:48 +00:00
c46216e645 COMP: Added missed file 2021-12-10 15:43:22 +00:00
7da2a5e096 ENH: redistributePar: reconstruct mode in collated. Fixes #2194 2021-12-10 15:24:04 +00:00
33b2e0df3d Merge branch 'feature-fvExpressionField' into 'develop'
New "exprField" function object

See merge request Development/openfoam!516
2021-12-10 14:46:33 +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
a6cbfcb9ba STYLE: qualify expression debug flags
- for debug/tracing handle the following keywords:

   * debug.driver   (was "debugBaseDriver")
   * debug.scanner  (was "debugScanner")
   * debug.parser   (was "debugParser")
2021-12-10 14:46:21 +00:00
510ffb3322 ENH: code reduction, improvements for expressions
- literal lookups only for expression strings

- code reduction for setExprFields.

- changed keyword "condition" to "fieldMask" (option -field-mask).
  This is a better description of its purpose and avoids possible
  naming ambiguities with functionObject triggers (for example)
  if we apply similar syntax elsewhere.

BUG: erroneous check in volumeExpr::parseDriver::isResultType()

- not triggered since this method is not used anywhere
  (may remove in future version)
2021-12-10 14:46:21 +00:00
39f6618d3a TUT: counterFlowFlame2D - corrected CH4 fraction. Fixes #2292 2021-12-10 14:34:05 +00:00
6be31e3feb ENH: pimpleFoam - added LTS support 2021-12-10 14:34:05 +00:00
af0b20779e Merge branch 'issues-2021-2' into 'develop'
BUG: 2021-2: Various bug fixes and developments

See merge request Development/openfoam!492
2021-12-09 18:49:20 +00:00
cad325f41f BUG: icoReactingMultiphaseInterFoam: enable phasesSystem surface tension models (Fixes #2228) 2021-12-09 18:49:02 +00:00
de90b2b28e BUG: rotateMesh: prevent double rotations (Fixes #2186) 2021-12-09 18:49:02 +00:00
8ac0548c6a BUG: solidificationMeltingSource: allow topology changes (Fixes #2026) 2021-12-09 18:49:02 +00:00
c8db0d135f BUG: solitaryWaveModel: avoid reference access to an operand object (Fixes #2178) 2021-12-09 18:49:02 +00:00
b053e2214c BUG: LESdelta: avoid double object registrations (Fixes #1171) 2021-12-09 18:49:02 +00:00
0c20256be5 BUG: LiquidEvapFuchsKnudsen: add missing particle surface area (Fixes #2069) 2021-12-09 18:49:02 +00:00
ae555ec744 BUG: alphatWallBoilingWallFunction: remove redundant phaseType=vapor entries (Fixes #2243) 2021-12-09 18:49:02 +00:00
ee955b19e5 STYLE: snappyHexMeshDict: remove excess entries 2021-12-09 17:09:34 +00:00
5b61013cf5 Merge branch 'feature-casting-oxide' into 'develop'
ENH: interfaceOxideRate: new mass transfer model for icoReactingMultiphaseInterFoam solver

See merge request Development/openfoam!510
2021-12-09 17:05:23 +00:00
1fca0d8d23 TUT: icoReactingMultiphaseInterFoam: new tutorial oxideFormation
Co-authored-by: sergio <s.ferraris@opencfd.co.uk>
2021-12-09 17:04:10 +00:00
60f3d416a6 ENH: InterfaceCompositionModels: add new thermo types for oxidation mass model 2021-12-09 17:04:10 +00:00
402bc0fef0 ENH: multiphaseSystem: add alpha1 boundary manipulation 2021-12-09 17:04:10 +00:00
437ea6917a ENH: timeVaryingMassSorption: new boundary condition for icoReacting solvers
Co-authored-by: Kutalmis Bercin <kutalmis.bercin@esi-group.com>
2021-12-09 17:04:10 +00:00
ea9d424e24 ENH: interfaceOxideRate: New mass transfer model
Based on:

    Cao, L., Sun, F., Chen, T., Tang, Y., & Liao, D. (2018).
    Quantitative prediction of oxide inclusion defects inside
    the casting and on the walls during cast-filling processes.
    International Journal of Heat and Mass Transfer, 119, 614-623.
    DOI:10.1016/j.ijheatmasstransfer.2017.11.127

Co-authored-by: Kutalmis Bercin <kutalmis.bercin@esi-group.com>
2021-12-09 17:04:10 +00:00
6580f1bbef ENH: interfaceCompositionModel: refactor Tactivate and includeDivU funcs 2021-12-09 17:04:10 +00:00
142fc55f44 TUT: icoReactingMultiphaseInterFoam: correct the directory name 2021-12-09 17:04:10 +00:00
f67406ddb2 Merge branch 'feature-liquidFilm' into 'develop'
ENH: New liquid film features

See merge request Development/openfoam!508
2021-12-09 17:02:18 +00:00
e479f842b3 ENH: liquidFilmModel: change default write option to NO_WRITE for few fields 2021-12-09 17:01:46 +00:00
b69ceb54a7 ENH: Adding shear stress to the film from the wall function
TUT: inclinedPlaneFilm/pitzDailyWithSprinklers: add shearStress model
2021-12-09 17:01:46 +00:00
9e8fd66ed2 BUG: faOption-limitVelocity: remove remnants of fvOption
COMP: ensure compilation of faOption-limitVelocity
2021-12-09 17:01:46 +00:00
eabafe5f9e BUG: filmTurbulenceModel: fix film friction models
STYLE: filmTurbulenceModel: add default destructor
2021-12-09 17:01:46 +00:00
9024441566 ENH: iglooWithFridges: demonstrate threaded, collated handling. See #2194. 2021-12-09 16:33:26 +00:00
c3c23c3cb2 ENH: allow top-level definition of function object name scoping
- this refines commit c233961d45, which added prefix scoping.

  Default is now off (v2106 behaviour).

  The 'useNamePrefix' keyword can be specified on a per function basis
  or at the top-level of "functions".

  ```
      functions
      {
          errors          warn;
          useNamePrefix   true;

          func1
          {
              type  ...;
              useNamePrefix   false;
          }

          func2
          {
              type  ...;
              // Uses current default for useNamePrefix
          }
      }
  ```
2021-12-09 15:42:51 +01:00
638d1fe8f6 BUG: blockMesh verbosity set too late
- sort out the command-line vs dictionary vs default logic *before*
  constructing any other members since they too are influenced by the
  verbosity.
2021-12-09 15:42:51 +01:00
fde3904796 GIT: relocate PrecisionAdaptor to memory/ 2021-12-09 15:42:51 +01:00
698ff5eedc STYLE: inherit SubField from FieldBase instead of refCount
- at the moment there is no significant difference since FieldBase is
  essentially just a refCount anyhow, but changing the inheritance
  ensures that reinterpret casting from SubField -> Field will
  continue to work if FieldBase is changed in the future.
2021-12-09 15:42:51 +01:00
efb187e3f7 ENH: support optional dimensionSet reading 2021-12-09 15:42:46 +01:00
8c98906780 ENH: MRFZone|List - enable re-reading; code clean-up 2021-12-09 13:33:13 +00:00
d7f7267165 Merge branch 'fix-2291-patchProbes' into 'develop'
ENH: patchProbes: output patch. Fixes #2291.

See merge request Development/openfoam!515
2021-12-09 09:23:00 +00:00
f19883c0c6 ENH: patchProbes: output patch. Fixes #2291. 2021-12-09 09:20:19 +00:00
aaf4f40bf7 Merge branch 'feature-adjoint-smoothed-sensitivity-map' into 'develop'
Added functionality for smoothing the sensitivity derivatives

See merge request Development/openfoam!504
2021-12-09 09:18:36 +00:00
f6dfa76f6d TUT: updated the motorbike tutorial
to also compute smoothed sensitivity maps
2021-12-09 09:18:02 +00:00
90d62c33e4 INT: Minor integration updates 2021-12-09 09:18:02 +00:00
3ef0d19ef4 ENH: added functionality for smoothing the sensitivity derivatives
A Helmholtz-like filter is applied to the original field of sensitivity
derivatives. The corresponding PDE is solved on the sensitivity patches,
using the finite area infrastructure. A smoothing radius is needed,
which is computed based on the average 'length' of the boundary faces,
if not provided by the user explicitly.

If an faMesh is provided, it will be used; otherwise it will be created
on the fly based on either an faMeshDefinition dictionary in system or
one constructed internally based on the sensitivity patches.
2021-12-09 09:18:02 +00:00
0343d3d7e9 Merge branch 'feature-nonorthogonal-correction-schemes' into 'develop'
ENH: New schemes for non-orthogonal meshes

See merge request Development/openfoam!502
2021-12-08 12:08:01 +00:00
ada3d1c77e TUT: nonOrthogonalChannel: new non-orthogonality test case 2021-12-08 12:07:26 +00:00
86da88cdfd ENH: Added relaxed nonOrthogonal laplacian corrector scheme 2021-12-08 12:07:26 +00:00
391c1eaa40 ENH: snGradSchemes: new scheme relaxedSnGrad
Surface gradient scheme with under-/over-relaxed
full or limited explicit non-orthogonal correction.

A minimal example by using system/fvSchemes:

  snGradSchemes
  {
      snGrad(<term>)       relaxed;
  }

and by using system/fvSolution:

  relaxationFactors
  {
      fields
      {
          snGrad(<term>)   <relaxation factor>;
      }
  }
2021-12-08 12:07:26 +00:00
37a6fc8db3 STYLE: snGradSchemes: modernise and clean up code
ENH: removes an unused scalarField from skewCorrectedSnGrad

DOC: snGradSchemes: improve header-file documentation
2021-12-08 12:07:26 +00:00
96821f70cd Merge branch 'feature-skew-corrected-gradient' into 'develop'
ENH: New gradient scheme iterativeGaussGrad

See merge request Development/openfoam!500
2021-12-08 11:05:43 +00:00
cac0bf856b TUT: skewnessCavity: new skewness test case 2021-12-08 11:05:06 +00:00
adf6869bba ENH: gradSchemes: new gradient scheme iterativeGaussGrad
A second-order gradient scheme using face-interpolation,
Gauss' theorem and iterative skew correction.

Minimal example by using system/fvSchemes:

  gradSchemes
  {
    grad(<term>) iterativeGauss <interpolation scheme> <number of iters>;
  }
2021-12-08 11:05:06 +00:00
563456087c STYLE: gradSchemes: modernise and clean up code 2021-12-08 11:05:06 +00:00
41b30af01a TUT: pisoFoam/RAS/cavity - updated FOreference 2021-12-08 10:00:46 +00:00
f6ccd77d8c BUG: sampledSets - ensure results are written on all procs 2021-12-07 21:09:14 +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
b25e1486de CONFIG: adjust paraview libs, intelmpi handling
- fix overly aggressive match in the API value

- allow `INTELMPI*` generic value, this can be used to specify something
  like INTELMPI_custom and populate the corresponding wmake rule
  manually

STYLE: mention FOAM_BUILDROOT in wmake -help-full output

STYLE: adjust openfoam shell session welcome information

- adjust internal variable names to reduce collision potential

- improve handling of openfoam -etc=...
2021-12-07 15:22:32 +01:00
810d0c72ee Merge branch 'feature-sampled-sets-extension' into 'develop'
sampledSets - enable writer construction from dictionary; glTF export

See merge request Development/openfoam!503
2021-12-06 13:14:09 +00:00
34b4770949 TUT: Added glTF export example for field and track data 2021-12-06 12:26:49 +01:00
85b405206d ENH: Added new glTF sammpled set writer
Description
    Writes point data in glTF v2 format

    Two files are generated:
    - filename.bin  : a binary file containing all scene entities
    - filename.gltf : a JSON file that ties fields to the binary data

    The output can contain both geometry and fields, with additional support
    for colours using a user-supplied colour map, and animation of particle
    tracks.

    Controls are provided via the optional formatOptions dictionary.

    For non-particle track data:

    \verbatim
    formatOptions
    {
        // Apply colours flag (yes | no ) [optional]
        colours     yes;

        // List of options per field
        fieldInfo
        {
            p
            {
                // Colour map [optional]
                colourMap       <colourMap>;

                // Colour map minimum and maximum limits [optional]
                // Uses field min and max if not specified
                min             0;
                max             1;

                // Alpha channel [optional] (uniform | field)
                alpha           uniform;
                alphaValue      0.5;

                //alpha           field;
                //alphaField      T;
                //normalise       yes;
            }
        }
    }
    \verbatim

    For particle tracks:

    \verbatim
    formatOptions
    {
        // Apply colours flag (yes | no) [optional]
        colours     yes;

        // Animate tracks (yes | no) [optional]
        animate     yes;

        // Animation properties [optional]
        animationInfo
        {
            // Colour map [optional]
            colourMap       <colourMap>;

            // Colour [optional] (uniform | field)
            colour          uniform;
            colourValue     (1 0 0); // RGB in range [0-1]

            //colour          field;
            //colourField     d;

            // Colour map minimum and maximum limits [optional]
            // Note: for colour = field option
            // Uses field min and max if not specified
            min             0;
            max             1;

            // Alpha channel [optional] (uniform | field)
            alpha           uniform;
            alphaValue      0.5;

            //alpha           field;
            //alphaField      T;
            //normalise       yes;
        }
    }
    \endverbatim

Note
    When writing particle animations, the particle field and colour properties
    correspond to initial particle state (first data point) and cannot be
    animated (limitation of the file format).

    For more information on the specification see
    https://www.khronos.org/registry/glTF/
2021-12-06 12:26:49 +01:00
0f155daf86 ENH: particleTracks - updated to include field data
The utility will now add field data to all tracks (previous version only
created the geometry)

The new 'fields' entry can be used to output specific fields.

Example

    cloud           reactingCloud1;

    sampleFrequency 1;

    maxPositions    1000000;

    fields          (d U); // includes wildcard support

STYLE: minor typo fix
2021-12-06 12:26:49 +01:00
98c25d163a ENH: sampledSets - enable writer construction from dictionary
Users can now include additional controls via a new formatOptions dictionary.
2021-12-06 12:26:48 +01:00
e5267bf81d ENH: sampledSetWriters - updated writing of particle tracks 2021-12-06 12:26:48 +01:00
79fafda22c ENH: Cloud - added function to read cloud fields from disk to obr 2021-12-06 12:26:48 +01:00
f5f93e81d8 COMP: temperatureCoupledBase: make API consistent. Fixes #2287. 2021-12-06 10:54:43 +00:00
29f7fcc515 COMP: workaround clang-13 optimization issue (vtk handling) 2021-12-03 21:23:44 +01:00
9a5125111e ENH: add coded Function1 (#2282)
- update coded templates with qualified names

GIT: add in missing PatchFunction1 constant() method

- was missed in a previous commit
2021-12-03 20:56:10 +01:00
8624d65c5a ENH: support alternative build-root location (#2286)
- specify any of these

    ./Allwmake -build-root=...
    wmake -build-root=...
    FOAM_BUILDROOT=... wmake

  these specify an alternative root where build artifacts are to land.
  Currently only used as an alternative for the 'build/' hierarchy
  since the 'platforms/' target normally includes inputs as well.

  Possible use:
  ```
  (
      export WM_MPLIB="%{foam_mplib}"
      export FOAM_MPI="%{foam_mpi}"
      export MPI_ARCH_PATH="%{mpi_prefix}"

      export FOAM_BUILDROOT=/tmp/mpibuild
      export FOAM_MPI_LIBBIN="$FOAM_BUILDROOT/platforms/$WM_OPTIONS/lib/$FOAM_MPI"

      src/Pstream/Allwmake-mpi
   )
   ```
2021-12-03 17:10:22 +01:00
27e57c29f7 BUG: dangling dictionary reference for expression BCs
- exposed by the new embedded function handling.

  Requires local copies of dictionary content instead
  (similar to coded BCs handling)

BUG: incorrect formatting for expression function output

ENH: simpler copyDict version taking wordList instead of wordRes

- corresponds to the most common use case at the moment

ENH: expression string writeEntry method

- write as verbatim for better readability
2021-12-03 17:10:22 +01:00
e09298092d ENH: support negated regular expressions (#2283)
- extendes the prefix syntax to handle '!' values.

  For example,  "(?!).*processor.*" or "(?!i)inlet.*"
2021-12-03 17:10:22 +01:00
49e26dd7d2 ENH: consistent specification of fan conditions (fixes #2279) 2021-12-03 17:10:22 +01:00
31a7c2a9cd ENH: initial use of ReactionTable to wrap information 2021-12-03 17:10:22 +01:00
c7f30a0989 STYLE: use Hash<word> instead of string::hasher for runTimeSelectionTables 2021-12-03 15:55:19 +01:00
bdf77bbdd1 ENH: simplify hashing overloads of string-types
- this revises the changes made in 95cd8ee75c to replace the
  SFINAE-type of handling of string hashes with direct definitions.

  This places a bit more burden on the developer if creating hashable
  classes derived from std::string or variants of Foam::string, but
  improves reliability when linking.

STYLE: drop template key defaulting from HashSet

- this was never used and `HashSet<>` is much less transparent
  than writing `HashSet<word>` or `wordHashSet`
2021-12-03 15:55:19 +01:00
939c335504 INT: liquidProperties: support for user defined liquid properties (#2141)
- Generic thermophysical properties class for a liquid in which the
  functions and coefficients for each property are run-time selected.

  Code adapted from openfoam.org
2021-12-03 15:54: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
ed5dee71a4 BUG: ccm region merge fails (fixes #2048)
- had lookups into the merge-point map instead of
  determining/remapping the duplicate points directly.
  The result was a jumble of face/point addressing.

STYLE: additional debug/verbosity comment for mergePoints
2021-12-03 15:32:37 +01:00
e6f4ae927a LINT: script not marked as bash-specific
CONFIG: cleanup additional build-related env variables
2021-12-03 15:32:37 +01:00
8ed6a61106 CONFIG: set API level to 2109
- Function1, sampledSets, expressions, runTime selection tables
2021-12-03 15:32:37 +01:00
78cc5f8676 SUBMODULE: entries marked as removable, compilation fixes 2021-12-03 15:32:37 +01:00
f7c7fa94a3 ENH: add Function1 constant() member
- marks if the value is considered to be independent of 'x'.
  Propagate into PatchFunction1 instead ad hoc checks there.

- adjust method name in PatchFunction1 to 'whichDb()' to reflect
  final changes in Function1 method names.

ENH: add a Function1 'none' placeholder function

- This is principally useful for interfaces that expect a Function1
  but where it is not necessarily used by a particular submodel.

TUT: update Function1 creation to use objectRegistry
2021-12-03 15:32:37 +01:00
b96cef1339 ENH: [sampled]DistanceSurface - added construct from searchableSurface 2021-12-03 13:48:34 +00:00
9cf26ac7c5 BUG: InjectionModel::findCellAtPosition - celli can be zero 2021-12-03 13:48:34 +00:00
9833e614da BUG: surfaceAlignedSBRStressFvMotionSolver - corrected units (see #2265)
Note - this resolves the reported dimensions error, but it is not clear
if this code (has ever?) run or if this change is appropriate...
2021-12-03 13:48:34 +00:00
6aa608cf33 ENH: MRF - exposed origin and axis; added lookup from name 2021-12-03 13:48:33 +00:00
53e9c8eb5a ENH: forces|Coeffs FO - updated coordinate system 2021-12-03 13:48:33 +00:00
8fc4501c46 Merge branch 'feature-turbulentTemperature_Function1' into 'develop'
ENH: coupling BC: allow Function1. Fixes #2277.

See merge request Development/openfoam!507
2021-12-02 18:03:17 +00:00
29c70e9bbb ENH: coupling BC: allow Function1. Fixes #2277. 2021-12-02 18:03:16 +00:00
6abbcb3eac BUG: GAMG: processorAgglomerator crashes. Fixes #2281.
Problem was extending the storage, copying the
original contents.
2021-11-29 14:44:24 +00:00
2880a54373 Merge branch 'feature-expr-improvements' into 'develop'
Updates for expressions to improve robustness and support functions, external context etc.

See merge request Development/openfoam!501
2021-11-26 12:16:45 +00:00
c0adccf826 ENH: generalize volField lookups to include 'context' objects
- allows an additional HashTable of pointers to reference external
  content which not otherwise directly available via an
  objectRegistry.

  This could typically be used to provide a function-local "rho"
  to the expression evaluation.
2021-11-26 12:24:35 +01:00
643763d258 ENH: add cell/face set/zone support for patch expressions
- for cell quantities, these evaluate on the faceCells associated with
  that patch to produce a field of true/false values

- for face quantities, these simply correspond to the mesh faces
  associated with that patch to produce a field of true/false values
2021-11-26 12:24:35 +01:00
fc6239d96e ENH: add expression support for scalar/vector expression lookups
- similar idea to swak timelines/lookuptables but combined together
  and based on Function1 for more flexibility.

  Specified as 'functions<scalar>' or 'functions<vector>'.
  For example,

  functions<scalar>
  {
      intakeType table ((0 0) (10 1.2));

      p_inlet
      {
          type        sine;
          frequency   3000;
          scale       50;
          level       101325;
      }
  }

  These can be referenced in the expressions as a nullary function or a
  unary function.

  Within the parser, the names are prefixed with "fn:" (function).
  It is thus possible to define "fn:sin()" that is different than
  the builtin "sin()" function.

     * A nullary call uses time value
       - Eg, fn:p_inlet()

     * A unary call acts as a remapper function.
       - Eg, fn:intakeType(6.25)
2021-11-26 12:24:35 +01:00
e6697edb52 ENH: robuster lemon parsing
- previously simply reused the scan token, which works fine for
  non-nested tokenizations but becomes too fragile with nesting.

  Now changed to use tagged unions that can be copied about
  and still retain some rudimentary knowledge of their types,
  which can be manually triggered with a destroy() call.

- provide an 'identifier' non-terminal as an additional catch
  to avoid potential leakage on parsing failure.

- adjust lemon rules and infrastructure:

  - use %token to predefine standard tokens.
    Will reduce some noise on the generated headers by retaining the
    order on the initial token names.

  - Define BIT_NOT, internal token rename NOT -> LNOT

- handle non-terminal vector values.
  Support vector::x, vector::y and vector::z constants

- permit fieldExpr access to time().
  Probably not usable or useful for an '#eval' expression,
  but useful for a Function1.

- provisioning for hooks into function calls. Establishes token
  names for next commit(s).
2021-11-26 12:24:35 +01:00
adbcd3a19f Merge branch 'feature-functionObject-Function1' into 'develop'
Function1 objectRegistry access

See merge request Development/openfoam!499
2021-11-26 11:24:13 +00:00
adcf41bd13 ENH: add Function1 wrapping for functionObject trigger
Returns a 0/1 value corresponding to function object trigger levels.

    Usage:
    \verbatim
        <entryName> functionObjectTrigger;
        <entryName>Coeffs
        {
            triggers        (1 3 5);
            defaultValue    false;  // Default when no triggers activated
        }
    \endverbatim

ENH: add reset() method for Constant Function1

ENH: allow forced change of trigger index

- the triggers are normally increase only,
  but can now override this optionally
2021-11-26 11:22:36 +00:00
30a2fa4b27 BUG: dsmcFields fails with scoped field names 2021-11-26 11:22:36 +00:00
89ddc271c7 ENH: LimitRange Function1 - extended and renamed
Description
    Function1 wrapper that maps the input value prior to it being used by
    another Function1.

    Example usage for limiting a polynomial:
    \verbatim
        <entryName>
        {
            type            inputValueMapper;
            mode            minMax;

            min             0.4;
            max             1.4;

            value polynomial
            (
                (5 1)
                (-2 2)
                (-2 3)
                (1 4)
            );
        }
    \endverbatim

    Here the return value will be:
    - poly(0.4) for x <= 0.4;
    - poly(1.4) for x >= 1.4; and
    - poly(x) for 0.4 < x < 1.4.

    Example usage for supplying a patch mass flux for a table lookup:
    \verbatim
        <entryName>
        {
            type            inputValueMapper;
            mode            function;

            function
            {
                type            functionObjectValue;
                functionObject  surfaceFieldValue1;
                functionObjectResult sum(outlet,phi);
            }

            value
            {
                type        table;
                file        "<system>/fanCurve.txt";
            }
        }
    \endverbatim

    Where:
    \table
        Property | Description                                  | Required
        mode     | Mapping mode (see below)                     | yes
        function | Mapping Function1                            | no*
        min      | Minimum input value                          | no*
        max      | Maximum input value                          | no*
        value    | Function of type Function1<Type>             | yes
    \endtable

    Mapping modes include
    - none     : the input value is simply passed to the 'value' Function1
    - function : the input value is passed through the 'function' Function1
                 before being passed to the 'value' Function1
    - minMax   : limits the input value to 'min' and 'max' values before being
                 passed to the 'value' Function1

Note
    Replaces the LimitRange Function1 (v2106 and earlier)
2021-11-26 11:22:36 +00:00
ba45fb2cba ENH: Function1 - updated time-based Function1 usage 2021-11-26 11:22:36 +00:00
f6ee1811e7 STYLE: renamed convertTimeBase to more descriptive userTimeToTime 2021-11-26 11:22:36 +00:00
098aec4962 ENH: Function1's - added objectRegistry access 2021-11-26 11:22:36 +00:00
889bc171d9 TUT: Added example showing use of functionObject result lookup from a Function1 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
9194cd5203 ENH: Deprecated TimeFunction1 usage in favour of Function1 2021-11-26 11:22:36 +00:00
925a2e724b ENH: add caching selector to PatchFunction1
- extend handling of uniform PatchFunction1 to include new Function1
  types and pass through the objectRegistry information
2021-11-26 11:22:36 +00:00
f29eb55cee ENH: Refactored TimeFunction1 - now possible using Function1 directly 2021-11-26 11:22:36 +00:00
b9b011f5ea ENH: Added new sample Function1 2021-11-26 11:22:36 +00:00
bc2b469f9d ENH: Added new Function1: FunctionObjectValue
Returns a value retrieved from a function object result.

Usage:
    <entryName> functionObjectValue;
    <entryName>Coeffs
    {
        functionObject          <name>;
        functionObjectResult    <function object result field name>
    }
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
70b55be684 COMP: Function1 - propagated API change resulting from new objectRegistry access 2021-11-26 11:22:36 +00:00
c1a04abd96 ENH: Function1 - added optional objectRegistry reference
Function1 can now be created with an object registry, e.g. time or mesh
database. This enables access to other stored objects, e.g. fields,
dictionaries etc. making Function1 much more flexible.

Note: will allow TimeFunction1 to be deprecated
2021-11-26 11:22:36 +00:00
aeef96251f ENH: Refactored stateFunctionObject
- created new functionObjects::properties class derived from IOdictionary
  - replaces raw state IOdictionary owned by functionObjectList
  - state dictionary access/manipulators moved from stateFunctionObject
- stateFunctionObject now acts as a light wrapper around
  functionObjecties::properties
- updated dependent code
2021-11-26 11:22:36 +00:00
b19e767b8f ENH: sampledSets - added min,max,average values to the results dict 2021-11-26 11:22:36 +00:00
f078643f8c ENH: add blockFaces.vtp output for blockMesh -write-vtk 2021-11-25 20:02:09 +01:00
f459b11e24 STYLE: direct iteration over dictionary entries 2021-11-25 20:02:08 +01:00
bcf8a48c68 CONFIG: add build information into shell session
- more closely reflect what the binaries report
- report the installation path
- change PS1 case/separator to roughly correspond to package names

STYLE: adjust README to mention upcoming v2112
2021-11-25 17:36:37 +01:00
1804d3fed5 ENH: additional #word and #message dictionary directives (#2276)
- use `#word` to concatenate, expand content with the resulting string
  being treated as a word token. Can be used in dictionary or
  primitive context.

  In dictionary context, it fills the gap for constructing dictionary
  names on-the-fly. For example,

  ```
  #word "some_prefix_solverInfo_${application}"
  {
      type    solverInfo;
      libs    (utilityFunctionObjects);
      ...
  }
  ```

  The '#word' directive will automatically squeeze out non-word
  characters. In the block content form, it will also strip out
  comments. This means that this type of content should also work:

  ```
  #word {
     some_prefix_solverInfo
     /* Appended with application name (if defined) */
     ${application:+_}  // Use '_' separator
     ${application}     // The application
  }
  {
      type    solverInfo;
      libs    (utilityFunctionObjects);
      ...
  }
  ```
  This is admittedly quite ugly, but illustrates its capabilities.

- use `#message` to report expanded string content to stderr.
  For example,

  ```
  T
  {
     solver          PBiCG;
     preconditioner  DILU;
     tolerance       1e-10;
     relTol          0;
     #message "using solver: $solver"
  }
  ```
  Only reports on the master node.
2021-11-25 17:05:37 +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
ccb0fd9cf0 EMH: Adding layers option and writing out HR and Tdew fields for
humidityTemperature BC
2021-11-24 15:52:24 -08:00
6712548137 Merge branch 'feature-electrodeposition' into 'develop'
ENH: New suite for electrostatic deposition applications

See merge request Development/openfoam!496
2021-11-24 18:06:39 +00:00
27f4cee78d TUT: interFoam: new tutorial for electrostatic deposition 2021-11-24 18:05:58 +00:00
19f7825a04 ENH: electrostaticDeposition: new finiteVolume boundary condition 2021-11-24 18:05:58 +00:00
aaeddba466 ENH: electricPotential: new solver function object 2021-11-24 18:05:58 +00:00
fd9670d4a3 ENH: add objectRegistry handling to expressions driver
- needed for future embedding
2021-11-23 13:37:37 +01:00
fbd7b78999 ENH: make expressions::FieldAssociation a common enum
- use FACE_DATA (was SURFACE_DATA) for similarity with polySurface

ENH: add expression value enumerations and traits

- simple enumeration of standard types (bool, label, scalar, vector)
  that can be used as a value type-code for internal bookkeeping.

GIT: relocate pTraits into general traits/ directory
2021-11-23 12:53:45 +01:00
141403ed98 BUG: compare of two zero-sized faces was returning false 2021-11-23 10:31:24 +01:00
d710bb6595 TUT: Rename tutorial 2021-11-22 09:44:46 -08:00
bb7d8d0f4d BUG: mapped: make consistent with AMI. Fixes #2275 2021-11-22 12:21:13 +00:00
39d244ad91 ENH: add check for isTimeDb() into objectRegistry
- add missing time() into pointMesh

STYLE: use static_cast instead of dynamic_cast for Time -> objectRegistry
2021-11-17 19:52:33 +01:00
1af0380edc Merge branch 'feature-dictionary-reporting' into 'develop'
ENH: report dictionary defaults with Executable prefix

See merge request Development/openfoam!498
2021-11-17 17:33:01 +00:00
3d889b6dbf ENH: report dictionary defaults with Executable prefix
- provides better context when default values are accessed from
  a dictionary than reporting a source file location.
2021-11-17 16:04:46 +01:00
bb771a3caf GIT: remove spurious method declaration in regIOobject
STYLE: adjust param/return for internal readStream method
2021-11-17 16:04:40 +01:00
92d52243af ENH: support cref() and shallow copies (refPtr and tmp)
- enables building HashTables with shadowed variables

- support good() and valid() as synonyms in memory classes
2021-11-17 16:04:40 +01:00
96735dce20 ENH: expose ITstream hasPutback to allow better handling
STYLE: relocate ITstream::parseStream from static to file-scope
2021-11-17 16:04:40 +01:00
4e59ad9d8d ENH: make objectRegistry::cfindIOobject public 2021-11-15 22:13:21 +01:00
28800dcbbc LINT: fix permissions 2021-11-15 21:22:36 +01:00
effd69a005 ENH: add refPtr release() method
- releases ownership of the pointer. A no-op (and returns nullptr)
  for references.

  Naming consistent with unique_ptr and autoPtr.

DOC: adjust wording for memory-related classes

- add is_const() method for tmp, refPtr.

  Drop (ununsed and confusing looking) isTmp method from refPtr
  in favour of is_pointer() or movable() checks

ENH: noexcept for some pTraits methods, remove redundant 'inline'

- test for const first for tmp/refPtr (simpler logic)
2021-11-15 19:34:01 +01:00
9c9d6c64b5 DEFEATURE: remove general objects storage from exprResult
- unused, generally fragile.
2021-11-15 19:19:55 +01:00
adb01bddf4 ENH: use float-narrowing for ensight set writer
- replaces hand-rolled checks

STYLE: minor cleanup of ensightPTraits
2021-11-15 18:14:16 +01:00
e62a260bdd ENH: rhoThermos: enable new set of combinations 2021-11-15 18:14:16 +01:00
8e887d3395 BUG: snappyHexMesh: parallel consistency. Fixes #2271. 2021-11-15 11:46:38 +00:00
168c13c514 ENH: cht: suppress printing of thicknessLayers. Fixes #2266 2021-11-11 08:54:42 +00:00
ba93392f69 Merge branch 'feature-Function1-fvSolution' into 'develop'
ENH: fvSolution: allow Function1 for all scalars

See merge request Development/openfoam!497
2021-11-10 19:06:49 +00:00
53e8f2a807 ENH: fvSolution: allow Function1 for all scalars
TUT: demonstrate some ramping

- compressible/rhoPimpleFoam/RAS/angledDuct
2021-11-10 17:28:52 +01:00
ba95b89e5f ENH: add Function1 caching selector 2021-11-10 17:28:45 +01:00
fd82f3e47a ENH: distinguish between compressible/incompressible coded source
- previously had codeAddSup used for both incompressible and
  compressible source terms. However, it was not actually possible to
  use it for compressible sources since any references to the 'rho'
  parameter would cause a compilation error for the incompressible case.

  Added 'codeAddSupRho' to distinguish the compressible case.
  User must supply one or both of them on input.
2021-11-09 21:48:42 +01:00
8638d82325 ENH: additional dictionary controls, methods
STYLE: declaration order of topoSet, resize_nocopy for sortedOrder

STYLE: remove cstring dependency from SHA1

STYLE: use Ostream endEntry()
2021-11-09 21:33:32 +01:00
79e110aeb0 ENH: update lemon version, wmake wrappers 2021-11-09 21:17:51 +01:00
a78e79908b ENH: additional decompose options
- decomposePar: -no-fields to suppress decomposition of fields

- makeFaMesh: -no-decompose to suppress creation of *ProcAddressing
  and fields, -no-fields to suppress decomposition of fields only
2021-11-09 15:44:54 +01:00
e8aa3aad25 ENH: simple detection for collapsed block descriptions
- switch from default topology merge to point merge if degenerate
  blocks are detected. This should alleviate the problems noted in
  #1862.

  NB: this detection only works for blocks with duplicate vertex
      indices, not ones with geometrically duplicate points.

ENH: add patch block/face summary in blockMesh generation

- add blockMesh -verbose option to override the static or dictionary
  settings.  The -verbose option can be used multiple times to increase
  the verbosity.

ENH: extend hexCell handling with more cellShape-type methods

- allows better reuse in blockMesh.
  Remove blockMesh-local hex edge definitions that shadowed the
  hexCell values.

ENH: simplify some of the block-edge internals
2021-11-09 15:44:54 +01:00
5a121119e6 ENH: add -verbose support into argList
- similar to -dry-run handling, can be interrogated from argList,
  which makes it simpler to add into utilities.

- support multiple uses of -dry-run and -verbose to increase the
  level. For example, could have

    someApplication -verbose -verbose

 and inside of the application:

    if (args.verbose() > 2) ...

BUG: error with empty distributed roots specification (fixes #2196)

- previously used the size of distributed roots to transmit if the
  case was running in distributed mode, but this behaves rather poorly
  with bad input. Specifically, the following questionable setup:

      distributed true;
      roots ( /*none*/ );

  Now transmit the ParRunControl distributed() value instead,
  and also emit a gentle warning for the user:

      WARNING: running distributed but did not specify roots!
2021-11-09 15:44:54 +01: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
9371c517b9 COMP: adjust include guards 2021-11-09 12:18:07 +01:00
d4f3581265 BUG: createPhiv - updated flux call 2021-11-08 19:32:13 +00:00
c8ba81f92c Merge branch 'feature-one-equation-turbulence-model' into 'develop'
ENH: new RANS model for geophysical applications

See merge request Development/openfoam!493
2021-11-08 18:58:07 +00:00
f05dc09692 TUT: atmFlatTerrain: add an example for kL RANS model
BUG: atmFlatTerrain: fix input settings in the plot script
2021-11-08 18:56:59 +00:00
76dcc4f28f ENH: kL: new RANS model for geophysical applications
STYLE: atmosphericModels: regroup atmospheric turbulence models
ENH: kEpsilonLopesdaCosta: enable this RANS model for compressible applications
2021-11-08 18:56:59 +00:00
b90ba9d125 ENH: noiseModel updates. Fixes #2263
- updated safeLog10 - returns -GREAT instead of zero
- enabled reference for dB calc to be user defined

Cross reference exchange platform 1689
2021-11-08 18:48:46 +00:00
6102b76377 Merge branch 'feature-finiteArea-fixes' into 'develop'
parallel construct finiteArea with arbitrary connections

See merge request Development/openfoam!490
2021-11-05 18:08:12 +00:00
7fc943c178 ENH: improvements for makeFaMesh, checkFaMesh
- added -dry-run, -write-vtk options.
  Additional mesh information after creation.

- add parallel reductions and more information for checkFaMesh

ENH: minor cleanup of faPatch internals

- align pointLabels and pointEdges creation more closely with coding
  patterns used in PrimitivePatch

- use fileHandler when loading "S0" field.
2021-11-05 18:07:36 +00:00
a95427c28a ENH: improve handling of area calculations in faMesh (#2233)
- previous handling did not correctly account for off-processor
  connections (SEGFAULT).

- revised the point/area normal calculations to use the dual of the
  faces. This simplifies the logic and reduces the depth of loops.

  Point corrections from the neighbouring patches is handled
  centrally by the new halo face information, which properly handles
  on-processor or off-processor faces irrespective of any explicit
  processor patches.

STYLE: local function and add comments for finiteArea area weighting

- following the original Tukovic code, the area-weighted normal
  for a vector pair (defining a triangle) is weighted by
    (1) area : larger weight for larger areas
    (2) sin  : lower weight for narrow angles (eg, shards)
    (3) invDist squared : lower weights for distant points

  Refactored to eliminate intermediate operations, some additional
  divide-by-zero protection - similar to vector normalise()
2021-11-05 18:07:36 +00:00
ea92cb82c4 ENH: add boundary halo handling to faMesh
- the finiteArea is typically restricteed to one or more patches on a
  polyMesh but will have an external connectivity to other parts of
  the polyMesh. For proper determination of the point normals (for
  example), the neighbouring information is needed.

  These outside 'halo' faces can be located on different processors,
  but not correspond to an internal processor-processor interface.

  Add a dedicated form of mapDistribute for swapping this type of
  information. Since this is a collective operation, locate
  corresponding methods directly on the faMesh level instead of
  the faPatch level.
2021-11-05 18:07:36 +00:00
8e45108905 BUG: parallel construct finiteArea fails with arbitrary connections (#2152)
- the case of 'fan-like' processor was previously assumed to be
  rare (see merge-request !490 and issue #2084).

  However, Vaggelis Papoutsis noticed that even fairly normal geometries
  can trigger problems.

- replaced the old patch/patch matching style with a more general
  edge-based synchronisation and matching that appears to handle
  the corner cases inherently. The internal communication overhead
  is essentially unchanged, and the logic is simpler.

ENH: additional framework for managing patch connectivity
2021-11-05 18:07:36 +00:00
9c1f94d4fd BUG: parallel blocking with faFieldDecomposer, faMeshReconstructor (fixes #2237)
- the patch remapping in faFieldDecomposer calls weights
  internalField() which can trigger parallel communication on the
  complete mesh for some processors only (ie, blocks).

  Force a priori creation of weights instead.

- ensure that the complete mesh (reconstruction helper)
  is serial when adding patches.
2021-11-05 18:07:36 +00:00
a809265432 BUG: incorrect finite-area faceProcAddressing (fixes #2155)
- when creating a finite-area mesh in parallel, need to determine
  the equivalent ProcAddressing for the faMesh.

  In the faceProcAddressing the collected and sorted order was being
  scattered directly back to the individual processors instead of only
  the sections relevant to each particular processor.

  This caused the observed jumbled order for reconstructed fields.
2021-11-05 18:07:36 +00:00
38bf30167d Merge branch 'feature-runTimeCompat' into 'develop'
long-term maintenance improvement for runTime selection tables

See merge request Development/openfoam!481
2021-11-05 18:06:31 +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
4fc6ec1d1d ENH: define singleton-style lookups for runTime selection, alias handling
- this makes the lookup and use of tables slightly cleaner and
  provides a hook for update (compat) messages

  The singleton-style method returns the function pointer directly,
  or nullptr on not-found.

  NEW access method (mnemonic: 'ctor' prefix for constructors)

  ```
  auto* ctorPtr = dictionaryConstructorTable(modelType);

  if (!ctorPtr)
  {
      ...
  }

  return autoPtr<myModel>(ctorPtr(dict, ...));
  ```

  OLD method, which also still works, but without any compat handling:

  ```
  auto ctorIter = dictionaryConstructorTablePtr_->cfind(modelType);

  if (!ctorIter.found())
  {
      ...
  }

  return autoPtr<myModel>(ctorIter()(dict, ...));
  ```
2021-11-05 17:21:27 +01:00
794e23e083 ENH: add error::master() static for low-level messages
- a Pstream::master with a Pstream::parRun guard in case Pstream has
  not yet been initialised, as will be the case for low-level messages
  during startup.

- propagate relativeName handling into IOstreams
2021-11-05 14:53:55 +01:00
0bd113f537 ENH: refactored and simplified runtime declaration macros
- improves future maintenance, avoids code/macro duplication
2021-11-05 14:53:51 +01:00
7f8ecd98f5 ENH: rename runTime selection typedefs
- better distinction between content and storage type
  by appending 'Type' to the typedef.

    old: 'Class::abcConstructorTable* tablePtr'
    new: 'Class::abcConstructorTableType* tablePtr'

  Was rarely used in any exposed code.

BREAKING: LESdelta::New with additional table

- parameter change to dictionaryConstructorTableType
  (was dictionaryConstructorTable)
2021-11-05 14:14:20 +01:00
3416151dee ENH: improve isolation of basicThermo internals (as private)
- getThermoOrDie: returns constructor pointer, or FatalError.
  Better isolation and avoids additional template/typename previously
  needed with ambiguous method name (lookupThermo).

- makeThermoName: centralize dictionary -> stringified name

- splitThermoName: use stringOps functionality
2021-11-05 14:14:20 +01:00
9e56dd4098 Merge branch 'feature-proudman-mean-fields' into 'develop'
ENH: proudmanAcousticPower - extended to operate on mean turbulence fields

See merge request Development/openfoam!485
2021-11-05 13:08:52 +00: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
83fd1c9579 SUBMODULE: update OpenQBMM (selector table modifications) 2021-11-04 21:44:04 +01:00
742a2c8a49 BUG: foamPackRelease detects wrong build information
- was taking from the current head instead from specified commit-ish

ENH: add -debian=NUM convenience option to foamPackRelease

STYLE: relocate compile begin/end messages

COMP: suppress more clang warnings (needed for boost)
2021-11-04 19:56:01 +01:00
50995706a6 STYLE: remove unused private fields (foamyMesh)
- simplify handling of warnings for surfaceBooleanFeatures
2021-11-04 18:03:34 +01:00
c9333a5ac8 ENH: improve flexibility of error, messageStream output
- provide a plain stream() method on messageStream to reduce reliance
  on casting operators and slightly opaque operator()() calls etc

- support alternative stream for messageStream serial output.
  This can be used to support local redirection of output.
  For example,

     refPtr<OFstream> logging;   // or autoPtr, unique_ptr etc

     // Later...
     Info.stream(logging.get())
        << "Detailed output ..." << endl;

  This will use the stdout semantics in the normal case, or allow
  redirection to an output file if a target output stream is defined,
  but still effectively use /dev/null on non-master processes.

  This is mostly the same as this ternary

      (logging ? *logging : Info())

  except that the ternary could be incorrect on sub-processes,
  requires more typing etc.

ENH: use case-relative names of dictionary, IOstream for FatalIOError

- normally yields more easily understandable information
2021-11-03 11:46:13 +01:00
1c354ce299 ENH: expose dictionary relativeName() method
STYLE: more consistent noexcept for dictionary and entry
2021-11-03 11:38:39 +01:00
b364a9e72c ENH: argList improvements
- argList::envExecutable() static method.
  This is identical to getEnv("FOAM_EXECUTABLE"), where the name of
  the executable has typically been set from the argList construction.

  Provides a singleton access to this value from locations that
  do not have knowledge of the originating command args (argList).
  This is a similar rationale as for the argList::envGlobalPath() static.

- additional argList::envRelativePath() static method.

- make -dry-run handling more central and easier to use by adding into
  argList itself.

STYLE: drop handling of -srcDoc (v1706 option)

- replaced with -doc-source for 1712 and never used much anyhow
2021-11-03 11:38:21 +01:00
a19f03a5cb STYLE: additional storage checks, noexcept, spelling
- prune unneeded demandDrivenData.H includes
2021-11-03 11:27:56 +01:00
851be8ea33 ENH: use consistent naming when toggling exception throwing on/off 2021-11-02 21:14:41 +01:00
fddf8a8832 ENH: add -help-full option for foamEtcFile 2021-11-02 21:14:41 +01:00
2698cab01c ENH: extend use of WM_COMPILER_CONTROL to manage compiler versions
- for compilers such as gcc and clang, may have several different
  variants installed on the computer. Use WM_COMPILER_CONTROL to
  specify the preferred variant.

  Eg,
      WM_COMPILER=Gcc
      WM_COMPILER_CONTROL="version=8"

      will compile with "gcc-8" and "g++-8"

  Good practice would be to tag output directory names with the
  version too. Eg

      WM_COMPILER=Clang110
      WM_COMPILER_CONTROL="version=11.0"

STYLE: modify message for change of gcc -> clang (darwin)
2021-11-02 17:30:06 +01:00
3494d662c7 COMP: eliminate some unused variables 2021-11-02 15:47:18 +01:00
a6f2aff449 BUG: spurious argument in sutherlandTransport addition (fixes #2256) 2021-11-02 15:47:18 +01:00
8746d7e443 Merge branch 'fix-2257-threaded-writing' into 'develop'
BUG: collated: threaded writing accesses out-of-scope. Fixes #2257.

See merge request Development/openfoam!494
2021-11-02 14:26:30 +00:00
227b3976ba BUG: collated: threaded writing accesses out-of-scope. Fixes #2257. 2021-11-02 14:26:30 +00:00
08e66a64e1 CONFIG: increment API level to 2108
- reflects updates for List, globalIndex handling etc
2021-10-29 19:41:27 +02:00
08588134fb ENH: report filter settings for distance surface (#1631) 2021-10-29 19:34:54 +02:00
0c89154729 ENH: add fallback behaviour for distanceSurface proximity regions (#1631)
- using the proximityRegions filter when there is no enclosing surface
  to segregate domains causes a surface of zero-faces to be created.

  In most cases, this means that a simpler proximityFaces filter would
  have been more appropriate. To increase overall robustness, revert
  to the simpler proximityFaces filter logic when the proximityRegions
  would otherwise result in zero faces (globally seen).
2021-10-29 17:49:50 +02:00
048166c3d8 ENH: reduces buffer use / blocking in Ensight output
- reuse single component buffer within an Ensight output method.
  Use direct UPstream read/write to avoid Pstream char buffers

- replace blocking transfer with scheduled for Ensight cloud output
2021-10-29 17:04:52 +02:00
33ff3201ea ENH: replace PstreamBuffers with scheduled read/writes for VTK output
- use the new updates to globalIndex to manage the bookkeeping
2021-10-29 17:04:52 +02:00
b6539cd02e ENH: additional MPI gather/scatter routines, globalIndex gather methods
- UPstream::mpiGather (MPI_Gather)   - used by Pstream::listGatherValues
- UPstream::mpiScatter (MPI_Scatter) - used by Pstream::listScatterValues

  These are much simpler forms for gather/scatter of fixed-sized
  contiguous types data types (eg, primitives, simple pairs etc).

  In the gather form, creates a list of gathered values on the master
  process. The subranks have a list size of zero.

  Similarly, scatter will distribute a list of values to single values
  on each process.

  Instead of

      labelList sendSizes(Pstream::nProcs());
      sendSizes[Pstream::myProcNo()] = sendData.size();
      Pstream::gatherList(sendSizes);

  Can write

      const labelList sendSizes
      (
          UPstream::listGatherValues<label>(sendData.size())
      );

  // Less code, lower overhead and list can be const.

  For scattering an individual value only,
  instead of

      labelList someValues;
      if (Pstream::master()) someValues = ...;

      Pstream::gatherList(sendSizes);
      const label localValue
      (
          someValues[Pstream::myProcNo()]
      );

  Can write

      labelList someValues;
      if (Pstream::master()) someValues = ...;

      Pstream::gatherList(sendSizes);
      const label localValue
      (
          UPstream::listScatterValues<label>(someValues)
      );

   Can of course also mix listGatherValues to assemble a list on master
   and use Pstream::scatterList to distribute.

ENH: adjusted globalIndex gather methods

- added mpiGather() method [contiguous data only] using MPI_Gatherv

- respect localSize if gathering master data to ensure that a
  request for 0 master elements is properly handled.
2021-10-29 17:04:52 +02:00
1f20747b1a ENH: cleanup Pstream internal names, cull unneeded parameters
- Pstreams can be ascii/binary but are always currentVersion

- rename UIPstream externalBuf_ to 'recvBuf_' for similar naming as
  PstreamBuffers and symmetry with UOPstream::sendBuf_

- specific enum size for commsType (for more compact structures in the
  future). Default construct lists items.

BUG: possible incidental indexing in UIPstream::read(char*, std::streamsize)

- raw reading had been split into beginRawRead(), readRaw().
  However, this could change the current input position (due to word
  boundary alignment), even if the expected count is zero. Make a
  no-op for count == 0. This mirrors UOPstream::write behaviour.
2021-10-29 17:04:51 +02:00
609fb366e3 ENH: improve flexibilty of globalIndex
- construct or reset from a list of local sizes. It is generally
  easier and safer to assemble sizes and let globalIndex determine the
  corresponding offsets, when working with raw values.

- Can use reset() from sizes or fine-tune offsets with setLocalSize()
  instead of using the potentially more fragile non-const access to
  the offsets.

- add globalIndex const_iterator to iterate across the access ranges.
  This is makes it simpler to use with the List slice() method to
  access or operate on a sub-section of list.

  For example,
      scalarField allValues = ...;
      globalIndex procAccess = ...;

      for (const labelRange& range : procAccess)
      {
          someOutput(allValues.slice(range));
      }
2021-10-29 17:04:51 +02:00
b8a4b7e80d ENH: additional 'nocopy' methods for List resize/reserve methods
- the size of a List often requires adjustment prior to an operation,
  but old values (if any) are not of interest and will be overwritten.

  In these cases can use the _nocopy versions to avoid additional memory
  overhead of the intermediate list and the copy/move overhead of
  retaining the old values (that we will subsequently discard anyhow).

  No equivalent for PtrList/UPtrList - this would be too fragile.

- add swap DynamicField with DynamicList

BUG: fixed Dynamic{Field,List} setCapacity corner case

- for the case when the newly requested capacity coincides with the
  current addressable size, the resize of the underlying list would have
  been bypassed - ie, the real capacity was not actually changed.

- remove (unused) PtrDynList setCapacity method as too fragile
2021-10-29 17:04:51 +02:00
e2861cc200 ENH: return UList range slice as a SubList
- previously returned the range slice as a UList,
  but this prevents convenient assignment.
  Apply similar handling for Field/SubField

  Allows the following

     labelRange range(...);
     fullList.slice(range) = identity(range.size());

  and

     fullList.slice(range) = UIndirectList<T>(other, addr);

ENH: create SubList from full FixedList (simplifies interface)

- allow default constructed SubList. Use shallowCopy to 'reset' later
2021-10-29 17:04:51 +02:00
3781f17eee ENH: add '_bytes()' versions of List data(), cdata()
- simply adds in the reinterpret_cast, which simplifies coding for
  binary data movement.
  Name complements the size_bytes() method for contiguous data

STYLE: container IO.C files into main headers for better visibility

STYLE: include CompactListList.H in polyTopoChange

- avoids future mismatches if the CompactListList template signature
  changes

GIT: relocate CompactListList into CompactLists/ directory
2021-10-29 17:04:51 +02:00
3d3d287452 ENH: additional tests in {cell,face}SetOption
- useSubMesh() - name as per fvMeshSubsetProxy.
  Setter methods take a parameter instead of direct access.
2021-10-29 17:04:51 +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
33790ca972 ENH: add stream and dictionary output options for edgeMesh formats 2021-10-29 17:04:51 +02:00
120e4a46bc BUG: face flips lost on foamToVTK faceZone output
- previously used an indirect patch to get the sampling locations,
  but this doesn't take account of the face flips. Now use
  the faceZone intrinsic for generating a properly flipped patch
  and provide the sampling locations separately.

STYLE: adjust compatiblity header for surfaceMeshWriter
2021-10-29 17:04:51 +02:00
a98d5ebf32 ENH: handle ';' for fluent input (fixes #2249) 2021-10-29 17:04:51 +02:00
435be2e5ec CONFIG: improve flexibility of MPI specification
- it is now possible to include the selected mpi version in the
  top-level bashrc or prefs.sh file. For example,

      WM_MPLIB=OPENMPI-4.1.1  or  WM_MPLIB=openmpi-4.1.1

  after evaluation of the config.sh/mpi, this will define

      WM_MPLIB=OPENMPI-4.1.1  and  FOAM_MPI=openmpi-4.1.1

  During the wmake, the mpi-rules will first load the MPI 'family'
  rules (OPENMPI in this example) before trying to load
  version-specific rules if they exist.

  NOTE: the regular user-defined prefs system is unaffected by this
  change. This means it is still possible to use a file such as
  'prefs.openmpi' to define the preferred version instead or as well.
  However, it does mean inconsistent naming can be specified.
  For example, specify WM_MPLIB=OPENMPI-4.1.1 at the top-level but
  actually have FOAM_MPI=openmpi-4.0.6 in the prefs.openmpi file.
  This will make the value of WM_MPLIB misleading.

CONFIG: foamConfigurePaths support for sys-openmpi major version

CONFIG: cleanup any shadow env variables
2021-10-29 17:04:51 +02:00
36bb99da9b BUG: Condensation mass transfer in interfaceHeatResistance. Fixes #2216 2021-10-28 14:33:05 -07:00
7d5dc29e53 Merge branch 'feature-turbulence-model-hierarchy' into 'develop'
ENH: Regroup and unify various virtual functions in laminar/RAS/LES models

See merge request Development/openfoam!487
2021-10-22 16:29:13 +00:00
783c2f567f ENH: LESModel: regroup omega/epsilon virtual functions
ENH: LESeddyViscosity: move Ce to LESModel to
enable omega/epsilon virtual hierarchy
2021-10-22 11:40:50 +01:00
64fdbf6099 ENH: laminar: regroup k/omega/epsilon/R virtual functions 2021-10-22 11:40:48 +01:00
ec62cda73a ENH: RASModel: regroup omega/epsilon virtual functions 2021-10-22 11:40:45 +01:00
52be5d0428 TUT: use mergeType points for wedge geometries (#2241) 2021-10-21 15:31:11 +02:00
c2697f466d CONFIG: update c++ standard, some compiler rules (partially addresses #2209)
- migrate to c++14 for most compilers *except* gcc.
  There are still many systems in use with gcc-4.8.5, which does not
  support c++14.

- initial rules for nvidia compilers (pgi is will soon be defunct).
  Not fully tested...

CONFIG: provide fallback value for the user directory name

- in containers may have an unset USER env variable.
  Default to 'user' to prevent ugly looking directory names.
2021-10-21 15:31:05 +02:00
8eab653117 Merge branch 'feature-decompositionConstraints_cyclicAMI' into 'develop'
ENH: decomposePar: cyclicAMI in constraints. Fixes #2242

See merge request Development/openfoam!491
2021-10-20 15:40:39 +00:00
42a9078dad ENH: decomposePar: cyclicAMI in constraints. Fixes #2242 2021-10-20 14:51:38 +01:00
b157614e00 ENH: redistributePar: write collated format. #806
- supports redistributePar -decompose -fileHandler collated
- supports redistributePar -reconstruct
- does not support redistributePar with collated in redistribution mode
2021-10-19 12:18:07 +01:00
2a2edf5fee ENH: Added contact resistance to multi-world. See #1535.
- added contact resistance to turbulentTemperatureCoupledBaffleMixed
- added basic multi-world to turbulentTemperatureRadCoupledMixed
- added unit-testcase to $FOAM_APP/test/multiWorld
2021-10-18 19:22:23 +01:00
3e026783ab TUT: update keywords, create finiteArea in parallel 2021-10-18 15:30:51 +02:00
85760cbc34 COMP: added arm64 support for OSX fpe handling (#2240) 2021-10-18 15:28:23 +02:00
fe8c630936 BUG: Foam::cp inadvertently creates recursive directories (fixes #2235)
- noticed by Robin Knowles with `decomposePar -fields -copyZero`

  The internals for the Foam:cp method combine the behaviour of
  a regular `cp` and `cp -R` combined.

  When source and target are both directories, the old implementation
  created a subdirectory for the contents.
  This normally fine,

      ok:  cp "path1/0/" to "path2/1" -> "path2/1/2"
      BUT: cp "path1/0/" to "path2/0" -> "path2/0/0" !!

  Now add check for the basenames first.
  If they are identical, we probably meant to copy directory contents
  only, without the additional subdir layer.

BUG: decomposePar -fields -copyZero copies the wrong directory

- was using the current time name (usually latest) instead of copying
  the 0 directory

ENH: accept 0.orig directories as a fallback to copy if the 0 directory
is missing
2021-10-18 14:58:17 +02:00
4a0646451d CONFIG: accept '-lib' for foamCleanPath
- simplfies differences for OSX
2021-10-18 14:58:17 +02:00
16d48ed047 CONFIG: improve robustness/flexibility for MPI config handling
- use orte-info to determine prefix/libdir for openmpi.
  This removes a run-time dependency on mpicc, which is actually
  only needed for building with MPI (not running with MPI).
  The corresponding openmpi devel package (deb/rpm) will not
  necessarily be installed on a particular system.

- retain mpicc logic if the new logic using orte-info does not
  deliver an answer. Final fallback to using 'orterun' to
  infer prefix/libdir.

- Additional logic for intel and msmpi to make it easier to
  locate these vendor packages within ThirdParty
  (ie, under ThirdParty/opt/...)

CONFIG: improve robustness

- add check for absolute path when adding PATH/LD_LIBRARY_PATH etc.

- prefix more variables with '_foam*' to prevent accidental overwrite
  of userspace shell variables when sourcing
2021-10-18 11:34:02 +02:00
f61228ae38 STYLE: changes for implicit handling, region coupling
- avoid deprecated autoPtr check

- bundle bool values in fvPatchField for compacter allocation

- change useImplicit to a set method taking an argument instead of
  allowing direct access.
2021-10-15 18:48:08 +02:00
f422495bb5 BUG: Robust implementation for contact resistance. See #1535. 2021-10-14 14:40:42 -07:00
9bed548227 ENH: Adding coupled matrix option for solid-only cht cases 2021-10-14 14:40:02 -07:00
7ad75fa18e ENH: add single-parameter PtrListOps::names (ie, no name filtering)
ENH: adjust fileName component method

- the location \c npos returns the last component
2021-10-12 10:11:05 +02:00
5014398c45 ENH: adjust documentation for face edges, remove unused method
BUG: incorrect addressing in rcEdge, but not used in the code.
2021-10-08 10:16:39 +02:00
6a3f918827 ENH: collective for boundary connections, makes lduAddressing const
- top-level faceCells() on the boundary list simplifies the creation
  of lduAddressing etc, can also be useful on its own

STYLE: replace isA/refCast combination with a single isA
2021-10-08 09:13:36 +02:00
674a9a878f ENH: foamGetDict: sneak in topoSetSourcesDict. See #2232 2021-10-07 10:56:13 +01:00
3c0fef819b BUG: cyclicAMI: defaultValues are on *this. Fixes #2226. 2021-10-06 11:05:01 +01:00
9ad7e87000 Merge branch 'issues-2021-1' into 'develop'
BUG: 2021-1: Various bug fixes and developments

See merge request Development/openfoam!489
2021-10-05 10:47:21 +00:00
40bed278ef DOC: pressure: correct the usage explanations for pName (#2221) 2021-10-04 15:25:49 +01:00
770df14bf6 ENH: foamMonitor: modernise and refactor for POSIX compliance (#2202)
ENH: add xrange option
2021-10-04 15:24:47 +01:00
a8243b8377 STYLE: PilchErdman: modernise code for constness and constructs 2021-10-04 15:24:47 +01:00
e2d54dfe14 BUG: PilchErdman: correct the sign of the exponent (fixes #2214) 2021-10-04 15:24:47 +01:00
3a1c61fc98 DOC: uniformSet: improve header documentation 2021-10-04 15:24:47 +01:00
cd938d96f3 ENH: uniformSet: enable the relative tolerance (tol) as a user-defined optional entry 2021-10-04 15:24:47 +01:00
c161d0e069 BUG: uniformSet: add missing hit point updates (fixes #2067) 2021-10-04 15:24:47 +01:00
9923cc9bf8 BUG: applyBoundaryLayer: disable application on disconnected cells (fixes #1513) 2021-10-04 15:24:47 +01:00
8a3dc0527c ENH: -no-finite-area, -no-lagrangian options for some parallel utils 2021-10-01 15:26:50 +02:00
20902b7f7c ENH: use updated surface methods, additional debugging for isoTopo 2021-10-01 15:26:50 +02:00
15f2487c0b ENH: extend vtk::polyWriter and vtk:GenericPatchWriter
- writeCellData() and writePointData() for polyWriter
- writeProcIDs for generic vtk patch writer
2021-10-01 15:26:50 +02:00
aa5ba2b494 ENH: additional cleanup method(s) for MeshedSurface, triSurface
- adjust zone addressing after surface face swap and upon construction
2021-10-01 15:26:50 +02:00
8e5c569cf1 ENH: explicitly check for invalid edge (PrimitivePatch::findEdge) 2021-10-01 15:25:13 +02:00
d585774841 ENH: handle float values for named optimisation switches (#2222) 2021-10-01 12:47:06 +02:00
6a3f63c2bc BUG: error write() method not marked as virtual (fixes #2218)
- slices on output and misses file/line information for IOerror
2021-09-30 19:58:26 +02:00
9ce5aa2136 BUG: Function1 Table: disallow wildcards. See #2223 2021-09-30 13:35:06 +01:00
ad8e5540a3 BUG: overset: memory leak. Fixes #2219
Not tested; from visual inspection
2021-09-29 10:57:42 +01:00
680c1dcfdd Merge branch 'feature-isosurface-snapping' into 'develop'
add point snapping to iso-surface topo algorithm (#2210)

See merge request Development/openfoam!488
2021-09-27 15:46:13 +00:00
4ff010d094 ENH: add point snapping to iso-surface topo algorithm (#2210)
- helps avoid the creation of small face cuts (near corners, edges)
  that result in zero-size faces on output.

CONFIG: make default iso-surface topo regularisation less aggressive

- The full (diagcell) regularisation no longer includes cleaning of
  non-manifold surfaces by removing open edges.
  This can be selected by the 'clean' regularisation option instead.
  ie, 'clean' = 'full' + erode open edges

ENH: additional debug modes for iso-surface topo

- with (debug & 8) dumps out a VTK file of the tets to be cut and the
  calculated open edges.
2021-09-27 16:23:58 +02:00
0454f4a040 ENH: robustness and functionality improvements for VTK output
- PstreamBuffers for parallel VTK output.
  - avoids MPI overflows for larger meshes

- new vtk::lineWriter for writing edges

- vtk::fileWriter::writeUniform now also supports processor-specific
  uniform values instead of assuming that they are identical everywhere.
2021-09-27 13:26:22 +02:00
a0d7933360 ENH: support vtu mesh subsetting, creation from cellShapes
- support simple mesh subsetting to vtu formats to enable debug output
  for a subsection of an existing polyMesh

- rudimentary support for VTK from cellShapes is intended for handling
  basic primitive cell shapes without a full blown polyMesh description.

  For example,

     // Create an empty polyMesh with points only
     polyMesh debugMesh
     (
         io,
         std::move(points),
         faceList(),     // faces
         labelList(),    // owner
         labelList(),    // neighbour
         true            // syncPar
     );

    // Establish the appropriate VTK sizing for the TET shapes
    vtk::vtuCells vtuCells;
    vtuCells.resetShapes(debugCutTets);
    vtuCells.nPoints(debugMesh.nPoints());

  NOTE
  Since the vtk::internalMeshWriter only uses the polyMesh reference
  for the points, it is also possible to create the vtuCells
  description without a pointField (or from a different mesh
  description) and write out the connectivity using the pointField
  from a different mesh.
2021-09-27 13:26:02 +02:00
8628d4216c BUG: foamToVTK patch/proc ids missing if there are no volume fields 2021-09-27 13:18:27 +02:00
fcd7423fa8 CONFIG: add date and paths information for tutorial Allrun script
STYLE: replace short-circuit Allrun script with Alltest
2021-09-22 17:42:21 +02:00
134aaee91a ENH: relocated tetBasePtIs adjustment from sampling to polyMeshTetDecomposition 2021-09-22 13:32:31 +02:00
c0b4c26dc1 BUG: correct erroneous PoutInFunction macro
- replace unusable operator() calls with simple '<<' operations
2021-09-21 15:26:45 +02:00
72e67c7d1b Merge branch 'feature-cyclicPeriodicAMI' into 'develop'
ENH: interpolate in cylindrical coordinates: See #2145

See merge request Development/openfoam!483
2021-09-16 08:48:16 +00:00
a4289f7dd2 ENH: interpolate in cylindrical coordinates: See #2145
This intercepts all vector/tensor AMI interpolations and
does the interpolation in cylindrical coordinates.

Use (component) 'coupled' linear solver to enable this in
the linear solver sweeps.
2021-09-16 08:30:17 +00:00
c0feb56521 ENH: optional face area normals output for VTK surface format
- similar to additional flag for the raw surface writer (#2003)

  Example,
  ```
  formatOptions
  {
      vtk
      {
          normal      yes;
      }
  }
2021-09-15 18:04:36 +02:00
7c46daea0d Merge branch 'issue-1838-yPlus' into 'develop'
BUG: fix yPlus predictions of nut wall functions

See merge request Development/openfoam!484
2021-09-14 15:21:49 +00:00
6ed5e23536 BUG: nut{k,U}WallFunction: use viscous predictions in yPlus (fixes #1773,#1838) 2021-09-14 15:21:09 +00: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
91439bb30d BUG: nutLowReWallFunction: add effective viscosity into yPlus (fixes #1843) 2021-09-14 15:21:09 +00:00
0265f2caad COMP: ShihQuadraticKE: remove redundant header file 2021-09-14 15:21:09 +00:00
fb88d4887b SUBMODULE: update cfmesh (compilation only) 2021-09-08 13:47:32 +02:00
7d20854726 BUG: fileHandler: disable parallel inside master-only ops. See #806. 2021-09-08 09:04:57 +01:00
f815a12bba BUG: error with empty distributed roots specification (fixes #2196)
- previously used the size of distributed roots to transmit if the
  case was running in distributed mode, but this behaves rather poorly
  with bad input. Specifically, the following questionable setup:

      distributed true;
      roots ( /*none*/ );

  Now transmit the ParRunControl distributed() value instead,
  and also emit a gentle warning for the user:

      WARNING: running distributed but did not specify roots!
2021-09-08 09:29:27 +02:00
f89fb3e066 CONFIG: adjust ordering of library paths (#2200)
- previously OpenFOAM library paths were set before adding in
  MPI-specific elements. However, this may mask some libraries.

  |  New library order  |  Old library order  |
  |---------------------|---------------------|
  |  user-lib (serial)  |  various 3rd-party  |
  |  site-lib (serial)  |  foam-lib (mpi)     |
  |  foam-lib (mpi)     |  ext-lib (mpi)      |
  |  foam-lib (serial)  |  system mpi-libs    |
  |  ext-lib  (mpi)     |  user-lib (serial)  |
  |  ext-lib  (serial)  |  site-lib (serial)  |
  |  various 3rd-party  |  foam-lib (serial)  |
  |  system mpi-libs    |  ext-lib (serial)   |
  |  dummy              |  dummy              |
2021-09-07 16:35:34 +02:00
96adf3ae80 ENH: add IOobject::objectRelPath() for compact output (#2195) 2021-09-07 16:35:34 +02:00
610711ac47 ENH: inGroups support for mesh zones
- provisions for alternative groupings of zones

- extend indices() for boundary meshes to handle wordRes as well
2021-09-07 16:35:10 +02:00
f0fb0d4263 ENH: variable-specific debug flags (finiteArea solvers) 2021-09-07 11:29:11 +02:00
dabe506e9e ENH: code-style for lduMatrix and fvMatrix solve
- use dictionary methods directly in LduMatrix::solver::readControls.
  Deprecate the redundant LduMatrix::solver::readControl helper-function

- define solver log-level outside of the loop,
  narrow log flag to int.

- reinstate API-compatible parameters for SolverPerformance
2021-09-07 11:29:11 +02:00
bf1ed94e53 ENH: use PrecisionAdaptor to support scotch with label widening
- allows reuse of an int64_t scotch library with label-size 32
  and/or label-size 64.

COMP: prefer scotch/metis/kahip libraries with label-size qualifiers

- as noted in #2200, mpirun may insert mpi libraries higher in the
  library loader which can cause masking of our ThirdParty libraries
  of the same name. With scotch (for example), the operating system
  may have an int32 version installed but we have an int64 version
  compiled under ThirdParty. Runing in serial is fine, but in parallel
  we resolve to the (incorrect) system version due to the adjustments
  in mpirun.

- adjust the ThirdParty make scripts to also create corresponding
  links (eg, 'ln -s libscotch.so libscotch-int64.so') and prefer
  linkage with these qualified libraries.

    Eg,  -L$(SCOTCH_LIB_DIR) -lscotch$(SCOTCH_LIBNAME_SUFFIX)

  this prevent accidental runtime linkage with the system versions.

STYLE: simplify scotch interface code by using local functions
2021-09-07 11:29:11 +02:00
5e4d678c98 ENH: make precision adaptors modifiable (#2173)
- allows reuse similar to refPtr for wrapping different content.

- additional control for when contents are copied back,
  instead of waiting for the adaptor to go out of scope.

  Eg,

  if (adaptor.active())
  {
      adaptor.commit();
      adaptor.clear();
  }

- static ConstPrecisionAdaptor::get method renamed to 'select' as a
  better description of its purpose and avoid confusion with
  non-static 'get' method.

  Was previously only used within GAMGPreconditioner, but even there
  it is better just to use the ConstPrecisionAdaptor directly.
2021-09-07 11:29:11 +02:00
d27aa79cd7 ENH: KirchhoffShell: further simplication of log output 2021-09-07 11:29:11 +02:00
ac6077b471 Merge remote-tracking branch 'origin/master' into develop 2021-09-07 10:14:29 +01:00
aeda015a78 BUG: distributionModels::general: avoid zero-division errors 2021-09-07 09:50:16 +01:00
0aa44f2b9b ENH: ConeInjection - randomised the injector order. See #2199
For cases where the number of injectors exceeded the number of parcels to
inject, processing the injectors sequentially led to not all injector locations
being active and yielding non-physical spatial distributions.
2021-09-06 14:23:21 +01:00
c307c4abd2 Merge branch 'feature-distributionModels' into 'develop'
Improve the Lagrangian distribution models

See merge request Development/openfoam!426
2021-09-06 13:07:03 +00:00
4be5511f8c DOC: distributionModels: improve header file documentation 2021-09-02 13:58:20 +01:00
2bd37c7643 INT: distributionModels::general: add cumulative distribution function 2021-09-02 13:58:20 +01:00
5a1baa478d BUG: distributionModels: fix mean functions (#1996) 2021-09-02 13:58:20 +01:00
800df883a6 BUG: distributionModels: fix sample functions (#1996) 2021-09-02 13:58:20 +01:00
07cd88abd0 ENH: distributionModels: replace input variable names with de facto conventions
Previous naming conventions for input variables in the
normal, multiNormal, RosinRammler, and massRosinRammler
distributions were heuristic and did not reflect
the de facto conventions being used in statistics.
2021-09-02 13:58:20 +01:00
89289b0716 STYLE: distributionModels: modernise code style 2021-09-02 13:58:16 +01:00
0feb0e4d7b ENH: distributionModel: add new sanity checks 2021-09-02 13:58:16 +01:00
839a52ee16 ENH: distributionModel: consolidate min/max of distributions
BUG: distributionModel: disallow any distribution
where input min is equal to input max

ENH: distributionModel: ensure execution of check() at ctor level
2021-09-02 13:57:04 +01:00
a88d0e7181 BUG: Fixing BC's fixed value for species in multicomponent system 2021-09-01 12:26:29 -07:00
851cf11c0a BUG: iglooWithFridges: consistent collated handling. Fixes #2194. 2021-09-01 15:49:30 +01:00
d5fd97d991 ENH: createPatch: check for overlapping patches. Fixes #2193 2021-09-01 08:29:32 +01:00
4e6e7d59da BUG: ParticleCollector - corrected and simplified parallel reductions. See #2184 2021-08-18 10:29:17 +01:00
8be3f3d910 BUG: Corrected ddtCorr switch - see #2183 2021-08-17 15:36:34 +01:00
9678b1dc22 ENH: splitMeshRegions: combine cellZones. See #2046
addZones: specifies the name instead of synthesising
2021-08-11 16:14:23 +01:00
9bf030d86a BUG: Fixing frozenFlow option with implicit fvMatrix in CHT solvers 2021-08-06 12:54:44 -07:00
b826e23d2f TUT: Rename tutorial scripts to Allrun 2021-08-06 11:15:31 -07:00
93b0a57791 BUG: Fixes #2175 and #2176 2021-08-06 11:07:48 -07:00
b78dccdd51 ENH: noiseModel - protected log10 calls 2021-08-05 16:06:33 +01:00
d8eecc5e2a Merge branch 'issue-2093-custom-U-in-devRhoReff-and-devReff' into 'develop'
ENH: enable custom input of U for devRhoReff and devReff

See merge request Development/openfoam!479
2021-08-05 12:41:24 +00: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
3207e315b2 ENH: enable custom input of U for devRhoReff and devReff 2021-08-05 12:40:47 +00:00
c8a52fad96 Merge branch 'issue-2132-turbulenceFields' into 'develop'
ENH: turbulenceFields: various improvements

See merge request Development/openfoam!476
2021-08-04 11:37:16 +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
084f89ee94 Merge branch 'issue-2122-dmd-snapshot0' into 'develop'
BUG: DMD: write snapshot0 at start times

See merge request Development/openfoam!482
2021-08-04 09:23:49 +00:00
9c46f86048 ENH: makeSolidReaction: modify macros to allow new models 2021-08-04 09:23:20 +00:00
c64c312bae TUT: hopper: parameterise blockMeshDict content (#2134) 2021-08-04 09:23:20 +00:00
f482f74277 BUG: DMD: write snapshot0 at start times (fixes #2122) 2021-08-04 09:23:20 +00:00
f687a21761 Merge branch 'issue-1615-solver-verbosity' into 'develop'
ENH: linear solvers: add variable-specific debug flags

See merge request Development/openfoam!478
2021-08-04 09:15:31 +00:00
6dedfe078a ENH: linear solvers: add variable-specific debug flags
Introduces a new optional keyword of label type 'log'
to linear-solver dictionaries to enable variable-specific
debug statements. For example, in fvOptions file:

    solvers
    {
        p
        {
            solver GAMG;
            ...
            log    2;
        }

        U
        {
            ...
            log    0;
        }
    }

The meanings of values of 'log' are:

    log    0;    <!--  no output
    log    1;    <!--  standard output
    log    2;    <!--  debug output
    // values higher than 2 are expected to have no effect

This keyword does not directly affect the operations of various
DebugSwitches and backward compatibility has been ensured in exchange
of code cleanness. The related DebugSwitches are:

    DebugSwitches
    {
        SolverPerformance    0;
        GAMG                 0;
        PCG                  0;
        PBiCG                0;
        smoothSolver         0;
    }
2021-08-04 09:15:19 +00:00
d9b200af28 TUT: rotatingFanInRoom: perturb locationInMesh (fixes #2162) 2021-08-04 09:15:19 +00:00
d6ff22e5e7 ENH: KirchhoffShell: simplification of log output 2021-08-04 09:15:19 +00:00
fa03050e03 Merge branch 'feature-implicitCyclics-merge' into 'develop'
Implicit treatment of coupled boundary conditions

See merge request Development/openfoam!477
2021-08-03 20:08:51 +00:00
53af23b9fb Implicit treatment of coupled boundary conditions 2021-08-03 20:08:49 +00:00
9645e1adc2 BUG: Curle - added missing division by r. See #2169 2021-08-02 18:51:58 +01:00
11e0db96d3 ENH: snappyHexMeshDict: added missing documentation 2021-08-02 14:01:12 +01:00
60aeca32a8 ENH: checkMesh: add stabilisation. Fixes #2171 2021-07-28 17:56:48 +01:00
9ab8c525cf CONFIG: set API level to 2107
- liquid film, blockMesh changes, multiWorld communicators
2021-07-28 17:17:41 +02:00
9b0051c40d SUBMODULE: update visualization 2021-07-28 16:54:00 +02:00
270f2eecf9 ENH: report API information in header #2126
- previously reported the WM_PROJECT_VERSION in the top banner
  but this makes it overly sensitive to arbitrary user naming.

  Change to the current API in the comment banner, include the
  WM_PROJECT_VERSION as part of the reported "Build: ..."
  string instead.
2021-07-28 16:53:53 +02:00
d379f0b61d Merge branch 'feature-multiWorld' into 'develop'
improve handling of multiple world communication

See merge request Development/openfoam!480
2021-07-28 14:50:05 +00:00
9d26b25c46 TUT: multi-world tutorial setup with circular connectivity 2021-07-28 16:21:14 +02: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
56a5a43910 ENH: simplify mapped patch cloning in extrudeToRegionMesh 2021-07-28 16:07:31 +02:00
ec4265343a ENH: use multi-world connection object for managing mappedPatches 2021-07-28 16:07:30 +02:00
b2ec5af9e0 ENH: centralized MeshObject handler for multi-world connections 2021-07-28 16:07:30 +02:00
13740de427 BUG: mpi: use group-local communicator allocation. Fixes #2158 2021-07-28 16:07:30 +02:00
8f1bad1cb4 BUG: decomposing ConstantField loses information (#2101)
- previously had a patch-size check, which caused a zero-sized patch
  to be "sticky" as uniform Zero regardless of what the original input
  stated (eg, "constant 0.5")

  This was caused by short-circuiting logic that circumvented reading
  on zero-size patches.
2021-07-28 16:05:46 +02:00
10dd0d34d1 ENH: combine patchDistMethod New methods (code reduction) 2021-07-28 13:14:44 +02:00
a530b505ed TUT: replace m4 versions of angledDuct blockMeshDict with native forms
- dictionary parameters to change the bend angle

- blockMesh transform parameters to allow different orientations
2021-07-28 13:14:44 +02:00
29acee5a50 TUT: use new blockMesh support (faces, transforms) 2021-07-28 13:14:44 +02:00
d31f351c15 ENH: blockMesh enhancements
- support non-uniform scaling, prescaling and cartesian coordinate
  transformations.

  Eg, stretch in one direction and then rotate
  ```
  prescale  (1.5 1 1);
  transform
  {
      origin   (0 0 0);
      rotation
      {
          type  axisAngle;
          axis  (0 0 1);
          angle 45;
      }
  }
  ```

- support "transformed" versions of blockMesh vertices, topology.
  With the additional of transformations etc, a simplistic application
  of a single scale parameter is no longer sufficient.

    new:  blMesh.vertices(true);
    old:  blMesh.vertices() * blMesh.scaleFactor();

    new:  blMesh.topology(true);
    old:  N/A

- add individual edge access for blockDescriptor.
  Saves copying and duplicate calculations.

- handle '(block face)' specification for curved faces,
  which is ok for external block faces, but likely somewhat
  questionable if used for internal block faces.
2021-07-28 13:14:44 +02:00
4eeff16735 ENH: handle min/span as alternative to min/max for box selection
- searchable box, boxToCell, boxToFace, boxToPoint
2021-07-28 11:35:12 +02:00
d49566ea34 ENH: improve alignment of tetCell and cellShape
- added hexCell for some more encapsulation
2021-07-28 11:35:08 +02:00
5b09e59b3f ENH: support direct specification of coordinate rotation "none"
- Can specify
  ```
  transform
  {
      origin      (1 2 3);
      rotation    none;
  }
  ```
  instead of the longer form
  ```
  transform
  {
      origin      (1 2 3);
      e1          (1 0 0);
      e3          (0 0 1);
  }
  ```

COMPAT: remove old (pre-1812) Euler and STARCD keywords

- use "angles", remove old compat name "rotation"
  as clutter and possible confusion with "coordinate rotation"

STYLE: remove coordinate rotation move constructors

- an unnecessary holdover from older code.
2021-07-28 10:02:27 +02:00
e2be2289a1 ENH: finer granularity for CleanFunctions
- separate handling of auxiliary files vs time directories

- restore0Dir: avoid removing 0/ if 0.orig/ does not exist
2021-07-28 10:02:27 +02:00
eb7d0f0ef0 COMP: add missing includes for runtime-selection 2021-07-28 10:02:27 +02:00
847b61d1f9 GIT: fix some merge and edit rubbish 2021-07-28 10:02:27 +02:00
621d400db2 BUG: Fix to const Uwall helper function 2021-07-27 08:24:33 -07:00
3e70154ff1 BUG: Fixing movingWall BC mesh flux 2021-07-26 11:03:30 -07:00
7f2cbd6cd4 BUG: boundaryData output incorrect when no fields are sampled (fixes #2163)
- add "point data" or "face data" note to the boundaryData output
  for easier diagnositics in the future.
2021-07-20 12:53:39 +02:00
40ff2acdd6 BUG: word input is too strict (fixes #2160)
- for v2106 restricted the input conversion of string types to disallow
  treating verbatim strings as possible word input.
  However, it was too strict in just allowing quoted strings
  and should have also permitted '$'-sigil variables as well.

- ensure that errors for bad string -> word input conversion
  are raised from within the '>>' read operator. These were
  previously triggered during the stripping process, which
  made error tracing more difficult.
2021-07-17 19:46:37 +02:00
6f20499b57 Merge branch 'feature-liquidFilm' into 'develop'
finiteArea: new models and solvers for films

See merge request Development/openfoam!475
2021-07-16 16:39:48 +00:00
1f3c35841f ENH: Updating tutorials for finite area 2021-07-16 16:38:06 +00:00
3f670d88ea ENH: Initialization for area and single layer films for lagrangian 2021-07-16 16:38:06 +00:00
7d8dba564c TUT: heatTransfer: new tutorial for thermalShellModel 2021-07-16 16:38:06 +00:00
5b21050a0b TUT: incompressible/lagrangian: new tutorials for surfaceFilmModel 2021-07-16 16:38:06 +00:00
4b05b766d3 ENH: limitVelocity: new faOption 2021-07-16 16:38:06 +00:00
18ffb1ad07 ENH: KirchhoffShell: replace read() by init() 2021-07-16 16:38:06 +00:00
d3807a6ee3 ENH: vibrationShellModel and thermalShellModel: remove read()
STYLE: vibrationShellModel and thermalShellModel: regroup the access functions
2021-07-16 16:38:06 +00:00
a9aa6cb0db ENH: kinematicParcelFoam: new solver and tutorial
The original thermoSurfaceFilm sub-models were divided between kinematicSurfaceFilm and thermoSurfaceFilm in order to use the surfaceFilm model in a kinematicCloud.

The film interaction models are now in a kinematicSurface class which can be used in a kinematic cloud adding constant thermal properties (p and T) for some sub-models, e.g. drySplashInteraction/wetSplashInteraction.

pRef and Tref were added to the kinematicSurfaceFilm as entry to the regionFilm when used with a kinematic cloud.

In the finite area surface film model Tref, pRef are stored in filmSubModelBase.

TUT: kinematicParcelFoam: new tutorial pitzDailySprinkles
2021-07-16 16:38:06 +00:00
4476863907 ENH: Adding radiation to thermalShell 2021-07-16 16:38:06 +00:00
384b9f8100 ENH: reactingParcelFoam: allow to run single species 2021-07-16 16:38:06 +00:00
f98633e427 ENH: liquidFilm subModels: add force models 2021-07-16 16:38:06 +00:00
e30cbfc6db ENH: liquidFilm subModels: add injection models
ENH: Several additions to thinFilm models

1) Changing the faSolution entry nonOrthoCorr to nFilmCorr entry.
   This entry specify the number of iterations on the film thickness
   Eq which does not correct for laplacian non-orthogonality.

2) Changing laminar turbulent model for the skin friction exerted by
   the flow to the film.

3) Adding optional relaxation factors for source terms coming from
   the added mass of the lagragian particles into the film such as
   rhoSp, pnSp and Usp. Similarly the film pressure (pf) can  be
   relaxed in the inner loops.

4) Adding optional entries to curvatureSepration injection model.
   minimum (fThreshold) force and minimum curvature (minInvR1) for
   separation were added to have more control on determining the
   points of film separation

ENH: ThermoSurfaceFilm in lagragian to search for finiteArea film models
2021-07-16 16:38:06 +00:00
b62306ddc5 ENH: Adding regionFaModels library to solvers 2021-07-16 16:38:06 +00:00
be09967acf ENH: regionFaModel: various updates 2021-07-16 16:38:06 +00:00
efd3f59295 ENH: finiteArea: new models for shallow film modelling
- new model framework: liquidFilm
- new film turbulence models: filmTurbulenceModel with friction models
- new velocity boundary condition: velocityFilmShell to handle/evolve regionFa film
- new function object: setTimeStep to control the simulation time-step based on regionFa Courant number
- add support for the absorption of Lagrangian particles into films
2021-07-16 16:38:06 +00:00
b006f5c44e ENH: movingWallVelocity: add Uwall function 2021-07-16 16:38:06 +00:00
ce5e2e7e1c ENH: volSurfaceMapping: new mapToField and mapToSurface funcs 2021-07-16 16:38:06 +00:00
db9460f0bc ENH: copy construct FixedList from fixed subset of input
- remove construct from two iterators (#2083)
2021-07-15 16:47:27 +02:00
0c15f773e0 STYLE: remove/replace unneeded SortableList 2021-07-15 16:47:27 +02:00
aca366d293 TUT: replace remaining templated thermoType
TUT: some simplification for multiWorld test

STYLE: remove some editor junk
2021-07-15 16:47:22 +02:00
09aa3d8b43 COMP: avoid incomplete types in runTime tables, unneeded typedefs etc 2021-07-15 14:31:54 +02:00
ccc751e55d ENH: centralize checks for keyword age into Foam::error
STYLE: additional note about include/exclude HashTable.C
2021-07-15 12:53:02 +02:00
90ad6ce9cf GIT: Updated gitlab bug template 2021-07-15 10:20:09 +00:00
c1c1799051 BUG: Caching alphaPhiUn for VoF for scalarTransport FOcin mixture. #2053 2021-07-12 14:22:08 -07:00
20ca8e8aac BUG: Fixing entries for BinghamPlastic model. Fixes #1150 2021-07-08 13:23:39 -07:00
bda5a87213 BUG: Correcting calculation of phiGas used in coupled BC. Fixes #2149 2021-07-08 12:26:04 -07:00
2ab81c3b69 BUG: Correcting surface tension calculation from pair order. Fixes #2051 2021-07-08 12:17:05 -07:00
028ca26617 COMP: resolve abi:cxx11 linker issue (fixes #2147)
Issue first shows up on gcc-11 with these types of library symbols:

     U Foam::tableReader<double>::dictionaryConstructorTablePtr_[abi:cxx11]
  xx B Foam::tableReader<double>::dictionaryConstructorTablePtr_

  Use concrete hasher functor for runtime selection tables, which
  avoids any additional template resolutions (introduced with
  95cd8ee75c). The library symbols now resolve _without_ an
  additional abi:cxx11 tag.
2021-07-08 13:58:28 +02:00
014dbf4004 Update Build.md 2021-07-07 09:24:55 +00:00
3f172ccae1 ENH: Provided links to source packs 2021-07-07 09:24:31 +00:00
70c697fdcb BUG: momentum: boundary field mismatch on "empty" patches (fixes #2121) 2021-07-05 15:20:41 +02:00
64deb4e4b8 BUG: state error in volRegion::calculateCache() (fixes #2121)
- need to change requireUpdate_ at the beginning of calculateCache
  otherwise it is not updated for "ALL" selection (causing unnecessary
  repeated calculations). For other modes, it would have tripped
  an error in FULLDEBUG.
2021-07-05 15:17:56 +02:00
8cda8e5c3a ENH: downgrade lookupObject failure from abort() to exit()
- lets function objects catch and handle errors
  (fixes #2144, related to #1779)
2021-07-05 14:55:48 +02:00
cc5aa20931 ENH: simplify exit/abort handling and jobinfo (code reduction)
- handle failures more robustly
- add static shutdown() for similarity with Pstream etc.
2021-07-05 14:55:48 +02:00
8a1f667067 COMP: cannot resolve read in UnsortedMeshedSurface constructor
- fix linkage for cellModeller compat methods
2021-07-05 14:55:37 +02:00
00990698ad COMP: remove construct SortableList from two iterators (#2083)
- unused, but missed in 40567b844a
2021-07-05 14:55:37 +02:00
8884d58a52 STYLE: fix/correct some tests. Remove useless tests 2021-07-05 14:55:37 +02:00
6a390f6ad1 COMP: remove includes of defunct locations (fixes #2143) 2021-06-29 13:43:44 +02:00
1898395038 ENH: group bools together, relocate override of updateT (basicThermo)
- all flags before loaders. Avoids "uninitialized when used here"
  warning while preserving the field ownership logic.

- relocate override of updateT basicThermo into constructor body
  for clearer logic and initialization

STYLE: plain bool instead of Switch for dpdt flag
2021-06-29 13:43:44 +02:00
252326df05 STYLE: add fa/fv namespace qualifiers for fa/fv option 2021-06-29 13:43:44 +02:00
f75379633c CONFIG: Updated version to com following release of OpenFOAM v2106 2021-06-28 17:33:22 +01:00
c15bfde3cb RELEASE: Updated config scripts to v2106 2021-06-28 09:15:09 +01:00
e3796745ed CONFIG: Updated headers to v2106
Minor clean-up
2021-06-28 09:14:42 +01:00
c503deb72e CONFIG: Updated completions 2021-06-28 09:14:34 +01:00
03cc42414c BUG: Changing divDevRhoReff scheme for incompressible flows 2021-06-24 08:10:16 -07:00
155455398e SUBMODULE: update OpenQBMM 2021-06-24 13:51:36 +02:00
eb3c96fe30 Merge branch 'bugfix-fan' into 'develop'
Hot fixes for v2106

See merge request Development/openfoam!474
2021-06-24 11:06:35 +00:00
aaa5469261 ENH: fan bc: more logical initialisation. See #2138. 2021-06-24 12:03:13 +01:00
3b10cd84c6 ENH: Provided backwards compat for deprecated partialFaceAreaWeightAMI 2021-06-24 10:29:35 +01:00
3cf0c58d19 BUG: fan/jump BCs - updated construction 2021-06-24 10:29:35 +01:00
27cc914337 BUG: liquidProperties - corrected read scalar (was label). See #2142 2021-06-24 09:12:12 +01:00
c40796843d Merge branch 'feature-momErrSubMesh' into 'develop'
ENH: Adding subMesh option to momentumError and div FOs

See merge request Development/openfoam!463
2021-06-23 08:44:22 +00:00
acd8e53310 BUG: Managing topoBitSet as source in haloToCell. See issue #2137 2021-06-23 08:11:12 +00: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
6595429f53 Merge branch 'tutorial-boatAndPropeller-rigidBodyHull' into 'develop'
TUT: multiphase: replace boatAndPropeller with rigidBodyHull

See merge request Development/openfoam!473
2021-06-22 22:42:06 +00:00
6eae29aa1d TUT: reduce the number of postProcessing files 2021-06-22 22:41:41 +00:00
57304aeaf6 TUT: multiphase: replace boatAndPropeller with rigidBodyHull 2021-06-22 22:41:41 +00:00
7d42501107 ENH: Adjusting reactingEuler settings in tutorials 2021-06-22 14:23:54 -07:00
f5e0f69bae ENH: fvMeshSubsetProxy resetZones, noexcept on some methods 2021-06-22 14:02:49 +02:00
98aa92a07f BUG: noise did not set num of output fields (VTK legacy) [fixes #2133]
ENH: less cryptic error message in surfaceWriters::vtkWriter

- fall back to nFields=1 and report the problem.
2021-06-21 17:01:34 +02:00
3825c4ee95 STYLE: lagrangian: typo. 2021-06-21 09:08:04 +01:00
269d0ffd5c ENH: improve flexibility of zoneTo{Cell,Face,Point} (#2130)
- add setter/getter methods for the zone selection

- construct for multiple zone selection

- support explicit zone ids instead of name matcher
2021-06-19 14:10:22 +02:00
b2fdc67273 ENH: improve verbosity controls for topoSetSource 2021-06-19 11:56:47 +02:00
02881f6237 ENH: improve flexibility of haloToCell (#2130)
- add setter/getter methods for number of grow/shrink steps,
  which allows reuse of the same object.

- remove the lower input hard-limit of 1 step, to allow definition of
  a no-op filter.

- drop early exit from grow/shrink cycle (potential parallel issues).
2021-06-19 10:41:34 +02:00
521a9e4dd6 Merge remote-tracking branch 'origin/master' into develop.mol
CONFIG: set API level to 2106 in ramp-up for release
2021-06-18 17:22:24 +02:00
e2148b587e CONFIG: inline _foamEval within <etc/config.sh/setup>
- previously a function (unlike the csh version) but since bashrc and
  setup have been split -> replace with inline definition

STYLE: formatting/wording for openfoam starters

TUT: simplify controlDict modification, add default substitution

ENH: accept '/' for end-of-options terminator (etc/openfoam)

- makes the application or service more apparent.
  * eg.  /usr/bin/openfoam / blockMesh
  * vs.  /usr/bin/openfoam -- blockMesh

  Accept lone '-' as the end-of-options terminator, as per bash

- Adjust handling of openfoam '-c' option to flag that a command-string
  will appear, but continue with option parsing.
  Consistent with bash definition.
2021-06-18 17:14:22 +02:00
7d2a9fad1a ENH: add auto-detect 0/ to foamCleanTutorials
- in the 'auto' mode (now the default), it will use cleanCase and also
  remove the 0/ directory if a 0.orig/ directory also exists.

  This corresponds to a frequent idiom and can be used quite safely
  for most cases.

ENH: add -serial / -parallel preference for foamRunTutorials
2021-06-18 17:14:22 +02:00
096b9dc52e TUT: add parallel version for various squareBend cases
- adjust commented-out evaluation to avoid warnings.

  With code like this
  ```
  #if 0
  nxin    #eval{ round($nxin / 5) };
  #endif
  ```

  The handling of the "#if 0 / #endif" clause uses the plain ISstream
  parser to tokenize. This means that the "round(" is parsed as a word
  with a mismatched closing ')', whereas the "#eval" parser will slurp
  everything in until the closing brace and send it off as a string
  to the expression parser.
2021-06-18 17:14:22 +02:00
a3d90ae9b9 TUT: example of patch expressions (#2114) 2021-06-18 17:14:21 +02:00
3b29395a66 BUG: surfaceFieldValue with vectorWeights blocks in parallel (fixes #2129) 2021-06-18 15:47:18 +02:00
f39fedb7f9 Merge branch 'issue-2091-PDRFOAM-End' into 'develop'
STYLE: PDRFOAM End of Program was inconsistent with other applications

See merge request Development/openfoam!447
2021-06-18 13:17:59 +00:00
36dd86f89a STYLE: PDRFOAM End of Program was inconsistent with other applications 2021-06-18 13:07:26 +00:00
a9f55f06ba Merge branch 'feature-ami-face-area-intersect' into 'develop'
AMI improvements

See merge request Development/openfoam!468
2021-06-18 10:32:18 +00:00
ba4d38da68 ENH: AMI improvements
- Added new faceAreaWeightAMI2D AMIMethod:
  - performs intersection using a new 2D triangle class;
  - candidate face matches set using an AABBTree method (vs advancing front for
    faceAreaWeightAMI).

  - Use by setting the AMIMethod entry when specifying the AMI in the
    constant/polyMesh/boundary file, e.g.

        AMI
        {
            type            cyclicACMI;
            AMIMethod       faceAreaWeightAMI2D; // new method
            Cbb             0.1; // optional coefficient
            nFaces          1000;
            startFace       100000;
            matchTolerance  0.0001;
            transform       noOrdering;
            neighbourPatch  AMI1;
            nonOverlapPatch AMI1_non_overlap;
        }

  - The optional Cbb coeffcient controls the size of the bounding box used when
    looking for candidate pairs; the value of 0.1 is the default and worked well
    for a large range of test cases. For badly matched AMI patches this may need
    to be increased.

- Deprecated the partialFaceAreaWeightAMI class - primarily used by ACMI:
  - functionality now offered by the AMI variants.
2021-06-18 10:31:58 +00:00
3e5056144d ENH: Vector2D - added isClose function 2021-06-18 10:31:58 +00:00
b8768e2878 Merge branch 'feature-prghTotalPressurePermeable' into 'develop'
ENH: Adding new permeable boundary conditions and a tutorial

See merge request Development/openfoam!471
2021-06-17 20:53:50 +00:00
775194bea1 TUT: new multiphase tutorial: damBreakPermeable 2021-06-17 18:21:25 +01:00
3f7c057712 ENH: Adding new permeable boundary conditions
- prghPermeableAlphaTotalPressure for p_rgh
- pressurePermeableAlphaInletOutletVelocity for U
- new helper class for pressure-related BCs: updateableSnGrad
2021-06-17 18:21:22 +01:00
371619bc7a BUG: rigidBodyMeshMotion: do not access uninitialised. Fixes #2127 2021-06-17 16:46:35 +01:00
9823ddd480 STYLE: createBafflesDict: not used. Built-in into blockMesh 2021-06-17 16:08:36 +01:00
f46c57951d STYLE: dynamicFvMesh: indentation, naming 2021-06-17 14:46:25 +01:00
0110e69018 BUG: tutorial: missing writing of phi. Fixes #2124 2021-06-17 11:48:46 +01:00
1f84dcbac6 ENH: blockMesh: avoid 'empty' for initial mesh. Fixes #2125. 2021-06-17 10:18:39 +01:00
ee4f7feb30 ENH: noiseModel - report missing octave bands 2021-06-16 20:48:30 +01:00
98abafccdb Merge branch 'feature-multiRegion' into 'develop'
ENH: Added new multiRegion function object

See merge request Development/openfoam!470
2021-06-16 11:48:20 +00:00
af86d19ea5 ENH: Added new multiRegion function object
Wrapper that clones the supplied object for each region.

Simplifies the setup of identical post-processing requirements for
multi-region cases.
Applies the supplied function to all regions by default.

Example of function object specification:

    multiRegion
    {
        type    multiRegion;
        libs    (utilityFunctionObjects);
        ...

        function
        {
            // Actual object specification
            type    fieldMinMax;
            libs    (fieldFunctionObjects);
            fields  (<field1> .. <fieldN>);
        }

        // Optional entries
        regions     (region1 region2);
    }

    Where the entries comprise:
        Property   | Description                    | Reqd | Default
        type       | Type name: multiRegion         | yes |
        function   | Function object sub-dictionary | yes |
        regions    | List of region names           | no  | all
2021-06-16 13:44:50 +02:00
89de932685 Merge branch 'feature-multifieldvalue' into 'develop'
ENH: new multiFieldValue function object

See merge request Development/openfoam!469
2021-06-16 09:25:13 +00:00
ea12bfdb0f ENH: new multiFieldValue function object
Computes a selected operation between multiple \c fieldValue function
    objects.

    The operation is applied to all results of each \c fieldValue object.

Note
    Each object must generate the same number and type of results.

Usage
    Minimal example by using \c system/controlDict.functions:

    multiFieldValue1
    {
        // Mandatory entries (unmodifiable)
        type            multiFieldValue;
        libs            (fieldFunctionObjects);

        // Mandatory entries (runtime modifiable)
        operation       subtract;

        // List of fieldValue function objects as dictionaries
        functions
        {
            region1
            {
                ...
            }
            region2
            {
                ...
            }

            ...

            regionN
            {
                ...
            }
        }

        // Optional (inherited) entries
        ...
    }

    where the entries mean:

      Property     | Description                         | Type | Req'd | Dflt
      type         | Type name: multiFieldValue          | word |  yes  | -
      libs         | Library name: fieldFunctionObjects  | word |  yes  | -
      operation    | Operation type to apply to values   | word |  yes  | -
      functions    | List of fieldValue function objects | dict |  yes  | -
    \endtable

    Options for the \c operation entry:

       add           | add
       subtract      | subtract
       min           | minimum
       max           | maximum
       average       | average

Deprecated fieldValueDelta

- The fieldValueDelta function object was originally written to compute the
difference between two fieldValue-type function objects. The multiFieldValue
object name better describes its purpose whilst being able to operate on an
arbitrary number of fieldValue-type objects.
2021-06-16 11:19:44 +02:00
b6e8768034 CONFIG: update compiler versions
TUT: add missing restore0Dir (finiteArea)

STYLE: doc spelling
2021-06-14 19:20:15 +02:00
82fdeaf679 BUG: redistributePar: preserve zone ordering. Fixes #2120 2021-06-14 16:36:48 +01:00
64fb07c5db Merge branch 'feature-relax-fan-jump' into 'develop'
ENH: Added under-relaxation to jump conditions

See merge request Development/openfoam!467
2021-06-14 15:34:43 +00:00
f54b190f31 ENH: Jump conditions - added optional minimum jump value
Example:

    plane
    {
        type            fan;
        patchType       cyclic;
        jump            uniform 0;
        value           uniform 0;
        uniformJump     false;

        relax           0.2;

        jumpTable       ( (1000 0) (-200 1) (20 2) (-0.75 3) );

        // Optional minimum jump value
        minJump         0;
    }
2021-06-14 14:52:35 +00:00
05e0749d0e ENH: Added under-relaxation to jump conditions
Currently only applied to the fanFvPatchField, e.g.

    plane
    {
        type            fan;
        patchType       cyclic;
        jump            uniform 0;
        value           uniform 0;
        uniformJump     false;

        // Optional under-relaxation
        relax           0.2;

        ...
    }
2021-06-14 14:52:35 +00:00
30da494e55 STYLE: PatchParticleHistogram: simplify output for further parsing
CONFIG: update completion_cache
2021-06-11 17:18:36 +02:00
ae02a86562 ENH: multi-region support for reconstructParMesh (#2072) 2021-06-11 17:18:35 +02:00
620fe96c02 ENH: multi-region support for rotateMesh (#2072) 2021-06-11 17:18:35 +02:00
c4b0f3c63d STYLE: direct inclusion of region options 2021-06-11 17:18:20 +02:00
2797a8be25 TUT: missing run-limit on tutorials/Alltest 2021-06-11 11:18:01 +02:00
596d8fab39 Merge branch 'feature-distanceSurface-filtering' into 'develop'
ENH: add proximityRegions filter to distanceSurface (#2108)

See merge request Development/openfoam!460
2021-06-10 19:13:40 +00:00
ca88abba7e ENH: add proximityRegions filter to distanceSurface (#2108)
- combines region-based and proximity-based filtering

  proxityRegions (post-filter):
    Checks the distance of the resulting faces against the original
    search surface. Filters based on the area-weighted distance
    of each topologically connected region.
    If the area-weighted distance of a region is greater than
    \c absProximity, the entire region is rejected.

STYLE: 'proxityFaces' as newer synonym for 'proximity' filter
2021-06-10 18:21:04 +02:00
b6b4ab071d ENH: additional patch expressions (#2114)
- snGrad, internalField, neighbourField.
  Functional use as per swak: "... + internalField(T) ..."

ENH: additional volume/patch expressions

- deltaT()

STYLE: rename exprDriverWriter -> fvExprDriverWriter

- the original class name was a misnomer since it holds a reference
  to fvExprDriver

BUG: expression faceToPoint/pointToFace definitions were flipped

ENH: refactor expression hierarchy and code style

- handle TimeState reference at the top-level for simpler derivations

- unified internal search parameters (cruft)
2021-06-10 18:02:16 +02:00
239a7884a6 ENH: more flexible finiteArea patch selection (#2084)
- support wordRes for selecting patch names

- ownerPolyPatch specification is now optional, which simplifies input
  and also supports a faMesh spanning different patches but with a
  single boundary condition.

  Alternatively, can specify more granularity if required.

  ```
  polyMeshPatches  ( "top.*" );

  boundary
  {
      inlet1
      {
          type patch;
          ownerPolyPatch top1;    // <- specific to this portion
          neighbourPolyPatch inlet;
      }
      inlet2
      {
          type patch;
          ownerPolyPatch top2;    // <- specific to this portion
          neighbourPolyPatch inlet;
      }
      outlet
      {
          type patch;
          neighbourPolyPatch outflow;
      }
      bound
      {
          type symmetry;
          neighbourPolyPatch bound;
      }
  }
  ```
2021-06-10 09:25:00 +02:00
7b14af4230 DOC: reorganize Requirements.md, additional note for openSUSE leap
- move unreferenced Config.md to wiki content
2021-06-10 08:38:20 +02:00
853010309d ENH: replace tutorials/AutoTest with bin/foamTestTutorial
- additional -serial/-parallel option:
  prefer Allrun-serial or Allrun-parallel if available

- optional -output=DIR to preserve output

ENH: report missing tutorials/ directory in RunFunctions
2021-06-10 08:38:20 +02:00
c7bde70ecb ENH: robustness, consistency for wmake -show-api, -version
- add to wmakeFunctions to ensure it works even without 'make' being
  installed. Exit immediately after -show-api for consistency with
  -version.

foamEtcFile:
  - drop warnings for some old (pre-v1812) defunct options
    and simply flag as unknown options.
  - handle -version, --version as equivalent to -show-api
2021-06-10 08:34:43 +02:00
1afa6f1b46 COMP: PengRobinsonGas: construction order. 2021-06-09 16:33:24 +01:00
2941d0387d Merge branch 'issue-1452-solverInfo-writeResidualFields' into 'develop'
BUG: fixing various bugs for v2106

See merge request Development/openfoam!420
2021-06-09 14:28:51 +00:00
d92edabcb6 ENH: atmBoundaryLayer: ensure PatchFunction1s are valid 2021-06-09 14:28:18 +00:00
ab49eaf983 BUG: cellLimited<cubic>: ensure the limiter is differentiable (fixes #2113) 2021-06-09 14:28:18 +00:00
b4724c37ad DOC: solverInfo FO: improve header-file documentation
- TUT: solverInfo FO: add an example to pisoFoam/cavity
2021-06-09 14:28:18 +00:00
02129b0846 BUG: solverInfo: ensure access to initial residual fields (#1452)
Prior to the commit, initial residual fields were registered by
the `setResidualField()` function of a linear solver with a field name
prefixed by `residual:`. However, `solverInfo` FO could only access to
the initial residual fields prefixed by `initialResidual:`.

Due to this discrepancy, using `solverInfo` FO with `writeResidualFields=true`
option was resulting in empty residual fields to be output.
2021-06-09 14:28:18 +00:00
4eba7481bc BUG: DEShybrid: replace hardcoded scalar with SMALL (#2082) 2021-06-09 14:28:18 +00:00
0cc201e2b8 ENH: turbulenceProperties: make turbulence switch optional (#2112) 2021-06-09 14:28:18 +00:00
348ae6f4be COMP: incGamma: adjustments for int64 (#2100) 2021-06-09 14:28:18 +00:00
9dda3626b3 Merge branch 'tutorial-finiteArea' into 'develop'
TUT: finiteArea: clean up tutorials

See merge request Development/openfoam!451
2021-06-09 13:41:54 +00:00
de9657dd20 TUT: finiteArea: clean up tutorials 2021-06-09 13:41:45 +00:00
88f7dd7393 Merge branch 'feature-normalisation-dfsem' into 'develop'
ENH: turbulentDFSEMInlet: various improvements

See merge request Development/openfoam!454
2021-06-09 13:41:02 +00:00
f5fe37114f TUT: turbulentDFSEMInlet: update DFSEM tutorials (fixes #2097) 2021-06-09 13:40:51 +00:00
b9c174312b ENH: turbulentDFSEMInlet: refactoring by PatchFunction1
- ENH: turbulentDFSEMInlet: add normalisation factors for
input Reynolds stresses, mean velocity and integral-length
scales as entries `Uref` and `Lref`.
- ENH: turbulentDFSEMInlet: add scaling factor entries, `scale`
and `m`, to enable users to tune C1 normalisation coefficient,
if need be.
- BUG: turbulentDFSEM: (fixes #1004 #1744 #2089)
- see #2090 for theoretical issues related to the DFSEM method.
2021-06-09 13:40:51 +00:00
c6759692ba BUG: MappedFile: ensure separate entry scopes (fixes #2098)
BUG: MappedFile: ensure rmap() and automap() consistent
2021-06-09 13:40:51 +00:00
53f6431c31 Merge branch 'tutorial-basic-IO-preProcessing-verificationAndValidation' into 'develop'
TUT: basic, IO, preProcessing, VV: clean up tutorials

See merge request Development/openfoam!464
2021-06-09 13:39:15 +00:00
3384d37a9a TUT: basic, IO, preProcessing, VV: clean up tutorials
- TUT: mesh: add missing SnakeRiverCanyon files
- TUT: mesh: add missing cp source in a foamyHexMesh tutorial
2021-06-09 11:16:08 +01:00
48cdf5523b Merge branch 'vv-lagrangian-heat-transfer-models' into 'develop'
ENH: CloudFunctionObject: new particle function objects

See merge request Development/openfoam!443
2021-06-08 20:35:30 +00:00
7788a1a01a TUT: sprayFoam: add examples for the new cloud function objects
- ReynoldsNumber (thermo)
- NusseltNumber
- HeatTransferCoeff
2021-06-08 20:34:28 +00:00
d3d82c6a26 ENH: lagrangian: add new CloudFunctionObjects
New cloud function objects:
- ReynoldsNumber (for kinematic parcels, i.e. KinematicReynoldsNumber)
- ReynoldsNumber (for thermo/reacting parcels, i.e. ThermoReynoldsNumber)
- NusseltNumber
- HeatTransferCoeff
2021-06-08 20:34:28 +00:00
ea0afd8a35 ENH: lagrangian: split macros for CloudFunctionObjects
three macros:
- makeParcelCloudFunctionObjects for kinematic parcels
- makeThermoParcelCloudFunctionObjects for thermo parcels
- makeReactingParcelCloudFunctionObjects for reacting parcels
2021-06-08 20:34:28 +00:00
1911dba4d5 DOC: lagrangian: review heat transfer models 2021-06-08 20:34:28 +00:00
283c94fdd0 ENH: RanzMarshall: generalises the Nusselt-number correlation 2021-06-08 20:34:28 +00:00
1f8c6e0f5b ENH: rhoThermos: enable transport:tabulated + equationOfState:icoPolynomial 2021-06-08 20:34:28 +00:00
a857c8d3ad Merge branch 'issue-2076-updategeoVoF' into 'develop'
ENH: update geoVoF module (#2076)

See merge request Development/openfoam!450
2021-06-08 20:29:56 +00:00
9dada5f3f2 ENH: geoVoF module has the capability to run AMR with load balancing
code style and quality improvements
renamed recon::centre to interfaceCentre.{groupName}
ranmed recon::normal to interfaceNormal.{groupName}
centre and normal field are not written by default
2021-06-08 20:25:53 +00:00
7e4cd55882 Merge branch 'tutorial-combustion' into 'develop'
TUT: combustion: clean up tutorials

See merge request Development/openfoam!461
2021-06-08 20:24:34 +00:00
ab5c7765c4 TUT: combustion: clean up tutorials 2021-06-08 20:17:19 +00:00
1a747a12ab Merge branch 'tutorial-incompressible' into 'develop'
TUT: incompressible: clean up tutorials

See merge request Development/openfoam!462
2021-06-08 20:16:59 +00:00
e81cf778a1 TUT: incompressible: clean up tutorials 2021-06-08 20:15:47 +00:00
3395cba40e Merge branch 'tutorial-mesh-multiphase' into 'develop'
TUT: mesh, multiphase: clean up tutorials

See merge request Development/openfoam!465
2021-06-08 20:14:39 +00:00
91c1e8efe2 TUT: multiphase: clean up tutorials 2021-06-08 20:14:09 +00:00
3a858ac682 TUT: mesh: clean up tutorials 2021-06-08 20:14:09 +00:00
6120e13d29 ENH: add tmp/refPtr support for setting cref/ref from pointer
- makes it easier to use for local or alternative storage.
  Eg,

  ```
      tmp<volScalarField> tfld;

      tfld.cref(obj.cfindObject<volScalarField>("name"));

      if (!tfld)
      {
          tfld = volScalarField::New("name", ...);
      }
  ```
2021-06-08 14:01:08 +02:00
e2c8b0b13f TUT: avoid xterm in mpi schema (multiWorld) 2021-06-07 17:24:54 +02:00
3a2e725253 Merge branch 'issue-1922-user-access-to-dictionary' into 'develop'
add access to dictionary context for dynamic-coded items.

See merge request Development/openfoam!466
2021-06-07 14:23:45 +00:00
c2692e7c99 TUT: example of user access for Function1 2021-06-07 15:21:02 +02:00
b59ae32d68 ENH: provide dictionary access for coded BCs etc (#1922)
- in some cases, additional dictionary inputs are useful for extending
  the input parameters or functionality of dynamic coded conditions.

  Typically this can be used to provide a simple set of dictionary
  inputs that are used to drive specific code, but allows changing the
  inputs without causing a recompilation.

  Accessed with this type of code:
  ```
  const dictionary& dict = this->codeContext();
  ```

boundary conditions and function objects:

* specify an additional codeContext dictionary entry:
  ```
  codeContext
  {
      ...
  }
  ```

PatchFunction1:

* The code context dictionary is simply the dictionary used to specify
  the PatchFunction1 coefficients.

  To replicated persistant data, use local member static data.
  Eg,
  ```
  code
  #{
      // Persistent (Member) Data
      static autoPtr<Function1<scalar>> baseVel;
      static autoPtr<Function1<vector>> baseDir;
      ...
  #}
  ```

fvOptions:

* currently not applicable
2021-06-07 10:28:15 +02:00
b0891824fa ENH: improve codeTemplates
- meshTools include/library for many (most) coded items

- add PatchFunction1 include for coded BCs to provide ready access
  to Function1 and PatchFunction1
2021-06-07 09:48:21 +02:00
2f6739b140 ENH: protected method fa/fv option::resetApplied()
- resizes to current fieldNames_ size and assigns everything to
  false to avoid any "stickiness" if the field ordering changes
  between reads.

ENH: additional debugging faOption/fvOption (#2110)

- aids tracing which sources are being used/ignored
- update code style

STYLE: rename CodedSource -> CodedFvSource

- avoid future name clashes with CodedFaSource
2021-06-07 09:47:54 +02:00
d5a8ca5660 DOC: adjust documented requirements (#2068) 2021-05-31 21:05:33 +02:00
9f26e6738f COMP: fix linkage on some libs and utils (general and mingw)
- remove finiteVolume dependency from libfaDecompose
2021-05-31 20:54:58 +02:00
e681c127f2 CONFIG: accept module-prefix 'none' as equivalent to 'false' (ie, disabled) 2021-05-31 11:14:49 +02:00
0ba43df9c5 STYLE: remove erroneous reference in dynamicCast use 2021-05-31 09:11:49 +02:00
5d9e42cb70 ENH: multi-region support for transformPoints (#2080) 2021-05-30 21:33:20 +02:00
3e87a46498 ENH: multi-region support for foamToEnsight (#2080)
- additional finite-area support too.
2021-05-30 21:02:59 +02:00
9f5df1adba ENH: additional ensight output routines for finite-area fields (#2084)
- adds support for retaining local face numbers, to allow direct
  addressing into the corresponding area field
2021-05-30 21:02:59 +02:00
6c4a1b17ad ENH: update vtk reading to handle new legacy format (#2094)
- with the changes in vtkCellArray, the legacy files now have
  OFFSET, CONNECTIVITY information.

- support reading of both versions.

- continue to generate legacy format 2.0, since this is what
  many programs still expect
2021-05-30 21:02:59 +02:00
82cc00b153 STYLE: VTK ascii output with 9 items per line
- corresponds to the more recent VTK convention
2021-05-30 21:02:59 +02:00
f2d634c49f ENH: cellShape::reset() - simplifies modification of existing shapes 2021-05-30 21:02:59 +02:00
5ec49a3898 Merge branch 'finiteArea-decompose' into 'develop'
support parallel creation of finiteArea meshes with on-the-fly decomposition of fields #2084

See merge request Development/openfoam!457
2021-05-28 18:14:53 +00:00
f421e29c2e ENH: improved handling of dangling finiteArea edges (#2084)
- restrict searching to patch quantities to avoid triggering
  mesh edge calculations
2021-05-27 21:04:55 +02:00
ac51890051 ENH: parallel makeFaMesh with consistency on processor boundaries (#2084)
- consider the neighbour polyPatch addressing on the connecting edge,
  even when the neighbouring processor does not have a corresponding
  section of the finiteArea mesh.

  These "dangling" edges now propagate their real connectivity across.
2021-05-27 21:04:55 +02:00
e8d048d777 ENH: parallel makeFaMesh with addressing and field decomposition (#2084) 2021-05-27 21:04:55 +02:00
02bf8928cb ENH: faMeshReconstructor for reconstructing equivalent serial faMesh (#2084)
- A bare-bones reconstructor for finiteArea meshes when processor
  meshes are available (in parallel) but an equivalent serial faMesh
  is needed for reconstruction or decomposition.
  In these situations, a serial version of the faMesh is needed,
  but preferably without reconstructing the entire volume mesh.

  It uses the finiteVolume faceProcAddressing in addition to
  the geometric information available from the underlying polyMesh.

  The resulting equivalent faMesh can be used for basic operations,
  but caution should be exercised before attempting large operations.
2021-05-27 21:04:55 +02:00
2d9b31f6a4 ENH: support fa/fv field decomposers without the complete mesh (#2084) 2021-05-27 21:04:55 +02:00
0ae17908a2 ENH: collect and cleanup decompose and reconstruct methods (#2084)
- new faDecompose and faReconstruct libraries

- provide common readFields in the faDecompose library
2021-05-27 21:04:55 +02:00
830a217353 TUT: use system/ location instead of constant/faMesh/ for faMeshDefinition
- adjust surfactantFoam/planeTransport tutorial to have partial
  coverage of the plate by the finiteArea mesh.

  Depending on the decomposition, the outflow boundary may coincide
  with a processor patch (good for testing purposes).

- additional Allrun-parallel versions for targetted future behaviour
2021-05-27 21:04:55 +02:00
5076e6a745 CONFIG: adjust cleanup for faMeshDefinition constant/ or system/ locations 2021-05-27 21:04:55 +02:00
0cf4aede6e ENH: initial revamp of faMesh to improve modularity (#2084)
- improved separation of patch creation that is also parallel-aware,
  which now allows creation in parallel

- memory-safe use of PtrList for adding patches, with a more generalized
  faPatchData helper

- use uindirectPrimitivePatch instead of indirectPrimitivePatch
  for internal patch handling.

- align boundary methods with polyMesh equivalents

- system/faMeshDefinition instead of constant/faMesh/faMeshDefinition
  as per blockMesh convention. Easier to manage definitions, easier
  for cleanup.

- drop inheritence from GeoMesh.
2021-05-27 21:04:55 +02:00
0a5a0c29d7 ENH: lazier demand-driven evaluation in faOption
STYLE: namespace qualifiers on fa/fv option
2021-05-27 21:04:55 +02:00
0abafd98c7 BUG: areaWrite fails with partial fields (#2084)
- depending on how the finiteArea is split up across processors,
  it is possible that some processors have failed to register
  fields in their object registry.

  Now ensure that the field names are synchronized in parallel before
  attempting a write. Replace locally missing fields with a dummy
  zero-sized field.
2021-05-27 21:04:16 +02:00
2990b14d89 ENH: add more direct methods for getting meshEdge (PrimitivePatch)
- refine definition of patch boundary faces to distinguish between
  boundaryFaces() and uniqBoundaryFaces().

  * boundaryFaces() for edge to face lookup on boundary edges.
  * uniqBoundaryFaces() for accessing quantities such as face areas
    or eroding an outer layer

ENH: LabelledItem container, replaces unused 'Keyed' container

- method names in alignment with objectHit, pointIndexHit etc.
  Top-level name aligns with labelledTri.
2021-05-27 15:42:46 +02:00
aeb9644db4 ENH: use common internal calls for VTK begin/end DataArray
- reduces common boilerplate, ensures that label fields are
  more easily handled.
2021-05-27 15:41:21 +02:00
48c05e5441 ENH: mpirunDebug improvements
- provide '-clean' option for removing old files

- handle out of order '-decomposeParDict' as per RunFunctions

- implicit no-prompt '-yes' with the shortcuts (eg, -log, -xterm)
  and set -local if not already defined

- accept <return> to select defaults
2021-05-27 15:40:55 +02:00
da30533a8f Merge branch 'bugfix-issue-2016-geoVoF-infiniteloop' into 'develop'
BUG: normalResidual has the potential to contain uninitialized values

See merge request Development/openfoam!455
2021-05-27 09:01:13 +00:00
eb8e0aefa5 BUG: normalResidual has the potential to contain uninitilized values 2021-05-27 09:00:46 +00:00
6c3a868fbe Merge branch 'tutorial-compressible' into 'develop'
TUT: compressible: clean up tutorials

See merge request Development/openfoam!459
2021-05-27 09:00:22 +00:00
7ce111809e TUT: compressible: clean up tutorials 2021-05-27 08:59:28 +00:00
f3d715dd13 Merge branch 'feature-spalart-allmaras-model' into 'develop'
ENH: SpalartAllmaras: add estimation functions for k, epsilon and omega

See merge request Development/openfoam!441
2021-05-27 08:59:05 +00:00
42bbd05992 TUT: SpalartAllmaras: add showcase for k/epsilon/omega estimation funcs
TUT: airfoil2D: clean up the tutorial case
2021-05-27 09:04:53 +01:00
c7357bd1c3 ENH: SpalartAllmaras: add estimation functions for k, epsilon and omega
ENH: SpalartAllmaras: reduce peak-memory usage
2021-05-27 09:04:47 +01:00
3273e6c21a BUG: extrudeMesh: copy original patch. See #2103
This is a partial fix for #2103. If there are no points
extruded for a stand-alone mesh (so not adding to mesh)
it should still include the original patch points. Not
doing so would generate illegal faces (also copiedPatchPoints
would not get set).
2021-05-26 14:14:34 +01:00
ab00110b5c Merge branch 'feature-spline-extrudeMesh' into 'develop'
INT: splineEdge: allowing usage in extrudeMesh. See #1983.

See merge request Development/openfoam!453
2021-05-26 12:22:25 +00:00
4a87e2d0b4 INT: splineEdge: allowing usage in extrudeMesh. See #1983. 2021-05-26 12:22:24 +00:00
8be49d8683 Merge branch 'tutorial-heat-transfer' into 'develop'
TUT: heatTransfer: clean up tutorials

See merge request Development/openfoam!458
2021-05-26 11:36:21 +00:00
f62a599eef TUT: heatTransfer: clean up tutorials 2021-05-26 11:35:49 +00:00
ad75af0e50 Merge branch 'feature-localWorld' into 'develop'
Support AMI for multi-world operation

See merge request Development/openfoam!456
2021-05-26 08:27:31 +00:00
f44dbbc200 ENH: Support AMI for multi-world operation. Fixes #2099
Multi-world operation now supports AMI:

    // What to sample:
    sampleMode      nearestPatchFaceAMI;
2021-05-26 08:27:30 +00:00
9a3d27e3df ENH: blockMesh: enable named blocks and mergePatchPairs. Fixes #2088. 2021-05-20 16:13:52 +01:00
f99ba1adbd CONFIG: bump API to 2103
- reflect updated tokenizing of expressions, scotch/paraview version
2021-05-19 18:25:17 +02:00
cb7d8cef78 SUBMODULE: style/code updates for cfmesh, openqbmm, external-solver 2021-05-19 18:16:06 +02:00
b2ab5e8ae9 CONFIG: update scotch (6.1.0), paraview (5.9.1) and petsc (3.15.0) 2021-05-19 18:16:06 +02:00
4028738327 ENH: redistributePar - detect if reconstruct is required (#2092) 2021-05-19 18:16:06 +02:00
0df219d1b3 ENH: expose decomposePar -dry-run options -domains, -method
- can now drop older Test-decomposePar for exploration purposes
  and simply use -dry-run with the -domains and -method options.

- write VTK file instead of volScalarField in combination
  with -dry-run and -cellDist.

  Avoids adding any OpenFOAM fields and is usually faster to load.
  Also easier to rename than a volScalarField would be when exploring
  multiple decompositions.
2021-05-19 18:16:05 +02:00
0ea709e5ee STYLE: minor code reduction in reconstructParMesh 2021-05-19 18:16:05 +02:00
0affbceaca ENH: 'foamToVTK -finite-area' option (compat: -finiteAreaFields)
- aligns with the resulting VTK subdirectory name
2021-05-19 18:16:05 +02:00
edbee86271 Merge branch 'update-tokenizer' into 'develop'
ENH: adjust tokenizing

See merge request Development/openfoam!452
2021-05-19 16:11:50 +00:00
ec81436cce TUT: generalize (parameterize) blockMeshDict for half-cylinder geometries
- profit from some of the recent modifications to parser expansion

TUT: adjust some #eval statements for less clutter
2021-05-19 17:33:25 +02:00
2dbabb242b ENH: namedDictionary for managing keyword/dictionary combinations
- reworked from the openfoam.org wordAndDictionary version.

Allows, for example, named entries in topoSet.
2021-05-19 17:13:24 +02:00
c9fda67b5f ENH: refactor function arg splitting -> stringOps::splitFunctionArgs 2021-05-19 16:20:12 +02:00
44a243a94d ENH: improve stream handling of expansions (#2095)
* removed internal upper limit on word/string length for parsed input.

  - Although it has not caused many problems, no reason to retain
    these limits.
  - simplify some of the internal logic for reading string-like items.
  - localize parsers for better separation from the header

  - expose new function seekCommentEnd_Cstyle(), as useful
    handler of C-style comments

* exclude imbalanced closing ')' from word/variable

  - previously included this into the word/variable, but makes more
    sense to leave on the parser for the following token.

    Prevents content like 'vector (10 20 $zmax);' from being parsed
    as '$zmax)' instead of as '$zmax' followed by a ')'.
    No conceivable reason that the former would actually be desirable,
    but can still be obtained with brace notation: Eg, '${zmax)}'

* consistent handling of ${{ ... }} expressions

  - within a dictionary content, the following construct was
    incorrectly processed:

        value ${{2*sqrt(0.5)}};

    Complains about no dictionary/env variable "{2*sqrt(0.5)}"

    Now trap expressions directly and assign their own token type
    while reading. Later expansion can then be properly passed to
    the exprDriver (evalEntry) instead of incorrectly trying
    variable expansion.

    Does not alter the use of expressions embedded within other
    expansions. Eg, "file${{10*2}}"

* improve #eval { ... } brace slurping

  - the initial implementation of this was rudimentary and simply
    grabbed everything until the next '}'.  Now continue to grab
    content until braces are properly balanced

    Eg, the content:   value #eval{${radius}*2};

    would have previously terminated prematurely with "${radius" for
    the expression!

NOTE:
    both the ${{ expr }} parsed input and the #eval { ... } input
    discard C/C++ comments during reading to reduce intermediate
    overhead for content that will be discarded before evaluation
    anyhow.

* tighten recognition of verbatim strings and expressions.

  - parser was previously sloppy and would have accepted content such
    as "# { ..." (for example) as an verbatim string introducer.
    Now only accept parse if there are no intermediate characters
    discarded.
2021-05-18 15:41:26 +02:00
efd1ac4b5f ENH: adjust token in preparation for separate expression tokenization
- minor simplification of #if/#endif handling

ENH: improve input robustness with negative-prefixed expansions (#2095)

- especially in blockMeshDict it is useful to negate an value directly.
  Eg,
  ```
     xmax  100;
     xmin  -$xmax;
  ```
  However, this fails since the dictionary expansion is a two-step
  process of tokenization followed by expansion. After the expansion
  the given input would now be the following:
  ```
     xmax  100;
     xmin  - 100;
  ```
  and retrieving a scalar value for 'xmin' fails.

  Counteract this by being more generous on tokenized input when
  attempting to retrieve a label or scalar value.
  If a '-' is found where a number is expected, use it to negate the
  subsequent value.

  The previous solution was to invoke an 'eval':
  ```
     xmax  100;
     xmin  #eval{-$xmax};
  ```
  which adds additional clutter.
2021-05-18 15:30:00 +02:00
739c1c1d61 Merge branch 'feature-splitMeshRegions-merge' into 'develop'
ENH: splitMeshRegions: combine cellZones. See #2046

See merge request Development/openfoam!448
2021-05-17 10:53:41 +00:00
5120c51ba1 ENH: splitMeshRegions: combine cellZones. See #2046 2021-05-17 10:53:40 +00:00
18c1da05fd Merge branch 'refactor-schemes-handling' into 'develop'
refactor and extend handling of faSchemes/fvSchemes

See merge request Development/openfoam!449
2021-05-14 18:36:38 +00:00
3a1a160cbb ENH: refactor and extend handling of faSchemes/fvSchemes
- use common base for handling scheme lookups.
  Extended to support local injection of schemes into the dictionaries
  during runtime.
2021-05-13 15:27:24 +02:00
91ede9957c STYLE: consistency for usage of GeoMesh
- add const qualifiers on C() methods
2021-05-13 13:07:15 +02:00
662bed74f6 Merge branch 'feature-list-face-updates' into 'develop'
collected changes for Lists, faces and PrimitivePatch

See merge request Development/openfoam!446
2021-05-13 10:53:02 +00:00
5022591c36 ENH: return old file handler on change
- intended for the following type of use:

      auto oldHandler = fileHandler(fileOperation::NewUncollated());

      ... do something that only works with uncollated

      // Restore previous (if any)
      if (oldHandler)
      {
          fileHandler(std::move(oldHandler));
      }

ENH: make fileOperation distributed(bool) mutable

- use is "static-like" and akin to Pstream::parRun(bool),
  thus allow toggling of the switch without a const_cast
2021-05-13 11:39:30 +02:00
2a438385a3 STYLE: make polyMesh constructor explicit
- use polyMesh::defaultRegion instead of fvMesh::defaultRegion and
  others via static inheritance. (92 vs ~25 occurrences)
2021-05-12 11:24:57 +02:00
3bc8ab2839 ENH: improve PrimitivePatch access for edges
- return internalEdges() and boundaryEdges() sub lists directly

- calculate and return boundaryFaces() to identify faces attached to
  boundary edges.

- minor code cleanup, and add PrimitivePatchBase class for
  non-templated code.

STYLE: mark unused parameter in globalMeshData mergePoints
2021-05-12 11:24:57 +02:00
ea2bf72740 ENH: support gather of indirect list via globalIndex 2021-05-12 11:24:57 +02:00
17e6a14773 ENH: improve support for assignment from indirect list
- copy assignment from indirect list to SubList and Field
2021-05-12 11:24:57 +02:00
40567b844a DEFEATURE: remove construct List from two iterators (#2083)
- this constructor was added for similarity with std::vector,
  but continues to cause various annoyances.

  The main problem is that the templated parameter tends to grab
  anything that is not a perfect match for other constructors.

  Typically seen with two integers (in 64-bit mode), but various other
  cases as well.

  If required, the ListOps::create() function provides a lengthier
  alternative but one that can also incorporate transformations.
  Eg,

      pointField pts = ....;

      List<scalar> mags
      (
          List<scalar>::create
          (
              pts.begin(),
              pts.end(),
              [](const vector& v){ return magSqr(v); }
      );
2021-05-12 11:24:57 +02:00
c0138ee8b6 ENH: add forward/reverse circular index/value accessors for indirect lists
- improves interchangeability of List vs IndirectList
2021-05-12 11:24:57 +02:00
8eef91c5e2 ENH: improve edge access for face/triFace
- additional rcEdge(), rcEdges() methods for reverse order walk

- accept generic edge() method as alternative to faceEdge() for
  single edge retrieval.

- edge() method with points -> returns the vector

- reduce the number of operations in edgeDirection methods

DEFEATURE: remove longestEdge global function

- deprecated and replaced by face::longestEdge() method (2017-04)
2021-05-12 11:24:57 +02:00
5eb48c443a ENH: add set/zone support to randomise function object (#2086) 2021-05-12 11:24:52 +02:00
3595e6f93c COMP: specify default format for vtk::polyWriter constructor (internals)
- gcc-4.8.5 does not respect the default parameter,
  thus specify format explicitly
2021-05-12 09:50:23 +02:00
4d14c95567 ENH: change location of static ensight geometry (#2079)
Historically the "geometry" for static meshes was placed under
directly in the EnSight case directory.

Eg,

     ensight/ensight.case
     ensight/geometry
     ensight/data/000001
     ensight/data/000002 ...

This generally works ok, but relocating it to a constant data directory
Eg
     ensight/ensight.case
     ensight/data/constant/geometry
     ensight/data/000001
     ensight/data/000002 ...

Improves handling and avoids potential collisions when adding in
additional mesh regions
2021-05-10 14:34:44 +02:00
0a78e685ee ENH: introduce intermediate vtk::polyWriter class
- reduces code, simplifies creation of new, specialized polyData
  writers.

- new templated vtk::GenericPatchWriter, which adds support for
  writing both uindirectPrimitivePatch + indirectPrimitivePatch types.

- handle geometric fields separately from regular fields with
    * vtk:GenericPatchGeoFieldsWriter
    * vtk:indirectPatchGeoFieldsWriter
    * vtk:uindirectPatchGeoFieldsWriter
2021-05-10 14:34:44 +02:00
492d5cb645 ENH: support 'transform' specification for geometric decomposition
- can be used for block-like meshes that are not aligned with the global
  coordinate directions. Alternatively, for general testing purposes.

  Example,

    method  simple;
    coeffs
    {
        n       ( 2 2 2 );
        transform
        {
            origin  (-0.15 0.15 0);
            e1      (1 1 0);
            e3      (0 0 1);
        }
    }
2021-05-10 14:34:43 +02:00
36266a7e7d BUG: dynamicMotionSolverFvMeshAMI - correction for running in debug mode. See #2078 2021-05-10 13:24:26 +01:00
ac2dee910d Merge branch 'feature-allRegions' into 'develop'
add multi-region handling for checkMesh etc,  centralized the region handling #2072

See merge request Development/openfoam!445
2021-05-07 10:50:02 +00:00
1177dbd111 ENH: checkMesh: -allRegions. See #2072 2021-05-07 09:46:33 +02:00
c410edf928 ENH: centralized handling of -allRegions, -regions, -region (#2072)
Step 1.
    include "addAllRegionOptions.H"

    Adds the -allRegions, -regions and -region options to argList.

Step 2.
    include "getAllRegionOptions.H"

    Processes the options with -allRegions selecting everything
    from the regionProperties.

    OR use -regions to specify multiple regions (from
       regionProperties), and can also contain regular expressions

    OR use the -region option

    Specifying a single -regions NAME (not a regular expresssion)
    is the same as -region NAME and doesn't use regionProperties

    Creates a `wordList regionNames`

Step 3.
    Do something with the region names.
    Either directly, or quite commonly with the following

    include "createNamedMeshes.H"

    Creates a `PtrList<fvMesh> meshes`

STYLE: add description to some central include files
2021-05-07 09:46:33 +02:00
86a2ae4f03 ENH: add maxSize() and maxNonLocalSize() to globalIndex
- useful for establishing and preallocating a max buffer size
  when reading from sub-procs
2021-05-07 09:43:42 +02:00
56db12fca1 TUT: remove old metisCoeffs entries 2021-05-06 21:43:10 +02:00
3375ec952a GIT: remove unused file 2021-05-06 21:43:10 +02:00
8fcc1b893a BUG: OFstream does not remove existing link (fixes #2075) 2021-05-06 21:43:10 +02:00
03b0ca6f2e CONFIG: trap missing make command in canCompile (#2077) 2021-05-06 21:43:10 +02:00
db6c9c7bb2 BUG: cyclicAMIFvPatch - use AMI.distributed() flag instead of Pstream::parRun(). See #2078 2021-05-06 10:27:26 +01:00
bfea2326da Merge branch 'enh-streams-and-function1' into 'develop'
improve flexiblity of IOdictionary construction, use of ITstream, Function1

See merge request Development/openfoam!444
2021-04-29 08:18:21 +00:00
5a5fd1a43c COMP: sign check to avoid warnings about new[] range 2021-04-27 12:28:35 +02:00
308af39136 COMP: sign check to avoid warnings about new[] range 2021-04-27 10:20:25 +02:00
86f627b9e6 ENH: consolidate decomposition model, constructors for decomposition methods
- make regionName an optional constructor parameter, which eliminates
  a separate set of constructors and construction tables. Adjust
  internals to treat a missing/empty regionName as a no-op.

- pass in fallback dictionary content via new IOdictionary constructor
  with a pointer

ENH: further relax check for matching number of processor dirs

- if the "numberOfSubdomains" entry is missing (or even zero)
  ignore checks of processor dirs as meaningless.
2021-04-27 09:14:48 +02:00
dedb1c0c90 ENH: remove some "heavy" data when copying dictionary content 2021-04-26 17:09:39 +02:00
399c21d76c ENH: adjustments for Function1/PatchFunction1
- additional debug information

- improve support for dictionary specification of constant, polynomial
  and table entries. These previously only worked properly for
  primitiveEntry, which causes confusion.

- extend table Function1 to include TableFile functionality.
  Simplifies switching and modifying content.
2021-04-26 17:09:39 +02:00
0252b4d58d ENH: update {fa,fv}Schemes for more recent dictionary/ITstream definitions
- can construct named empty dictionary directly.
- removed some duplicate code
2021-04-26 17:09:39 +02:00
b267f8b6da ENH: add failsafe accessors for ITstream
- failsafe examine elements: peek(), peekFirst(), peekLast()
- failsafe traversing: skip()

  For example,

      ITstream& is = dict.lookup(key);
      if (is.peek().isWord())
      {
          is.skip();
      }
2021-04-26 17:09:39 +02:00
9dc3d2bf40 ENH: additional ITstream constructors
- additional default construct

- add explicit zero-size constructor for ITstream.
  For tagged dispatching, without ambiguity

- elminate mandatory name for parsing versions.
  This makes it easier to use ITstream, IStringStream, UListStream
  interchangeable.
2021-04-26 17:09:39 +02:00
eb01cab052 ENH: failsafe version of Istream peek()
- return undefinedToken on error

STYLE: fix slicing of ITstream from dictionary lookup
2021-04-26 17:09:38 +02:00
b62437081e ENH: support optional fallback content for IOdictionary 2021-04-26 17:09:38 +02:00
385f92732b STYLE: default construct empty dictionaries
- some code used copy construct from dictionary::null instead.
  The result is the same but suggests that something else may be intended.
  Only need dictionary::null for const-ref usage.
2021-04-26 17:09:38 +02:00
d2311437ef Merge branch 'feature-refactoring-dmd' into 'develop'
ENH: DMD: refactor dynamic mode decomposition FO

See merge request Development/openfoam!440
2021-04-26 14:50:44 +00:00
2c74298891 TUT: DMD: update cylinder2D with new DMD functionalities 2021-04-26 09:20:25 +00:00
2a8e1c0865 ENH: DMD: refactor dynamic mode decomposition FO
ENH: DMD: enable operations on patch fields
ENH: DMD: enable postProcess utility
2021-04-26 09:20:25 +00:00
8bfab7aa80 ENH: QRMatrix: improve stability in pinv 2021-04-26 09:20:25 +00:00
881eeb0214 TUT: atmFlatTerrain: fix atmAmbientTurbSource value (#2031) 2021-04-26 09:20:25 +00:00
7c494a6b64 ENH: accept quoted surface names in surfaceFeatureExtract (#2071)
- allows use of surface names starting with a digit
  (by quoting the name).

  User is responsible for not generating bad names for output files.
  Eg "bad.**.name", since these will be difficult to handle from the
  shell
2021-04-23 11:40:29 +02:00
8524d02218 STYLE: use full path for decompositionMethods includes
- improves overall consistency and simplifies mpi-specific reuse
  (ie, ptscotchDecomp)
2021-04-23 11:39:29 +02:00
77375a88fd CONFIG: additional intel compiler flags (#2056) 2021-04-23 11:39:29 +02:00
d549826528 CONFIG: adjust intel compiler and mpi settings (#2056)
- largely as per patch from Jong-Gwan (Jason) Do

NB: the intel-one setup adds in paths for intelmpi.
    Its mpicc version does not harmonize with the OpenFOAM
    system openmpi setup (using mpicc --showme:link).

    Needs adjustment, or use intelmpi instead.

- update name mappings for newer gcc, clang versions
2021-04-23 11:39:29 +02:00
8878050ff9 BUG: Checking sum of multiComponent mixture species
Checking for the sum of species mass fraction in multiComponentMixture.
It can't be zero at the internal field or patches. A fatal error is thrown.

A warning was added if the mixture sum is different from one. In a
re-start the mass fraction can be slightly unbounded and new
normalization is required.
2021-04-22 11:22:58 -07:00
f00357349c Merge branch 'feature-filename-regex-hashes' into 'develop'
consistency improvements for regex and hashes, etc

See merge request Development/openfoam!442
2021-04-19 16:34:09 +00:00
cf9063878e ENH: improve dynamicCode consistency
- refactor and provision for additional code context
2021-04-19 16:33:42 +00:00
2b7b3700c2 ENH: replace keyType with wordRe for matching selectors.
- The keyType is primarily used within dictionary reading, whereas
  wordRe and wordRes are used for selectors in code.
  Unifying on wordRe and wordRes reduces the number matching options.
2021-04-19 16:33:42 +00:00
95cd8ee75c ENH: improve hashing overloads of string-types and HashTable/HashSet
- additional dummy template parameter to assist with supporting
  derived classes. Currently just used for string types, but can be
  extended.

- provide hash specialization for various integer types.
  Removes the need for any forwarding.

- change default hasher for HashSet/HashTable from 'string::hash'
  to `Hash<Key>`. This avoids questionable hashing calls and/or
  avoids compiler resolution problems.

  For example,
  HashSet<label>::hasher and labelHashSet::hasher now both properly
  map to Hash<label> whereas previously HashSet<label> would have
  persistently mapped to string::hash, which was incorrect.

- standardize internal hashing functors.

  Functor name is 'hasher', as per STL set/map and the OpenFOAM
  HashSet/HashTable definitions.

  Older code had a local templated name, which added unnecessary
  clutter and the template parameter was always defaulted.
  For example,

      Old:  `FixedList<label, 3>::Hash<>()`
      New:  `FixedList<label, 3>::hasher()`
      Unchanged:  `labelHashSet::hasher()`

  Existing `Hash<>` functor namings are still supported,
  but deprecated.

- define hasher and Hash specialization for bitSet and PackedList

- add symmetric hasher for 'face'.
  Starts with lowest vertex value and walks in the direction
  of the next lowest value. This ensures that the hash code is
  independent of face orientation and face rotation.

NB:
  - some of keys for multiphase handling (eg, phasePairKey)
    still use yet another function naming: `hash` and `symmHash`.
    This will be targeted for alignment in the future.
2021-04-19 16:33:42 +00:00
b060378dca ENH: improve consistency of fileName handling windows/non-windows (#2057)
- wrap command-line retrieval of fileName with an implicit validate.

  Instead of this:
      fileName input(args[1]);
      fileName other(args["someopt"]);

  Now use this:
      auto input = args.get<fileName>(1);
      auto other = args.get<fileName>("someopt");

  which adds a fileName::validate on the inputs

  Because of how it is implemented, it will automatically also apply
  to argList getOrDefault<fileName>, readIfPresent<fileName> etc.

- adjust fileName::validate and clean to handle backslash conversion.
  This makes it easier to ensure that path names arising from MS-Windows
  are consistently handled internally.

- dictionarySearch: now check for initial '/' directly instead of
  relying on fileName isAbsolute(), which now does more things

BREAKING: remove fileName::clean() const method

- relying on const/non-const to control the behaviour (inplace change
  or return a copy) is too fragile and the const version was
  almost never used.

  Replace:
      fileName sanitized = constPath.clean();

  With:
      fileName sanitized(constPath);
      sanitized.clean());

STYLE: test empty() instead of comparing with fileName::null
2021-04-19 16:33:42 +00:00
96a1b86fb9 ENH: consistency improvements for keyType and wordRe
- simplify compile/uncompile, reading, assignment

- implicit construct wordRe from keyType (was explicit) to simplify
  future API changes.

- make Foam::isspace consistent with std::isspace (C-locale)
  by including vertical tab and form feed

ENH: improve #ifeq float/label comparisons
2021-04-19 16:33:42 +00:00
57c1fceabf ENH: disentangle testing and quoting of regex characters
- originally had tests for regex meta characters strewn across
  regExp classes as well as wordRe, keyType, string.
  And had special-purpose quotemeta static function within string
  that relied on special naming convention for testing the meta
  characters.

  The regex meta character testing/handling now relegated entirely
  to the regExp class(es).
  Relocate quotemeta to stringOps, with a predicate.

- avoid code duplication. Reuse some regExpCxx methods in regExpPosix
2021-04-19 16:33:42 +00:00
cdbc3e2de6 ENH: List/DynamicList appendUniq() method
- affords some code reduction.

STYLE: use HashSet insert() without found() check in more places
2021-04-19 16:33:42 +00:00
6dc6d7ca9a ENH: refactor generic patch fields for code reduction
- adjust compilation order to make available after
  finiteArea and finiteVolume are compiled
2021-04-19 16:33:42 +00:00
ed686f4ef6 COMP: missing separator
CONFIG: bad csh syntax
2021-04-19 16:33:42 +00:00
41d6b935dd Merge branch 'feature-snappyHexMesh-proximityCheck' into 'develop'
ENH: snappyHexMesh: block walk through other surfaces.

See merge request Development/openfoam!439
2021-04-19 09:28:54 +00:00
a9f8bc079f ENH: snappyHexMesh: block walk through other surfaces. 2021-04-19 09:22:28 +00:00
3f1f191034 BUG: noise - reinstated parallel running without processor directories 2021-04-16 09:57:44 +01:00
c1bc839841 GIT: relocate compatibility tmpNrc.H to tmp/ 2021-04-15 10:41:54 +02:00
8ad448b803 ENH: minor adjustments to token methods for more granularity 2021-04-15 10:41:54 +02:00
bb86eecdc4 ENH: add filtering version of dictionary copy
- can be useful when extracting portions of larger field files
2021-04-15 10:41:53 +02:00
100ae5c2bd ENH: fixedNormalSlip BC: add 'value' keyword (#1980, #1981)
DOC: improve header-file content

STYLE: fix stray use of wordReList instead of wordRes

Co-authored-by: Kutalmis Bercin
2021-04-15 10:41:08 +02:00
86744913f4 Merge remote-tracking branch 'origin/master' into develop 2021-04-15 10:29:07 +02:00
6740925621 CONFIG: bump patch level 2021-04-14 20:09:25 +02:00
19b90a1130 BUG: generic point patch fails (fixes #2062)
- the generic constructor could be called twice in pointPatchField::New,
  which results in an attempt to transfer tokens twice.
2021-04-14 19:35:41 +02:00
93befa4f63 ENH: surfaceNoise - added option to specify area-weighted|ensemble average 2021-04-01 13:04:01 +01:00
2dbdac109e STYLE: modifyMesh: left-over debug printing 2021-03-31 15:55:48 +01:00
c9c85d9afe BUG: primitiveMesh: incorrect uncached edgeFaces. Fixes #2047.
It was only looking for faces that were used in both
endpoints but not actually checking whether they were indeed
an edge (== consecutive vertex) in all faces. So if one
face had an additional crossing edge and another didn't it
would find more edgeFaces than the proper
'primitiveMesh::edgeFaces()' routine.
This occasionally happened inside snappyHexMesh
(e.g. motorBike tutorial)
2021-03-31 15:32:14 +01:00
fefd59f374 COMP: Allwmake: fix compilation problem
On high numbers of cores the extrudeModel/polyLine can
start compiling before blockMesh/lnInclude has been
constructed correctly.
2021-03-31 15:32:14 +01:00
6778ba9e3d Merge branch 'feature-acmi-layerAdditionRemoval' into 'develop'
Handle layer addition on acmi

See merge request Development/openfoam!434
2021-03-31 14:30:03 +00:00
22b4c44fe8 BUG: layerAddition: duplicate faces. Fixes #1988. Fixes #2036.
When extruding an edge to a patch face make sure to extrude
all the patch faces connected to that edge and cell. This
will handle cyclicACMI (has duplicate patches - AMI and non-overlap)
2021-03-31 14:29:48 +00:00
1829f7db6e BUG: fvMesh: handle cyclicACMI inside e.g. checkMesh
fvMesh::readUpdate calls polyMesh::readUpdate which updates
the ACMI (including mesh areas etc). So we should not call
polyMesh::clearOut again inside fvMesh::readUpdate to avoid
having to re-do all the ACMI.
2021-03-31 14:29:48 +00:00
aa971e901a Merge branch 'issue-2033-reactingMultiphaseEulerFoam-reactingTwoPhaseEulerFoam' into 'develop'
INT: reacting*EulerFoam: correct handling of K for energy equation (#2033)

See merge request Development/openfoam!438
2021-03-31 10:16:49 +00:00
ded81f4e65 INT: reacting*EulerFoam: correct handling of K for energy equation (#2033) 2021-03-31 10:16:23 +00:00
ef0786cca0 Merge branch 'tutorial-DNS-electromagnetics-financial-stressAnalysis' into 'develop'
TUT: DNS, electromagnetics, financial, stressAnalysis: clean up tutorials

See merge request Development/openfoam!437
2021-03-31 10:14:57 +00:00
16762e6d49 TUT: DNS, electromagnetics, financial, stressAnalysis: clean up tutorials 2021-03-31 10:14:42 +00:00
20af386290 Merge branch 'feature-radiationmodel-external-solarload' into 'develop'
ENH: solarLoad: new load model, timeDependent

See merge request Development/openfoam!431
2021-03-31 10:13:52 +00:00
82a24a39b0 ENH: solarLoad: enable time-dependent direct/diffuse irradiance
ENH: solarLoad, fvDOM: enable time-dependent spectralDistribution
DOC: solarLoad, fvDOM, solarCalculator: improve header documentation
TUT: solarLoadModel, solarDirectionModel: use new shorter entries
2021-03-31 10:13:08 +00:00
4ad4783e5f DOC: radiation fvOptions: improve documentation 2021-03-31 10:13:08 +00:00
644857ba9e SUBMODULE: update for visualization
- robuster handling of different VTK versions

- compilation changes for avalanche, cfmesh
2021-03-29 16:13:03 +02:00
21720bea12 ENH: support field width for #eval expressions
For example,
```
entry #eval 10 { vector(rand(), 0, 0) };
```

ENH: be more generous and ignore trailing ';' in expressions

STYLE: adjust parse token name for tensor::I
2021-03-29 16:00:11 +02:00
d4ac96cdf3 ENH: support use of 'vector' in #calc directive (fixes #2039) 2021-03-29 16:00:11 +02:00
4a3998c698 ENH: add exprResult output of a field without dictionary keywords 2021-03-29 16:00:11 +02:00
13ea1b70fe CONFIG: update/generalize FJMPI settings (#2044)
- previously had a very old (likely irrelevant) setting for solaris
  systems only.

- support site-specific customization.
  Eg, using etc/config.{csh,sh}/prefs.fjmpi

- remove erroneous shell redirects present in cshell files
2021-03-29 16:00:11 +02:00
b0e6c1fcd3 ENH: preserve face point order for VTK
- less important for VTK (may help in future though) but preserve
  the face point 0 when flipping faces to ensure that the result
  is the same as having called face::reverseFace()
2021-03-29 16:00:11 +02:00
8abac1dc4d Merge branch 'feature-function1-fields' into 'develop'
ENH: refactor Function1 to enable fields

See merge request Development/openfoam!435
2021-03-29 13:55:42 +00:00
7ff603d496 ENH: refactor Function1 to enable fields 2021-03-29 13:35:55 +00:00
7cd3b270d8 Merge branch 'issue-2016-geoVoF-infiniteloop' into 'develop'
BUG: possible infinteloop in plicRDF and isoAdvector - Fixes #2016

See merge request Development/openfoam!436
2021-03-26 12:11:00 +00:00
497215cc26 BUG: possible infinteloop in plicRDF and isoAdvector - Fixes #2016 2021-03-25 20:49:34 +01:00
05a0e7f371 Merge remote-tracking branch 'origin/master' into develop 2021-03-24 14:22:13 +00:00
79ea57bdc1 ENH: pointNoise - check pressure data before applying conversions 2021-03-24 13:59:15 +00:00
eb317550fe Merge branch 'tutorial-discreteMethods' into 'develop'
TUT: discreteMethods: cleanup tutorials

See merge request Development/openfoam!432
2021-03-24 13:17:15 +00:00
2fa8e5fdf3 TUT: discreteMethods: cleanup tutorials 2021-03-24 13:16:45 +00:00
c4a7563a73 Merge branch 'code-review.saf' into 'develop'
ENH: new solvers: overPhaseChangeInterFoam and overCompressibleInterDyMFoam

See merge request Development/openfoam!425
2021-03-24 13:15:22 +00:00
ad35fea763 ENH: new solvers: overCompressibleInterDyMFoam and overInterPhaseChangeDyMFoam
- overCompressibleInterDyMFoam: Overset solver for two compressible,
non-isothermal, immiscible fluids using a VOF (i.e. volume of fluid)
phase-fraction based interface capturing approach.
- overInterPhaseChangeDyMFoam: Overset solver for two incompressible,
isothermal, immiscible fluids with phase-change (e.g. cavitation) using
VoF (i.e. volume of fluid) phase-fraction based interface capturing approach.
- adds new tutorials:
  - multiphase/overCompressibleInterDyMFoam/compressibleTwoSimpleRotors
  - multiphase/overInterPhaseChangeDyMFoam/twoSimpleRotors

Signed-off-by: Kutalmis Bercin <kutalmis.bercin@esi-group.com>
2021-03-24 12:35:31 +00:00
b3142ffb54 ENH: runTimeControl - added option to trigger a fatal error on exit (#2042)
- useful when used in a batch process to trap the exit signal,
  e.g. stop the run when the velocity magnitude exceeds a given
  threshold:

    runTimeControl
    {
        type            runTimeControl;
        libs            ("libutilityFunctionObjects.so");
        nWriteStep      1;

        // Optional end 'action'
        satisfiedAction abort; // end; // setTrigger

        conditions
        {
            maxU
            {
                type            minMax;
                functionObject  MinMax;
                fields          ("max(mag(U))");
                value           1e6;
                mode            maximum;
            }
        }
    }
2021-03-23 20:49:31 +00:00
cbfa9f685e ENH: noiseModels - added feedback for the case that frequency range is empty 2021-03-23 18:10:37 +00:00
21dda3254c BUG: noiseModel - respect lower frequency bound in octave calculation. Fixes #2041 2021-03-23 17:12:43 +00:00
5ba31cd5de BUG: avoid blocking on redistributePar (continuation of #2027)
- adjust sync condition (continuation of 201f117f5f)
2021-03-23 18:00:14 +01:00
221c3c0200 ENH: add OFstream rewind() method.
- truncates output file, handles compressed streams
2021-03-23 18:00:14 +01:00
f5a931d4b5 STYLE: avoid some implicit dictionary construct from Istream 2021-03-23 17:59:46 +01:00
9cc497373b ENH: snappyHexMeshDict: added thicknessModel setting 2021-03-22 14:52:17 +00:00
1c0714f9b8 STYLE: snappyHexMeshDict: indentation 2021-03-22 14:52:17 +00:00
b99078768e ENH: downgrade missing default system/decomposeParDict to warning
- if the system/decomposeParDict is missing, skip check for matching
  number of processor dirs. This can make job dispatch easier.
  Does not apply if -decomposeParDict was explicitly specified.

STYLE: adjust naming of host/slaves in argList
2021-03-22 14:45:17 +01:00
201f117f5f BUG: prevent blocking when processor directories are missing (fixes #2027)
- ensure that the processor directory cache is consistently available
  by providing appropriate synthesized names. If the expected files
  really do not exist, it will still fail at a later point (but not in
  the caching).

  This addresses cases that have been manually distributed
  (different content on different nodes, but the same root path),
  while still maintaining the readDir on master only for massively
  parallel cases (#1946). It also addresses regular cases with
  gaps in the processor directories.
2021-03-22 14:45:17 +01:00
dc27daf4f4 ENH: additional data.class, data.format entries for collated 2021-03-22 10:47:52 +01:00
f8c2928a88 COMP: Adding fvDynamicMesh lib to option file 2021-03-18 14:12:12 -07:00
2f4d864c85 ENH: Adding dynamic mesh functionality to icoReactingMultiphaseInterFoam 2021-03-18 11:47:18 -07:00
5c4d714b45 ENH: Update icoReactingMultiPhaseInterFoam tutorials 2021-03-18 11:47:17 -07:00
85ff3d39d4 BUG: Fixing crankConRod re-reading controlDict 2021-03-18 11:47:17 -07:00
67e41f02ef ENH: Adding chemistry time scale information to EDC models 2021-03-18 11:47:17 -07:00
cd3fa1c04b BUG: Fixing pyrolysis region motion. 2021-03-18 11:47:17 -07:00
1f0476a84c Merge remote-tracking branch 'origin/master' into develop 2021-03-18 16:56:54 +00:00
dbed3a0602 BUG: Curle FO - corrected division by 4pi. Fixes #2035 2021-03-18 16:41:40 +00:00
1ca99a2c94 ENH: improve dimensions handling for setExpr* utilities (#2014)
- new '-ascii' option to write in ASCII format instead of the
  controlDict setting. This can be useful when generating fields that
  should be parsed with other tools, or for visual inspection.

- correct mismatch of option names and lookups
2021-03-18 11:53:42 +01:00
cd1350a87f ENH: support preloading fields for setExpr* utilities (#2014)
- can use either command-line option "-load-fields" or dictionary
  entry "readFields" to specify field names to be preloaded.

  Essentially the same functionality as with a readFields function
  object but with a lot less typing.

- tutorial examples provided by Ryan Danks <ryan.danks@rwdi.com>
  illustrate using setExpr* utilities to calculate a quantity
  as a post-processing step.
2021-03-17 21:42:37 +01:00
6ccc587bea ENH: reduce some code duplication in fileOperations 2021-03-17 15:52:36 +01:00
cb6dedacfc STYLE: suppress meta information for empty zone meshes 2021-03-17 15:10:00 +01:00
9a2a22a03a ENH: provide setter methods for IOobject read/write options etc.
- simplifies local toggling.

- centralize fileModification static variables into IOobject.
  They were previously scattered between IOobject and regIOobject
2021-03-17 15:10:00 +01:00
3ce18cb6e2 COMP: missing include file for math functions (FULLDEBUG)
- additional include "Switch" in expressions
2021-03-17 15:09:33 +01:00
3299f9ac0d ENH: redistributePar: single-step. See #1211
Support for DimensionedFields
2021-03-17 12:21:46 +00:00
853f50f7da Merge branch 'feature-rigidBody' into 'develop'
ENH: Improvement to overset that allows multiple motion solvers

See merge request Development/openfoam!428
2021-03-17 09:08:38 +00:00
ec609b90b8 STY: Clearing up code and updating tutrial 2021-03-17 09:07:26 +00:00
da1e6ea8d0 ENH: Improvement to overset that allows multiple motion solvers
to operate with overset

1) Adding zoneMotion to rigidBodyMotion
2) Introducing PID to prescribedRotation restraint
3) Making drivenLinearMotion read total displacement
4) When drivenLinearMotion is used sixDof and rigid-body solvers
   write total displacement
2021-03-17 09:07:26 +00:00
8d3efa1cb9 BUG: AABBTree - corrected addressing. Fixes #2028 2021-03-16 12:27:38 +00:00
1050314b8c Merge branch 'IOObject-headers' into 'develop'
file "meta" information

See merge request Development/openfoam!430
2021-03-16 08:49:21 +00:00
da44c100f0 ENH: support additional output meta data in FoamFile header
- currently add to mesh zones to provide a table of contents
  of the zone names that allows downstream consumers quick access to
  the information without needing to parse the entire file.
2021-03-16 08:47:59 +00:00
0c985edfc8 ENH: additional routines for reading/writing/parsing IOObject headers
- support selective enable/disable of the file banner.

ENH: improve code isolation for decomposedBlockData

- use readBlockEntry/writeBlockEntry to encapsulate the IO handling,
  which ensures more consistency

- new decomposedBlockData::readHeader for chaining into the
  block header information.

- remove unused constructors for decomposedBlockData

ENH: minor cleanup of collated fileOperations
2021-03-16 08:47:59 +00:00
e8cf2a2c62 ENH: more consistent use of IOstreamOption
- improves interface and data consistency.
  Older signatures are still active (via the Foam_IOstream_extras
  define).

- refine internals for IOstreamOption streamFormat, versionNumber

ENH: improve data alignment for IOstream and IOobject

- fit sizeof label/scalar into unsigned char

STYLE: remove dead code
2021-03-16 08:47:59 +00:00
e3c8af0c8f ENH: add read/write specialization for lists of character data
- read/write lists of character data in binary only.
  This is the only means of preserving data.
  If character data are written as an ASCII list, there is no means of
  determining if spaces or newlines are content or separators.
2021-03-16 08:47:58 +00:00
498de8a74a ENH: unify read/write for containers
- handle binary/contiguous first as being the most obvious, followed
  by increasing complexity of ascii.
  Structure reading and writing routines similarly by introducing a
  readList method to compliment the writeList method.
2021-03-16 08:47:58 +00:00
a76a3d760c ENH: add operator* to refPtr - makes it more like autoPtr
- would ideally like the same for tmp, but there is too much existing
  code that uses a multiply operation that would be interpreted as a
  dereference.
2021-03-16 08:47:58 +00:00
d15a396a6a TUT: add value entry for some uniformFixedValue bcs (#2014)
- generally OK to miss for easily evaluated functions, but highly
  misleading with expressions (where the evaluate may be invalid
  during construction).
2021-03-15 19:02:00 +01:00
bf0a48d68e ENH: avoid possible divide-by-zero (fixes #2025)
- based on fix supplied by Henning.Scheufler@dlr.de
2021-03-15 18:29:13 +01:00
88c256b86a ENH: add dictionaryContent wrapper
STYLE: adjust wording of age-warning
2021-03-15 16:24:42 +01:00
db343351f7 BUG: redistributePar: single-step. See #1211
- override casename, procesorCase flags to guarantee reconstructed
case to be written to the undecomposed directory
- alternative is to construct a Zero mesh on the undecomposed
runTime and add all other bits to that but that has not been
pursued
2021-03-15 08:31:10 +00:00
273741c052 BUG: correct the EnSight point value patch conversion (#2010)
- patch point ordering was affected by the EnSight face sorting
  (tri, quad, nsided). This did not affect other point fields,
  since they use the internal field values.
2021-03-12 18:13:34 +01:00
9dc70ab856 Merge branch 'tutorial-lagrangian' into 'develop'
TUT: lagrangian: clean up tutorials

See merge request Development/openfoam!429
2021-03-12 11:40:21 +00:00
86c1ecdf32 TUT: lagrangian: clean up tutorials 2021-03-12 11:40:02 +00:00
d10769f5a9 ENH: checkMesh: write surface fields. Fixes #2023 2021-03-10 18:46:40 +00:00
daf9af461c CONFIG: bump API to 2102
- fvMeshDistribute and redistributePar changes
2021-03-09 09:55:02 +01:00
fa645c2dac ENH: noexcept size_bytes() method for lists
- for use when the is_contiguous check has already been done outside
  the loop. Naming as per std::span.

STYLE: use data/cdata instead of begin

ENH: replace random_shuffle with shuffle, fix OSX int64 ambiguity
2021-03-09 09:49:31 +01:00
51cd7ceecb ENH: improvements for token methods
- direct check of punctuation.
  For example,

      while (!tok.isPunctuation(token::BEGIN_LIST)) ..

  instead of

  while (!(tok.isPunctuation() && tok.pToken() == token::BEGIN_LIST)) ..

  Using direct comparison (tok != token::BEGIN_LIST) can be fragile
  when comparing int values:

      int c = readChar(is);
      while (tok != c) ..  // Danger, uses LABEL comparison!

- direct check of word.
  For example,

      if (tok.isWord("uniform")) ..

  instead of

      if (tok.isWord() && tok.wordToken() == "uniform") ..

- make token lineNumber() a setter method

ENH: adjust internal compound method empty() -> moved()

- support named compound tokens

STYLE: setter method for stream indentation
2021-03-09 09:23:41 +01:00
ce45a12918 TUT: improve parameterization of squareBend geometry
- orient blocks in global x/y/z.
  Provisioning for coarser/smaller geometries.
2021-03-08 17:31:18 +01:00
496792f328 COMP: use single-parameter fvMeshDistribute 2021-03-08 15:34:39 +01:00
aa942aadd4 Merge branch 'develop' of https://develop.openfoam.com/Development/openfoam into develop 2021-03-08 11:07:28 +00:00
ba9e573812 ENH: redistributePar: single-step. See #1211
- single-step for reconstructParMesh
- no point merging for redistributePar -reconstruct
2021-03-08 11:01:57 +00:00
22832b87cb Merge branch 'issue-2005-objectiveManager-masked-function' into 'develop'
COMP:  objective manager masks regIOobject::write function (#2005)

See merge request Development/openfoam!427
2021-03-05 12:36:06 +00:00
50d21b32f2 GIT: removed unused files in the adjoint boundary conditions (#1994) 2021-03-05 12:35:32 +00:00
9ca6e4a548 COMP: objectiveManager::write was hiding regIOobject::write (see #2005) 2021-03-05 12:35:32 +00:00
175d35de22 TUT: minor adjustments 2021-03-05 12:51:39 +01:00
6940b08822 COMP: adjustments for OSX (#2013)
- int64 ambiguity
- std::array include

- bsd-sed syntax (replaces gnu-sed syntax):
  * wmake-build-info
  * wmake-with-bear
2021-03-05 11:17:11 +01:00
a6f7b0f2ee BUG: eigenVectors: correct field-function return type (#2011)
- return type of `eigenVectors`  field functions should be
  `tensor` instead of `symmTensor`
2021-03-04 18:08:29 +01:00
0256e20da3 BUG: reactingParcelFoam: missing entry required for dynamic mesh motion (#2019) 2021-03-04 12:41:21 +01:00
23e14cd1d9 ENH: fvMeshDistribute: single-step distribution. Fixes #1211
First receives all mesh parts and then stitches them
all together in one step. This avoids lots of intermediate
addressing calculation
2021-03-03 15:39:48 +00:00
de7bc07153 BUG: snappyHexMesh: sync deletion decision. See #1772. 2021-03-03 13:14:35 +00:00
a8c9b5936e BUG: cannot set expression from command-line (fixes #2012) 2021-02-25 08:29:15 +01:00
9b0f1b67df Merge branch 'thermo-ext' into 'develop'
Thermo ext

See merge request Development/openfoam!424
2021-02-22 16:49:01 +00:00
fcd17db839 COMP: chemkinToFoam: correct dependencies 2021-02-22 10:44:31 +00:00
fcfaf9ba88 ENH: Adding thermo pairs to Lee model 2021-02-22 10:10:11 +00:00
1020991796 ENH: Adding tabutaled type to thermoPhysicsTypes.
Adding thermo options for mass exchange Lee model for multiPhaseInter using
tabulated type of thermos.
2021-02-22 10:10:11 +00:00
125e60ca67 BUG: pointPatch value ignored in vtk, ensight conversion (fixes #2010
- pointPatches may or may not have a "value" type.
  Use the patch value field where possible and the internal field
  otherwise. Previously always used the internal field.
2021-02-19 14:14:11 +01:00
1bb7afc7fe ENH: raw format with optional output for face area normals (#2003)
- the raw surface writer simply outputs x/y/z and field values.
  This additional flag allows recovery of some geometric information.

- optional user-specified output precision

Example,
```
formatOptions
{
    raw
    {
        normal      yes;
        precision   10;
    }
}
```
2021-02-17 13:36:16 +01:00
af80006f97 Merge remote-tracking branch 'origin/master' into develop 2021-02-17 09:39:18 +01:00
66d1b54a79 ENH: 'Math' namespace for mathematical functions
- centralises existing functions (erfInv, incGamma*, invIncGamma*).
  Provides a location for additional functions in the future.

- adjusted existing models to use these functions
  (e.g. distributionModels::normal)
2021-02-16 18:08:50 +01:00
0b1a33e9be ENH: relax the tensor-inverse tolerance on Tensor (FULLDEBUG) 2021-02-16 18:00:16 +01:00
531e8ab66d CONFIG: relocate messageStream output level control to an InfoSwitch
- location and naming more consistent with other controls

    old: DebugSwitch  'level'
    new: InfoSwitch   'outputLevel'
2021-02-16 14:30:36 +01:00
b97cd5c380 ENH: add HashPtrTable release method
- effectively 'steals' the pointer from the table but leaves its
  name as a placeholder
2021-02-16 14:30:36 +01:00
f8a0677a66 ENH: replace base implementation of Foam::Swap with std::swap
- eliminates a potentially invalid code branch.
  Since it essentially had the same internals as std::swap anyhow,
  make that more evident.

ENH: use std::swap for basic types

- makes it clearer that they do not rely on any special semantics
2021-02-16 14:30:36 +01:00
8c460d8ec9 CONFIG: generate flat debian version name 2021-02-16 14:30:36 +01:00
f997013eb8 COMP: include mpi information for versioned cmake build
- since the wrapped cmake calls generally use the regular build
  locations, add in MPI information to properly handle changes
  in that as well. This makes it easier to build for multiple MPI
  instances.
2021-02-16 14:30:36 +01:00
2954f55f6a ENH: improve surfaceFieldValue sampling and writing (#1999)
- ensure surface writing is time-step and nFields aware.
  This avoids overwriting (ignoring) previous output fields.

- allow sampled surfaces to be used for weight fields as well.
  Not sure why this restriction was still there.

- remove old compatibility reading of orientedFields.
  Last used in v1612, now removed.

- only use face sampling. For surfaceFieldValue we can only do
  something meaningful with face values.

ENH: modify interface methods for surfaceWriter

- replace direct modification of values with setter methods.
  Eg,
     old: writer.isPointData() = true;
     new: writer.isPointData(true);

  This makes it possible to add internal hooks to catch state changes.

ENH: allow post-construction change to sampledSurface interpolation

- rename interpolate() method to isPointData() for consistency with
  other classes and to indicate that it is a query.

- additional isPointData(bool) setter method to change the expected
  representation type after construction

- remove 'interpolate' restriction on isoSurfacePoint which was
  previously flagged as an error but within sampledSurfaces can use
  sampleScheme cellPoint and obtain representative samples.
  Relax this restriction since this particular iso-surface algorithm
  is slated for removal in the foreseeable future.
2021-02-16 14:30:19 +01:00
0990d30b73 BUG: Adding relative flux to the mesh 2021-02-15 12:34:49 -08:00
48fdec46c7 BUG: Improving robustness of tracking on cells with detA zero
1) Small modification to the tracking logic for detA zero.
2) Adding small vector displacement to locate function to avoid error where
particle is inserted at the cell centre.
2021-02-15 12:34:49 -08:00
a334aaae78 ENH: noiseModel gainX - protect against very small input frequencies 2021-02-15 12:51:35 +00:00
ae8ccd7b94 BUG: foamToEnsight cellZones missing mesh coverage (closes #2002) 2021-02-15 13:10:01 +01:00
0ee7a23504 CONFIG: ensure PV_PLUGIN_PATH is also in the library path 2021-02-15 13:09:58 +01:00
9913dfb31a CONFIG: bump patch level 2021-02-10 13:48:10 +01:00
77c31a7bef BUG: inconsistent surfaceFieldValue writing (fixes #1999)
- setup writer outside the data loop to ensure that the number of
  output fields is correct (VTK format).

- ignore 'interpolate' on sampled surfaces to ensure proper
  face sampling, never allow point sampling

BUG: incorrect debug-switch for sampledIsoSurface
2021-02-10 13:47:53 +01:00
8f4b080542 ENH: preserve ThirdParty locations in env modules 2021-02-10 12:43:07 +01:00
9f7a400952 GIT: remove old "removed-file" dependency stubs, version file (#1994) 2021-02-10 12:43:07 +01:00
e71bf4445a GIT: fix edit errors 2021-02-10 12:43:07 +01:00
aa9cd50db9 Merge branch 'feature-PtrList' into 'develop'
PtrListOps and adjustments for sync

See merge request Development/openfoam!422
2021-02-09 19:04:04 +00:00
6cdf89dced ENH: use concise forms for walking processor and cyclic boundaries 2021-02-09 17:57:49 +01:00
f24e3f113f ENH: use PtrListOps to reduce code 2021-02-09 16:22:23 +01:00
5080d3cd1f ENH: additional PtrListOps to simplify gathering information
- get: uses access operation to get values for each list item
  Example,
  PtrListOps::get(mesh.boundaryMesh(), nameOp<polyPatch>());

- names: the name() of each list item filtered for matches

- firstMatching: index of first item with a matching name()

- findMatching: indices of items with a matching match name()
  Example,
  PtrListOps::findMatching(mesh.boundaryMesh(), wordRes( ... ));

STYLE: deprecate transitional getNameOp, getTypeOp

- use nameOp, typeOp (word.H) instead
2021-02-09 16:22:23 +01:00
10787d7e82 BUG: particle: use correct celli. Fixes #1992
Was checking the old celli instead of the result of
re-finding the position. See also Foundation commit 50a965f8866683a81d79cbc7811af7333baf9d10.
2021-02-08 10:30:09 +00:00
3941159d6a ENH: polyMesh: fixed error message 2021-02-08 10:30:09 +00:00
4245909efb BUG: typo in etc/colourTables 2021-02-03 15:05:36 +01:00
13152510b3 ENH: surfaceFieldValue - set surface output info for run-time post-processing
If the 'writeFields' option is set in surfaceFieldValue, e.g.

    surface1
    {
        type        surfaceFieldValue;
        libs        (fieldFunctionObjects);
        operation   none;
        fields      (p);
        regionType  patch;
        name        walls;

        // Create a surface in VTK format
        writeFields yes;
        surfaceFormat vtk;
    }

... the surface can now be used in runTimePostProcessing, e.g.:

    surfaces
    {
        surfaceFieldValueOutput
        {
            type            functionObjectSurface;
            representation  surface;
            liveObject      no;
            field           p;
            colourBy        field;
            range           (0 120000);
            functionObject  surface1;
        }
    }

Note: setting 'liveObject' to 'no' to suppress warnings due to the surface
not being retrieved from the object registry (default = 'yes') - this surface
can [currently] only be read from disk.
2021-01-28 16:55:30 +00:00
170d73f4ec STYLE: minor doc update 2021-01-28 16:55:30 +00:00
aa1e1eb15d COMP: fix inline friend declarations (gcc-4.8.5) 2021-01-27 10:33:19 +01:00
8bda4fadbe Merge remote-tracking branch 'origin/master' into develop 2021-01-26 17:06:33 +01:00
d70e11195c BUG: syncTools: incorrect communicator. See #1986 2021-01-26 10:28:12 +01:00
2c7e95d2cb ENH: rename protected UList size(label) -> setAddressableSize(label)
- modification/continuation of 8d63073b08 and 5c1ec7ecb8 (#595).

  Although this protected function is only used internally, the name
  `size(label)` is too easily confused with `resize(label)` and
  `setSize(label)`. The longer method name eliminates some ambiguity.
  Name consistent with PtrListDetail.

- leave size(label) method (for possible compatibility),
  but mark as deprecated

- improve sizing consistency for (Istream >> DynamicList)

STYLE: more consistent use of resize vs setSize in DynamicList

- more consistency between DynamicList and DynamicField.
  There were some inconsistencies in how construct with a size was
  interpreted.

STYLE: more consistent declaration/use of Swap
2021-01-26 09:42:29 +01:00
9b56c6b1ac ENH: consistent noexcept for list iterators and raw-data accessors
- add byteSize to FixedList and Matrix, for possible streaming

ENH: expose data/cdata for PackedList, bitSet
2021-01-26 09:42:27 +01:00
64c6f350ae ENH: simplify packaging of debian orig tarfile, support zstd compression 2021-01-26 09:42:26 +01:00
902f09b688 ENH: IOobject for header generation, preserve output format in datToFoam 2021-01-26 09:42:26 +01:00
0d6de94e8e COMP: ambiguity in IOobject::writeHeader
- a C-string is interpreted as a bool instead of as a word,
  so remove default parameter to eliminate ambiguity
2021-01-26 09:42:26 +01:00
d770ce7aa8 BUG: syncTools: incorrect communicator. See #1986 2021-01-25 18:06:28 +00:00
f88feaf0d4 BUG: surfaceFieldValue fails writing legacy VTK format
- number of fields was not set.
- interpolated surfaces incorrectly written for all formats
2021-01-22 16:20:46 +01:00
c9b34c52bb COMP: bad template for foamNewFunctionObject (closes #1987) 2021-01-22 12:46:31 +01:00
0e7a2d1529 ENH: syncTools: specialisation for contiguous data. Fixes #1986. 2021-01-20 09:33:44 +00:00
648f0593c8 ENH: primitiveMesh: do not copy input storage. See #1963. 2021-01-20 09:33:44 +00:00
81629a44d0 BUG: mapped: access map() for AMI cases. Fixes #1982
Should not call map() since it triggers building the
(one-to-one) mapping which conflicts with the self-contained
mapping of cyclicAMI
2021-01-18 18:19:24 +00:00
71812c21c5 ENH: add 'arch' information to output file headers (ASCII)
- this was previously suppressed for ASCII format as being 'clutter',
  but without it there is no context for interpreting the type of data
  contained in ASCII files: potentially leading to integer overflows
  when reading in ParaView etc.
2021-01-15 15:06:06 +01:00
80bb1b9f57 ENH: use dictionary get<> methods instead of older readScalar + lookup() 2021-01-15 15:06:06 +01:00
d38a4a9177 ENH: correct newlines in DimensionedField output
- orientedType: use explicit constructors, minor cleanup.
2021-01-15 15:06:06 +01:00
5f805b0592 TUT: add decomposeParDict for cavity
- useful for trivial tests
2021-01-15 15:06:06 +01:00
4561717c51 BUG: incorrect returned size from surfaceWriter 2021-01-13 18:05:31 +01:00
b84caecc1e BUG: useless copy of input (primitiveMeshTools::makeCellCentresAndVols) 2021-01-08 08:59:27 +01:00
84a1452995 BUG: Fix dynamicRefineFvMesh mapping flux.
dynamicRefineFvMesh optionally can map fluxes derived from velocities
fields specified in dynamicMeshDict. The surface interpolation was
using old weights. This fix clear the old weights before mapping
the fluxes
2021-01-06 10:22:36 -08:00
c036d4207b ENH: syncTools: edge orientation test. See #1974. 2021-01-06 09:58:17 +00:00
542dae4a6d ENH: syncTools: add edge orientation. Fixes #1974. 2021-01-06 09:54:37 +00:00
f5e689c6a8 BUG: redistributePar: symmetric logic. Fixes #1973. 2021-01-04 14:44:28 +00:00
d2c0c97af8 BUG: redistributePar: symmetric logic. Fixes #1973. 2021-01-04 14:42:10 +00:00
2f449c57ce DOC: adjust wording 2021-01-03 17:21:14 +01:00
0723bcbf8a GIT: reverted version back to 'com' 2020-12-23 10:01:24 +00:00
79e353b84e RELEASE: Updated version to v2012 2020-12-23 10:01:39 +01:00
c536c0fee5 TUT: use scale instead of convertToMeters 2020-12-23 09:21:14 +01:00
1a7fbc3d7f COMP: initialise to nullptr 2020-12-22 21:14:10 +00:00
7a34f29002 DOC: header documentation updates/corrections 2020-12-22 12:15:06 +00:00
77aa2e6026 COMP: corrections to interfaceTrackingFvMesh following commit 14a471f937 2020-12-22 12:15:06 +00:00
bdcc02cf64 TUT: added missing call to tutorial case 2020-12-22 12:15:06 +00:00
7bdb509494 TUT: adjust tutorials for test loop 2020-12-22 12:27:21 +01:00
e58b59ed6f CONFIG: pass through -prefix=false (ie, disable) 2020-12-21 23:52:28 +01:00
5b29be5f9b COMP: fix linkage (mingw) 2020-12-21 23:28:41 +01:00
9f865914e6 Merge branch 'issue-1962-setAlphaField' into 'develop'
BUG: setAlphaField: fix incompatibilities with BCs (#1962)

See merge request Development/openfoam!418
2020-12-21 18:55:40 +00:00
54dfcf5046 BUG: setAlphaField: fix incompatibilities with BCs (#1962)
Co-authored-by: Johan Roenby <johan.roenby@gmail.com>
Co-authored-by: Henning Scheufler <Henning.Scheufler@dlr.de>
2020-12-21 18:55:30 +00:00
e77e4dd462 Merge branch 'feature-surface-film-filmflux-fo' into 'develop'
ENH: Added new filmFlux function object

See merge request Development/openfoam!417
2020-12-21 18:06:57 +00:00
48f8811896 ENH: Added new filmFlux function object
Calculates the mass flux for surface film models.

Example usage:

    filmFlux
    {
        type            filmFlux;
        writeControl    writeTime;
        result          myPhi; // optional
    }
2020-12-21 18:06:57 +00:00
bf3e9b442d TUT: additional sampling planes, iso-surfaces 2020-12-21 18:31:23 +01:00
a2bc1fd3a6 BUG: extrudeMesh: revert previous fix. see #1964
The polyMesh construct-from-components will now ignore
the readOpt for the supplied primitives as before.
This again re-allows READ_IF_PRESENT for fv* in
combination with supplied primitives.
2020-12-21 17:25:56 +00:00
983b7579ee Merge branch 'feature-virtual-init' into 'develop'
Fix cyclicACMI (runtime-selection-geometry, scaling-of-weights)

See merge request Development/openfoam!419
2020-12-21 14:55:00 +00:00
14a471f937 BUG: cyclicACMI: different construction order. See #1953.
This makes the initialisation order of dynamicMesh consistent
with plain ones using the virtual mechanism. It does not
solve the cyclicACMI construction order yet.
2020-12-21 14:54:59 +00:00
20517 changed files with 690177 additions and 3150246 deletions

View File

@ -49,7 +49,7 @@
<!--
Providing details of your set-up can help us identify any issues, e.g.
OpenFOAM version : v1806|v1812|v1906 etc
OpenFOAM version : v2312|v2306|v2212|v2206|v2112 etc
Operating system : ubuntu|openSUSE|centos etc
Hardware info : any info that may help?
Compiler : gcc|intel|clang etc

3
.gitmodules vendored
View File

@ -17,3 +17,6 @@
[submodule "external-solver"]
path = modules/external-solver
url = https://develop.openfoam.com/Modules/external-solver.git
[submodule "turbulence-community"]
path = modules/turbulence-community
url = https://gitlab.com/openfoam/community/tc-turbulence/turbulence-community.git

View File

@ -8,7 +8,7 @@ wmake -check-dir "$WM_PROJECT_DIR" 2>/dev/null || {
}
if [ -f "$WM_PROJECT_DIR"/wmake/scripts/AllwmakeParseArguments ]
then . "$WM_PROJECT_DIR"/wmake/scripts/AllwmakeParseArguments || \
echo "Argument parse error";
echo "Argument parse error"
else
echo "Error (${0##*/}) : WM_PROJECT_DIR appears to be incorrect"
echo " Check your OpenFOAM environment and installation"
@ -23,23 +23,23 @@ else
echo "mpirun=$(command -v mpirun || true)"
fi
echo
# Report compiler information
# Report compiler information. First non-blank line from --version output
compiler="$(wmake -show-path-cxx 2>/dev/null || true)"
if [ -x "$compiler" ]
then
echo "compiler=$compiler"
"$compiler" --version 2>/dev/null | sed -ne '1p'
"$compiler" --version 2>/dev/null | sed -e '/^$/d;q'
else
echo "compiler=unknown"
fi
echo
echo "========================================"
echo ========================================
date "+%Y-%m-%d %H:%M:%S %z" 2>/dev/null || echo "date is unknown"
echo "Starting compile ${WM_PROJECT_DIR##*/} ${0##*/}"
echo " $WM_COMPILER ${WM_COMPILER_TYPE:-system} compiler"
echo " $WM_COMPILER ${WM_COMPILER_TYPE:-system} compiler [${WM_COMPILE_CONTROL}]"
echo " ${WM_OPTIONS}, with ${WM_MPLIB} ${FOAM_MPI}"
echo "========================================"
echo ========================================
echo
# Compile tools for wmake
@ -62,26 +62,24 @@ else
echo "Skip ThirdParty (no directory)"
fi
echo "========================================"
echo "Compile OpenFOAM libraries"
echo
# OpenFOAM libraries
src/Allwmake $targetType $*
echo "========================================"
echo "Compile OpenFOAM applications"
echo
# OpenFOAM applications
applications/Allwmake $targetType $*
# Additional components/modules
if [ "$FOAM_MODULE_PREFIX" = false ]
then
echo "========================================"
echo "OpenFOAM modules disabled (prefix=false)"
case "$FOAM_MODULE_PREFIX" in
(false | none)
echo ========================================
echo "OpenFOAM modules disabled (prefix=${FOAM_MODULE_PREFIX})"
echo
elif [ -d "$WM_PROJECT_DIR/modules" ]
then
(cd "$WM_PROJECT_DIR/modules" 2>/dev/null && wmake -all)
fi
;;
(*)
# Use wmake -all instead of Allwmake to allow for overrides
( cd "$WM_PROJECT_DIR/modules" 2>/dev/null && wmake -all )
esac
# Count files in given directory. Ignore "Test-*" binaries.
_foamCountDirEntries()
@ -93,16 +91,18 @@ _foamCountDirEntries()
# Some summary information
echo
date "+%Y-%m-%d %H:%M:%S %z" 2>/dev/null || echo "date is unknown"
echo "========================================"
echo ========================================
echo " ${WM_PROJECT_DIR##*/}"
echo " $WM_COMPILER ${WM_COMPILER_TYPE:-system} compiler"
echo " ${WM_OPTIONS}, with ${WM_MPLIB} ${FOAM_MPI}"
echo
echo " api = $(etc/openfoam -show-api 2>/dev/null)"
echo " patch = $(etc/openfoam -show-patch 2>/dev/null)"
echo " bin = $(_foamCountDirEntries "$FOAM_APPBIN") entries"
echo " lib = $(_foamCountDirEntries "$FOAM_LIBBIN") entries"
# The api/patch information
sed -e 's/^/ /; s/=/ = /' ./META-INFO/api-info 2>/dev/null || true
echo " bin = $(_foamCountDirEntries "$FOAM_APPBIN") entries"
echo " lib = $(_foamCountDirEntries "$FOAM_LIBBIN") entries"
echo
echo "========================================"
echo ========================================
#------------------------------------------------------------------------------

View File

@ -1,29 +1,39 @@
# Contributors to OpenFOAM
The following is an list of known contributors to OpenFOAM.
The following is a list of known contributors to OpenFOAM.
It is likely incomplete...
## Contributors (alphabetical by surname)
- Horacio Aguerre
- Yu Ankun
- Tetsuo Aoyagi
- Akira Azami
- William Bainbridge
- Gabriel Barajas
- Kutalmis Bercin
- Julius Bergmann
- Ivor Clifford
- Greg Collecutt
- Jonathan Cranford
- Santiago Marquez Damian
- Sergio Ferraris
- Matej Forman
- Marian Fuchs
- Gabriel Gerlero
- Pawan Ghildiyal
- Chris Greenshields
- Bernhard Gschaider
- Andrew Heather
- David Hill
- Yoshiaki Inoue
- Mattijs Janssens
- Andrew Jackson
- Hrvoje Jasak
- Alexander Kabat vel Job
- Thilo Knacke
- Shannon Leakey
- Sergey Lesnik
- Tommaso Lucchini
- Graham Macpherson
- Alexey Matveichev
@ -36,6 +46,7 @@ It is likely incomplete...
- Victor Olesen
- Evangelos Papoutsis-Kiachagias
- Juho Peltola
- Josep Pocurull
- Johan Roenby
- Henrik Rusche
- Bruno Santos
@ -46,11 +57,15 @@ It is likely incomplete...
- Gavin Tabor
- Zeljko Tukovic
- Eugene De Villiers
- Louis Vittoz
- Vuko Vukcevic
- Yi Wang
- Norbert Weber
- Gregor Weiss
- Volker Weissmann
- Henry Weller
- Niklas Wikstrom
- Guanyang Xue
- Thorsten Zirwes
<!----------------------------------------------------------------------------->

View File

@ -3,8 +3,9 @@
Meta-information is generally for OpenFOAM internal use only.
The format, content and meaning may be changed at anytime without
notice. If any of these are changed, these are some of places that
will need to be updated accordingly:
prior notice.
If any of these are changed, these are some of places that will need
to be updated accordingly:
- bin/foamEtcFile
- bin/tools/foamConfigurePaths
@ -38,7 +39,7 @@ Format: `date +%y%m`
- 4-digit year-month (YYMM) integer corresponding to the major
release or in unusual cases an intermediate release.
Example, `1712` for the Dec-2017 release.
Example, `2106` for the June-2021 release.
#### patch
@ -78,9 +79,9 @@ the saved information needs synchronization. The command
### Notes
The saved information is split into two separate files. The `api-info`
contains more permanent information, whereas the `build-info` is more
transient in nature.
The saved information is split into two separate files.
The `api-info` file contains more permanent information,
whereas the `build-info` is more transient in nature.
----
2020-06-23
2021-06-09

View File

@ -1,2 +1,2 @@
api=2012
patch=0
api=2312
patch=240220

View File

@ -11,7 +11,7 @@ individual and group contributors, integrations
[governance guided activities](https://www.openfoam.com/governance/).
## Copyright
## License
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
@ -27,10 +27,11 @@ may redistribute files.
OpenCFD Ltd grants use of its OpenFOAM trademark by Third Parties on a
licence basis. ESI Group and OpenFOAM Foundation Ltd are currently
permitted to use the Name and agreed Domain Name. For information on
trademark use, please refer to the [trademark policy guidelines](http://www.openfoam.com/legal/trademark-policy.php).
trademark use, please refer to the
[trademark policy guidelines][link trademark].
Please [contact OpenCFD](http://www.openfoam.com/contact) if you have
any questions on the use of the OpenFOAM trademark.
any questions about the use of the OpenFOAM trademark.
Violations of the Trademark are monitored, and will be duly prosecuted.
@ -39,9 +40,9 @@ Violations of the Trademark are monitored, and will be duly prosecuted.
If OpenFOAM has already been compiled on your system, simply source
the appropriate `etc/bashrc` or `etc/cshrc` file and get started.
For example, for the OpenFOAM-v1912 version:
For example, for the OpenFOAM-v2312 version:
```
source /installation/path/OpenFOAM-v1912/etc/bashrc
source /installation/path/OpenFOAM-v2312/etc/bashrc
```
## Compiling OpenFOAM
@ -55,6 +56,11 @@ guides:
| [ThirdParty][repo third] | [readme][link third-readme] | [system requirements][link third-require] | [build][link third-build] |
If you need to modify the versions or locations of ThirdParty
software, please read how the
[OpenFOAM configuration][wiki-config] is structured.
## How do I know which version I am currently using?
The value of the `$WM_PROJECT_DIR` or even `$WM_PROJECT_VERSION` are
@ -63,19 +69,19 @@ not guaranteed to have any correspondence to the OpenFOAM release
information is embedded into each application. For example, as
displayed from `blockMesh -help`:
```
Using: OpenFOAM-v1812.local (1812) - visit www.openfoam.com
Build: 65d6551ff7-20190530 (patch=190531)
Using: OpenFOAM-com (2012) - visit www.openfoam.com
Build: b830beb5ea-20210429 (patch=210414)
Arch: LSB;label=32;scalar=64
```
This output contains all of the more interesting information that we need:
| item | value |
|-----------------------|---------------|
| version | v1812.local |
| api | 1812 |
| commit | 65d6551ff7 |
| author date | 20190530 |
| patch-level | (20)190531 |
| version | com (eg, local development branch) |
| api | 2012 |
| commit | b830beb5ea |
| author date | 20210429 |
| patch-level | (20)210414 |
| label/scalar size | 32/64 bits |
The Arch information may also include the `solveScalar` size
@ -90,19 +96,19 @@ when OpenFOAM has not yet been compiled:
```
$ wmake -build-info
make
api = 1812
patch = 190531
api = 2012
patch = 210414
branch = master
build = 65d6551ff7-20190530
build = 308af39136-20210426
```
Similar information is available with `foamEtcFile`, using the
`-show-api` or `-show-patch` options. For example,
```
$ foamEtcFile -show-api
1812
2012
$ foamEtcFile -show-patch
190531
210414
```
This output will generally be the easiest to parse for scripts.
The `$FOAM_API` convenience environment variable may not reflect the
@ -121,8 +127,8 @@ These 3rd-party sources are normally located in a directory parallel
to the OpenFOAM directory. For example,
```
/path/parent
|-- OpenFOAM-v1912
\-- ThirdParty-v1912
|-- OpenFOAM-v2312
\-- ThirdParty-v2312
```
There are, however, many cases where this simple convention is inadequate:
@ -130,7 +136,7 @@ There are, however, many cases where this simple convention is inadequate:
operating system or cluster installation provides it)
* When we have changed the OpenFOAM directory name to some arbitrary
directory name, e.g. openfoam-sandbox1912, etc..
directory name, e.g. openfoam-sandbox2312, etc..
* When we would like any additional 3rd party software to be located
inside of the OpenFOAM directory to ensure that the installation is
@ -150,17 +156,14 @@ when locating the ThirdParty directory with the following precedence:
2. PREFIX/ThirdParty-VERSION
* this corresponds to the traditional approach
3. PREFIX/ThirdParty-vAPI
* allows for an updated value of VERSION, *eg*, `v1912-myCustom`,
* allows for an updated value of VERSION, *eg*, `v2312-myCustom`,
without requiring a renamed ThirdParty. The API value would still
be `1912` and the original `ThirdParty-v1912/` would be found.
be `2312` and the original `ThirdParty-v2312/` would be found.
4. PREFIX/ThirdParty-API
* this is the same as the previous example, but using an unadorned
API value. This also makes sense if the chosen version name also
uses the unadorned API value in its naming, *eg*,
`1912-patch190131`, `1912.19W03`
* same as the previous example, but using an unadorned API value.
5. PREFIX/ThirdParty-common
* permits maximum reuse for various versions, for experienced user
who are aware of potential version incompatibilities
* permits maximum reuse for various versions, for experienced
users who are aware of potential version incompatibilities
If none of these directories are found to be suitable, it reverts to
using PROJECT/ThirdParty as a dummy location (even if the directory
@ -184,18 +187,21 @@ ThirdParty directory will contain either an `Allwmake` file or a
<!-- OpenFOAM -->
[link trademark]: https://www.openfoam.com/opencfd-limited-trade-mark-policy
[repo openfoam]: https://develop.openfoam.com/Development/openfoam/
[repo third]: https://develop.openfoam.com/Development/ThirdParty-common/
[link openfoam-readme]: https://develop.openfoam.com/Development/openfoam/blob/develop/README.md
[link openfoam-issues]: https://develop.openfoam.com/Development/openfoam/blob/develop/doc/BuildIssues.md
[link openfoam-config]: https://develop.openfoam.com/Development/openfoam/blob/develop/doc/Config.md
[link openfoam-build]: https://develop.openfoam.com/Development/openfoam/blob/develop/doc/Build.md
[link openfoam-require]: https://develop.openfoam.com/Development/openfoam/blob/develop/doc/Requirements.md
[link third-readme]: https://develop.openfoam.com/Development/ThirdParty-common/blob/develop/README.md
[link third-build]: https://develop.openfoam.com/Development/ThirdParty-common/blob/develop/BUILD.md
[link third-require]: https://develop.openfoam.com/Development/ThirdParty-common/blob/develop/Requirements.md
[wiki-config]: https://develop.openfoam.com/Development/openfoam/-/wikis/configuring
## Useful Links
@ -203,8 +209,8 @@ ThirdParty directory will contain either an `Allwmake` file or a
- [Documentation](http://www.openfoam.com/documentation)
- [Reporting bugs/issues/feature requests](http://www.openfoam.com/code/bug-reporting.php)
- [Issue tracker](https://develop.openfoam.com/Development/openfoam/-/issues)
- [Code wiki](https://develop.openfoam.com/Development/openfoam/-/wikis/) and [general wiki](http://wiki.openfoam.com/)
- [Community](http://www.openfoam.com/community/), [Governance](http://www.openfoam.com/governance/)
- [Code wiki](https://develop.openfoam.com/Development/openfoam/-/wikis/) and [General wiki](http://wiki.openfoam.com/)
- [Governance](http://www.openfoam.com/governance/), [Governance Projects](https://www.openfoam.com/governance/projects)
- [Contacting OpenCFD](http://www.openfoam.com/contact/)
Copyright 2016-2020 OpenCFD Ltd
Copyright 2016-2023 OpenCFD Ltd

View File

@ -8,19 +8,29 @@ wmake -check-dir "$WM_PROJECT_DIR/applications" 2>/dev/null || {
}
if [ -f "$WM_PROJECT_DIR"/wmake/scripts/AllwmakeParseArguments ]
then . "$WM_PROJECT_DIR"/wmake/scripts/AllwmakeParseArguments || \
echo "Argument parse error";
echo "Argument parse error"
else
echo "Error (${0##*/}) : WM_PROJECT_DIR appears to be incorrect"
echo " Check your OpenFOAM environment and installation"
exit 1
fi
echo ========================================
echo Compile OpenFOAM applications
echo ========================================
#------------------------------------------------------------------------------
wmake -all $targetType solvers
wmake -all $targetType utilities
wmake -all $targetType solvers
# Optional
# Extra tools (optional)
## wmake -all $targetType tools
#------------------------------------------------------------------------------
echo ========================================
echo Done OpenFOAM applications
echo ========================================
#------------------------------------------------------------------------------

View File

@ -118,7 +118,7 @@ int main(int argc, char *argv[])
fvm::laplacian(rAUf, p) == fvc::div(phiHbyA)
);
pEqn.solve(mesh.solver(p.select(piso.finalInnerIter())));
pEqn.solve(p.select(piso.finalInnerIter()));
phi = phiHbyA - pEqn.flux();

View File

@ -11,4 +11,5 @@ EXE_LIBS = \
-lfvOptions \
-lmeshTools \
-lsampling \
-lregionFaModels
-lregionFaModels \
-lfiniteArea

View File

@ -18,6 +18,6 @@ dimensionedScalar rho("rho", dimDensity, transportProperties);
scalar MaxCo =
max(mesh.surfaceInterpolation::deltaCoeffs()*c0).value()
*runTime.deltaT().value();
*runTime.deltaTValue();
Info<< "Max acoustic Courant Number = " << MaxCo << endl;

View File

@ -3,6 +3,7 @@ EXE_INC = \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
-I$(LIB_SRC)/overset/lnInclude \
-I$(LIB_SRC)/overset/include/lnInclude
EXE_LIBS = \
-lfiniteVolume \

View File

@ -31,3 +31,25 @@
Info<< "Reading diffusivity DT\n" << endl;
dimensionedScalar DT("DT", dimViscosity, transportProperties);
bool oversetPatchErrOutput =
simple.dict().getOrDefault("oversetPatchErrOutput", false);
// Dummy phi for oversetPatchErrOutput
tmp<surfaceScalarField> tdummyPhi;
if (oversetPatchErrOutput)
{
tdummyPhi = tmp<surfaceScalarField>::New
(
IOobject
(
"dummyPhi",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
dimensionedScalar(dimless, Zero)
);
}

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2015 OpenFOAM Foundation
Copyright (C) 2016-2017 OpenCFD Ltd.
Copyright (C) 2016-2022 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -58,6 +58,7 @@ Description
#include "fvOptions.H"
#include "simpleControl.H"
#include "dynamicFvMesh.H"
#include "oversetPatchPhiErr.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -99,6 +100,11 @@ int main(int argc, char *argv[])
fvOptions.constrain(TEqn);
TEqn.solve();
fvOptions.correct(T);
if (oversetPatchErrOutput)
{
oversetPatchPhiErr(TEqn, tdummyPhi.ref());
}
}
#include "write.H"

View File

@ -1,125 +1,4 @@
Info<< "Reading velocity field U\n" << endl;
volVectorField U
(
IOobject
(
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
// Initialise the velocity internal field to zero
U = dimensionedVector(U.dimensions(), Zero);
surfaceScalarField phi
(
IOobject
(
"phi",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
fvc::flux(U)
);
if (args.found("initialiseUBCs"))
{
U.correctBoundaryConditions();
phi = fvc::flux(U);
}
// Construct a pressure field
// If it is available read it otherwise construct from the velocity BCs
// converting fixed-value BCs to zero-gradient and vice versa.
// Allow override from command-line -pName option
const word pName = args.getOrDefault<word>("pName", "p");
// Infer the pressure BCs from the velocity
wordList pBCTypes
(
U.boundaryField().size(),
fixedValueFvPatchScalarField::typeName
);
forAll(U.boundaryField(), patchi)
{
if (U.boundaryField()[patchi].fixesValue())
{
pBCTypes[patchi] = zeroGradientFvPatchScalarField::typeName;
}
}
// Note that registerObject is false for the pressure field. The pressure
// field in this solver doesn't have a physical value during the solution.
// It shouldn't be looked up and used by sub models or boundary conditions.
Info<< "Constructing pressure field " << pName << nl << endl;
volScalarField p
(
IOobject
(
pName,
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::NO_WRITE,
false
),
mesh,
dimensionedScalar(sqr(dimVelocity), Zero),
pBCTypes
);
// Infer the velocity potential BCs from the pressure
wordList PhiBCTypes
(
p.boundaryField().size(),
zeroGradientFvPatchScalarField::typeName
);
forAll(p.boundaryField(), patchi)
{
if (p.boundaryField()[patchi].fixesValue())
{
PhiBCTypes[patchi] = fixedValueFvPatchScalarField::typeName;
}
}
Info<< "Constructing velocity potential field Phi\n" << endl;
volScalarField Phi
(
IOobject
(
"Phi",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::NO_WRITE
),
mesh,
dimensionedScalar(dimLength*dimVelocity, Zero),
PhiBCTypes
);
label PhiRefCell = 0;
scalar PhiRefValue = 0;
setRefCell
(
Phi,
potentialFlow.dict(),
PhiRefCell,
PhiRefValue
);
mesh.setFluxRequired(Phi.name());
#include "createMRF.H"
#include "../createFields.H"
// Add solver-specific interpolations
{

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2017 OpenCFD Ltd
Copyright (C) 2017-2022 OpenCFD Ltd
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -83,6 +83,7 @@ Description
\heading Options
\plaintable
-writep | write the Euler pressure
-writephi | Write the final volumetric flux
-writePhi | Write the final velocity potential
-initialiseUBCs | Update the velocity boundaries before solving for Phi
\endplaintable
@ -117,6 +118,12 @@ int main(int argc, char *argv[])
"Initialise U boundary conditions"
);
argList::addBoolOption
(
"writephi",
"Write the final volumetric flux field"
);
argList::addBoolOption
(
"writePhi",
@ -135,6 +142,8 @@ int main(int argc, char *argv[])
"Execute functionObjects"
);
#include "addRegionOption.H"
#include "addCheckCaseOptions.H"
#include "setRootCaseLists.H"
#include "createTime.H"
#include "createNamedDynamicFvMesh.H"
@ -149,7 +158,6 @@ int main(int argc, char *argv[])
mesh.update();
surfaceScalarField faceMask(localMin<scalar>(mesh).interpolate(cellMask));
// Since solver contains no time loop it would never execute
// function objects so do it ourselves
@ -195,11 +203,16 @@ int main(int argc, char *argv[])
<< endl;
}
// Write U and phi
// Write U
U.write();
phi.write();
// Optionally write Phi
// Optionally write the volumetric flux, phi
if (args.found("writephi"))
{
phi.write();
}
// Optionally write velocity potential, Phi
if (args.found("writePhi"))
{
Phi.write();

View File

@ -25,6 +25,7 @@ EXE_LIBS = \
-lengine \
-lturbulenceModels \
-lcompressibleTurbulenceModels \
-lthermoTools \
-lcompressibleTransportModels \
-lfluidThermophysicalModels \
-lreactionThermophysicalModels \

View File

@ -160,7 +160,7 @@ int main(int argc, char *argv[])
runTime.printExecutionTime(Info);
}
Info<< "\n end\n";
Info<< "End\n";
return 0;
}

View File

@ -116,7 +116,7 @@ int main(int argc, char *argv[])
"normalisedGradP",
tmagGradP()/max(tmagGradP())
);
normalisedGradP.writeOpt() = IOobject::AUTO_WRITE;
normalisedGradP.writeOpt(IOobject::AUTO_WRITE);
tmagGradP.clear();
++runTime;
@ -207,7 +207,7 @@ int main(int argc, char *argv[])
runTime.printExecutionTime(Info);
}
Info<< "\n end\n";
Info<< "End\n";
return 0;
}

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2015 OpenFOAM Foundation
Copyright (C) 2019 OpenCFD Ltd.
Copyright (C) 2019-2021 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -43,9 +43,9 @@ Foam::autoPtr<Foam::PDRDragModel> Foam::PDRDragModel::New
Info<< "Selecting drag model " << modelType << endl;
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
auto* ctorPtr = dictionaryConstructorTable(modelType);
if (!cstrIter.found())
if (!ctorPtr)
{
FatalIOErrorInLookup
(
@ -57,7 +57,9 @@ Foam::autoPtr<Foam::PDRDragModel> Foam::PDRDragModel::New
}
return autoPtr<PDRDragModel>
(cstrIter()(dict, turbulence, rho, U, phi));
(
ctorPtr(dict, turbulence, rho, U, phi)
);
}

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2019-2020 OpenCFD Ltd.
Copyright (C) 2019-2020,2023 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -132,6 +132,11 @@ void PDRkEpsilon::correct()
// Update epsilon and G at the wall
epsilon_.boundaryFieldRef().updateCoeffs();
// Push new cell values to
// coupled neighbours. Note that we want to avoid the re-updateCoeffs
// of the wallFunctions so make sure to bypass the evaluate on
// those patches and only do the coupled ones.
epsilon_.boundaryFieldRef().evaluateCoupled<coupledFvPatch>();
// Add the blockage generation term so that it is included consistently
// in both the k and epsilon equations

View File

@ -109,7 +109,7 @@ Foam::XiEqModel::calculateSchelkinEffect(const scalar uPrimeCoef) const
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE,
false
IOobject::NO_REGISTER
),
mesh,
dimensionedScalar(Nv.dimensions(), Zero)

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2015 OpenFOAM Foundation
Copyright (C) 2019 OpenCFD Ltd.
Copyright (C) 2019-2021 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -42,9 +42,9 @@ Foam::autoPtr<Foam::XiEqModel> Foam::XiEqModel::New
Info<< "Selecting flame-wrinkling model " << modelType << endl;
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
auto* ctorPtr = dictionaryConstructorTable(modelType);
if (!cstrIter.found())
if (!ctorPtr)
{
FatalIOErrorInLookup
(
@ -55,7 +55,7 @@ Foam::autoPtr<Foam::XiEqModel> Foam::XiEqModel::New
) << exit(FatalIOError);
}
return autoPtr<XiEqModel>(cstrIter()(dict, thermo, turbulence, Su));
return autoPtr<XiEqModel>(ctorPtr(dict, thermo, turbulence, Su));
}

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2015 OpenFOAM Foundation
Copyright (C) 2019 OpenCFD Ltd.
Copyright (C) 2019-2021 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -42,9 +42,9 @@ Foam::autoPtr<Foam::XiGModel> Foam::XiGModel::New
Info<< "Selecting flame-wrinkling model " << modelType << endl;
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
auto* ctorPtr = dictionaryConstructorTable(modelType);
if (!cstrIter.found())
if (!ctorPtr)
{
FatalIOErrorInLookup
(
@ -55,7 +55,7 @@ Foam::autoPtr<Foam::XiGModel> Foam::XiGModel::New
) << exit(FatalIOError);
}
return autoPtr<XiGModel>(cstrIter()(dict, thermo, turbulence, Su));
return autoPtr<XiGModel>(ctorPtr(dict, thermo, turbulence, Su));
}

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2015 OpenFOAM Foundation
Copyright (C) 2019 OpenCFD Ltd.
Copyright (C) 2019-2021 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -45,9 +45,9 @@ Foam::autoPtr<Foam::XiModel> Foam::XiModel::New
Info<< "Selecting flame-wrinkling model " << modelType << endl;
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
auto* ctorPtr = dictionaryConstructorTable(modelType);
if (!cstrIter.found())
if (!ctorPtr)
{
FatalIOErrorInLookup
(
@ -59,7 +59,9 @@ Foam::autoPtr<Foam::XiModel> Foam::XiModel::New
}
return autoPtr<XiModel>
(cstrIter()(dict, thermo, turbulence, Su, rho, b, phi));
(
ctorPtr(dict, thermo, turbulence, Su, rho, b, phi)
);
}

View File

@ -27,7 +27,7 @@ if (pimple.transonic())
betav*fvOptions(psi, p, rho.name())
);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
pEqn.solve(p.select(pimple.finalInnerIter()));
if (pimple.finalNonOrthogonalIter())
{
@ -57,7 +57,7 @@ else
betav*fvOptions(psi, p, rho.name())
);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
pEqn.solve(p.select(pimple.finalInnerIter()));
if (pimple.finalNonOrthogonalIter())
{

View File

@ -19,6 +19,7 @@ EXE_LIBS = \
-lengine \
-lturbulenceModels \
-lcompressibleTurbulenceModels \
-lthermoTools \
-lcompressibleTransportModels \
-lfluidThermophysicalModels \
-lreactionThermophysicalModels \

View File

@ -26,6 +26,7 @@ EXE_LIBS = \
-lengine \
-lturbulenceModels \
-lcompressibleTurbulenceModels \
-lthermoTools \
-lcompressibleTransportModels \
-lfluidThermophysicalModels \
-lreactionThermophysicalModels \

View File

@ -30,7 +30,7 @@ if (pimple.transonic())
fvOptions(psi, p, rho.name())
);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
pEqn.solve(p.select(pimple.finalInnerIter()));
if (pimple.finalNonOrthogonalIter())
{
@ -66,7 +66,7 @@ else
fvOptions(psi, p, rho.name())
);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
pEqn.solve(p.select(pimple.finalInnerIter()));
if (pimple.finalNonOrthogonalIter())
{

View File

@ -20,6 +20,7 @@ EXE_LIBS = \
-lengine \
-lturbulenceModels \
-lcompressibleTurbulenceModels \
-lthermoTools \
-lcompressibleTransportModels \
-lfluidThermophysicalModels \
-lreactionThermophysicalModels \

View File

@ -35,7 +35,7 @@ if (pimple.transonic())
fvOptions(psi, p, rho.name())
);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
pEqn.solve(p.select(pimple.finalInnerIter()));
if (pimple.finalNonOrthogonalIter())
{
@ -71,7 +71,7 @@ else
fvOptions(psi, p, rho.name())
);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
pEqn.solve(p.select(pimple.finalInnerIter()));
if (pimple.finalNonOrthogonalIter())
{

View File

@ -171,10 +171,7 @@ if (ign.ignited())
fvOptions.correct(Su);
// Limit the maximum Su
// ~~~~~~~~~~~~~~~~~~~~
Su.min(SuMax);
Su.max(SuMin);
Su.clamp_range(SuMin, SuMax);
}
else
{
@ -218,7 +215,7 @@ if (ign.ignited())
+ (
scalar(1)
+ (2*XiShapeCoef)
*(scalar(0.5) - min(max(b, scalar(0)), scalar(1)))
*(scalar(0.5) - clamp(b, zero_one{}))
)*(XiEqStar - scalar(1.001))
);
@ -226,7 +223,7 @@ if (ign.ignited())
volScalarField R(Gstar*XiEqStar/(XiEqStar - scalar(1)));
volScalarField G(R*(XiEq - scalar(1.001))/XiEq);
//R *= (Gstar + 2*mag(dev(symm(fvc::grad(U)))))/Gstar;
//R *= (Gstar + 2*mag(devSymm(fvc::grad(U))))/Gstar;
// Solve for the flame wrinkling
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@ -29,7 +29,7 @@ if (pimple.transonic())
fvOptions(psi, p, rho.name())
);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
pEqn.solve(p.select(pimple.finalInnerIter()));
if (pimple.finalNonOrthogonalIter())
{
@ -64,7 +64,7 @@ else
fvOptions(psi, p, rho.name())
);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
pEqn.solve(p.select(pimple.finalInnerIter()));
if (pimple.finalNonOrthogonalIter())
{

View File

@ -6,11 +6,13 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude
EXE_LIBS = \
-lfiniteVolume \
-lmeshTools \
-lfluidThermophysicalModels \
-lreactionThermophysicalModels \
-lchemistryModel
-lchemistryModel \
-lthermophysicalProperties

View File

@ -6,7 +6,7 @@
solve
(
fvm::ddt(rho, Yi) - chemistry.RR(specieI),
mesh.solver("Yi")
"Yi"
);
}
}

View File

@ -12,7 +12,7 @@ Info<< "Creating base fields for time " << runTime.timeName() << endl;
mesh,
IOobject::READ_IF_PRESENT,
IOobject::NO_WRITE,
false
IOobject::NO_REGISTER
),
mesh,
dimensionedScalar("Ydefault", dimless, 1)
@ -29,7 +29,7 @@ Info<< "Creating base fields for time " << runTime.timeName() << endl;
mesh,
IOobject::READ_IF_PRESENT,
IOobject::NO_WRITE,
false
IOobject::NO_REGISTER
),
mesh,
dimensionedScalar("p", dimPressure, p0)
@ -46,7 +46,7 @@ Info<< "Creating base fields for time " << runTime.timeName() << endl;
mesh,
IOobject::READ_IF_PRESENT,
IOobject::NO_WRITE,
false
IOobject::NO_REGISTER
),
mesh,
dimensionedScalar("T", dimTemperature, T0)

View File

@ -1,5 +1,5 @@
if (adjustTimeStep)
{
runTime.setDeltaT(min(dtChem, maxDeltaT));
Info<< "deltaT = " << runTime.deltaT().value() << endl;
Info<< "deltaT = " << runTime.deltaTValue() << endl;
}

View File

@ -1,3 +1,3 @@
dtChem = chemistry.solve(runTime.deltaT().value());
dtChem = chemistry.solve(runTime.deltaTValue());
scalar Qdot = chemistry.Qdot()()[0]/rho[0];
integratedHeat += Qdot*runTime.deltaT().value();
integratedHeat += Qdot*runTime.deltaTValue();

View File

@ -20,6 +20,7 @@ EXE_LIBS = \
-lengine \
-lturbulenceModels \
-lcompressibleTurbulenceModels \
-lthermoTools \
-lcompressibleTransportModels \
-lfluidThermophysicalModels \
-lspecie

View File

@ -1,7 +1,8 @@
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I${LIB_SRC}/meshTools/lnInclude \
-I${LIB_SRC}/sampling/lnInclude \
-I$(LIB_SRC)/finiteArea/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
@ -14,7 +15,6 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/solidChemistryModel/lnInclude \
-I$(LIB_SRC)/combustionModels/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
@ -23,7 +23,9 @@ EXE_INC = \
-I$(LIB_SRC)/regionModels/pyrolysisModels/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
-I$(LIB_SRC)/ODE/lnInclude
-I$(LIB_SRC)/ODE/lnInclude \
-I$(LIB_SRC)/regionFaModels/lnInclude \
-I$(LIB_SRC)/faOptions/lnInclude
EXE_LIBS = \
-lfiniteVolume \
@ -32,6 +34,7 @@ EXE_LIBS = \
-lsampling \
-lturbulenceModels \
-lcompressibleTurbulenceModels \
-lthermoTools \
-lspecie \
-lcompressibleTransportModels \
-lfluidThermophysicalModels \
@ -50,4 +53,7 @@ EXE_LIBS = \
-llagrangian \
-llagrangianIntermediate \
-llagrangianTurbulence \
-lODE
-lODE \
-lregionFaModels \
-lfiniteArea \
-lfaOptions

View File

@ -35,17 +35,17 @@ tmp<fv::convectionScheme<scalar>> mvConvection
fvOptions.constrain(YiEqn);
YiEqn.solve(mesh.solver("Yi"));
YiEqn.solve("Yi");
fvOptions.correct(Yi);
Yi.max(0.0);
Yi.clamp_min(0);
Yt += Yi;
}
}
Y[inertIndex] = scalar(1) - Yt;
Y[inertIndex].max(0.0);
Y[inertIndex].clamp_min(0);
radiation->correct();

View File

@ -1,4 +1,4 @@
const volScalarField& psi = thermo.psi();
const volScalarField& T = thermo.T();
regionModels::surfaceFilmModel& surfaceFilm = tsurfaceFilm();
const label inertIndex(composition.species()[inertSpecie]);
const label inertIndex(composition.species().find(inertSpecie));

View File

@ -36,7 +36,7 @@ while (pimple.correctNonOrthogonal())
+ fvOptions(psi, p_rgh, rho.name())
);
p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter())));
p_rghEqn.solve(p_rgh.select(pimple.finalInnerIter()));
if (pimple.finalNonOrthogonalIter())
{

View File

@ -19,6 +19,7 @@ EXE_LIBS = \
-lsampling \
-lturbulenceModels \
-lcompressibleTurbulenceModels \
-lthermoTools \
-lreactionThermophysicalModels \
-lspecie \
-lcompressibleTransportModels \

View File

@ -34,15 +34,15 @@ tmp<fv::convectionScheme<scalar>> mvConvection
fvOptions.constrain(YiEqn);
YiEqn.solve(mesh.solver("Yi"));
YiEqn.solve("Yi");
fvOptions.correct(Yi);
Yi.max(0.0);
Yi.clamp_min(0);
Yt += Yi;
}
}
Y[inertIndex] = scalar(1) - Yt;
Y[inertIndex].max(0.0);
Y[inertIndex].clamp_min(0);
}

View File

@ -1,3 +1,3 @@
const volScalarField& psi = thermo.psi();
const volScalarField& T = thermo.T();
const label inertIndex(composition.species()[inertSpecie]);
const label inertIndex(composition.species().find(inertSpecie));

View File

@ -37,7 +37,7 @@ if (pimple.transonic())
fvOptions(psi, p, rho.name())
);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
pEqn.solve(p.select(pimple.finalInnerIter()));
if (pimple.finalNonOrthogonalIter())
{
@ -72,7 +72,7 @@ else
fvOptions(psi, p, rho.name())
);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
pEqn.solve(p.select(pimple.finalInnerIter()));
if (pimple.finalNonOrthogonalIter())
{

View File

@ -49,7 +49,7 @@ if (pimple.transonic())
fvOptions(psi, p, rho.name())
);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
pEqn.solve(p.select(pimple.finalInnerIter()));
if (pimple.finalNonOrthogonalIter())
{
@ -89,7 +89,7 @@ else
fvOptions(psi, p, rho.name())
);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
pEqn.solve(p.select(pimple.finalInnerIter()));
if (pimple.finalNonOrthogonalIter())
{

View File

@ -20,6 +20,7 @@ EXE_LIBS = \
-lsampling \
-lturbulenceModels \
-lcompressibleTurbulenceModels \
-lthermoTools \
-lreactionThermophysicalModels \
-lspecie \
-lcompressibleTransportModels \

View File

@ -1,3 +1,3 @@
const volScalarField& psi = thermo.psi();
const volScalarField& T = thermo.T();
const label inertIndex(composition.species()[inertSpecie]);
const label inertIndex(composition.species().find(inertSpecie));

View File

@ -41,7 +41,7 @@ while (pimple.correctNonOrthogonal())
- fvm::laplacian(rhorAUf, p_rgh)
);
p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter())));
p_rghEqn.solve(p_rgh.select(pimple.finalInnerIter()));
if (pimple.finalNonOrthogonalIter())
{

View File

@ -20,6 +20,7 @@ EXE_LIBS = \
-lsampling \
-lturbulenceModels \
-lcompressibleTurbulenceModels \
-lthermoTools \
-lreactionThermophysicalModels \
-lspecie \
-lcompressibleTransportModels \

View File

@ -1,3 +1,3 @@
const volScalarField& psi = thermo.psi();
const volScalarField& T = thermo.T();
const label inertIndex(composition.species()[inertSpecie]);
const label inertIndex(composition.species().find(inertSpecie));

View File

@ -4,6 +4,5 @@ cd "${0%/*}" || exit # Run from this directory
wclean libso BCs
wclean
wclean rhoCentralDyMFoam
#------------------------------------------------------------------------------

View File

@ -5,8 +5,7 @@ cd "${0%/*}" || exit # Run from this directory
(
wmake $targetType BCs \
&& wmake $targetType \
&& wmake $targetType rhoCentralDyMFoam \
&& wmake $targetType
)
#------------------------------------------------------------------------------

View File

@ -103,16 +103,10 @@ Foam::smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField
<< exit(FatalIOError);
}
if (dict.found("value"))
if (!this->readValueEntry(dict))
{
fvPatchField<scalar>::operator=
(
scalarField("value", dict, p.size())
);
}
else
{
fvPatchField<scalar>::operator=(patchInternalField());
// Fallback: set to the internal field
fvPatchField<scalar>::patchInternalField(*this);
}
refValue() = *this;
@ -165,14 +159,10 @@ void Foam::smoluchowskiJumpTFvPatchScalarField::updateCoeffs()
return;
}
const fvPatchScalarField& pmu =
patch().lookupPatchField<volScalarField, scalar>(muName_);
const fvPatchScalarField& prho =
patch().lookupPatchField<volScalarField, scalar>(rhoName_);
const fvPatchField<scalar>& ppsi =
patch().lookupPatchField<volScalarField, scalar>(psiName_);
const fvPatchVectorField& pU =
patch().lookupPatchField<volVectorField, vector>(UName_);
const auto& pmu = patch().lookupPatchField<volScalarField>(muName_);
const auto& prho = patch().lookupPatchField<volScalarField>(rhoName_);
const auto& ppsi = patch().lookupPatchField<volScalarField>(psiName_);
const auto& pU = patch().lookupPatchField<volVectorField>(UName_);
// Prandtl number reading consistent with rhoCentralFoam
const dictionary& thermophysicalProperties =
@ -207,7 +197,7 @@ void Foam::smoluchowskiJumpTFvPatchScalarField::updateCoeffs()
// Write
void Foam::smoluchowskiJumpTFvPatchScalarField::write(Ostream& os) const
{
fvPatchScalarField::write(os);
fvPatchField<scalar>::write(os);
os.writeEntryIfDifferent<word>("U", "U", UName_);
os.writeEntryIfDifferent<word>("rho", "rho", rhoName_);
@ -217,7 +207,7 @@ void Foam::smoluchowskiJumpTFvPatchScalarField::write(Ostream& os) const
os.writeEntry("accommodationCoeff", accommodationCoeff_);
Twall_.writeEntry("Twall", os);
os.writeEntry("gamma", gamma_);
writeEntry("value", os);
fvPatchField<scalar>::writeValueEntry(os);
}

View File

@ -105,18 +105,15 @@ Foam::maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField
<< exit(FatalIOError);
}
if (dict.found("value"))
if (this->readValueEntry(dict))
{
fvPatchField<vector>::operator=
(
vectorField("value", dict, p.size())
);
const auto* hasRefValue = dict.findEntry("refValue", keyType::LITERAL);
const auto* hasFrac = dict.findEntry("valueFraction", keyType::LITERAL);
if (dict.found("refValue") && dict.found("valueFraction"))
if (hasRefValue && hasFrac)
{
this->refValue() = vectorField("refValue", dict, p.size());
this->valueFraction() =
scalarField("valueFraction", dict, p.size());
this->refValue().assign(*hasRefValue, p.size());
this->valueFraction().assign(*hasFrac, p.size());
}
else
{
@ -155,12 +152,9 @@ void Foam::maxwellSlipUFvPatchVectorField::updateCoeffs()
return;
}
const fvPatchScalarField& pmu =
patch().lookupPatchField<volScalarField, scalar>(muName_);
const fvPatchScalarField& prho =
patch().lookupPatchField<volScalarField, scalar>(rhoName_);
const fvPatchField<scalar>& ppsi =
patch().lookupPatchField<volScalarField, scalar>(psiName_);
const auto& pmu = patch().lookupPatchField<volScalarField>(muName_);
const auto& prho = patch().lookupPatchField<volScalarField>(rhoName_);
const auto& ppsi = patch().lookupPatchField<volScalarField>(psiName_);
Field<scalar> C1
(
@ -187,8 +181,8 @@ void Foam::maxwellSlipUFvPatchVectorField::updateCoeffs()
if (curvature_)
{
const fvPatchTensorField& ptauMC =
patch().lookupPatchField<volTensorField, tensor>(tauMCName_);
const auto& ptauMC =
patch().lookupPatchField<volTensorField>(tauMCName_);
vectorField n(patch().nf());
refValue() -= C1/prho*transform(I - n*n, (n & ptauMC));
@ -200,7 +194,7 @@ void Foam::maxwellSlipUFvPatchVectorField::updateCoeffs()
void Foam::maxwellSlipUFvPatchVectorField::write(Ostream& os) const
{
fvPatchVectorField::write(os);
fvPatchField<vector>::write(os);
os.writeEntryIfDifferent<word>("T", "T", TName_);
os.writeEntryIfDifferent<word>("rho", "rho", rhoName_);
os.writeEntryIfDifferent<word>("psi", "thermo:psi", psiName_);
@ -215,7 +209,7 @@ void Foam::maxwellSlipUFvPatchVectorField::write(Ostream& os) const
refValue().writeEntry("refValue", os);
valueFraction().writeEntry("valueFraction", os);
writeEntry("value", os);
fvPatchField<vector>::writeValueEntry(os);
}

View File

@ -104,11 +104,8 @@ void Foam::fixedRhoFvPatchScalarField::updateCoeffs()
return;
}
const fvPatchField<scalar>& psip =
patch().lookupPatchField<volScalarField, scalar>(psiName_);
const fvPatchField<scalar>& pp =
patch().lookupPatchField<volScalarField, scalar>(pName_);
const auto& psip = patch().lookupPatchField<volScalarField>(psiName_);
const auto& pp = patch().lookupPatchField<volScalarField>(pName_);
operator==(psip*pp);
@ -118,11 +115,10 @@ void Foam::fixedRhoFvPatchScalarField::updateCoeffs()
void Foam::fixedRhoFvPatchScalarField::write(Ostream& os) const
{
fvPatchScalarField::write(os);
fvPatchField<scalar>::write(os);
os.writeEntryIfDifferent<word>("p", "p", pName_);
os.writeEntryIfDifferent<word>("psi", "thermo:psi", psiName_);
writeEntry("value", os);
fvPatchField<scalar>::writeValueEntry(os);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -7,7 +7,7 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude
-I$(LIB_SRC)/dynamicFvMesh/lnInclude
EXE_LIBS = \
-lfiniteVolume \
@ -18,4 +18,7 @@ EXE_LIBS = \
-lspecie \
-lrhoCentralFoam \
-lturbulenceModels \
-lcompressibleTurbulenceModels
-lcompressibleTurbulenceModels \
-lthermoTools \
-ldynamicFvMesh \
-ltopoChangerFvMesh

View File

@ -17,7 +17,7 @@ tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> interpolate
vf,
dir,
"reconstruct("
+ (reconFieldName != word::null ? reconFieldName : vf.name())
+ (reconFieldName.empty() ? vf.name() : reconFieldName)
+ ')'
)
);

View File

@ -1,3 +0,0 @@
rhoCentralDyMFoam.C
EXE = $(FOAM_APPBIN)/rhoCentralDyMFoam

View File

@ -1,26 +0,0 @@
EXE_INC = \
-I.. \
-I../BCs/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/dynamicFvMesh/lnInclude
EXE_LIBS = \
-lfiniteVolume \
-lfvOptions \
-lmeshTools \
-lcompressibleTransportModels \
-lfluidThermophysicalModels \
-lspecie \
-lrhoCentralFoam \
-lturbulenceModels \
-lcompressibleTurbulenceModels \
-ldynamicMesh \
-ldynamicFvMesh \
-ltopoChangerFvMesh

View File

@ -1,288 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Application
rhoCentralDyMFoam
Group
grpCompressibleSolvers grpMovingMeshSolvers
Description
Density-based compressible flow solver based on central-upwind
schemes of Kurganov and Tadmor
with support for mesh-motion and topology changes.
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "dynamicFvMesh.H"
#include "psiThermo.H"
#include "turbulentFluidThermoModel.H"
#include "fixedRhoFvPatchScalarField.H"
#include "directionInterpolate.H"
#include "localEulerDdtScheme.H"
#include "fvcSmooth.H"
#include "motionSolver.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[])
{
argList::addNote
(
"Density-based compressible flow solver based on central-upwind"
" schemes of Kurganov and Tadmor.\n"
"With support for mesh-motion and topology changes."
);
#define NO_CONTROL
#include "postProcess.H"
#include "setRootCaseLists.H"
#include "createTime.H"
#include "createDynamicFvMesh.H"
#include "createFields.H"
#include "createFieldRefs.H"
#include "createTimeControls.H"
turbulence->validate();
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "readFluxScheme.H"
const dimensionedScalar v_zero(dimVolume/dimTime, Zero);
// Courant numbers used to adjust the time-step
scalar CoNum = 0.0;
scalar meanCoNum = 0.0;
Info<< "\nStarting time loop\n" << endl;
while (runTime.run())
{
#include "readTimeControls.H"
#include "setDeltaT.H"
++runTime;
Info<< "Time = " << runTime.timeName() << nl << endl;
// Do any mesh changes
mesh.update();
// --- Directed interpolation of primitive fields onto faces
surfaceScalarField rho_pos(interpolate(rho, pos));
surfaceScalarField rho_neg(interpolate(rho, neg));
surfaceVectorField rhoU_pos(interpolate(rhoU, pos, U.name()));
surfaceVectorField rhoU_neg(interpolate(rhoU, neg, U.name()));
volScalarField rPsi("rPsi", 1.0/psi);
surfaceScalarField rPsi_pos(interpolate(rPsi, pos, T.name()));
surfaceScalarField rPsi_neg(interpolate(rPsi, neg, T.name()));
surfaceScalarField e_pos(interpolate(e, pos, T.name()));
surfaceScalarField e_neg(interpolate(e, neg, T.name()));
surfaceVectorField U_pos("U_pos", rhoU_pos/rho_pos);
surfaceVectorField U_neg("U_neg", rhoU_neg/rho_neg);
surfaceScalarField p_pos("p_pos", rho_pos*rPsi_pos);
surfaceScalarField p_neg("p_neg", rho_neg*rPsi_neg);
surfaceScalarField phiv_pos("phiv_pos", U_pos & mesh.Sf());
surfaceScalarField phiv_neg("phiv_neg", U_neg & mesh.Sf());
// Make fluxes relative to mesh-motion
if (mesh.moving())
{
phiv_pos -= mesh.phi();
phiv_neg -= mesh.phi();
}
// Note: extracted out the orientation so becomes unoriented
phiv_pos.setOriented(false);
phiv_neg.setOriented(false);
volScalarField c("c", sqrt(thermo.Cp()/thermo.Cv()*rPsi));
surfaceScalarField cSf_pos
(
"cSf_pos",
interpolate(c, pos, T.name())*mesh.magSf()
);
surfaceScalarField cSf_neg
(
"cSf_neg",
interpolate(c, neg, T.name())*mesh.magSf()
);
surfaceScalarField ap
(
"ap",
max(max(phiv_pos + cSf_pos, phiv_neg + cSf_neg), v_zero)
);
surfaceScalarField am
(
"am",
min(min(phiv_pos - cSf_pos, phiv_neg - cSf_neg), v_zero)
);
surfaceScalarField a_pos("a_pos", ap/(ap - am));
surfaceScalarField amaxSf("amaxSf", max(mag(am), mag(ap)));
surfaceScalarField aSf("aSf", am*a_pos);
if (fluxScheme == "Tadmor")
{
aSf = -0.5*amaxSf;
a_pos = 0.5;
}
surfaceScalarField a_neg("a_neg", 1.0 - a_pos);
phiv_pos *= a_pos;
phiv_neg *= a_neg;
surfaceScalarField aphiv_pos("aphiv_pos", phiv_pos - aSf);
surfaceScalarField aphiv_neg("aphiv_neg", phiv_neg + aSf);
// Reuse amaxSf for the maximum positive and negative fluxes
// estimated by the central scheme
amaxSf = max(mag(aphiv_pos), mag(aphiv_neg));
#include "centralCourantNo.H"
phi = aphiv_pos*rho_pos + aphiv_neg*rho_neg;
surfaceVectorField phiU(aphiv_pos*rhoU_pos + aphiv_neg*rhoU_neg);
// Note: reassembled orientation from the pos and neg parts so becomes
// oriented
phiU.setOriented(true);
surfaceVectorField phiUp(phiU + (a_pos*p_pos + a_neg*p_neg)*mesh.Sf());
surfaceScalarField phiEp
(
"phiEp",
aphiv_pos*(rho_pos*(e_pos + 0.5*magSqr(U_pos)) + p_pos)
+ aphiv_neg*(rho_neg*(e_neg + 0.5*magSqr(U_neg)) + p_neg)
+ aSf*p_pos - aSf*p_neg
);
// Make flux for pressure-work absolute
if (mesh.moving())
{
surfaceScalarField phia(a_pos*p_pos + a_neg*p_neg);
phia.setOriented(true);
phiEp += mesh.phi()*phia;
}
volScalarField muEff("muEff", turbulence->muEff());
volTensorField tauMC("tauMC", muEff*dev2(Foam::T(fvc::grad(U))));
// --- Solve density
solve(fvm::ddt(rho) + fvc::div(phi));
// --- Solve momentum
solve(fvm::ddt(rhoU) + fvc::div(phiUp));
U.ref() =
rhoU()
/rho();
U.correctBoundaryConditions();
rhoU.boundaryFieldRef() == rho.boundaryField()*U.boundaryField();
if (!inviscid)
{
solve
(
fvm::ddt(rho, U) - fvc::ddt(rho, U)
- fvm::laplacian(muEff, U)
- fvc::div(tauMC)
);
rhoU = rho*U;
}
// --- Solve energy
surfaceScalarField sigmaDotU
(
"sigmaDotU",
(
fvc::interpolate(muEff)*mesh.magSf()*fvc::snGrad(U)
+ fvc::dotInterpolate(mesh.Sf(), tauMC)
)
& (a_pos*U_pos + a_neg*U_neg)
);
solve
(
fvm::ddt(rhoE)
+ fvc::div(phiEp)
- fvc::div(sigmaDotU)
);
e = rhoE/rho - 0.5*magSqr(U);
e.correctBoundaryConditions();
thermo.correct();
rhoE.boundaryFieldRef() ==
rho.boundaryField()*
(
e.boundaryField() + 0.5*magSqr(U.boundaryField())
);
if (!inviscid)
{
solve
(
fvm::ddt(rho, e) - fvc::ddt(rho, e)
- fvm::laplacian(turbulence->alphaEff(), e)
);
thermo.correct();
rhoE = rho*(e + 0.5*magSqr(U));
}
p.ref() =
rho()
/psi();
p.correctBoundaryConditions();
rho.boundaryFieldRef() == psi.boundaryField()*p.boundaryField();
turbulence->correct();
runTime.write();
runTime.printExecutionTime(Info);
}
Info<< "End\n" << endl;
return 0;
}
// ************************************************************************* //

View File

@ -6,6 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2021 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -30,12 +31,14 @@ Group
grpCompressibleSolvers
Description
Density-based compressible flow solver based on central-upwind
schemes of Kurganov and Tadmor.
Density-based compressible flow solver based on
central-upwind schemes of Kurganov and Tadmor with
support for mesh-motion and topology changes.
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "dynamicFvMesh.H"
#include "psiThermo.H"
#include "turbulentFluidThermoModel.H"
#include "fixedRhoFvPatchScalarField.H"
@ -49,8 +52,9 @@ int main(int argc, char *argv[])
{
argList::addNote
(
"Density-based compressible flow solver based on central-upwind"
" schemes of Kurganov and Tadmor."
"Density-based compressible flow solver based on"
" central-upwind schemes of Kurganov and Tadmor with"
" support for mesh-motion and topology changes."
);
#define NO_CONTROL
@ -59,7 +63,7 @@ int main(int argc, char *argv[])
#include "addCheckCaseOptions.H"
#include "setRootCaseLists.H"
#include "createTime.H"
#include "createMesh.H"
#include "createDynamicFvMesh.H"
#include "createFields.H"
#include "createFieldRefs.H"
#include "createTimeControls.H"
@ -80,6 +84,18 @@ int main(int argc, char *argv[])
while (runTime.run())
{
#include "readTimeControls.H"
if (!LTS)
{
#include "setDeltaT.H"
++runTime;
// Do any mesh changes
mesh.update();
}
// --- Directed interpolation of primitive fields onto faces
surfaceScalarField rho_pos(interpolate(rho, pos));
@ -107,6 +123,15 @@ int main(int argc, char *argv[])
surfaceScalarField phiv_neg("phiv_neg", U_neg & mesh.Sf());
phiv_neg.setOriented(false);
// Make fluxes relative to mesh-motion
if (mesh.moving())
{
surfaceScalarField meshPhi(mesh.phi());
meshPhi.setOriented(false);
phiv_pos -= meshPhi;
phiv_neg -= meshPhi;
}
volScalarField c("c", sqrt(thermo.Cp()/thermo.Cv()*rPsi));
surfaceScalarField cSf_pos
(
@ -157,18 +182,13 @@ int main(int argc, char *argv[])
amaxSf = max(mag(aphiv_pos), mag(aphiv_neg));
#include "centralCourantNo.H"
#include "readTimeControls.H"
if (LTS)
{
#include "setRDeltaT.H"
}
else
{
#include "setDeltaT.H"
}
++runTime;
++runTime;
}
Info<< "Time = " << runTime.timeName() << nl << endl;
@ -189,6 +209,14 @@ int main(int argc, char *argv[])
+ aSf*p_pos - aSf*p_neg
);
// Make flux for pressure-work absolute
if (mesh.moving())
{
surfaceScalarField meshPhi(mesh.phi());
meshPhi.setOriented(false);
phiEp += meshPhi*(a_pos*p_pos + a_neg*p_neg);
}
volScalarField muEff("muEff", turbulence->muEff());
volTensorField tauMC("tauMC", muEff*dev2(Foam::T(fvc::grad(U))));

View File

@ -6,7 +6,7 @@ EXE_INC = \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude
EXE_LIBS = \
-lfiniteVolume \
@ -17,4 +17,5 @@ EXE_LIBS = \
-lfluidThermophysicalModels \
-lspecie \
-lturbulenceModels \
-lcompressibleTurbulenceModels
-lcompressibleTurbulenceModels \
-lthermoTools

View File

@ -63,7 +63,7 @@
fvOptions(psi, p, rho.name())
);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
pEqn.solve(p.select(pimple.finalInnerIter()));
// Rhie & Chow interpolation (part 2)
if (pimple.finalNonOrthogonalIter())

View File

@ -8,7 +8,8 @@ EXE_INC = \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/regionFaModels/lnInclude
EXE_LIBS = \
-lfiniteVolume \
@ -19,8 +20,11 @@ EXE_LIBS = \
-lspecie \
-lturbulenceModels \
-lcompressibleTurbulenceModels \
-lthermoTools \
-ldynamicMesh \
-ldynamicFvMesh \
-ltopoChangerFvMesh \
-lsampling \
-latmosphericModels
-latmosphericModels \
-lregionFaModels \
-lfiniteArea

View File

@ -21,6 +21,7 @@ EXE_LIBS = \
-lspecie \
-lturbulenceModels \
-lcompressibleTurbulenceModels \
-lthermoTools \
-ldynamicFvMesh \
-ltopoChangerFvMesh \
-loverset

View File

@ -29,7 +29,7 @@ if (mesh.changing())
wordList pcorrTypes
(
p.boundaryField().size(),
zeroGradientFvPatchScalarField::typeName
fvPatchFieldBase::zeroGradientType()
);
// Set BCs of pcorr to fixed-value for patches at which p is fixed
@ -72,7 +72,7 @@ if (mesh.changing())
divrhoU()
);
pcorrEqn.solve(mesh.solver(pcorr.select(pimple.finalInnerIter())));
pcorrEqn.solve(pcorr.select(pimple.finalInnerIter()));
//Bypass virtual layer
//mesh.fvMesh::solve(pcorrEqn, d);

View File

@ -1,4 +0,0 @@
bool ddtCorr
(
pimple.dict().getOrDefault("ddtCorr", true)
);

View File

@ -69,6 +69,8 @@ mesh.setFluxRequired(p.name());
// Mask field for zeroing out contributions on hole cells
#include "createCellMask.H"
// Create bool field with interpolated cells
#include "createInterpolatedCells.H"
Info<< "Creating turbulence model\n" << endl;
autoPtr<compressible::turbulenceModel> turbulence

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2015 OpenFOAM Foundation
Copyright (C) 2016-2017 OpenCFD Ltd.
Copyright (C) 2016-2022 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -43,7 +43,6 @@ Description
#include "dynamicFvMesh.H"
#include "fluidThermo.H"
#include "turbulentFluidThermoModel.H"
#include "bound.H"
#include "pimpleControl.H"
#include "pressureControl.H"
#include "CorrectPhi.H"
@ -89,10 +88,8 @@ int main(int argc, char *argv[])
while (runTime.run())
{
#include "readControls.H"
#include "readDyMControls.H"
// Store divrhoU from the previous mesh so that it can be mapped
// and used in correctPhi to ensure the corrected phi has the
// same divergence
@ -128,7 +125,6 @@ int main(int argc, char *argv[])
{
if (pimple.firstIter() || moveMeshOuterCorrectors)
{
// Do any mesh changes
mesh.update();
@ -137,52 +133,22 @@ int main(int argc, char *argv[])
MRF.update();
#include "setCellMask.H"
const surfaceScalarField faceMaskOld
(
localMin<scalar>(mesh).interpolate(cellMask.oldTime())
);
// Zero Uf on old faceMask (H-I)
rhoUf() *= faceMaskOld;
surfaceVectorField rhoUfint(fvc::interpolate(rho*U));
// Update Uf and phi on new C-I faces
rhoUf() += (1-faceMaskOld)*rhoUfint;
// Update Uf boundary
forAll(rhoUf().boundaryField(), patchI)
{
rhoUf().boundaryFieldRef()[patchI] =
rhoUfint.boundaryField()[patchI];
}
// Calculate absolute flux from the mapped surface velocity
phi = mesh.Sf() & rhoUf();
#include "setInterpolatedCells.H"
#include "correctRhoPhiFaceMask.H"
if (correctPhi)
{
// Corrects flux on separated regions
#include "correctPhi.H"
}
// Zero phi on current H-I
const surfaceScalarField faceMask
(
localMin<scalar>(mesh).interpolate(cellMask)
);
phi *= faceMask;
U *= cellMask;
// Make the fluxes relative to the mesh-motion
fvc::makeRelative(phi, rho, U);
}
if (checkMeshCourantNo)
{
#include "meshCourantNo.H"
if (checkMeshCourantNo)
{
#include "meshCourantNo.H"
}
}
}

View File

@ -25,17 +25,6 @@ surfaceScalarField phiHbyA
fvc::interpolate(rho)*fvc::flux(HbyA)
);
if (ddtCorr)
{
surfaceScalarField faceMaskOld
(
localMin<scalar>(mesh).interpolate(cellMask.oldTime())
);
phiHbyA +=
faceMaskOld*MRF.zeroFilter(rhorAUf*fvc::ddtCorr(rho, U, phi, rhoUf));
}
fvc::makeRelative(phiHbyA, rho, U);
MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
@ -67,7 +56,7 @@ if (pimple.transonic())
// Relax the pressure equation to ensure diagonal-dominance
pEqn.relax();
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
pEqn.solve(p.select(pimple.finalInnerIter()));
if (pimple.finalNonOrthogonalIter())
{
@ -89,7 +78,7 @@ else
{
fvScalarMatrix pEqn(pDDtEqn - fvm::laplacian(rhorAUf, p));
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
pEqn.solve(p.select(pimple.finalInnerIter()));
if (pimple.finalNonOrthogonalIter())
{
@ -134,8 +123,4 @@ if (thermo.dpdt())
}
}
surfaceScalarField faceMask
(
localMin<scalar>(mesh).interpolate(cellMask)
);
phi *= faceMask;

View File

@ -1,9 +0,0 @@
#include "readTimeControls.H"
correctPhi = pimple.dict().getOrDefault("correctPhi", false);
checkMeshCourantNo =
pimple.dict().getOrDefault("checkMeshCourantNo", false);
ddtCorr = pimple.dict().getOrDefault("ddtCorr", true);

View File

@ -54,7 +54,7 @@ if (pimple.transonic())
// Relax the pressure equation to ensure diagonal-dominance
pEqn.relax();
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
pEqn.solve(p.select(pimple.finalInnerIter()));
if (pimple.finalNonOrthogonalIter())
{
@ -76,7 +76,7 @@ else
{
fvScalarMatrix pEqn(pDDtEqn - fvm::laplacian(rhorAUf, p));
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
pEqn.solve(p.select(pimple.finalInnerIter()));
if (pimple.finalNonOrthogonalIter())
{

View File

@ -65,7 +65,7 @@ if (pimple.transonic())
// Relax the pressure equation to ensure diagonal-dominance
pEqn.relax();
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
pEqn.solve(p.select(pimple.finalInnerIter()));
if (pimple.finalNonOrthogonalIter())
{
@ -90,7 +90,7 @@ else
{
fvScalarMatrix pEqn(pDDtEqn - fvm::laplacian(rhorAtU, p));
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
pEqn.solve(p.select(pimple.finalInnerIter()));
if (pimple.finalNonOrthogonalIter())
{

View File

@ -49,7 +49,7 @@
);
}
// Update tho boundary values of the reciprocal time-step
// Update the boundary values of the reciprocal time-step
rDeltaT.correctBoundaryConditions();
Info<< "Flow time scale min/max = "

View File

@ -7,6 +7,7 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/regionFaModels/lnInclude
EXE_LIBS = \
-lfiniteVolume \
@ -18,4 +19,7 @@ EXE_LIBS = \
-lspecie \
-lturbulenceModels \
-lcompressibleTurbulenceModels \
-latmosphericModels
-lthermoTools \
-latmosphericModels \
-lregionFaModels \
-lfiniteArea

View File

@ -21,6 +21,7 @@ EXE_LIBS = \
-lspecie \
-lturbulenceModels \
-lcompressibleTurbulenceModels \
-lthermoTools \
-ldynamicFvMesh \
-ltopoChangerFvMesh \
-lsampling \

View File

@ -1,22 +1,52 @@
Info<< "Create dynamic mesh for time = "
<< runTime.timeName() << nl << endl;
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2017 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
autoPtr<dynamicFvMesh> meshPtr
Description
Create a dynamicFvMesh, with init()
Required Variables
- runTime [Time]
Provided Variables
- mesh [dynamicFvMesh], meshPtr
\*---------------------------------------------------------------------------*/
Foam::autoPtr<Foam::dynamicFvMesh> meshPtr;
{
Foam::Info << "Create dynamic mesh for time = "
<< runTime.timeName() << Foam::nl;
meshPtr = dynamicFvMesh::New
(
dynamicFvMesh::New
IOobject
(
IOobject
(
dynamicFvMesh::defaultRegion,
runTime.timeName(),
runTime,
IOobject::MUST_READ
)
polyMesh::defaultRegion,
runTime.timeName(),
runTime,
IOobject::MUST_READ
)
);
}
dynamicFvMesh& mesh = meshPtr();
// Calculate initial mesh-to-mesh mapping. Note that this should be
// done under the hood, e.g. as a MeshObject
mesh.update();
dynamicFvMesh& mesh = meshPtr();
// Calculate initial mesh-to-mesh mapping. Note that this should be
// done under the hood, e.g. as a MeshObject
mesh.update();
Foam::Info << Foam::endl;
// ************************************************************************* //

View File

@ -18,4 +18,5 @@ EXE_LIBS = \
-lfluidThermophysicalModels \
-lspecie \
-lturbulenceModels \
-lcompressibleTurbulenceModels
-lcompressibleTurbulenceModels \
-lthermoTools

View File

@ -16,4 +16,5 @@ EXE_LIBS = \
-lfluidThermophysicalModels \
-lspecie \
-lturbulenceModels \
-lcompressibleTurbulenceModels
-lcompressibleTurbulenceModels \
-lthermoTools

View File

@ -21,6 +21,7 @@ EXE_LIBS = \
-lspecie \
-lturbulenceModels \
-lcompressibleTurbulenceModels \
-lthermoTools \
-ldynamicMesh \
-ldynamicFvMesh \
-ltopoChangerFvMesh \

View File

@ -44,11 +44,7 @@ SourceFiles
namespace Foam
{
// Forward declaration of classes
class Istream;
class Ostream;
// Forward declaration of friend functions and operators
// Forward Declarations
class magnet;
Istream& operator>>(Istream&, magnet&);
Ostream& operator<<(Ostream&, const magnet&);

View File

@ -127,7 +127,7 @@ int main(int argc, char *argv[])
);
pEqn.setReference(pRefCell, pRefValue);
pEqn.solve(mesh.solver(p.select(piso.finalInnerIter())));
pEqn.solve(p.select(piso.finalInnerIter()));
if (piso.finalNonOrthogonalIter())
{
@ -167,7 +167,7 @@ int main(int argc, char *argv[])
fvm::laplacian(rABf, pB) == fvc::div(phiB)
);
pBEqn.solve(mesh.solver(pB.select(bpiso.finalInnerIter())));
pBEqn.solve(pB.select(bpiso.finalInnerIter()));
if (bpiso.finalNonOrthogonalIter())
{

View File

@ -4,10 +4,10 @@
sqrt
(
2*M_PI*sigma*sqr(aMesh.edgeInterpolation::deltaCoeffs())
*aMesh.edgeInterpolation::deltaCoeffs()
*mag(aMesh.edgeInterpolation::deltaCoeffs())
/rhol
)
).value()*runTime.deltaT().value();
).value()*runTime.deltaTValue();
Info<< "Max Capillary Courant Number = " << CoNumSigma << '\n' << endl;
}

View File

@ -5,7 +5,7 @@
(
"h",
runTime.timeName(),
mesh,
aMesh.thisDb(),
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
@ -20,7 +20,7 @@
(
"Us",
runTime.timeName(),
mesh,
aMesh.thisDb(),
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
@ -34,7 +34,7 @@
(
"phis",
runTime.timeName(),
mesh,
aMesh.thisDb(),
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
@ -48,7 +48,7 @@
(
"phi2s",
runTime.timeName(),
mesh,
aMesh.thisDb(),
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
@ -67,7 +67,7 @@
(
"Sm",
runTime.timeName(),
mesh,
aMesh.thisDb(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
@ -82,7 +82,7 @@
(
"Sd",
runTime.timeName(),
mesh,
aMesh.thisDb(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
@ -96,7 +96,7 @@
(
"Sg",
runTime.timeName(),
mesh,
aMesh.thisDb(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
@ -112,7 +112,7 @@
(
"ps",
runTime.timeName(),
mesh,
aMesh.thisDb(),
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
@ -134,7 +134,7 @@
(
"manningField",
runTime.timeName(),
mesh,
aMesh.thisDb(),
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
@ -147,7 +147,7 @@
(
"frictionFactor",
runTime.timeName(),
mesh,
aMesh.thisDb(),
IOobject::NO_READ,
IOobject::NO_WRITE
),

View File

@ -1,10 +1,13 @@
// Volume-to surface mapping object
const volSurfaceMapping vsm(aMesh);
volVectorField U
(
IOobject
(
"U",
runTime.timeName(),
mesh,
mesh.thisDb(),
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
@ -19,13 +22,10 @@ volScalarField H
(
"H",
runTime.timeName(),
mesh,
mesh.thisDb(),
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar(dimLength, Zero)
);
// Create volume-to surface mapping object
volSurfaceMapping vsm(aMesh);

View File

@ -87,7 +87,13 @@ int main(int argc, char *argv[])
(
fam::ddt(h, Us)
+ fam::div(phi2s, Us)
+ fam::Sp(0.0125*frictionFactor*mag(Us), Us)
+ fam::Sp
(
0.0125
*frictionFactor.internalField()
*mag(Us.internalField()),
Us
)
==
Gs*h
- fam::Sp(Sd, Us)

View File

@ -47,10 +47,10 @@ if (aMesh.nInternalEdges())
);
CoNum = max(SfUfbyDelta/aMesh.magLe())
.value()*runTime.deltaT().value();
.value()*runTime.deltaTValue();
meanCoNum = (sum(SfUfbyDelta)/sum(aMesh.magLe()))
.value()*runTime.deltaT().value();
.value()*runTime.deltaTValue();
velMag = max(mag(phis)/aMesh.magLe()).value();
}

View File

@ -5,7 +5,7 @@ areaScalarField Cs
(
"Cs",
runTime.timeName(),
mesh,
aMesh.thisDb(),
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
@ -26,7 +26,7 @@ areaVectorField Us
(
"Us",
runTime.timeName(),
mesh,
aMesh.thisDb(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
@ -47,6 +47,7 @@ forAll(Us, faceI)
Us[faceI].z() =
Uinf.value()*0.25*R[faceI].x()*R[faceI].z()/sqr(mag(R[faceI]));
}
Us.boundaryFieldRef().evaluateCoupled<coupledFaPatch>();
Us -= aMesh.faceAreaNormals()*(aMesh.faceAreaNormals() & Us);
@ -57,7 +58,7 @@ edgeScalarField phis
(
"phis",
runTime.timeName(),
mesh,
aMesh.thisDb(),
IOobject::NO_READ,
IOobject::NO_WRITE
),

View File

@ -1,2 +0,0 @@
// Create Finite Area mesh
faMesh aMesh(mesh);

View File

@ -1,5 +1,5 @@
// Create volume-to surface mapping object
volSurfaceMapping vsm(aMesh);
// Volume-to surface mapping object
const volSurfaceMapping vsm(aMesh);
volScalarField Cvf
(
@ -7,7 +7,7 @@
(
"Cvf",
runTime.timeName(),
mesh,
mesh.thisDb(),
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
@ -24,7 +24,7 @@
(
"U",
runTime.timeName(),
mesh,
mesh.thisDb(),
IOobject::NO_READ,
IOobject::AUTO_WRITE
),

View File

@ -5,7 +5,7 @@ areaScalarField Cs
(
"Cs",
runTime.timeName(),
mesh,
aMesh.thisDb(),
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
@ -37,7 +37,7 @@ areaVectorField Us
(
"Us",
runTime.timeName(),
mesh,
aMesh.thisDb(),
IOobject::MUST_READ,
IOobject::NO_WRITE
),
@ -51,7 +51,7 @@ edgeScalarField phis
(
"phis",
runTime.timeName(),
mesh,
aMesh.thisDb(),
IOobject::NO_READ,
IOobject::NO_WRITE
),

View File

@ -1,2 +0,0 @@
// Create Finite Area mesh
faMesh aMesh(mesh);

View File

@ -1,5 +1,5 @@
// Create volume-to surface mapping object
volSurfaceMapping vsm(aMesh);
// Volume-to surface mapping object
const volSurfaceMapping vsm(aMesh);
volScalarField Cvf
(
@ -7,7 +7,7 @@
(
"Cvf",
runTime.timeName(),
mesh,
mesh.thisDb(),
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
@ -24,7 +24,7 @@
(
"U",
runTime.timeName(),
mesh,
mesh.thisDb(),
IOobject::NO_READ,
IOobject::AUTO_WRITE
),

View File

@ -1,8 +1,11 @@
EXE_INC = \
-I../buoyantBoussinesqSimpleFoam \
-I../../incompressible/pimpleFoam \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
-I$(LIB_SRC)/transportModels \
@ -13,6 +16,8 @@ EXE_LIBS = \
-lfiniteVolume \
-lfvOptions \
-lmeshTools \
-ldynamicMesh \
-ldynamicFvMesh \
-lsampling \
-lturbulenceModels \
-lincompressibleTurbulenceModels \

View File

@ -6,6 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2021 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -30,7 +31,8 @@ Group
grpHeatTransferSolvers
Description
Transient solver for buoyant, turbulent flow of incompressible fluids.
Transient solver for buoyant, turbulent flow of incompressible fluids,
with optional mesh motion and mesh topology changes.
Uses the Boussinesq approximation:
\f[
@ -51,9 +53,11 @@ Description
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "dynamicFvMesh.H"
#include "singlePhaseTransportModel.H"
#include "turbulentTransportModel.H"
#include "radiationModel.H"
#include "CorrectPhi.H"
#include "fvOptions.H"
#include "pimpleControl.H"
@ -64,7 +68,8 @@ int main(int argc, char *argv[])
argList::addNote
(
"Transient solver for buoyant, turbulent flow"
" of incompressible fluids.\n"
" of incompressible fluids, with optional mesh"
" motion and mesh topology changes.\n"
"Uses the Boussinesq approximation."
);
@ -73,10 +78,10 @@ int main(int argc, char *argv[])
#include "addCheckCaseOptions.H"
#include "setRootCaseLists.H"
#include "createTime.H"
#include "createMesh.H"
#include "createControl.H"
#include "createDynamicFvMesh.H"
#include "createDyMControls.H"
#include "createFields.H"
#include "createTimeControls.H"
#include "createUfIfPresent.H"
#include "CourantNo.H"
#include "setInitialDeltaT.H"
#include "initContinuityErrs.H"
@ -89,7 +94,7 @@ int main(int argc, char *argv[])
while (runTime.run())
{
#include "readTimeControls.H"
#include "readDyMControls.H"
#include "CourantNo.H"
#include "setDeltaT.H"
@ -100,6 +105,34 @@ int main(int argc, char *argv[])
// --- Pressure-velocity PIMPLE corrector loop
while (pimple.loop())
{
if (pimple.firstIter() || moveMeshOuterCorrectors)
{
// Do any mesh changes
mesh.controlledUpdate();
if (mesh.changing())
{
MRF.update();
if (correctPhi)
{
// Calculate absolute flux
// from the mapped surface velocity
phi = mesh.Sf() & Uf();
#include "correctPhi.H"
// Make the flux relative to the mesh motion
fvc::makeRelative(phi, U);
}
if (checkMeshCourantNo)
{
#include "meshCourantNo.H"
}
}
}
#include "UEqn.H"
#include "TEqn.H"

View File

@ -27,7 +27,7 @@
p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell));
p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter())));
p_rghEqn.solve(p_rgh.select(pimple.finalInnerIter()));
if (pimple.finalNonOrthogonalIter())
{
@ -42,6 +42,12 @@
U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rAUf);
U.correctBoundaryConditions();
fvOptions.correct(U);
// Correct Uf if the mesh is moving
fvc::correctUf(Uf, U, phi);
// Make the fluxes relative to the mesh motion
fvc::makeRelative(phi, U);
}
}

View File

@ -1,4 +1,5 @@
EXE_INC = \
-I../../compressible/rhoPimpleFoam \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
@ -6,7 +7,10 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
-I$(LIB_SRC)/regionFaModels/lnInclude
EXE_LIBS = \
-lfiniteVolume \
@ -19,4 +23,10 @@ EXE_LIBS = \
-lspecie \
-lturbulenceModels \
-lcompressibleTurbulenceModels \
-latmosphericModels
-lthermoTools \
-latmosphericModels \
-ldynamicMesh \
-ldynamicFvMesh \
-ltopoChangerFvMesh \
-lregionFaModels \
-lfiniteArea

Some files were not shown because too many files have changed in this diff Show More