Commit Graph

23826 Commits

Author SHA1 Message Date
538dfcd6d3 Merge branch 'feature-atmInletBCs' into 'develop'
ENH: Improve and verify atmBoundaryLayerInlet conditions

See merge request Development/openfoam!354
2020-06-05 14:42:23 +01:00
336fb3bddf ENH: improve/verify atmBoundaryLayerInlet conditions
ENH: add generalised log-law type ground-normal inflow boundary conditions for
  wind velocity and turbulence quantities for homogeneous, two-dimensional,
  dry-air, equilibrium and neutral atmospheric boundary layer (ABL) modelling

  ENH: remove `zGround` entry, which is now automatically computed

  ENH: add `displacement height` entry, `d`

  ENH: add generalised atmBoundaryLayerInletOmega boundary condition

  ENH: add a verification case for atmBoundaryLayerInlet BCs

  DOC: improve atmBoundaryLayerInlet header documentation

  BUG: fix value-entry behaviour in atmBoundaryLayerInlet (fixes #1578)
  Without this change:
  - for serial-parallel computations, if `value` entry is available in
    an `atmBoundaryLayerInlet` BC, the theoretical ABL profile expressions
    are not computed, and the `value` entry content is used as a profile data
  - for parallel computations, if `value` entry is not available, `decomposePar`
    could not be executed.
  With this change:
  - assuming `value` entry is always be present, the use of `value` entry for
    the ABL profile specification is determined by a flag `initABL`
  - the default value of the optional flag `initABL` is `true`, but whenever
    `initABL=true` is executed, `initABL` is overwritten as `false` for the
    subsequent runs, so that `value` entry can be safely used.
  Thanks Per Jørgensen for the bug report.

  BUG: ensure atmBoundaryInlet conditions are Galilean-invariant (fixes #1692)

  Related references:

      The ground-normal profile expressions (tag:RH):
        Richards, P. J., & Hoxey, R. P. (1993).
        Appropriate boundary conditions for computational wind
        engineering models using the k-ε turbulence model.
        In Computational Wind Engineering 1 (pp. 145-153).
        DOI:10.1016/B978-0-444-81688-7.50018-8

    Modifications to preserve the profiles downstream (tag:HW):
        Hargreaves, D. M., & Wright, N. G. (2007).
        On the use of the k–ε model in commercial CFD software
        to model the neutral atmospheric boundary layer.
        Journal of wind engineering and
        industrial aerodynamics, 95(5), 355-369.
        DOI:10.1016/j.jweia.2006.08.002

    Expression generalisations to allow height
    variation for turbulence quantities (tag:YGCJ):
        Yang, Y., Gu, M., Chen, S., & Jin, X. (2009).
        New inflow boundary conditions for modelling the neutral equilibrium
        atmospheric boundary layer in computational wind engineering.
        J. of Wind Engineering and Industrial Aerodynamics, 97(2), 88-95.
        DOI:10.1016/j.jweia.2008.12.001

    The generalised ground-normal profile expression for omega (tag:YGJ):
        Yang, Y., Gu, M., & Jin, X., (2009).
        New inflow boundary conditions for modelling the
        neutral equilibrium atmospheric boundary layer in SST k-ω model.
        In: The Seventh Asia-Pacific Conference on Wind Engineering,
        November 8-12, Taipei, Taiwan.

  Reproduced benchmark:
      Rectangular prism shown in FIG 1 of
        Hargreaves, D. M., & Wright, N. G. (2007).
        On the use of the k–ε model in commercial CFD software
        to model the neutral atmospheric boundary layer.
        Journal of wind engineering and
        industrial aerodynamics, 95(5), 355-369.
        DOI:10.1016/j.jweia.2006.08.002
  Benchmark data:
      HW, 2007 FIG 6

  TUT: update simpleFoam/turbineSiting tutorial accordingly
2020-06-05 14:40:53 +01:00
5863c94be0 Merge branch 'issue-1556-fo-header-writing' into 'develop'
ENH: enable user to control re-writing of function object output file headers.  See #1556

See merge request Development/openfoam!360
2020-06-05 14:38:15 +01:00
1b45599b26 ENH: enable user to control re-writing of function object output file headers. See #1556 2020-06-05 14:37:21 +01:00
d44babcc78 Merge branch 'feature-iterative-eigendecomposition' into 'develop'
ENH: Robust Iterative Eigendecomposition and Parallel Low-Memory Dynamic Mode Decomposition

See merge request Development/openfoam!353
2020-06-05 14:35:57 +01:00
730233cd15 ENH: add new FO Streaming-Total Dynamic Mode Decomposition (STDMD)
STDMD (i.e. Streaming Total Dynamic Mode Decomposition) is a variant of
    a data-driven dimensionality reduction method.

    STDMD is being used as a mathematical post-processing tool to compute
    a set of dominant modes out of a given flow (or dataset) each of which is
    associated with a constant frequency and decay rate, so that dynamic
    features of a given flow may become interpretable, and tractable.
    Among other Dynamic Mode Decomposition (DMD) variants, STDMD is presumed
    to provide the general DMD method capabilities alongside economised and
    feasible memory and CPU usage.

    Please refer to the header file documentation for further details.

  ENH: add new STDMD tutorial, pimpleFoam/laminar/cylinder2D
2020-06-05 14:35:37 +01:00
ef9ee7a8b1 ENH: add iterative eigen decomposition solver, EigenMatrix
ENH: add Test-EigenMatrix application

  The new iterative eigen decomposition functionality is
  derived from:

    Passalacqua et al.'s OpenQBMM (openqbmm.org/),
    which is mostly derived from JAMA (math.nist.gov/javanumerics/jama/).
2020-06-05 14:35:36 +01:00
153f847ad2 BUG: fix pinv() for single-element input matrices
ENH: return zero-valued matrix when input zero-valued matrix in pinv()
2020-06-05 14:35:36 +01:00
af22163492 ENH: improve Matrix classes and tests 2020-06-05 14:35:36 +01:00
b3e5620d2a COMP: typo in surfaceBooleanFeatures/PolyhedronReader Make/options
ENH: strip {GMP,MPRF}_ARCH_PATH in make rules
2020-06-05 12:36:37 +02:00
1c5508a61b SUBMODULES: updates and revert
- update OpenQBMM to origin/openfoam.com

- revert adios, visualization
  * changes inadvertently crept in recent commit
2020-06-05 11:40:07 +02:00
7618150ea4 ENH: fileModificationSkew: Changed default. See #1472 2020-06-05 09:06:14 +01:00
67b7b378db ENH: motorBike: change coarseLevel solver 2020-06-05 09:06:14 +01:00
5c220a9e2d Merge remote-tracking branch 'origin/master' into develop 2020-06-04 22:30:12 +02:00
fec5093c04 ENH: add blockMesh -write-vtk option
- generates a vtk file in an ASCII, XML format (blockTopology.vtu).

  More information than the equivalent obj file since it includes
  connectivity, cell shapes and cell IDs (equivalent to the block
  numbers).
2020-06-04 22:15:26 +02:00
8f8617a8ca CONFIG: increment patch level 2020-06-04 21:49:35 +02:00
11ff01f434 ENH: refactor vtk::internalWriter, vtk::patchWriter
- new vtk::internalMeshWriter, vtk::patchMeshWriter
  intermediate classes without finiteVolume dependencies.

  Enables direct use with a polyMesh.
  Makes vtk::internalWriter, vtk::patchWriter header/template only.
2020-06-04 21:44:26 +02:00
9d2fe2086a BUG: missing compilation for some vtk conversion components (fixes #1720) 2020-06-04 21:07:44 +02:00
ea4c8f4bea ENH: boolVector for specialized bundling of boolean values
- bundled of boolean values as a vector of 3 components with
  element access using x(), y() and z() member functions.
  It also has some methods similar to bitSet.

- Not derived from Vector or VectorSpace since it does not share very
  many vector-like characteristics.
2020-06-04 16:56:21 +02:00
bc9e97cf36 ENH: additional polynomial constructors, improved I/O
- support construct from initializer_list, which can help simplify
  code with constant coefficients.

- add default constructor for polynomialFunction and Istream reading
  to support resizable lists of polynomialFunction.

  A default constructed polynomialFunction is simply equivalent to
  a constant zero.

- no special IO handling for Polynomial required,
  it is the same as VectorSpace anyhow.
2020-06-04 15:02:21 +02:00
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
cf09b67b28 ENH: support shell syntax for foamCreateModuleInclude (#1717)
- can pre-generate shell environment for later sourcing as an
  alternative to sourcing etc/bashrc itself
2020-06-03 18:23:58 +02:00
44ccf1e4d4 CONFIG: adjust aliases to use project-dir directly
- reduces some reliance on env variables
2020-06-03 12:11:17 +02:00
84d7141e31 STYLE: adjust return branching 2020-06-03 10:38:10 +02:00
65c2ec29de Merge branch 'style-dictionary-methods' into 'develop'
ENH: unify use of dictionary method names

See merge request Development/openfoam!362
2020-06-03 09:31:00 +01:00
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
f721b5344f ENH: report dictionary name actually used (for -dict option) 2020-06-02 14:29:36 +02:00
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
695766af16 COMP: no constexpr methods for older gcc (nullObject) 2020-05-31 20:44:12 +02:00
8600d6ba1c COMP: change fieldsFunctionObject library link order (fixes #1714)
- before (-lreactingPhaseSystem -ltwoPhaseReactingTurbulenceModels)
  after  (-ltwoPhaseReactingTurbulenceModels -lreactingPhaseSystem)
  to fix symbol resolution issue on clang.
2020-05-29 15:58:08 +02:00
1d7d5b2d26 ENH: provide lightweight labelFwd, scalarFwd headers
- centralizes sizing information and typedefs
  without dependencies beyond <cstdint>

COMP: ensure label typedef exists for nullObject.H
2020-05-29 15:56:08 +02:00
727ea48e0c STYLE: include scalar.H instead of floatScalar.H/doubleScalar.H separately
STYLE: adjust code comments
2020-05-29 15:55:56 +02:00
1d2391e0b4 ENH: add swallow assignment to nullObject
- similar to the behaviour of std::ignore and consistent with the
  no input / no output nature of nullObject. Similarly accept a
  const reference for its Istream operator.

- make most nullObject methods constexpr
2020-05-29 15:55:27 +02:00
e3367dbdc1 ENH: inline and extend clockValue, clockTime
- mostly wraps std::chrono so can inline much of it, which is potentially
  helpful when used for inner timings.

- add elapsedTime() method for direct cast to double and for
  naming similarity with wall-clock method.

Potential breaking change (minor):

- clockValue construct with a bool parameter is now simply tagged
  dispatch (value is ignored) and always queries the current clock
  value. This avoids needless branching.
  Since this constructor form has primarily been used internally (eg,
  clockTime), breakages in user code are not expected.
2020-05-29 15:48:21 +02:00
45a05012c6 STYLE: use Time::printExecutionTime() method
- makes format of ExecutionTime = ... output configurable (#788)
  and reduces code clutter.
2020-05-29 15:48:20 +02:00
5eebe5050b ENH: reduce dependencies for foamVersion.H
- have printBuildInfo output to std::ostream
- removed extraneous include "stdFoam.H"

ENH: revert to pre-processor defines for hard-coded paths (#1712)

- redundant information, but more robust at run-time without relying
  on initialization order
2020-05-29 15:48:20 +02:00
bee23c79bd ENH: adjust foamSystemCheck, foamInstallationTest
- add clang test, don't complaint about dash, zsh

- don't bother with checking gzip and tar
2020-05-29 15:46:01 +02:00
0e480f3d7e ENH: allow bin/tools/foamConfigurePaths from anywhere
- previously could only run from the project directory

- strip surrounding double quotes on input of path names
  since they are added automatically when editing.
2020-05-28 12:03:08 +02:00
da989f3680 STYLE: remove older deprecation scripts (older than 3-4 versions)
- interDyMFoam, multiphaseInterDyMFoam, pimpleDyMFoam, rhoPimpleDyMFoam
- surfaceMeshTriangulate
2020-05-28 12:03:06 +02:00
be417c9841 COMP: erroneous return from void method (fixes #1716) 2020-05-26 10:40:26 +02:00
03c2373d2c ENH: align meshRefinement dictionary wrapper with dictionary code
COMP: do not rely on implicit conversion to PtrList from Istream
2020-05-26 08:56:11 +02:00
997c9a232c STYLE: use compact form for libs () entries 2020-05-23 18:42:47 +02:00
b68ab9bd5a ENH: Function1 and PatchFunction for external wall heat transfer (#1709)
- can define spatial/temporal variations for heat-flux or
  convection coefficient.

- can define temporal variations for power or ambient temperature
2020-05-23 18:42:47 +02:00
1a9f067df9 TUT: use expression and/or step function in a few places 2020-05-23 18:42:47 +02:00
5105154b88 ENH: expression versions of Function1 and PatchFunction1 (#1709) 2020-05-23 18:42:47 +02:00
51c2329f97 ENH: additional step function, cleanup autoPtr use in Function1 2020-05-23 18:42:41 +02:00
09d9c5cc03 ENH: consistent autoPtr handling in PatchFunction1 2020-05-23 16:02:35 +02:00
2659c48f36 COMP: change foamVersion::configuredProjectDir to function (#1712)
- exhibited apparent issues with initialization order (on some
  installations of gcc-4.8.5) when a variable was used.
2020-05-23 15:56:25 +02:00
02517e971a ENH: no implicit loading of controlDict libs for foamListRegions (#1713)
ENH: eliminate duplicate input region types
2020-05-23 15:53:17 +02:00
a5a504693a ENH: support disable libs when constructing Time from argList (#1714)
- previously relied on presence/absence of command-line options.
  Can now explicitly disable individually

- provide shorter constructors for dealing with these types of cases.
  Make construction with non-default names for "system" and "constant"
  lengthier so there is no ambiguity.
2020-05-23 15:28:32 +02:00