Commit Graph

16442 Commits

Author SHA1 Message Date
11d17fec5f ENH: Adding evaporation-condensation lagragian model for solution
1) Adding LiquidEvapFuchsKnudsen model for lagrangian evaporation.
   This models is based on a diffusion type of evaporation/
   condensation on particles composed of solution (liquid + solid).

2) Adding modes of calculating the particle rho and volume change.
   The new keyword in constantProperties is 'volumeUpdateMethod'
   which three options:
        a) constantRho
        b) constantVolume
        c) updateRhoAndVol

   The old keyword 'constantVolume' true/face is still valid

3) The entry rho0 is now optional for multicomponent parcels.
   If defined , it is used, but if it is not the actual mixture
   provided is used to calculate rho0 of the particle.
   T0 is still used as initial T and Cp0 is over-written in the
   multicomponent cloud but still required.

4) Adding tutorial for evaporation/condensation model
2020-09-22 16:35:53 +01:00
973e2d4e2d COMP: remnant foam-extend code in faMatrix::setValues (fixes #1834)
BUG: faMatrix::residual changes source vector (fixes #1835)

ENH: improve code alignment between faMatrix and fvMatrix

- support setValues() with a single value
2020-09-16 17:27:56 +02:00
bf3b4fabb4 ENH: UniformList to wrap a single value into a list-like container
- refactor UniformField accordingly
2020-09-16 17:27:56 +02:00
0d08942bf3 STYLE: mark globalMeshData::ListPlusEqOp as deprecated
- can use ListOps::appendEqOp as the more general form.
  Note that this uses a different template parameter.
  Eg,
      `globalMeshData::ListPlusEqOp<labelList>()`
  vs. `ListOps::appendEqOp<label>()`
2020-09-16 17:27:56 +02:00
0a1cd580ac ENH: improvements for nastran surface writer
- select default nastran PLOAD2 or PLOAD4 based on field type.
  Default to PLOAD2 for scalar types and PLOAD4 for vectors etc.

- relocate nastran SHELL/MAT cards.
  Previously wrote at the end of the file, now emit when writing the
  geometry itself. This improves modularity (of code and files)

- initial support for common geometry file for nastran
2020-09-16 17:27:56 +02:00
7d203443c3 ENH: refactor surface writer collated time management (#1600)
- abstracted out from ensight surface writer for potential reuse by
  other surface writers.
2020-09-16 17:27:56 +02:00
f8ffee8135 ENH: support fieldScale for more surface writers 2020-09-16 17:27:56 +02:00
a9bf69b551 ENH: suppress surface Face-id field if writer manages that itself (#1600)
- for CAE formats such as abaqus, nastran, starcd, etc, the element id
  is already part of the output format itself. For these cases, there
  is no use in generating an additional "Ids" field.

ENH: add code to ignore negative face ids

- these will arise from very special cases, such as when a
  solid element and side are encoded into a single integer.

BUG: starcd surface values output did not use original face ids
2020-09-16 17:27:56 +02:00
a001c0d2fa BUG: volPointInterpolation: fixes #1831 2020-09-16 15:30:09 +01:00
52e0ebca57 ENH: gradingDescriptor(s) correct() and normalise() methods
- single entry point to handle negative expansions etc.
  Reduces typos and forgotten code (as per #1841)
2020-09-16 09:47:08 +02:00
9762b547fe BUG: gradingDescriptor stream input ignores negative expansion (Fix #1841)
- mostly only tripped when using fractional edge grading, since this
  is where the list reading is used. Overseen in commit 7da0b5bee1.
2020-09-16 09:25:28 +02:00
ab55157358 BUG: snappyHexMesh: fixes #1836.
When truncating layers in one go (nBufferCellsNoExtrude -1) it
should set the nCells per face to be the min of the number of points
per edge.
2020-09-10 14:09:58 +01:00
c9ab12cb3d ENH: IOobject: print some more info 2020-09-10 14:09:57 +01:00
1e95af4d57 STYLE: use more generic terms allow/deny for selections 2020-09-09 13:54:34 +02:00
d4cd87830d BUG: Changing rho mixing to volume-based in rhoThermo. Fixes #1812. 2020-09-08 15:24:12 -07:00
7be3092414 BUG: Fixing parallel writing for interfaceHeight FO. Fixes #1788 2020-09-08 09:20:51 -07:00
be99805986 ENH: isolate config/version information from regular globals
- slight speed gain for recompilation and provisions for future
  refactoring
2020-09-07 17:36:26 +02:00
9423d2bd83 CONFIG: improve support for compiler/link options (#1830)
- introduce WM_COMPILE_CONTROL variable to convey control information
  into the build rules.

  The convention (as per spack):
      - '+' to select a feature
      - '~' to deselect a feature

  Eg, to select the gold linker, and disable openmp
  (spaces are not required):

      WM_COMPILE_CONTROL="+gold ~openmp"

CONFIG: accept FOAM_EXTRA_LDFLAGS for AMD, gold, Mingw linkers

CONFIG: generalize PROJECT_LIBS (-ldl used almost universally)
2020-09-07 09:45:51 +02:00
fbfcdfc723 ENH: allow default parameter for Tuple2 (#1827)
- simplifies cases where Tuple2 is used as a Pair replacement
  (for output format reasons)
2020-09-07 09:37:05 +02:00
1c71c7cb23 Merge remote-tracking branch 'origin/master' into develop 2020-09-03 12:04:45 +02:00
73057447a2 COMP: pass-through targetType for a few Allwmake files (#1824) 2020-09-03 11:35:18 +02:00
4735776246 COMP: pass shell args for Allwmake-mpi (#1824) 2020-09-03 10:15:12 +02:00
0e6df58c70 STYLE: simpler construct for empty tmp field in volFieldValue
- originally (incorrectly) was a Field(0.0), which was generalized
  to Field(Zero), but Field() is the correct form

STYLE: rename 'mustGet' to more standard 'mandatory' variable
2020-09-03 09:26:37 +02:00
b2feb6a8d8 ENH: avoid redundant IO in readFields function object (fixes #1825)
- read header info once and reuse
- short-circuit logic to avoid unneeded checks
- additional debug information if field cannot be found

STYLE: remove unused old code remnants from #1206
2020-09-03 09:07:31 +02:00
8d55c37b2f BUG: missing tab in actuationDiskSource output (fixes #1819) 2020-08-31 15:17:54 +02:00
fa364eda12 BUG: inconsistency between constructor and output (fixes #1816)
- slipped in with changes to csvTableReader (commit 59ed3ba18d) so
  only affects the 2006 version.

- adjust constructor to expect "componentColumns", but also accept
  "valueColumns" as 1912 and earlier-compatibility. This not only
  fixes the reported bug, but also ensure proper compatibility with
  older files.

ENH: use "refColumn" instead of "timeColumn" for csvTableReader

- consistent with the CSV Function1.
  Support 'timeColumn' as 1912 and earlier-compatibility.

TUT: remove unused table-reader entry
2020-08-31 15:17:32 +02:00
6a1efe3b5c ENH: support construct/reset refPtr from autoPtr and unique_ptr (#1775)
- makes it easier to use in combination with various 'New' selectors,
  which mostly return an autoPtr.

ENH: add very simple FFT test

- basic sanity test that the library links properly
2020-08-11 13:15:28 +02:00
6e2b7be983 ENH: direct access to wrapped ifstream/ofstream with compression (#1805)
- previously hidden as Detail::[IO]FstreamAllocator, now exposed
  directly as [io]fstreamPointer, which allows reuse for
  std::ifstream, std::ofstream wrapping, without the additional
  ISstream, OSstream layers.

  These stream pointers have some characteristics similar to a
  unique_ptr.

- restrict direct gzstream usage to two files (fstreamPointers.C,
  gzstream.C) which improves localization and makes it simpler to
  enable/disable with the `HAVE_LIBZ` define.

  The HAVE_LIBZ define is currently simply hard-coded in the
  Make/options.

  If compiled WITHOUT libz support:
    - reading gz files : FatalError
    - writing gz files : emit warning and downgrade to uncompressed
    - warn if compression is specified in the case controlDict
      and downgrade to uncompressed

ENH: minor updates to gzstream interface for C++11

- support construct/open with std::string for the file names.

CONFIG: provisioning for have_libz detection as wmake/script
2020-08-10 12:40:08 +02:00
5424c5e5bc ENH: finer granularity for handling functionObject failure (#1779)
- additional "errors" entry with enumerated values
  (default|warn|ignore|strict) for defining warning or error at
  construct or runtime stage

- default : construct = warn, runtime = fatal
- warn    : construct = warn, runtime = warn
- ignore  : construct = silent, runtime = silent
- strict  : construct = fatal, runtime = fatal

The errors control can be added at the top-level and/or for individual
function objects.
2020-08-06 07:45:12 +02:00
a192095ce0 COMP: remove unused variable from phasePressureModel 2020-08-05 18:56:25 +01:00
99e20b3b6f ENH: combine some phaseSystem selectors into regular .C files
- reduces the number of files, eases code refactoring
2020-08-05 18:56:24 +01:00
93ed933770 STYLE: use unitConversion degToRad() from instead of separate value 2020-08-05 18:56:24 +01:00
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
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
42ce617b43 ENH: prefer 'model' keyword instead of 'RASModel',... (#149)
- since the context (laminar/RAS/LES) is already given by the
  sub-dictionary, it is redundant to use as prefix as well.

- silently support the longer names as compat methods
2020-08-05 15:29:03 +02:00
14c9582458 ENH: provide wordPair typedef in Pair.H, and separate wordPair.H 2020-08-04 12:13:33 +02:00
6b074985ac ENH: improve separation of turbulence models macros (define vs make) 2020-08-03 16:28:21 +02:00
65d9cd503a COMP: stricter inclusion of headers in turbulenceModels
- include fvOptions header, Smagorinsky header
2020-07-31 13:08:33 +02:00
23ea498c08 BUG: inconsistent check in non-const '->' dereference (tmp, refPtr)
- old code just checked for pointer vs non-pointer.
  Should actually treat CREF and REF types differently
  Overseen in commit be058bec7d. Only affects develop branch

ENH: improved naming consistency in tmp, refPtr

- also use long-form to check for pointer type instead of the isTmp()
  method. Makes differences between PTR, CREF, REF easier to spot.

STYLE: typeName() for tmp, refPtr is static
2020-07-30 10:20:07 +02:00
e56e195ab5 ENH: support objectRegistry store of refPtr (as per tmp) 2020-07-30 09:45:55 +02:00
487002d2e2 STYLE: consistent file naming (rigidBodyDynamics,sixDoFRigidBodyMotion) 2020-07-30 09:45:13 +02:00
28eae0573b BUG: The option to cache the limiter field was not working
In fvSolution is possible to cache the limiter. This surface field
is stored in the database to be read later.

The internal tmp management of the field was not working properly.
2020-07-29 11:14:12 -07:00
d073724232 BUG: Limiting min alpha to SMALL to avoid zero transient term of turbulence model
In certain turbulence models such as kEpsilon, kOmegaSST, etc when used
in the multiphase context throw an error in the preconditioner. This
is due to alpha being zero. Fixes #1789.
2020-07-28 12:40:06 -07:00
74a062d1d5 Merge remote-tracking branch 'origin/master' into develop 2020-07-28 08:42:12 +02:00
65d640e58e BUG: potential memory leaks in HashPtrTable (#1787)
- using HashPtrTable::set() with the same key twice did not guarantee
  proper cleanup of memory since it simply used the underlying
  HashTable::set() without doing anything about the old memory. Now
  check for pre-existing storage and delete it when it does not
  correspond to the newly stored pointer.

  This problem is independent of potential memory slicing previously
  flagged (#1286) and only partially resolved.
2020-07-28 08:40:43 +02:00
fa71840d8b ENH: add get() retrieval of a pointer from PtrLists, HashPtrTable
- naming similarity with autoPtr, unique_ptr and other containers.

  For UPtrList derivatives, this is equivalent to the existing
  operator(). The read-only variant is also equivalent to the
  single-parameter 'set(label)' method.

  With PtrList<T> list(...) :

      const T* ptr = list.get(10);
      if (ptr)
      {
          ptr->method();
      }

  vs.
      if (list.set(10))
      {
          list[10].method();
      }

  For HashPtrTable there is only a read-only variant which is equivalent
  to testing for existence and for value.

  With HashPtrTable<T> hash(...) :

      const T* ptr = list.get("key");
      if (ptr)
      {
          ptr->method();
      }

  vs.
      if (list.found("key"))
      {
          // Fails on null pointer!!
          list["key"].method();
      }

Use of get() is largely a matter of taste or local coding requirements
2020-07-28 08:40:43 +02:00
872c9d370b ENH: support emplace methods and std::unique_ptr for PtrList-derivatives
- emplace methods
  Eg,
      m.internalCoeffs().emplace(patchi, fc.size(), Zero);
  vs.
      m.internalCoeffs().set(patchi, new Field<Type>(fc.size(), Zero));

- handle insert/append of refPtr wherever tmp was already supported

COMP: incorrect variable names in PtrListOpsTemplates.C
2020-07-28 08:40:43 +02:00
4110699d90 ENH: HashTable::emplace_set() method, HashPtrTable support for unique_ptr
- forwarding like the emplace() method, but overwriting existing
  entries as required

- propagate similar changes to HashPtrTable

  For example, with HashPtrTable<labelList> table(...) :

  With 'insert' semantics

      table.emplace("list1", 1000);

  vs
      if (!table.found("list1"))
      {
          table.set("list1", new labelList(1000));
      }
  or
      table.insert("list1", autoPtr<labelList>::New(1000));

  Note that the last example invokes an unnecessary allocation/deletion
  if the insertion is unsuccessful.

  With 'set' semantics:

      table.emplace_set("list1", 15);

  vs
      table.set("list1", new labelList(15));
2020-07-28 08:40:43 +02:00
c77afff48f COMP: fix sloppy (and now ambiguous) use of PtrList::set()
- constructs such as the following will no longer worked, but that is
  also a good thing.

     ptrlist.set(i, scalarField(nFaces, Zero));

  this called set(.., const tmp<scalarField>&), which meant under
  the hood:

     - create local temporary const scalarField&
     - wrap as const tmp&
     - use tmp::ptr(), to clone the const-ref

  This implies an additional allocation (for the const scalarField&)
  which is immediately discarded. Doubtful that compiler optimization
  would do anything.
2020-07-28 08:35:42 +02:00
3455d556c4 BUG: potential memory leaks in HashPtrTable::set (#1787)
- backported fix from develop

COMP: incorrect variable names in PtrListOpsTemplates.C
2020-07-27 10:28:40 +02:00