Commit Graph

25672 Commits

Author SHA1 Message Date
sergio
c0581fe8eb TUT: poolEvaporationMultiComponent: new tutorial for icoReactingMultiphaseInterFoam
TUT: icoReactingMultiphaseInterFoam: various changes in settings
2022-06-21 09:30:02 +01:00
sergio
618aee84a5 ENH: diffusionGasEvaporation: new diffusion based mass transfer model
ENH: saturationModels: new library for saturation models
2022-06-21 09:30:02 +01:00
sergio
d91fe9a6ac ENH: multiphaseInter: ensure consistent Hf treatment for phases
TUT: icoReactingMultiphaseInterFoam: update thermophysicalProperties.liquid
2022-06-21 09:30:02 +01:00
sergio
0f0a5c5c0f BUG: interfaceHeatResistance: remove max condensation limiter 2022-06-21 09:30:02 +01:00
sergio
8f8612fd0c BUG: multiphaseInterSystem: fix kappaEff functions 2022-06-21 09:30:02 +01:00
sergio
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
sergio
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
sergio
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
Andrew Heather
e96990c8bf DOC: Doxygen corrections 2022-06-17 11:49:23 +01:00
mattijs
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
mattijs
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
mattijs
e5cb375ab7 BUG: (un)refinement: combine topochange+motion. Fixes #2492 2022-06-15 13:28:34 +01:00
Andrew Heather
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
sergio
c8538ee49e ENH: Adding iterative solver to S2S equations
ENH: Adding report after matrix smoothing
2022-06-15 12:25:58 +00:00
Mark Olesen
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
Vaggelis Papoutsis
ed621480ac COMP: NURBS3DVolume was masking the write function of IOdictionary 2022-06-15 11:36:37 +02:00
Mark Olesen
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
Mark Olesen
c6c4ced741 COMP: non-existent directories (#2509) 2022-06-14 15:51:53 +02:00
Mark Olesen
ea91261f59 CONFIG: update compiler versions 2022-06-14 15:23:08 +02:00
Mark Olesen
96ece1ef35 ENH: foamRunTutorials -dry-run option
- for tracing tutorials execution
2022-06-14 15:23:08 +02:00
Mark Olesen
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
Kutalmis Bercin
8c03201cd1 TUT: planeChannel: add setTurbulenceFields example
TUT: cylinder: fix the order in Allclean
2022-06-14 13:21:53 +00:00
Kutalmis Bercin
a371f1792b ENH: setTurbulenceFields: new automatic initialisation method for turbulence fields 2022-06-14 13:21:53 +00:00
Andrew Heather
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
sergio
3636876e68 TUT: groundAbsorption: new tutorial for speciesSorption and enthalpySorption BCs 2022-06-14 11:35:45 +01:00
sergio
98f11e4bd0 ENH: enthalpySorption: new temperature boundary condition 2022-06-14 11:35:42 +01:00
sergio
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
Mark Olesen
33f381c052 SUBMODULE: realign visualization commit 2022-06-13 16:06:01 +02:00
Mark Olesen
1e37ab4b44 DOC: update dictionary doxygen 2022-06-13 16:06:01 +02:00
Andrew Heather
cf61b0ab88 ENH: ParticleZoneInfo cloud FO - reworked for restarts 2022-06-13 14:55:48 +01:00
Andrew Heather
b0b9aa6def ENH: subModelBase - return bool from getModelProperty to identify read success 2022-06-13 14:09:00 +01:00
mattijs
10d08c28e5 GIT: tutorials: cleanup 2022-06-13 09:59:15 +01:00
Andrew Heather
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
Mark Olesen
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
Mark Olesen
675c168014 Merge remote-tracking branch 'origin/master' into develop.mol 2022-06-10 17:57:05 +02:00
Mark Olesen
c509e1c9b2 SUBMODULE: update to current heads 2022-06-10 17:55:49 +02:00
Mark Olesen
63cfb77fa5 ENH: use vector removeCollinear/normalise in NVDscheme 2022-06-10 15:50:49 +02:00
Andrew Heather
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
Vaggelis Papoutsis
f6897a595f ENH: cref for grad(Ua) in the adjoint library
Necessary when grad(Ua) is cached
2022-06-10 13:00:52 +00:00
Vaggelis Papoutsis
a5f59cd903 BUG: nearWallDist not updated throughout optimisation loops
Partially fixes #2502 (see discussion there)
2022-06-10 13:00:52 +00:00
Vaggelis Papoutsis
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
Vaggelis Papoutsis
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
Vaggelis Papoutsis
06cde7916c TUT: added a tutorial showcasing the use of the nutSqr objective 2022-06-10 13:00:52 +00:00
Vaggelis Papoutsis
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
Vaggelis Papoutsis
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
Vaggelis Papoutsis
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
Vaggelis Papoutsis
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
Vaggelis Papoutsis
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
Vaggelis Papoutsis
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
Vaggelis Papoutsis
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