Commit Graph

3822 Commits

Author SHA1 Message Date
Andrew Heather
1dc216eb1f TUT: Corrected references to mut - related to #3057 2024-01-03 09:55:44 +00:00
Andrew Heather
c4328296b0 TUT: Corrected legacy muTilda -> nuTilda. Fixes 3057 2024-01-03 09:43:23 +00:00
Vaggelis Papoutsis
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
Vaggelis Papoutsis
9f0f9f2dd6 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 11:59:08 +00:00
Vaggelis Papoutsis
e5a62a0bdd TUT: removed unnecessary computations of yPlus
in shape optimisation tutorials
2023-12-21 09:50:26 +00:00
Andrew Heather
28aad3a03e RELEASE: Updated headers to v2312 2023-12-20 19:42:55 +01:00
Mark Olesen
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
mattijs
2602d08d8a TUT: mergePairs: cleanup 2023-12-20 11:58:53 +00:00
Vaggelis Papoutsis
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
Vaggelis Papoutsis
7868d9251a TUT: added a topology optimisation tutorial using ISQP
to update the design variables
2023-12-18 18:01:35 +00:00
Vaggelis Papoutsis
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
Vaggelis Papoutsis
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
Vaggelis Papoutsis
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
Vaggelis Papoutsis
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
Vaggelis Papoutsis
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
Mattijs Janssens
d6ba54bfec ENH: fileOperation: fix fileOperation::nProcs to handle multiple candidates 2023-12-18 15:59:31 +00:00
Mattijs Janssens
7a9dd4c0c2 ENH: cyclicAMI: add non-blocking for GAMG 2023-12-18 12:56:33 +00:00
Mark Olesen
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
mattijs
05f2d54979 ENH: masterCoarsest: demo case for processorAgglom. See !645 2023-12-11 12:28:08 +00:00
mattijs
d2b2b9fa0f TUT: redistributePar: use instead of decomposePar 2023-12-11 08:54:41 +00:00
mattijs
bc5aafa0d9 TUT: fileOperation: bit more testing. See #2952 2023-12-08 15:58:12 +00:00
Mark Olesen
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
mattijs
227480c366 TUT: snappyHexMesh: demo multiple insidePoints 2023-12-07 14:42:22 +00:00
mattijs
8cd22c1a83 TUT: redistributePar does not write dummy meshes anymore. 2023-12-07 10:22:57 +00:00
Kutalmis Bercin
4c6b7217d1 ENH: KinematicWeberNumber: add new cloud function object 2023-12-05 09:47:23 +00:00
mattijs
75790ba540 TUT: Allrun : requires numberOfDomains in decomposeParDict 2023-12-04 14:40:32 +00:00
Andrew Heather
9d20dd84a9 TUT: Added caseInfo function object example 2023-12-01 15:04:41 +00:00
mattijs
6da041e61f TUT: added -constant for redistributePar. See !605 2023-11-29 09:14:59 +00:00
mattijs
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
Kutalmis Bercin
1a4d2f735f TUT: cylinder2D: add examples for the createROMfields utility 2023-11-24 19:57:11 +00:00
mattijs
4183419be0 TUT: redistributePar 2023-11-21 11:14:28 +00:00
Mark Olesen
17257f9f97 DOC: add -print-context to tutorial/Alltest
- allows separate query/generation of context information
2023-11-15 11:10:10 +01:00
Andrew Heather
6ea2041122 Merge remote-tracking branch 'origin/master' into develop 2023-11-14 17:52:28 +00:00
mattijs
e67f8d0929 TUT: overset: demo some motion. See #2711. 2023-11-09 15:02:51 +00:00
Kutalmis Bercin
f75aa7fbc8 TUT: steadyBoundaryLayer: ensure compatibility with gnuplot version > 5.4
- fix various scripts
2023-11-09 14:02:13 +00:00
Mark Olesen
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
mattijs
69169c5abe ENH: add non-blocking handling for cyclicAMI (#2963)
Co-authored-by: Mark Olesen <>
2023-08-30 13:39:16 +00:00
Mark Olesen
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
Mark Olesen
2fc2d1f95f TUT: missing ';' for solverInfo 2023-07-31 20:11:32 +02:00
Andrew Heather
1fc9313c97 BUG: Conservative AMI - use supplied points when resetting the AMI. See #2078 2023-07-26 15:36:25 +01:00
mattijs
ab0d4d95ff ENH: snappyHexMesh: write leak-closure faces 2023-07-19 12:55:02 +01:00
Kutalmis Bercin
edb455ca97 TUT: weightedFluxExample: correct plot indices (fixes #2940) 2023-07-13 16:07:49 +01:00
Mark Olesen
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
Andrew Heather
763bf4674d RELEASE: Updated headers to v2306 2023-06-28 16:35:48 +01:00
Kutalmis Bercin
d6d319d95a TUT: mixerVessel: update problematic entries 2023-06-26 10:28:58 +01:00
Mark Olesen
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
Kutalmis Bercin
32386d0b39 TUT: turbulentFlatPlate: tighten solver settings for epsilon (fixes #2810) 2023-06-20 17:33:39 +01:00
mattijs
66a2894da8 ENH: parProfiling: add few more functionality to test 2023-06-19 15:53:27 +01:00
Kutalmis Bercin
41cb168649 TUT: scalarTransport: avoid excessive number of output directories (fixes #2806) 2023-06-19 09:01:37 +01:00
Kutalmis Bercin
188c303a27 ENH: finiteArea: enable cache-gradient mechanism 2023-06-14 14:21:27 +00:00
Kutalmis Bercin
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
Kutalmis Bercin
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
mattijs
6a66a15b8f ENH: generalise masterCoarsest restart (GAMG) 2023-06-01 08:17:58 +00:00
Mark Olesen
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
Mark Olesen
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
Mark Olesen
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
Mattijs Janssens
b0b3ec0d8e ENH: parProfiling: profile linear solver only 2023-05-03 19:04:10 +00:00
Mark Olesen
e967305ef2 STYLE: use calculatedType() and zeroGradientType() methods 2023-05-02 13:34:12 +02:00
Mark Olesen
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
Mark Olesen
ee39e3d276 STYLE: use explicit REGISTER option when storing fields 2023-04-25 13:45:08 +02:00
Mark Olesen
2b1061420c STYLE: remove trailing space, tabs 2023-04-24 15:37:33 +02:00
Mark Olesen
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
mattijs
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
Mark Olesen
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
Mark Olesen
25bc7d65f7 STYLE: prefer REGISTER/NO_REGISTER instead of true/false for IOobject
- self-documenting
2023-03-10 14:16:32 +00:00
Mark Olesen
7e9b5dbc78 TUT: adjust height limiter and outflow BC for drippingChair 2023-03-03 20:55:10 +01:00
Mark Olesen
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
Mark Olesen
0b7c0844f4 TUT: replace calc with eval for wallMountedHump (faster!) 2023-02-21 14:27:33 +01:00
Mark Olesen
fb2bf77e8e TUT: update keyword coordinateRotation -> rotation 2023-02-20 19:00:31 +01:00
Mark Olesen
aafcd0b9e0 TUT: use slash-scoped dictionary references 2023-02-13 21:18:57 +01:00
Mark Olesen
27a7ae2d1d ENH: use simpler lookupPatchField form 2023-02-13 20:08:48 +01:00
Jiri Polansky
1471d292bf TUT: add dripping chair test 2023-01-31 15:29:26 +01:00
Mark Olesen
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
Andrew Heather
51ed7a6034 TUT: Added simpleFoam/rotatingCylinders validation case - fixes #2563 2023-01-03 21:20:48 +00:00
Andrew Heather
7e61f36c12 RELEASE: Updated headers to v2212 2022-12-21 16:16:18 +00:00
mattijs
02ca7868d5 BUG: tutorial: missing run script invocation 2022-12-14 14:28:50 +00:00
mattijs
029c5a24fe BUG: snappyMultiRegionHeaterImplicit: fix decomposition. Fixes #2657 2022-12-14 13:25:24 +00:00
mattijs
09f4d8513f ENH: processorAgglomerator: test nMasters 2022-12-12 13:29:37 +00:00
Kutalmis Bercin
885456f9a4 ENH: dynamicContactAngleForce: new finite-area contact-angle force model
DEFEATURE: merge fa-perturbedTemperatureDependent into dynamicContactAngle
2022-12-09 13:09:11 +00:00
mattijs
d0061d6f54 ENH: cellToFaceZone: new topoSetSource 2022-12-08 11:35:39 +00:00
mattijs
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
Kutalmis Bercin
b50591166e STYLE: rename atmospheric-field names, plantCd->Cd and leafAreaDensity->LAD 2022-12-08 11:35:39 +00:00
Vaggelis Papoutsis
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
Mark Olesen
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
Mark Olesen
126d831f6e TUT: use filter/mapping with ensight data (#2609) 2022-11-24 13:30:16 +01:00
Mark Olesen
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
Kutalmis Bercin
b18a6675cb STYLE: heatTransferCoeff: minor cleanup of models
TUT: solidQuenching2D: correct libs for reactingEulerHtcModel
2022-11-21 15:58:58 +00:00
Mark Olesen
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
Mark Olesen
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
Mark Olesen
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
Mark Olesen
ec1d66d640 TUT: keyword updates 2022-11-18 10:31:00 +01:00
Kutalmis Bercin
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
Kutalmis Bercin
d5a973419a STYLE: overset: change massCorrection to fluxCorrection
COMP: overset: fixes for SPDP, int64
2022-11-14 15:41:40 +00:00
mattijs
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
sergio
b48fd4f38a TUT: overset: add new tutorials and update existing tutorials 2022-11-11 10:19:51 +00:00
Mark Olesen
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
Kutalmis Bercin
e510321a26 TUT: wallMountedHump: new DES tutorial 2022-11-07 10:59:18 +00:00
Andrew Heather
32507b3251 TUT: vortexShed case - added turbulenceFields example 2022-11-07 10:59:18 +00:00
Mark Olesen
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
Mark Olesen
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