Commit Graph

2339 Commits

Author SHA1 Message Date
Mark Olesen
b2bded48c9 STYLE: use Time::printExecutionTime() method
- makes format of ExecutionTime = ... output configurable (#788)
  and reduces code clutter.

STYLE: more consistent line-breaks after "End" tag
2020-08-07 09:24:56 +02:00
Mark Olesen
93ed933770 STYLE: use unitConversion degToRad() from instead of separate value 2020-08-05 18:56:24 +01:00
Mark Olesen
915c0785ae ENH: avoid phaseSystem cyclic dependencies, reduce number of libraries
Reduce the number of phaseSystems libraries:

- phaseSystems previously had a number of smaller libraries to provide
  interface and model properties, etc. This potential flexibility was
  never actually used anywhere, but causes cyclic dependencies between
  phaseSystem and the models (and turbulence) that causes extreme
  difficulty for mingw linking (issue #1238).

- libincompressibleMultiphaseSystems
  - removed: libmassTransferModels

- libmultiphaseSystem
  - removed: libcompressibleMultiphaseEulerianInterfacialModels

- libreactingMultiphaseSystem
  - removed: libreactingPhaseSystem
  - removed: libreactingEulerianFvPatchFields
  - removed: libreactingEulerianInterfacialCompositionModels
  - removed: libreactingEulerianInterfacialModels
  - removed: libmultiphaseReactingTurbulenceModels

- libreactingTwoPhaseSystem
  - removed: libreactingPhaseSystem
  - removed: libreactingEulerianFvPatchFields
  - removed: libreactingEulerianInterfacialCompositionModels
  - removed: libreactingEulerianInterfacialModels

Avoid duplicate symbol for phaseCompressibleTurbulenceModels

  Common turbulence models are defined in libreactingMultiphaseSystem,
  and libmultiphaseReactingTurbulenceModels is now redundant.

  The libtwoPhaseReactingTurbulenceModels extends the common models
  for reactingTwoPhaseSystem.
2020-08-05 18:56:23 +01:00
Mark Olesen
03526e2097 ENH: centralize more libraries in src/phaseSystemModels
- prelude to code refactoring

NOTE
    no source code change in this commit, only relocation,
    renaming and adjustment of Make/{files,options}
2020-08-05 18:56:22 +01:00
Mark Olesen
6b074985ac ENH: improve separation of turbulence models macros (define vs make) 2020-08-03 16:28:21 +02:00
Mark Olesen
12c91b9472 STYLE: check autoPtr as plain bool instead of valid()
- cleaner code, more similarity with unique_ptr

  Now
      if (ptr)
      if (!ptr)

  instead
      if (ptr.valid())
      if (!ptr.valid())
2020-07-16 11:39:24 +02:00
Mark Olesen
9af3f85cf9 STYLE: simplify short-circuit involving autoPtr (#1775)
- with '&&' conditions, often better to check for non-null autoPtr
  first (it is cheap)

- check as bool instead of valid() method for cleaner code, especially
  when the wrapped item itself has a valid/empty or good.
  Also when handling multiple checks.

  Now
      if (ptr && ptr->valid())
      if (ptr1 || ptr2)

  instead
      if (ptr.valid() && ptr->valid())
      if (ptr1.valid() || ptr2.valid())
2020-07-16 10:17:25 +02:00
Andrew Heather
d1dae159ad BUG: Corrected use of ddtCorr off 2020-06-29 11:07:09 +01:00
Andrew Heather
013a52238d COMP: some resolved compiler warnings 2020-06-25 10:02:50 +01:00
Andrew Heather
6e716c66d5 ENH: pimpleFoam - ddtCorr now optional 2020-06-24 22:10:20 +01:00
mattijs
15d6febeff COMP: chtMultiRegion: avoid excess unused references. See #1726. 2020-06-22 11:55:08 +01:00
OpenFOAM bot
01ec92fd35 GIT: remove leading/trailing blank lines, trailing whitespace 2020-06-17 10:46:26 +02:00
Mark Olesen
c1c995d3fe COMP: fix some linkage issues for mingw
COMP: automatically add FlexLexer.h to MSwindows OSspecific

- useful, frequently forgotten step for cross-compiling
2020-06-16 23:56:41 +02:00
Mark Olesen
c21c5e070a COMP: relocate compressibleInterIsoFoam (#1726)
- place under compressibleInterFoam to ensure that the library
  dependency on VoFphaseCompressibleTurbulenceModels is satisfied
2020-06-15 14:16:52 +02:00
Henning Scheufler
44a84d4778 CONT: Addition of compressibleIsoInterFOam and PLIC
1) Implementation of the compressibleIsoInterFOam solver
   2) Implementation of a new PLIC interpolation scheme.
   3) New tutorials associated with the solvers

This implementation was carried out by Henning Scheufler (DLR) and Johan
Roenby (DHI), following :

\verbatim

Henning Scheufler, Johan Roenby,
Accurate and efficient surface reconstruction from volume fraction data
on general meshes, Journal of Computational Physics, 2019, doi
10.1016/j.jcp.2019.01.009

\endverbatim

The integration of the code was carried out by Andy Heather and Sergio
Ferraris from OpenCFD Ltd.
2020-06-09 08:11:04 +01:00
sergio
087e963af5 STY: Changing AUTO_WRITE flags in mass exchange models 2020-06-08 12:22:24 -07:00
sergio
95f7ed0342 COM: Separate htc FO from general FO and reactingEuler solvers (#1714)
The phase systems tables for multiphase solvers create conflict
between each other as they are defined in the same namespace and using
similar class names.

Therefore a special htc function object for reactingEulerSolver was
added (reactingEulerHtcModel), located under
src/phaseSystemModels/reactingEulerFoam/functionObjects/

This commit includes the following:

- Relocate solvers/reactingEulerFoam functionObjects to
  src/phaseSystemModels
- Remove links for fieldFunctionObject to multiphase libs to avoid
  conflicts
- New FO for htc for reactingEulerFoam called reactingEulerHtcModel
2020-06-03 20:58:02 +02:00
Mark Olesen
3e43edf056 ENH: unify use of dictionary method names
- previously introduced `getOrDefault` as a dictionary _get_ method,
  now complete the transition and use it everywhere instead of
  `lookupOrDefault`. This avoids mixed usage of the two methods that
  are identical in behaviour, makes for shorter names, and promotes
  the distinction between "lookup" access (ie, return a token stream,
  locate and return an entry) and "get" access (ie, the above with
  conversion to concrete types such as scalar, label etc).
2020-06-02 17:26:03 +02:00
Mark Olesen
31b172217c ENH: support predicate checks for argList (similar to dictionary methods)
- Favour use of argList methods that are more similar to dictionary
  method names with the aim of reducing the cognitive load.

  * Silently deprecate two-parameter get() method in favour of the
    more familiar getOrDefault.
  * Silently deprecate opt() method in favour of get()

  These may be verbosely deprecated in future versions.
2020-06-02 13:51:18 +02:00
Mark Olesen
997c9a232c STYLE: use compact form for libs () entries 2020-05-23 18:42:47 +02:00
sergio
11965904b7 COMP: Avoiding double entry in runTime table TurbulenceModel
multiphaseReactingTurbulenceModels and twoPhaseReactingTurbulenceModels
add models to the same table TurbulenceModel. These two libs were removed
from libreactingPhaseSystem which created the conflict.

The multiphaseReactingTurbulenceModels was added to
reactingMultiPhaseEulerFoam solver and twoPhaseReactingTurbulenceModels to
twoPhaseReactingEulerFoam solver

The FO heatTransferCoeffs for libfieldFunctionObjects needs
twoPhaseReactingTurbulenceModels.

These change avoids linking conflict from multiphaseReactingTurbulenceModels
and twoPhaseReactingTurbulenceModels being linked in the same lib.
2020-05-22 11:01:55 -07:00
sergio
486df96fbc ENH: Re-ordering compilation phaseSystemModels 2020-05-21 15:21:23 +01:00
Mark Olesen
595579e01d COMP: use -iquotedir for including the local '.' directory
- adds into the include-quoted search list instead the general (-Idir)
  search list.

  * makes it less subject to ordering (since it will now generally be
    searched first) and makes it less subject to how duplicate removal
    is implemented. In some compilers (#1627), the last instance of
    a duplicate directory would be used and not the first instance.

  * removes clutter in some Make/options files

COMP: add missing linkage libraries
2020-05-06 13:06:40 +02:00
Mark Olesen
8cfb483054 STYLE: some general spelling fixes 2020-05-04 09:15:21 +02:00
Mark Olesen
a1ccd1b716 STYLE: use DebugInFunction macro 2020-05-01 16:11:18 +02:00
Mark Olesen
79048eb68f STYLE: use writeEntry(), beginBlock(), endBlock() methods
- use dictionary::get<..> instead of lookup in a few more places
2020-04-28 10:41:23 +02:00
Mark Olesen
a14a231f09 STYLE: spelling and misc code style for interfaceHeatResistance 2020-04-21 13:32:26 +02:00
Sergio Ferraris
b240f9f963 ENH: Adding interfaceHeatResistance mass transfer model
1) Add interfaceHeatResistance model to icoReactingMultiphaseInterFoam
   This model uses a spread source for the continuity Eq.
   It is recommended for cases with good mesh resolution.

2) Adding iso-surface type of calculation for the interface for
   the kineticGasEvaporation model

3) Add switch for option to take into account volume change

4) Add poolEvaporation tutorial
2020-04-20 20:58:32 +01:00
sergio
c8b504a680 BUG: Bound Tsource and pEq sign for condensation. Fix #1682. 2020-04-17 11:30:10 -07:00
sergio
0e6213e548 BUG: Correct interface after alphaEq in interCondensatingEvaporatingFoam 2020-03-30 10:32:35 -07:00
Andrew Heather
af34e61ef7 ENH: reactingParcelFoam - made film region mesh available for postProcess 2020-03-26 21:27:44 +00:00
Mark Olesen
30d9cfa7c2 STYLE: remove trailing space, use Enum::get() 2020-03-12 10:17:49 +01:00
Kutalmis Bercin
d7622d1ef8 ENH: add virtual omega to turbulenceModels
STYLE: update dimensionSets in SpalartAllmaras
2020-03-11 16:31:42 +00:00
Mark Olesen
585ee0fe89 COMP: fix construct assignment from tmp (clang) 2020-02-21 10:08:47 +01:00
sergio
514751dcf7 STY: General clean up 2020-02-19 10:40:56 -08:00
sergio
499933dbab ENH: Adding features for phase change solvers
1) Adding interfaceHeight FO
2) Adding interfaceHeatResistance mass transfer model to
   interCondensatingEvaporatingFoam with spread source approach
3) Reworking framework for icoReactingMultiphaseInterFoam
2020-02-19 14:18:25 +00:00
Mark Olesen
87b3006566 STYLE: backslash doxygen commands, email address, typos in error messages 2020-01-31 17:06:30 +01:00
sergio
d04de0d481 ENH: modified laplacianFoam to use dimScalar or volScalar for DT (#1388) 2019-10-07 12:59:39 -07:00
Andrew Heather
042c529f9f Merge branch 'feature-adjoint-shapeOptimisation' into 'develop'
ENH: New adjont shape optimisation functionality

See merge request Development/openfoam!307
2019-12-12 14:18:20 +00:00
Vaggelis Papoutsis
b863254308 ENH: New adjont shape optimisation functionality
The adjoint library is enhanced with new functionality enabling
automated shape optimisation loops.  A parameterisation scheme based on
volumetric B-Splines is introduced, the control points of which act as
the design variables in the optimisation loop [1, 2].  The control
points of the volumetric B-Splines boxes can be defined in either
Cartesian or cylindrical coordinates.

The entire loop (solution of the flow and adjoint equations, computation
of sensitivity derivatives, update of the design variables and mesh) is
run within adjointOptimisationFoam. A number of methods to update the
design variables are implemented, including popular Quasi-Newton methods
like BFGS and methods capable of handling constraints like loop using
the SQP or constraint projection.

The software was developed by PCOpt/NTUA and FOSS GP, with contributions from

Dr. Evangelos Papoutsis-Kiachagias,
Konstantinos Gkaragounis,
Professor Kyriakos Giannakoglou,
Andy Heather

[1] E.M. Papoutsis-Kiachagias, N. Magoulas, J. Mueller, C. Othmer,
K.C.  Giannakoglou: 'Noise Reduction in Car Aerodynamics using a
Surrogate Objective Function and the Continuous  Adjoint Method with
Wall Functions', Computers & Fluids, 122:223-232, 2015

[2] E. M. Papoutsis-Kiachagias, V. G. Asouti, K. C. Giannakoglou,
K.  Gkagkas, S. Shimokawa, E. Itakura: ‘Multi-point aerodynamic shape
optimization of cars based on continuous adjoint’, Structural and
Multidisciplinary Optimization, 59(2):675–694, 2019
2019-12-12 14:17:29 +00:00
Andrew Heather
87bba9ae14 ENH: add selectable update control/interval to pimpleFoam, rhoPimpleFoam
- Allows user-defined control of when the mesh motion occurs,
  which can be especially useful in situations where the mesh motion
  is much slower than any of the fluid physics.

  For example, in constant/dynamicMeshDict:

      updateControl   runTime;
      updateInterval  0.5;

  to have mesh motion triggered every 1/2 second.

  Note that the _exact_ time that the mesh motion actually occurs may
  be slightly differently since the "runTime" triggering is fuzzy in
  nature. It will trigger when the threshold has been crossed, which
  will depend on the current time-step size.
2019-12-11 20:25:18 +00:00
Andrew Heather
6748f10d5d ENH: Lagrangian - added particle output to stream functions 2019-12-09 23:21:53 +00:00
Andrew Heather
31aad2159f STYLE: writeFile - renamed writeTime to writeCurrentTime to avoid conflicts 2019-09-09 09:19:38 +01:00
Mark Olesen
1310e85225 ENH: support 'get()' for retrieving argList options
- previously only had 'opt<..>()' for options, but 'get<..>()'
  provides more similarity with dictionary methods.
  The 'opt<..>()' method is retained.
2019-11-26 21:07:11 +01:00
Mark Olesen
98467036b3 STYLE: regularize quoting and exit on failed 'cd' 2019-11-13 13:19:16 +01:00
Mark Olesen
ec7e3c88e4 ENH: test for WM_PROJECT_DIR being set/unset in scripts 2019-11-06 09:18:51 +01:00
Andrew Heather
fdf8d10ab4 Merge commit 'e9219558d7' into develop-v1906 2019-12-05 11:47:19 +00:00
OpenFOAM bot
e9219558d7 GIT: Header file updates 2019-10-31 14:48:44 +00:00
sergio ferraris
9f11d892f5 ENH: Update of alphaBoiling BC, Bromley and tutorial 2019-10-28 12:30:53 -07:00
sergio
92f288ca36 BUG: Correcting issue 1441. Reading cAlphas entry for multiphase 2019-09-27 14:24:05 -07:00