Compare commits

..

124 Commits

Author SHA1 Message Date
39362aec25 CONFIG: bump patch level (240625) 2024-06-26 11:18:36 +02:00
fb365b6622 BUG: Nastran reading of free format truncates last field (fixes #3189)
- the old logic relied on the presence/absence of a comma to decide
  whether to parse as fixed or free format. This logic is faulty when
  handling the final (trailing) entry and will generally lead to the
  last field being truncated when read in.
  Now the caller decides on fixed vs free.

FIX: inconsistent Nastran surface output format

- use FREE format by default. Previously had an odd mix of SHORT
  format when created without options and LONG format (as default)
  when created with format options.
2024-06-26 11:06:05 +02:00
530a5192ca Merge branch 'fix-adjointRotatingWall-sens' into 'master'
BUG: adjointRotatingWallVelocity causes sensitivities to crash. Fixes #3180

Closes #3180

See merge request Development/openfoam!690
2024-06-11 10:39:58 +00:00
2ef96e9e43 BUG: adjointRotatingWallVelocity causes sensitivities to crash. Fixes #3180 2024-06-10 14:52:58 +03:00
51a34f5abc BUG: ThermoSurfaceFilm - corrected FA field caching for Cp. Fixes #3017 2024-06-07 20:47:35 +01:00
b2532e7769 BUG: extractEulerianParticles - corrected patch index. Fixes #2707 2024-06-07 12:26:03 +01:00
790de0f98e BUG: gltf corrections. Fixes #3179
- corrected scalar bounds (label->scalar), field limit initialisation
- corrected alpha field lookup
- updated header documentation
2024-06-07 12:25:32 +01:00
4510067e63 CONFIG: bump patch level 2024-05-22 16:26:39 +02:00
8cf757daf0 BUG: GAMG: processorAgglomeration not merging proc coeffs. Fixes #3172 2024-05-22 16:26:39 +02:00
6581c5792a BUG: STL: cannot handle files > 2Gb. Fixes #3171 2024-05-22 16:25:37 +02: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
10224 changed files with 100595 additions and 24691 deletions

View File

@ -49,7 +49,7 @@
<!--
Providing details of your set-up can help us identify any issues, e.g.
OpenFOAM version : v2306|v2212|v2206|v2112|v2106 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

View File

@ -46,6 +46,7 @@ It is likely incomplete...
- Victor Olesen
- Evangelos Papoutsis-Kiachagias
- Juho Peltola
- Josep Pocurull
- Johan Roenby
- Henrik Rusche
- Bruno Santos

View File

@ -1,2 +1,2 @@
api=2309
patch=0
api=2312
patch=240625

View File

@ -40,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-v2306 version:
For example, for the OpenFOAM-v2312 version:
```
source /installation/path/OpenFOAM-v2306/etc/bashrc
source /installation/path/OpenFOAM-v2312/etc/bashrc
```
## Compiling OpenFOAM
@ -127,8 +127,8 @@ These 3rd-party sources are normally located in a directory parallel
to the OpenFOAM directory. For example,
```
/path/parent
|-- OpenFOAM-v2306
\-- ThirdParty-v2306
|-- OpenFOAM-v2312
\-- ThirdParty-v2312
```
There are, however, many cases where this simple convention is inadequate:
@ -136,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-sandbox2306, 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
@ -156,9 +156,9 @@ 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*, `v2306-myCustom`,
* allows for an updated value of VERSION, *eg*, `v2312-myCustom`,
without requiring a renamed ThirdParty. The API value would still
be `2306` and the original `ThirdParty-v2306/` would be found.
be `2312` and the original `ThirdParty-v2312/` would be found.
4. PREFIX/ThirdParty-API
* same as the previous example, but using an unadorned API value.
5. PREFIX/ThirdParty-common
@ -213,4 +213,4 @@ ThirdParty directory will contain either an `Allwmake` file or a
- [Governance](http://www.openfoam.com/governance/), [Governance Projects](https://www.openfoam.com/governance/projects)
- [Contacting OpenCFD](http://www.openfoam.com/contact/)
Copyright 2016-2022 OpenCFD Ltd
Copyright 2016-2023 OpenCFD Ltd

View File

@ -30,6 +30,6 @@ volVectorField U
#include "createPhi.H"
mesh.schemes().setFluxRequired(p.name());
mesh.setFluxRequired(p.name());
#include "readTurbulenceProperties.H"

View File

@ -1,6 +1,6 @@
const dictionary& potentialFlow
(
mesh.solution().solutionDict("potentialFlow")
mesh.solutionDict().subDict("potentialFlow")
);
const int nNonOrthCorr

View File

@ -113,6 +113,6 @@ setRefCell
PhiRefCell,
PhiRefValue
);
mesh.schemes().setFluxRequired(Phi.name());
mesh.setFluxRequired(Phi.name());
#include "createMRF.H"

View File

@ -1,6 +1,6 @@
const dictionary& potentialFlow
(
mesh.solution().solutionDict("potentialFlow")
mesh.solutionDict().subDict("potentialFlow")
);
const int nNonOrthCorr

View File

@ -5,7 +5,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection
mesh,
fields,
phi,
mesh.schemes().div("div(phi,ft_b_ha_hau)")
mesh.divScheme("div(phi,ft_b_ha_hau)")
)
);

View File

@ -43,7 +43,7 @@ volVectorField U
#include "compressibleCreatePhi.H"
mesh.schemes().setFluxRequired(p.name());
mesh.setFluxRequired(p.name());
Info<< "Creating turbulence model\n" << endl;
autoPtr<compressible::RASModel> turbulence

View File

@ -44,7 +44,7 @@ volVectorField U
#include "compressibleCreatePhi.H"
mesh.schemes().setFluxRequired(p.name());
mesh.setFluxRequired(p.name());
Info<< "Creating turbulence model\n" << endl;
autoPtr<compressible::turbulenceModel> turbulence

View File

@ -5,7 +5,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection
mesh,
fields,
phi,
mesh.schemes().div("div(phi,ft_b_ha_hau)")
mesh.divScheme("div(phi,ft_b_ha_hau)")
)
);

View File

@ -5,7 +5,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection
mesh,
fields,
phi,
mesh.schemes().div("div(phi,Yi_h)")
mesh.divScheme("div(phi,Yi_h)")
)
);
{

View File

@ -89,7 +89,7 @@ volScalarField p_rgh
mesh
);
mesh.schemes().setFluxRequired(p_rgh.name());
mesh.setFluxRequired(p_rgh.name());
#include "phrghEqn.H"

View File

@ -5,7 +5,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection
mesh,
fields,
phi,
mesh.schemes().div("div(phi,Yi_h)")
mesh.divScheme("div(phi,Yi_h)")
)
);

View File

@ -47,7 +47,7 @@ volScalarField& p = thermo.p();
pressureControl pressureControl(p, rho, pimple.dict(), false);
mesh.schemes().setFluxRequired(p.name());
mesh.setFluxRequired(p.name());
Info << "Creating turbulence model.\n" << nl;
autoPtr<compressible::turbulenceModel> turbulence

View File

@ -48,7 +48,7 @@ volScalarField& p = thermo.p();
#include "compressibleCreatePhi.H"
mesh.schemes().setFluxRequired(p.name());
mesh.setFluxRequired(p.name());
Info << "Creating turbulence model.\n" << nl;
autoPtr<compressible::turbulenceModel> turbulence

View File

@ -49,7 +49,7 @@ volScalarField& p = thermo.p();
pressureControl pressureControl(p, rho, pimple.dict(), false);
mesh.schemes().setFluxRequired(p.name());
mesh.setFluxRequired(p.name());
Info << "Creating turbulence model.\n" << nl;

View File

@ -1,5 +1,5 @@
word fluxScheme("Kurganov");
if (mesh.schemes().dict().readIfPresent("fluxScheme", fluxScheme))
if (mesh.schemesDict().readIfPresent("fluxScheme", fluxScheme))
{
if ((fluxScheme == "Tadmor") || (fluxScheme == "Kurganov"))
{

View File

@ -79,7 +79,7 @@ autoPtr<compressible::turbulenceModel> turbulence
)
);
mesh.schemes().setFluxRequired(p.name());
mesh.setFluxRequired(p.name());
#include "createMRF.H"

View File

@ -42,7 +42,7 @@ volVectorField U
pressureControl pressureControl(p, rho, pimple.dict(), false);
mesh.schemes().setFluxRequired(p.name());
mesh.setFluxRequired(p.name());
Info<< "Creating turbulence model\n" << endl;
autoPtr<compressible::turbulenceModel> turbulence

View File

@ -56,7 +56,7 @@ if (mesh.changing())
pcorrTypes
);
mesh.schemes().setFluxRequired(pcorr.name());
mesh.setFluxRequired(pcorr.name());
{
dimensionedScalar rAUf("rAUf", dimTime, 1.0);

View File

@ -44,7 +44,7 @@ pressureControl pressureControl(p, rho, pimple.dict(), false);
const dimensionedScalar rhoMax("rhoMax", dimDensity, GREAT, pimple.dict());
const dimensionedScalar rhoMin("rhoMin", dimDensity, Zero, pimple.dict());
mesh.schemes().setFluxRequired(p.name());
mesh.setFluxRequired(p.name());
#include "createDpdt.H"

View File

@ -40,7 +40,7 @@ volVectorField U
pressureControl pressureControl(p, rho, simple.dict());
mesh.schemes().setFluxRequired(p.name());
mesh.setFluxRequired(p.name());
Info<< "Creating turbulence model\n" << endl;
autoPtr<compressible::turbulenceModel> turbulence

View File

@ -40,7 +40,7 @@ volVectorField U
pressureControl pressureControl(p, rho, simple.dict());
mesh.schemes().setFluxRequired(p.name());
mesh.setFluxRequired(p.name());
Info<< "Creating turbulence model\n" << endl;
autoPtr<compressible::turbulenceModel> turbulence

View File

@ -36,7 +36,7 @@ volVectorField U
#include "compressibleCreatePhi.H"
mesh.schemes().setFluxRequired(p.name());
mesh.setFluxRequired(p.name());
Info<< "Creating turbulence model\n" << endl;
autoPtr<compressible::turbulenceModel> turbulence

View File

@ -46,4 +46,4 @@ volScalarField rho
#include "compressibleCreatePhi.H"
mesh.schemes().setFluxRequired(p.name());
mesh.setFluxRequired(p.name());

View File

@ -114,5 +114,5 @@ label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, piso.dict(), pRefCell, pRefValue);
mesh.schemes().setFluxRequired(p.name());
mesh.schemes().setFluxRequired(pB.name());
mesh.setFluxRequired(p.name());
mesh.setFluxRequired(pB.name());

View File

@ -1,3 +1,3 @@
const dictionary& Bpiso = mesh.solution().solutionDict("BPISO");
const dictionary& Bpiso = mesh.solutionDict().subDict("BPISO");
const int nBcorr = Bpiso.getOrDefault<int>("nCorrectors", 1);

View File

@ -155,4 +155,4 @@
dimensionedScalar("one", dimless, 0.01)
);
aMesh.schemes().setFluxRequired("h");
aMesh.setFluxRequired("h");

View File

@ -1 +1 @@
loopControl iters(runTime, aMesh.solution().solutionDict(), "solution");
loopControl iters(runTime, aMesh.solutionDict(), "solution");

View File

@ -119,7 +119,7 @@ if (p_rgh.needReference())
);
}
mesh.schemes().setFluxRequired(p_rgh.name());
mesh.setFluxRequired(p_rgh.name());
#include "createMRF.H"
#include "createIncompressibleRadiationModel.H"

View File

@ -119,7 +119,7 @@ if (p_rgh.needReference())
);
}
mesh.schemes().setFluxRequired(p_rgh.name());
mesh.setFluxRequired(p_rgh.name());
#include "createMRF.H"
#include "createIncompressibleRadiationModel.H"

View File

@ -74,7 +74,7 @@ volScalarField p_rgh
// Force p_rgh to be consistent with p
p_rgh = p - rho*gh;
mesh.schemes().setFluxRequired(p_rgh.name());
mesh.setFluxRequired(p_rgh.name());
label pRefCell = 0;
scalar pRefValue = 0.0;

View File

@ -56,7 +56,7 @@ if (mesh.changing())
pcorrTypes
);
mesh.schemes().setFluxRequired(pcorr.name());
mesh.setFluxRequired(pcorr.name());
{
dimensionedScalar rAUf("rAUf", dimTime, 1.0);

View File

@ -71,7 +71,7 @@ volScalarField p_rgh
// Force p_rgh to be consistent with p
p_rgh = p - rho*gh;
mesh.schemes().setFluxRequired(p_rgh.name());
mesh.setFluxRequired(p_rgh.name());
label pRefCell = 0;
scalar pRefValue = 0.0;

View File

@ -81,7 +81,7 @@ setRefCell
pRefValue
);
mesh.schemes().setFluxRequired(p_rgh.name());
mesh.setFluxRequired(p_rgh.name());
dimensionedScalar initialMass = fvc::domainIntegrate(rho);
dimensionedScalar totalVolume = sum(mesh.V());

View File

@ -174,7 +174,7 @@ forAll(fluidRegions, i)
// Force p_rgh to be consistent with p
p_rghFluid[i] = thermoFluid[i].p() - rhoFluid[i]*ghFluid[i];
fluidRegions[i].schemes().setFluxRequired(p_rghFluid[i].name());
fluidRegions[i].setFluxRequired(p_rghFluid[i].name());
radiation.set
(
@ -185,7 +185,7 @@ forAll(fluidRegions, i)
initialMassFluid[i] = fvc::domainIntegrate(rhoFluid[i]).value();
const dictionary& simpleDict =
fluidRegions[i].solution().solutionDict("SIMPLE");
fluidRegions[i].solutionDict().subDict("SIMPLE");
setRefCell
(

View File

@ -1,5 +1,4 @@
const dictionary& simple =
fluidRegions[i].solution().solutionDict("SIMPLE");
const dictionary& simple = fluidRegions[i].solutionDict().subDict("SIMPLE");
const int nNonOrthCorr =
simple.getOrDefault<int>("nNonOrthogonalCorrectors", 0);

View File

@ -1,5 +1,4 @@
const dictionary& simple =
mesh.solution().solutionDict("SIMPLE");
const dictionary& simple = mesh.solutionDict().subDict("SIMPLE");
const int nNonOrthCorr =
simple.getOrDefault<int>("nNonOrthogonalCorrectors", 0);

View File

@ -278,14 +278,14 @@ forAll(fluidRegions, i)
phaseSystemFluid[i].phase1().thermo().p()
- phaseSystemFluid[i].phase1().thermo().rho()*ghFluid[i];
fluidRegions[i].schemes().setFluxRequired(p_rghFluid[i].name());
fluidRegions[i].setFluxRequired(p_rghFluid[i].name());
Info<< " Correcting initialMassFluid\n" << endl;
initialMassFluid[i] =
fvc::domainIntegrate(phaseSystemFluid[i].rho()).value();
const dictionary& pimpleDict =
fluidRegions[i].solution().solutionDict("PIMPLE");
fluidRegions[i].solutionDict().subDict("PIMPLE");
pimpleDict.readIfPresent("frozenFlow", frozenFlowFluid[i]);

View File

@ -1,5 +1,4 @@
const dictionary& pimpleDict =
mesh.solution().solutionDict("PIMPLE");
const dictionary& pimpleDict = mesh.solutionDict().subDict("PIMPLE");
Switch faceMomentum
(

View File

@ -9,7 +9,7 @@ if (Y.size())
mesh,
fields,
phi,
mesh.schemes().div("div(phi,Yi_h)")
mesh.divScheme("div(phi,Yi_h)")
)
);
}

View File

@ -189,7 +189,7 @@ forAll(fluidRegions, i)
// Force p_rgh to be consistent with p
p_rghFluid[i] = thermoFluid[i].p() - rhoFluid[i]*ghFluid[i];
fluidRegions[i].schemes().setFluxRequired(p_rghFluid[i].name());
fluidRegions[i].setFluxRequired(p_rghFluid[i].name());
Info<< " Adding to radiationFluid\n" << endl;
radiation.set
@ -260,8 +260,7 @@ forAll(fluidRegions, i)
);
const dictionary& pimpleDict =
fluidRegions[i].solution().solutionDict("PIMPLE");
fluidRegions[i].solutionDict().subDict("PIMPLE");
pimpleDict.readIfPresent("frozenFlow", frozenFlowFluid[i]);
rhoMaxFluid.set

View File

@ -1,5 +1,4 @@
const dictionary& pimple =
mesh.solution().solutionDict("PIMPLE");
const dictionary& pimple = mesh.solutionDict().subDict("PIMPLE");
const int nCorr =
pimple.getOrDefault<int>("nCorrectors", 1);

View File

@ -1,5 +1,4 @@
const dictionary& pimple =
mesh.solution().solutionDict("PIMPLE");
const dictionary& pimple = mesh.solutionDict().subDict("PIMPLE");
int nNonOrthCorr =
pimple.getOrDefault<int>("nNonOrthogonalCorrectors", 0);

View File

@ -92,19 +92,21 @@ else
// Consider mesh flux to correct for mesh deformation
bool meshFluxCorr(false);
if (mesh.solutionDict().found("SIMPLE"))
{
const dictionary& solutionDict = mesh.solution().solutionDict();
const dictionary* subdict = nullptr;
if
(
((subdict = solutionDict.findDict("SIMPLE")) != nullptr)
|| ((subdict = solutionDict.findDict("PIMPLE")) != nullptr)
)
{
meshFluxCorr = subdict->getOrDefault("meshFluxCorrection", false);
}
meshFluxCorr =
mesh.solutionDict().subDict("SIMPLE").getOrDefault<bool>
(
"meshFluxCorrection", false
);
}
else if (mesh.solutionDict().found("PIMPLE"))
{
meshFluxCorr =
mesh.solutionDict().subDict("PIMPLE").getOrDefault<bool>
(
"meshFluxCorrection", false
);
}
#include "createRadiationModel.H"

View File

@ -68,7 +68,7 @@ int main(int argc, char *argv[])
Info<< "\nEvolving thermodynamics\n" << endl;
if (mesh.solution().solutionDict().found("SIMPLE"))
if (mesh.solutionDict().found("SIMPLE"))
{
simpleControl simple(mesh);

View File

@ -65,7 +65,7 @@ int main(int argc, char *argv[])
Info<< "\nEvolving thermodynamics\n" << endl;
if (mesh.solution().solutionDict().found("SIMPLE"))
if (mesh.solutionDict().found("SIMPLE"))
{
simpleControl simple(mesh);

View File

@ -43,6 +43,8 @@ Description
int main(int argc, char *argv[])
{
#include "postProcess.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
@ -64,13 +66,13 @@ int main(int argc, char *argv[])
{
// Solve all primal equations
om.solvePrimalEquations();
// Clear sensitivities
om.clearSensitivities();
// Solve all adjoint equations
om.solveAdjointEquations();
}
// Update primal-based quantities of the adjoint solvers
om.updatePrimalBasedQuantities();
// Solve all adjoint equations
om.solveAdjointEquations();
}
Info<< "End\n" << endl;

View File

@ -106,7 +106,7 @@ int main(int argc, char *argv[])
// mesh.relaxationFactor("alpha")
// *(lambda*max(Ua & U, zeroSensitivity) - alpha);
alpha +=
mesh.solution().fieldRelaxationFactor("alpha")
mesh.fieldRelaxationFactor("alpha")
*(min(max(alpha + lambda*(Ua & U), zeroAlpha), alphaMax) - alpha);
zeroCells(alpha, inletCells);

View File

@ -32,7 +32,7 @@ volVectorField U
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, simple.dict(), pRefCell, pRefValue);
mesh.schemes().setFluxRequired(p.name());
mesh.setFluxRequired(p.name());
Info<< "Reading field pa\n" << endl;
@ -75,7 +75,7 @@ setRefCell
paRefCell,
paRefValue
);
mesh.schemes().setFluxRequired(pa.name());
mesh.setFluxRequired(pa.name());
singlePhaseTransportModel laminarTransport(U, phi);

View File

@ -54,11 +54,5 @@ volVectorField U
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell
(
p,
mesh.solution().solutionDict("PISO"),
pRefCell,
pRefValue
);
mesh.schemes().setFluxRequired(p.name());
setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue);
mesh.setFluxRequired(p.name());

View File

@ -36,11 +36,5 @@ singlePhaseTransportModel fluid(U, phi);
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell
(
p,
mesh.solution().solutionDict("PISO"),
pRefCell,
pRefValue
);
mesh.schemes().setFluxRequired(p.name());
setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue);
mesh.setFluxRequired(p.name());

View File

@ -43,7 +43,7 @@ surfaceScalarField phi
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, pimple.dict(), pRefCell, pRefValue);
mesh.schemes().setFluxRequired(p.name());
mesh.setFluxRequired(p.name());
Info<< "Creating SRF model\n" << endl;
autoPtr<SRF::SRFModel> SRF

View File

@ -34,7 +34,7 @@ volVectorField U
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, pimple.dict(), pRefCell, pRefValue);
mesh.schemes().setFluxRequired(p.name());
mesh.setFluxRequired(p.name());
singlePhaseTransportModel laminarTransport(U, phi);

View File

@ -32,7 +32,7 @@ volVectorField U
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, pimple.dict(), pRefCell, pRefValue);
mesh.schemes().setFluxRequired(p.name());
mesh.setFluxRequired(p.name());
//- Overset specific

View File

@ -32,7 +32,7 @@ volVectorField U
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, piso.dict(), pRefCell, pRefValue);
mesh.schemes().setFluxRequired(p.name());
mesh.setFluxRequired(p.name());
singlePhaseTransportModel laminarTransport(U, phi);

View File

@ -76,4 +76,4 @@ hTotal.write();
Info<< "Creating Coriolis Force" << endl;
const dimensionedVector F("F", ((2.0*Omega) & gHat)*gHat);
mesh.schemes().setFluxRequired(h.name());
mesh.setFluxRequired(h.name());

View File

@ -43,7 +43,7 @@ surfaceScalarField phi
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, simple.dict(), pRefCell, pRefValue);
mesh.schemes().setFluxRequired(p.name());
mesh.setFluxRequired(p.name());
Info<< "Creating SRF model\n" << endl;
autoPtr<SRF::SRFModel> SRF(SRF::SRFModel::New(Urel));

View File

@ -32,7 +32,7 @@ volVectorField U
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, simple.dict(), pRefCell, pRefValue);
mesh.schemes().setFluxRequired(p.name());
mesh.setFluxRequired(p.name());
singlePhaseTransportModel laminarTransport(U, phi);

View File

@ -32,7 +32,7 @@ volVectorField U
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, simple.dict(), pRefCell, pRefValue);
mesh.schemes().setFluxRequired(p.name());
mesh.setFluxRequired(p.name());
singlePhaseTransportModel laminarTransport(U, phi);

View File

@ -62,7 +62,7 @@ surfaceScalarField phic
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, pimple.dict(), pRefCell, pRefValue);
mesh.schemes().setFluxRequired(p.name());
mesh.setFluxRequired(p.name());
Info<< "Creating turbulence model\n" << endl;

View File

@ -5,7 +5,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection
mesh,
fields,
phi,
mesh.schemes().div("div(phi,Yi_h)")
mesh.divScheme("div(phi,Yi_h)")
)
);

View File

@ -91,7 +91,7 @@ volVectorField U
#include "compressibleCreatePhi.H"
mesh.schemes().setFluxRequired(p.name());
mesh.setFluxRequired(p.name());
Info<< "Creating turbulence model\n" << endl;
autoPtr<compressible::turbulenceModel> turbulence

View File

@ -75,7 +75,7 @@ autoPtr<incompressible::turbulenceModel> turbulence
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, pimple.dict(), pRefCell, pRefValue);
mesh.schemes().setFluxRequired(p.name());
mesh.setFluxRequired(p.name());
#include "createMRF.H"
#include "createClouds.H"

View File

@ -5,7 +5,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection
mesh,
fields,
phi,
mesh.schemes().div("div(phi,Yi_h)")
mesh.divScheme("div(phi,Yi_h)")
)
);

View File

@ -96,7 +96,7 @@ p_rgh = p - rho*gh;
pressureControl pressureControl(p, rho, pimple.dict(), false);
mesh.schemes().setFluxRequired(p_rgh.name());
mesh.setFluxRequired(p_rgh.name());
Info<< "Creating multi-variate interpolation scheme\n" << endl;
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;

View File

@ -5,7 +5,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection
mesh,
fields,
phi,
mesh.schemes().div("div(phi,Yi_h)")
mesh.divScheme("div(phi,Yi_h)")
)
);

View File

@ -50,7 +50,7 @@ volVectorField U
#include "compressibleCreatePhi.H"
mesh.schemes().setFluxRequired(p.name());
mesh.setFluxRequired(p.name());
const dimensionedScalar rhoMax("rhoMax", dimDensity, GREAT, simple.dict());
const dimensionedScalar rhoMin("rhoMin", dimDensity, Zero, simple.dict());

View File

@ -5,7 +5,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection
mesh,
fields,
phi,
mesh.schemes().div("div(phi,Yi_h)")
mesh.divScheme("div(phi,Yi_h)")
)
);

View File

@ -51,7 +51,7 @@ volVectorField U
#include "compressibleCreatePhi.H"
mesh.schemes().setFluxRequired(p.name());
mesh.setFluxRequired(p.name());
const dimensionedScalar rhoMax("rhoMax", dimDensity, GREAT, simple.dict());
const dimensionedScalar rhoMin("rhoMin", dimDensity, Zero, simple.dict());

View File

@ -5,7 +5,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection
mesh,
fields,
phi,
mesh.schemes().div("div(phi,Yi_h)")
mesh.divScheme("div(phi,Yi_h)")
)
);

View File

@ -50,7 +50,7 @@ volVectorField U
#include "compressibleCreatePhi.H"
mesh.schemes().setFluxRequired(p.name());
mesh.setFluxRequired(p.name());
const dimensionedScalar rhoMax("rhoMax", dimDensity, GREAT, pimple.dict());
const dimensionedScalar rhoMin("rhoMin", dimDensity, Zero, pimple.dict());

View File

@ -10,7 +10,7 @@
fv::ddtScheme<scalar>::New
(
mesh,
mesh.schemes().ddt("ddt(alpha)")
mesh.ddtScheme("ddt(alpha)")
)
);
const fv::ddtScheme<scalar>& ddtAlpha = tddtAlpha();
@ -237,7 +237,7 @@
if
(
word(mesh.schemes().ddt("ddt(rho,U)"))
word(mesh.ddtScheme("ddt(rho,U)"))
== fv::EulerDdtScheme<vector>::typeName
)
{

View File

@ -105,7 +105,7 @@ setRefCell
(
p,
p_rgh,
mesh.solution().solutionDict("PIMPLE"),
mesh.solutionDict().subDict("PIMPLE"),
pRefCell,
pRefValue
);
@ -121,8 +121,8 @@ if (p_rgh.needReference())
p_rgh = p - rho*gh;
}
mesh.schemes().setFluxRequired(p_rgh.name());
mesh.schemes().setFluxRequired(alpha1.name());
mesh.setFluxRequired(p_rgh.name());
mesh.setFluxRequired(alpha1.name());
// alphac must be constructed before the cloud
// so that the drag-models can find it

View File

@ -10,7 +10,7 @@
fv::ddtScheme<scalar>::New
(
mesh,
mesh.schemes().ddt("ddt(alpha)")
mesh.ddtScheme("ddt(alpha)")
)
);
const fv::ddtScheme<scalar>& ddtAlpha = tddtAlpha();
@ -239,9 +239,9 @@
if
(
word(mesh.schemes().ddt("ddt(rho,U)"))
word(mesh.ddtScheme("ddt(rho,U)"))
== fv::EulerDdtScheme<vector>::typeName
|| word(mesh.schemes().ddt("ddt(rho,U)"))
|| word(mesh.ddtScheme("ddt(rho,U)"))
== fv::localEulerDdtScheme<vector>::typeName
)
{

View File

@ -19,7 +19,7 @@ correctUphiBCs(U, phi);
surfaceScalarField rhof(fvc::interpolate(rho, "div(phi,rho)"));
dimensionedScalar rAUf("rAUf", dimTime, 1.0);
mesh.schemes().setFluxRequired(pcorr.name());
mesh.setFluxRequired(pcorr.name());
while (pimple.correctNonOrthogonal())
{

View File

@ -43,7 +43,7 @@ volVectorField U
#include "createPhi.H"
mesh.schemes().setFluxRequired(p.name());
mesh.setFluxRequired(p.name());
// Mass flux (corrected by rhoEqn.H)
surfaceScalarField rhoPhi
@ -86,8 +86,8 @@ rho == max
rhoMin
);
mesh.schemes().setFluxRequired(p.name());
mesh.schemes().setFluxRequired(rho.name());
mesh.setFluxRequired(p.name());
mesh.setFluxRequired(rho.name());
// Create incompressible turbulence model
autoPtr<incompressible::turbulenceModel> turbulence

View File

@ -1,3 +1,3 @@
const dictionary& alphaControls = mesh.solution().solverDict(alpha1.name());
const dictionary& alphaControls = mesh.solverDict(alpha1.name());
label nAlphaSubCycles(alphaControls.get<label>("nAlphaSubCycles"));

View File

@ -63,8 +63,8 @@ dimensionedScalar pMin
mixture
);
mesh.schemes().setFluxRequired(p_rgh.name());
mesh.schemes().setFluxRequired(alpha1.name());
mesh.setFluxRequired(p_rgh.name());
mesh.setFluxRequired(alpha1.name());
#include "readGravitationalAcceleration.H"

View File

@ -62,8 +62,8 @@ dimensionedScalar pMin
mixture
);
mesh.schemes().setFluxRequired(p_rgh.name());
mesh.schemes().setFluxRequired(alpha1.name());
mesh.setFluxRequired(p_rgh.name());
mesh.setFluxRequired(alpha1.name());
#include "readGravitationalAcceleration.H"

View File

@ -62,8 +62,8 @@ dimensionedScalar pMin
mixture
);
mesh.schemes().setFluxRequired(p_rgh.name());
mesh.schemes().setFluxRequired(alpha1.name());
mesh.setFluxRequired(p_rgh.name());
mesh.setFluxRequired(alpha1.name());
#include "readGravitationalAcceleration.H"

View File

@ -45,7 +45,7 @@ volScalarField rho
dimensionedScalar pMin("pMin", dimPressure, mixture);
mesh.schemes().setFluxRequired(p_rgh.name());
mesh.setFluxRequired(p_rgh.name());
#include "readGravitationalAcceleration.H"

View File

@ -804,7 +804,7 @@ void Foam::multiphaseMixtureThermo::solve()
{
const Time& runTime = mesh_.time();
const dictionary& alphaControls = mesh_.solution().solverDict("alpha");
const dictionary& alphaControls = mesh_.solverDict("alpha");
label nAlphaSubCycles(alphaControls.get<label>("nAlphaSubCycles"));
scalar cAlpha(alphaControls.get<scalar>("cAlpha"));

View File

@ -1,4 +1,4 @@
const dictionary& alphaControls = mesh.solution().solverDict(alpha1.name());
const dictionary& alphaControls = mesh.solverDict(alpha1.name());
label nAlphaCorr(alphaControls.get<label>("nAlphaCorr"));

View File

@ -125,8 +125,8 @@ if (p_rgh.needReference())
p_rgh = p - rho*gh;
}
mesh.schemes().setFluxRequired(p_rgh.name());
mesh.schemes().setFluxRequired(alpha1.name());
mesh.setFluxRequired(p_rgh.name());
mesh.setFluxRequired(alpha1.name());
// MULES Correction
tmp<surfaceScalarField> talphaPhiCorr0;

View File

@ -329,7 +329,7 @@ Foam::radiation::laserDTRM::laserDTRM(const volScalarField& T)
:
radiationModel(typeName, T),
mode_(powerDistNames_.get("mode", *this)),
DTRMCloud_(mesh_, "DTRMCloud", IDLList<DTRMParticle>()),
DTRMCloud_(mesh_, Foam::zero{}, "DTRMCloud"), // Empty cloud
nParticles_(0),
ndTheta_(get<label>("nTheta")),
ndr_(get<label>("nr")),
@ -427,7 +427,7 @@ Foam::radiation::laserDTRM::laserDTRM
:
radiationModel(typeName, dict, T),
mode_(powerDistNames_.get("mode", *this)),
DTRMCloud_(mesh_, "DTRMCloud", IDLList<DTRMParticle>()),
DTRMCloud_(mesh_, Foam::zero{}, "DTRMCloud"), // Empty cloud
nParticles_(0),
ndTheta_(get<label>("nTheta")),
ndr_(get<label>("nr")),

View File

@ -117,8 +117,8 @@ if (p_rgh.needReference())
p_rgh = p - rho*gh;
}
mesh.schemes().setFluxRequired(p_rgh.name());
mesh.schemes().setFluxRequired(alpha1.name());
mesh.setFluxRequired(p_rgh.name());
mesh.setFluxRequired(alpha1.name());
#include "createMRF.H"
#include "createFvOptions.H"

View File

@ -123,8 +123,8 @@ if (p_rgh.needReference())
p_rgh = p - rho*gh;
}
mesh.schemes().setFluxRequired(p_rgh.name());
mesh.schemes().setFluxRequired(alpha1.name());
mesh.setFluxRequired(p_rgh.name());
mesh.setFluxRequired(alpha1.name());
#include "createMRF.H"
#include "createFvOptions.H"

View File

@ -1,4 +1,4 @@
const dictionary& alphaControls = mesh.solution().solverDict(alpha1.name());
const dictionary& alphaControls = mesh.solverDict(alpha1.name());
label nAlphaCorr(alphaControls.get<label>("nAlphaCorr"));

View File

@ -121,8 +121,8 @@ if (p_rgh.needReference())
p_rgh = p - rho*gh;
}
mesh.schemes().setFluxRequired(p_rgh.name());
mesh.schemes().setFluxRequired(alpha2.name());
mesh.setFluxRequired(p_rgh.name());
mesh.setFluxRequired(alpha2.name());
#include "createMRF.H"
#include "createFvOptions.H"

View File

@ -157,7 +157,7 @@ Foam::threePhaseInterfaceProperties::threePhaseInterfaceProperties
mixture_(mixture),
cAlpha_
(
mixture.U().mesh().solution().solverDict
mixture.U().mesh().solverDict
(
mixture_.alpha1().name()
).get<scalar>("cAlpha")

View File

@ -60,7 +60,7 @@
fvc::makeAbsolute(phi, U);
}
mesh.schemes().setFluxRequired(pcorr.name());
mesh.setFluxRequired(pcorr.name());
dimensionedScalar rAUf("rAUf", dimTime/rho.dimensions(), 1.0);

View File

@ -148,7 +148,7 @@ if (p_rgh.needReference())
p_rgh = p - rho*gh;
}
mesh.schemes().setFluxRequired(p_rgh.name());
mesh.schemes().setFluxRequired(alpha1.name());
mesh.setFluxRequired(p_rgh.name());
mesh.setFluxRequired(alpha1.name());
#include "createMRF.H"

View File

@ -1,3 +1,3 @@
const dictionary& alphaControls = mesh.solution().solverDict(alpha1.name());
const dictionary& alphaControls = mesh.solverDict(alpha1.name());
label nAlphaSubCycles(alphaControls.get<label>("nAlphaSubCycles"));

View File

@ -125,8 +125,8 @@ if (p_rgh.needReference())
p_rgh = p - rho*gh;
}
mesh.schemes().setFluxRequired(p_rgh.name());
mesh.schemes().setFluxRequired(alpha1.name());
mesh.setFluxRequired(p_rgh.name());
mesh.setFluxRequired(alpha1.name());
#include "createMRF.H"
#include "createFvOptions.H"

View File

@ -1,4 +1,4 @@
const dictionary& alphaControls = mesh.solution().solverDict(alpha1.name());
const dictionary& alphaControls = mesh.solverDict(alpha1.name());
label nAlphaCorr(alphaControls.get<label>("nAlphaCorr"));

View File

@ -105,8 +105,8 @@ if (p_rgh.needReference())
p_rgh = p - rho*gh;
}
mesh.schemes().setFluxRequired(p_rgh.name());
mesh.schemes().setFluxRequired(alpha1.name());
mesh.setFluxRequired(p_rgh.name());
mesh.setFluxRequired(alpha1.name());
#include "createFvOptions.H"

View File

@ -105,8 +105,8 @@ if (p_rgh.needReference())
p_rgh = p - rho*gh;
}
mesh.schemes().setFluxRequired(p_rgh.name());
mesh.schemes().setFluxRequired(alpha1.name());
mesh.setFluxRequired(p_rgh.name());
mesh.setFluxRequired(alpha1.name());
#include "createFvOptions.H"

Some files were not shown because too many files have changed in this diff Show More