Commit Graph

2474 Commits

Author SHA1 Message Date
sergio
d286951008 BUG: Fix thermos templates for Lee model 2019-06-25 08:50:07 -07:00
sergio
1bd2ef7c21 ENH: Adding Lee thermos for icoReactingMultiphaseInterFoam 2019-06-24 08:12:58 -07:00
mattijs
8e3df10069 STYLE: overBuoyantPimpleDyMFoam: consistent directory naming 2019-06-20 10:26:24 +01:00
Vaggelis Papoutsis
ecc1fb5efb CONTRIB: New adjoint optimisation and tools
A set of libraries and executables creating a workflow for performing
gradient-based optimisation loops. The main executable (adjointOptimisationFoam)
solves the flow (primal) equations, followed by the adjoint equations and,
eventually, the computation of sensitivity derivatives.

Current functionality supports the solution of the adjoint equations for
incompressible turbulent flows, including the adjoint to the Spalart-Allmaras
turbulence model and the adjoint to the nutUSpaldingWallFunction, [1], [2].

Sensitivity derivatives are computed with respect to the normal displacement of
boundary wall nodes/faces (the so-called sensitivity maps) following the
Enhanced Surface Integrals (E-SI) formulation, [3].

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

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

and contributions in earlier version from

Dr. Ioannis Kavvadias,
Dr. Alexandros Zymaris,
Dr. Dimitrios Papadimitriou

[1] A.S. Zymaris, D.I. Papadimitriou, K.C. Giannakoglou, and C. Othmer.
Continuous adjoint approach to the Spalart-Allmaras turbulence model for
incompressible flows. Computers & Fluids, 38(8):1528–1538, 2009.

[2] E.M. Papoutsis-Kiachagias and K.C. Giannakoglou. Continuous adjoint methods
for turbulent flows, applied to shape and topology optimization: Industrial
applications. 23(2):255–299, 2016.

[3] I.S. Kavvadias, E.M. Papoutsis-Kiachagias, and K.C. Giannakoglou. On the
proper treatment of grid sensitivities in continuous adjoint methods for shape
optimization. Journal of Computational Physics, 301:1–18, 2015.

Integration into the official OpenFOAM release by OpenCFD
2019-06-17 12:59:11 +01:00
Mark Olesen
f0a4f8ee48 COMP: skip reactingEulerFoam compilation on mingw (#1238)
- pending resolution of cyclic dependencies
2019-06-14 13:58:37 +02:00
Andrew Heather
7322f73a31 Merge branch 'feature-isoAdvectorWithMorphingMeshes' into 'develop'
Introduced changes required to make isoAdvector and interIsoFoam work with...

See merge request Development/OpenFOAM-plus!257
2019-06-13 21:35:20 +01:00
sergio
da07aa9ac0 Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2019-06-13 12:13:04 -07:00
sergio
50cdddf46a ENH: New solidThermo to ReactingMultiphaseInterFoam 2019-06-13 12:11:09 -07:00
mattijs
e716d1c073 ENH: surfactantFoam: run cleanly. See #1328
- do not write 0/ directory
- clean case in ./Allclean
2019-06-13 14:24:58 +01:00
sergio
b1563dc03e ENH: Handling of phaseProperties in temperatureCoupledBase.
Adding poly solid thermo to InterfaceCompositionModel for use
on icoReactingMultiphaseInterFoam
2019-06-12 10:35:49 -07:00
sergio
3a1178ff12 BUG: Fixing problem with parallel DTRMParticle 2019-06-11 16:12:36 -07:00
Sergio Ferraris
8170f2ad92 INT: Org integration of VOF, Euler phase solvers and models.
Integration of VOF MULES new interfaces. Update of VOF solvers and all instances
of MULES in the code.
Integration of reactingTwoPhaseEuler and reactingMultiphaseEuler solvers and sub-models
Updating reactingEuler tutorials accordingly (most of them tested)

New eRefConst thermo used in tutorials. Some modifications at thermo specie level
affecting mostly eThermo. hThermo mostly unaffected

New chtMultiRegionTwoPhaseEulerFoam solver for quenching and tutorial.

Phases sub-models for reactingTwoPhaseEuler and reactingMultiphaseEuler were moved
to src/phaseSystemModels/reactingEulerFoam in order to be used by BC for
chtMultiRegionTwoPhaseEulerFoam.

Update of interCondensatingEvaporatingFoam solver.
2019-06-07 09:38:35 +01:00
Andrew Heather
24371a1d84 BUG: set the oriented flag - see #1324 2019-06-05 14:12:51 +01:00
Andrew Heather
289a7acf76 ENH: p field for potentialFoam now registsered 2019-06-05 14:11:50 +01:00
Johan Roenby
61c87b5552 Introduced changes required to make isoAdvector and interIsoFoam work with morphing meshes: 1) In the alphaEqn.H U is made relative to mesh motion before the interface advection step, 2) in isoAdvection::advect() alpha must be multiplied by Vsc0()/Vsc(). Implementation tested and verified with 1) a spherical interface in a cubic domain with no flow, where the domain walls are squeezed together and 2) a spherical interfacee inside the sloshingCylinder, again with no flow, so the sphere should stay spherical, which it does. 2019-04-30 16:07:48 +02:00
sergio
5c58b07f5a ENH: Adding overBuoyantPimpleFoam and tutorial 2019-06-04 12:18:13 -07:00
Mark Olesen
2eeaa326d6 Revert "COMP: combine twoPhaseProperties library into interfaceProperties"
Modified revert of commit 6c6f777bd5.

- The "alphaContactAngleFvPatchScalarField" occurs in several
  places in the code base:

    - as abstract class for two-phase properties
    - in various multiphase solvers

  To resolve potential linking conflicts, renamed the abstract class
  as "alphaContactAngleTwoPhaseFvPatchScalarField" instead.

  This permits potential linking of two-phase and multi-phase
  libraries without symbol conflicts and has no effect on concrete
  uses of two-phase alphaContactAngle boudary conditions.
2019-05-08 18:48:52 +02:00
sergio
25575df60e ENH: new ReactingHeterogeneousCloud
- number of particles per parcel info to kinematic cloud

- added turbulent dispersion to basicHeterogeneousReactingParcel

- corrected dhsTrans in MUCSheterogeneousRate::calculate

- added cloud macro system to reactingParcelFoam and fixed calculation
  of average particles per parcel

- added progress variable dimension to reacting model (nF)

- added ReactingHeterogeneous tutorial
2019-01-04 17:08:53 -08:00
sergio
659526101a ENH: Adding reflection capability to solar load radiation model
ENH: Several modifycations to avoid erroneuos rays to be shot
from wrong faces.

ENH: Updating tutorials and avoiding registration of the
coarse singleCellFvMesh

Adding solarLoad tutorial case simpleCarSolarPanel

ENH: Changes needed for the merge
2019-01-21 16:29:58 -08:00
Mark Olesen
e7a046858e COMP: avoid some implicit linkage (#1238) 2019-04-30 11:28:23 +02:00
Johan Roenby
d8e8306bbc BUG: interIsoFoam nAlphaSubCycles, nOuterCorrectors issue (fixes #1300)
- failed when nAlphaSubCycles > 1 and nOuterCorrectors > 1.
  Fixed thanks to Henning Scheufler (DLR Bremen).
2019-04-30 10:59:32 +02:00
Mark Olesen
beefee48d4 COMP: adjust compilation order with updated interdependencies
- Eg, with surface writers now in surfMesh, there are fewer libraries
  depending on conversion and sampling.

COMP: regularize linkage ordering and avoid some implicit linkage (#1238)
2019-04-28 14:44:33 +02:00
Mark Olesen
4941213880 COMP: combine twoPhaseProperties library into interfaceProperties
- avoids unnecessary cyclic dependency
2019-04-26 20:55:46 +02:00
Mark Olesen
e1609d16d1 STYLE: use degToRad() instead of pi/180 2019-04-26 11:48:27 +02:00
mattijs
cad37cf603 BUG: magneticFoam: add orientation information. Fixes #1291. 2019-04-24 15:40:52 +01:00
mattijs
cbc3953f26 Revert "BUG: snappyHexMesh: attraction distance mapping. Fixes #941."
This reverts commit 708e650990.
2019-04-10 10:32:18 +01:00
mattijs
7cd40afa3a BUG: snappyHexMesh: attraction distance mapping. Fixes #941. 2019-04-08 13:19:41 +01:00
sergio
a9747b90b1 ENH: Correcting order of the compressibleContErr.H in comp solvers.
Adding pMin,Pmax pressure control to buoyantPimple and
chtMultiReagion
2019-04-05 14:15:17 -07:00
sergio
49ba6a8e94 ENH: Updating overRhoSimpleFoam and overSimpleFoam to use
oversetInterpolationSuppressed dict.
2019-04-03 12:55:33 -07:00
sergio
cb250f59f3 Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2019-04-01 08:30:41 -07:00
sergio
1a13cd273b ENH: Adding new Gaussian power profile for laser 2019-04-01 08:29:56 -07:00
mattijs
5ab1021211 ENH: overset: move to oversetInterpolationSuppressed. Part of #1041. 2019-03-28 15:17:13 +00:00
sergio
33894bf893 Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2019-03-26 10:58:14 -07:00
sergio
c787edc846 ENH: Delete unused Qin_ variable on laserDTRM.H 2019-03-26 10:57:45 -07:00
mattijs
5f527c28aa ENH: rhoPimpleAdiabaticFoam: unused code 2019-03-14 12:45:02 +00:00
Mark Olesen
f330921c74 GIT: remove backup file 2019-03-01 08:05:13 +01:00
mattijs
f37942b388 ENH: potentialFoam: add region functionality. Fixes #1223.
Also implements combination of -region and -dry-run
2019-02-28 17:04:46 +00:00
Mark Olesen
8a7d8e74fe BUG: dereference invalid autoPtr in XiEngineFoam (fixes #1250) 2019-03-26 09:42:27 +01:00
Mark Olesen
33edea3ea4 ENH: add directory support for foamCleanTutorials 2019-02-23 19:59:04 +01:00
sergio
1dc9e7c4f4 BUG: Fixing entry consistency in PhaseMixtureEThermo.C
and reading dpdt in one basicThermo constructor
2019-02-20 16:45:12 -08:00
Mark Olesen
170041aaf5 ENH: for-range, forAllIters() ... in applications/
- reduced clutter when iterating over containers
2019-01-07 09:20:51 +01:00
Mark Olesen
60234ab007 STYLE: reduced nesting on return branching 2019-02-13 08:06:36 +01:00
mattijs
9cb57f7fa8 ENH: restart: save/restore cumulative continuity error. See #1172. 2019-02-07 14:28:30 +00:00
OpenFOAM bot
154029ddd0 BOT: Cleaned up header files 2019-02-06 12:28:23 +00:00
sergio
b3b9dd9b18 ENH: Changing energy Eq in interCondensatingEvaporatingFoam
from e to T. T proved to be more generic solution.
2019-02-01 15:10:16 -08:00
Mark Olesen
5c226864a8 ENH: add clip() method to GeometricField 2019-01-10 09:56:12 +01:00
Mark Olesen
9a7029004c ENH: minMax, minMaxMag as functions and field functions
- Global functions are unary or combining binary functions, which are
  defined in MinMax.H (MinMaxOps.H).

  There are also global reduction functions (gMinMax, gMinMaxMag)
  as well as supporting 'Op' classes:

  - minMaxOp, minMaxEqOp, minMaxMagOp, minMaxMagEqOp

  Since the result of the functions represents a content reduction
  into a single MinMax<T> value (a min/max pair), field operations
  returning a field simply do not make sense.

- Implemented for lists, fields, field-fields, DimensionedField,
  GeometricField (parallel reducing, with boundaries).

- Since the minMax evaluates during its operation, this makes it more
  efficient for cases where both min/max values are required since it
  avoids looping twice through the data.

  * Changed GeometricField writeMinMax accordingly.

ENH: clip as field function

- clipping provides a more efficient, single-pass operation to apply
  lower/upper limits on single or multiple values.

  Examples,

    scalarMinMax limiter(0, 1);

    limiter.clip(value)

       -> returns a const-ref to the value if within the range, or else
          returns the appropriate lower/upper limit

    limiter.inplaceClip(value)

       -> Modifies the value if necessary to be within lower/upper limit

  Function calls

    clip(value, limiter)

       -> returns a copy after applying lower/upper limit

    clip(values, limiter)

       -> returns a tmp<Field> of clipped values
2019-01-10 09:43:23 +01:00
Mark Olesen
d4b495131f COMP: avoid autoPtr automatic cast conversion in more places
- Can result in inadvertent conversions where the user should really
  know or check if the pointer is valid prior to using.

- Still have several places to fix that are using the deprecated copy
  construct and copy assignment
2019-01-25 12:45:22 +01:00
Mark Olesen
ed94a2714d STYLE: use HashTable iterator 'val()' method instead of 'object()' 2019-01-18 16:26:50 +01:00
Mark Olesen
3d6d6df566 BUG: incorrect dimensions for surfaceTensionForce
- accidentally introduced by 27c62303ad

STYLE: trial use of brace-initialized dimensionSet

- instead of writing

      dimensionedScalar(dimensionSet(1, -2, -2, 0, 0, 0), Zero);

  we can use C++11 brace-initialization to bundle the parameters
  for the dimensionSet construction and simply write

      dimensionedScalar({1, -2, -2, 0, 0, 0}, Zero);

  Note the following is incorrect syntax (extra brackets):

      dimensionedScalar(({1, -2, -2, 0, 0, 0}), Zero);
2019-01-10 10:17:36 +01:00
Mark Olesen
27c62303ad ENH: for-range, forAllIters() ... in applications/solvers
- reduced clutter when iterating over containers
2019-01-07 09:20:51 +01:00
Mark Olesen
07a6e9d83d STYLE: use cbrt() instead of pow(..,1.0/3.0) in a few more places 2019-01-09 12:22:07 +01:00
Mark Olesen
573a313f46 STYLE: deprecate hashedWordList contains() method
- identical to found(), which should be used for more consistency.
  The contains() is a remnant from when hashedWordList was generalized
  from a speciesTable (OCT 2010)
2019-01-07 09:51:45 +01:00
Mark Olesen
6a448016aa ENH: additional read guards for dimensionedType. input consistency (#762, #1148)
- provide a lookupOrDefault constructor form, since this is a fairly
  commonly used requirement and simplifies the calling sequence.

  Before

      dimensionedScalar rhoMax
      (
          dimensionedScalar::lookupOrDefault
          (
              "rhoMax",
              pimple.dict(),
              dimDensity,
              GREAT
          )
     );

  After

      dimensionedScalar rhoMax("rhoMax", dimDensity, GREAT, pimple.dict());

- read, readIfPresent methods with alternative lookup names.

- Mark the Istream related constructors with compile-time deprecated
  warnings.

BUG: read, readIfPresent methods not handling optional dimensions (#1148)
2019-01-03 13:34:11 +01:00
Mark Olesen
af310075a0 ENH: handle dimensions in dimensioned<Type>::lookupOrAddToDict (#1116) 2019-01-03 01:30:27 +01:00
Mark Olesen
505b4b9c1c ENH: add guarded lookup for dimensionedSet
STYLE: use standard dimensionedSets
2019-01-02 16:53:41 +01:00
Mark Olesen
1d85fecf4d ENH: use Zero when zero-initializing types
- makes the intent clearer and avoids the need for additional
  constructor casting. Eg,

      labelList(10, Zero)    vs.  labelList(10, 0)
      scalarField(10, Zero)  vs.  scalarField(10, scalar(0))
      vectorField(10, Zero)  vs.  vectorField(10, vector::zero)
2018-12-11 23:50:15 +01:00
Andrew Heather
2444e0f964 Merge branch 'release-v1812' 2018-12-20 16:12:59 +00:00
Mark Olesen
5d9e278e92 ENH: consolidate handling of mandatory/optional command arguments
- for some special cases we wish to mark command-line arguments as
  being optional, in order to do our own treatment. For example,
  when an arbitrary number of arguments should be allowed.

  Now tag this situation with argList::noMandatoryArgs().
  The argList::argsMandatory() query can then be used in any further
  logic, including the standard default argument checking.

- with the new default check, can consolidate the special-purpose

      "setRootCaseNonMandatoryArgs.H"

  into the regular

      "setRootCase.H"

- revert to a simple "setRootCase.H" and move all the listing related
  bits to a "setRootCaseLists.H" file. This leaves the information
  available for solvers, or whoever else wishes, without being
  introduced everywhere.

- add include guards and scoping to the listing files and rename to
  something less generic.

     listOptions.H -> setRootCaseListOptions.H
     listOutput.H  -> setRootCaseListOutput.H
2018-12-13 01:45:09 +01:00
Mark Olesen
29a5793b5b STYLE: argList::opt method instead of the longer argList::lookupOrDefault
- also replaced a few instances of readIfPresent with opt<> for
  constant values.
2018-12-12 12:10:39 +01:00
Mark Olesen
68ec561df8 STYLE: add usage notes to more utilities and solvers 2018-12-11 15:25:27 +01:00
Andrew Heather
0b5f681fb9 DOC: Updated header documentation 2018-12-06 23:09:10 +00:00
Andrew Heather
8f858af6c8 ENH: chtMultiRegionFoam - updated construction of g field 2018-11-27 11:47:16 +00:00
Andrew Heather
ea3c470a69 Merge branch 'issue-911' into 'master'
Issue 911

Closes #911

See merge request Development/OpenFOAM-plus!212
2018-11-20 14:40:43 +00:00
Andrew Heather
d1bc53b77e ENH: Updated construction/retrieval of gravity field. See #1094 2018-11-14 21:49:32 +00:00
Mark Olesen
5277221063 GIT: file permissions 2018-11-22 16:44:17 +01:00
Mark Olesen
6c568c61bf STYLE: Renamed source files to reflect solver names (issue #890) 2018-11-20 19:10:06 +01:00
Mark Olesen
dd87c98393 ENH: add read guard for dimensionedType constructors (#762)
- deprecate dimensionedType constructors using an Istream in favour of
  versions accepting a keyword and a dictionary.

  Dictionary entries are almost the exclusive means of read
  constructing a dimensionedType. By construct from the dictionary
  entry instead of doing a lookup() first, we can detect possible
  input errors such as too many tokens as a result of a input syntax
  error.

  Constructing a dimensionedType from a dictionary entry now has
  two forms.

  1.  dimensionedType(key, dims, dict);

      This is the constructor that will normally be used.

      It accepts entries with optional leading names and/or
      dimensions. If the entry contains dimensions, they are
      verified against the expected dimensions and an IOError is
      raised if they do not correspond. On conclusion, checks the
      token stream for any trailing rubbish.

  2.  dimensionedType(key, dict);

      This constructor is used less frequently.

      Similar to the previous description, except that it is initially
      dimensionless. If entry contains dimensions, they are used
      without further verification. The constructor also includes a
      token stream check.

      This constructor is useful when the dimensions are entirely
      defined from the dictionary input, but also when handling
      transition code where the input dimensions are not obvious from
      the source.

      This constructor can also be handy when obtaining values from
      a dictionary without needing to worry about the input dimensions.
      For example,

         Info<< "rho: " << dimensionedScalar("rho", dict).value() << nl;

      This will accept a large range of inputs without hassle.

ENH: consistent handling of dimensionedType for inputs (#1083)

BUG: incorrect Omega dimensions (fixes #2084)
2018-11-20 15:14:10 +01:00
sergio
b23375ab3d Merge branch 'master' of develop.openfoam.com:Development/OpenFOAM-plus 2018-09-25 12:49:09 -07:00
sergio
8794b1955a BUG: Fix ticket 792. pRefCelli is set to -1 for
chtMultiRegionSimpleFoam
2018-09-25 12:48:04 -07:00
Mark Olesen
a7a346b206 STYLE: indentation for FatalIOErrorInFunction calls 2018-11-06 09:49:22 +01:00
Mark Olesen
50baac3c45 ENH: construct string types from Istream now explicit (#1033)
- this helps for trapping unguarded dictionary lookups.
2018-11-03 20:24:34 +01:00
Andrew Heather
8bf7a522e7 BUG: Corrected setting of cloud name 2018-11-02 11:20:07 +00:00
mattijs
30dcac006f COMP: Allwmake: make -q work 2018-11-01 14:12:52 +00:00
Mark Olesen
07dafe7b0b STYLE: use range-for when looping dictionary entries.
- as part of the cleanup of dictionary access methods (c6520033c9)
  made the dictionary class single inheritance from IDLList<entry>.

  This eliminates any ambiguities for iterators and allows
  for simple use of range-for looping.

  Eg,
      for (const entry& e : topDict))
      {
          Info<< "entry:" << e.keyword() << " is dict:" << e.isDict() << nl;
      }

   vs

      forAllConstIter(dictionary, topDict, iter))
      {
          Info<< "entry:" << iter().keyword()
              << " is dict:" << iter().isDict() << nl;
      }
2018-10-19 13:08:24 +02:00
Mark Olesen
4e04c1966f ENH: use dictionary::get<word>() instead of lookup() in a few places 2018-10-19 09:11:31 +02:00
Mark Olesen
3b74512231 ENH: cleanup of Enum class
- more dictionary-like methods, enforce keyType::LITERAL for all
  lookups to avoid any spurious keyword matching.

- new readEntry, readIfPresent methods

- The get() method replaces the now deprecate lookup() method.

- Deprecate lookupOrFailsafe()
  Failsafe behaviour is now an optional parameter for lookupOrDefault,
  which makes it easier to tailor behaviour at runtime.

- output of the names is now always flatted without line-breaks.
  Thus,

     os << flatOutput(someEnumNames.names()) << nl;
     os << someEnumNames << nl;

  both generate the same output.

- Constructor now uses C-string (const char*) directly instead of
  Foam::word in its initializer_list.

- Remove special enum + initializer_list constructor form since
  it can create unbounded lookup indices.

- Removd old hasEnum, hasName forms that were provided during initial
  transition from NamedEnum.

- Added static_assert on Enum contents to restrict to enum or
  integral values.  Should not likely be using this class to enumerate
  other things since it internally uses an 'int' for its values.

  Changed volumeType accordingly to enumerate on its type (enum),
  not the class itself.
2018-10-18 12:57:32 +02:00
sergio
6e9520d3c1 Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2018-10-17 10:29:34 -07:00
sergio
5daa38d5b4 ENH:
Update of overRhoPimpleDyMFoam and overInterDyMFoam solvers.
Adding corresponding tutorials with best possible settings
The main effort was put on reducing pressure spikes as the
stencil change with hole cells on the background mesh.
2018-10-17 10:10:06 -07:00
Mark Olesen
8fabc32539 ENH: simplify objectRegistry access names (issue #322)
New name:  findObject(), cfindObject()
  Old name:  lookupObjectPtr()

      Return a const pointer or nullptr on failure.

  New name:  findObject()
  Old name:  --

      Return a non-const pointer or nullptr on failure.

  New name:  getObjectPtr()
  Old name:  lookupObjectRefPtr()

      Return a non-const pointer or nullptr on failure.
      Can be called on a const object and it will perform a
      const_cast.

- use these updated names and functionality in more places

NB: The older methods names are deprecated, but continue to be defined.
2018-10-17 16:44:10 +02:00
Mark Olesen
873b2f0a9f STYLE: use explicit dictionary access for dictionaryEntry
- clarifies the meanings of get<T> etc, avoids later ambiguities.

ENH: simplify phaseProperties construction, add input checks
2018-10-16 09:58:49 +02:00
Mark Olesen
8eddcc072a ENH: avoid readScalar, readLabel etc from dictionary (#762, #1033)
- use the dictionary 'get' methods instead of readScalar for
  additional checking

     Unchecked:  readScalar(dict.lookup("key"));
     Checked:    dict.get<scalar>("key");

- In templated classes that also inherit from a dictionary, an additional
  'template' keyword will be required. Eg,

     this->coeffsDict().template get<scalar>("key");

  For this common use case, the predefined getXXX shortcuts may be
  useful. Eg,

     this->coeffsDict().getScalar("key");
2018-10-12 08:14:47 +02:00
Mattijs Janssens
fdf19d67a4 Merge branch 'feature-coordinateSystem' into 'develop'
coordinate system improvements

See merge request Development/OpenFOAM-plus!211
2018-10-11 16:32:03 +01:00
sergio
da10a8e676 Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2018-10-05 08:26:51 -07:00
sergio
3eafee43c9 BUG: Correcting compilation error in createFields for
overPimpleDymFoam
2018-10-05 08:24:07 -07:00
sergio
77753021df Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2018-10-04 09:14:08 -07:00
sergio
ba870ef7df ENH: Adding non-interplating fields to createFields for overPimpleDyMFoam 2018-10-04 09:13:22 -07:00
sergio
789d261f0e Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2018-10-01 17:14:39 -07:00
sergio
ebdb227863 ENH: Modifications to overPimpleDyMFoam 2018-10-01 17:05:35 -07:00
Mark Olesen
6697bb4735 ENH: improve, simplify, rationalize coordinate system handling (issue #863)
Previously the coordinate system functionality was split between
coordinateSystem and coordinateRotation. The coordinateRotation stored
the rotation tensor and handled all tensor transformations.

The functionality has now been revised and consolidated into the
coordinateSystem classes. The sole purpose of coordinateRotation
is now just to provide a selectable mechanism of how to define the
rotation tensor (eg, axis-angle, euler angles, local axes) for user
input, but after providing the appropriate rotation tensor it has
no further influence on the transformations.

--

The coordinateSystem class now contains an origin and a base rotation
tensor directly and various transformation methods.

  - The origin represents the "shift" for a local coordinate system.

  - The base rotation tensor represents the "tilt" or orientation
    of the local coordinate system in general (eg, for mapping
    positions), but may require position-dependent tensors when
    transforming vectors and tensors.

For some coordinate systems (currently the cylindrical coordinate system),
the rotation tensor required for rotating a vector or tensor is
position-dependent.

The new coordinateSystem and its derivates (cartesian, cylindrical,
indirect) now provide a uniform() method to define if the rotation
tensor is position dependent/independent.

The coordinateSystem transform and invTransform methods are now
available in two-parameter forms for obtaining position-dependent
rotation tensors. Eg,

      ... = cs.transform(globalPt, someVector);

In some cases it can be useful to use query uniform() to avoid
storage of redundant values.

      if (cs.uniform())
      {
          vector xx = cs.transform(someVector);
      }
      else
      {
          List<vector> xx = cs.transform(manyPoints, someVector);
      }

Support transform/invTransform for common data types:
   (scalar, vector, sphericalTensor, symmTensor, tensor).

====================
  Breaking Changes
====================

- These changes to coordinate systems and rotations may represent
  a breaking change for existing user coding.

- Relocating the rotation tensor into coordinateSystem itself means
  that the coordinate system 'R()' method now returns the rotation
  directly instead of the coordinateRotation. The method name 'R()'
  was chosen for consistency with other low-level entities (eg,
  quaternion).

  The following changes will be needed in coding:

      Old:  tensor rot = cs.R().R();
      New:  tensor rot = cs.R();

      Old:  cs.R().transform(...);
      New:  cs.transform(...);

  Accessing the runTime selectable coordinateRotation
  has moved to the rotation() method:

      Old:  Info<< "Rotation input: " << cs.R() << nl;
      New:  Info<< "Rotation input: " << cs.rotation() << nl;

- Naming consistency changes may also cause code to break.

      Old:  transformVector()
      New:  transformPrincipal()

  The old method name transformTensor() now simply becomes transform().

====================
  New methods
====================

For operations requiring caching of the coordinate rotations, the
'R()' method can be used with multiple input points:

       tensorField rots(cs.R(somePoints));

   and later

       Foam::transformList(rots, someVectors);

The rotation() method can also be used to change the rotation tensor
via a new coordinateRotation definition (issue #879).

The new methods transformPoint/invTransformPoint provide
transformations with an origin offset using Cartesian for both local
and global points. These can be used to determine the local position
based on the origin/rotation without interpreting it as a r-theta-z
value, for example.

================
  Input format
================

- Streamline dictionary input requirements

  * The default type is cartesian.
  * The default rotation type is the commonly used axes rotation
    specification (with e1/e2/3), which is assumed if the 'rotation'
    sub-dictionary does not exist.

    Example,

    Compact specification:

        coordinateSystem
        {
            origin  (0 0 0);
            e2      (0 1 0);
            e3      (0.5 0 0.866025);
        }

    Full specification (also accepts the longer 'coordinateRotation'
    sub-dictionary name):

        coordinateSystem
        {
            type    cartesian;
            origin  (0 0 0);

            rotation
            {
                type    axes;
                e2      (0 1 0);
                e3      (0.5 0 0.866025);
            }
        }

   This simplifies the input for many cases.

- Additional rotation specification 'none' (an identity rotation):

      coordinateSystem
      {
          origin  (0 0 0);
          rotation { type none; }
      }

- Additional rotation specification 'axisAngle', which is similar
  to the -rotate-angle option for transforming points (issue #660).
  For some cases this can be more intuitive.

  For example,

      rotation
      {
          type    axisAngle;
          axis    (0 1 0);
          angle   30;
      }
  vs.
      rotation
      {
          type    axes;
          e2      (0 1 0);
          e3      (0.5 0 0.866025);
      }

- shorter names (or older longer names) for the coordinate rotation
  specification.

     euler         EulerRotation
     starcd        STARCDRotation
     axes          axesRotation

================
  Coding Style
================
- use Foam::coordSystem namespace for categories of coordinate systems
  (cartesian, cylindrical, indirect). This reduces potential name
  clashes and makes a clearer declaration. Eg,

      coordSystem::cartesian csys_;

  The older names (eg, cartesianCS, etc) remain available via typedefs.

- added coordinateRotations namespace for better organization and
  reduce potential name clashes.
2018-10-01 13:54:10 +02:00
Mark Olesen
69f6f63810 ENH: add globalPath() to argList and TimePaths
- simply combines (rootPath()/globalCaseName())
2018-09-28 15:24:59 +02:00
mattijs
89342b6ff3 COMP: Allwmake: pass through targetType 2018-09-26 14:32:32 +01:00
Andrew Heather
54457c68b6 Merge remote-tracking branch 'origin/master' into develop 2018-09-21 16:01:16 +01:00
Andrew Heather
0b95bb008c ENH: Refactored simpleReactingParcelFoam and added new simpleSprayFoam 2018-09-17 13:40:21 +01:00
Andrew Heather
5f3f101b4e BUG: Doxygen corrections 2018-09-11 12:13:19 +01:00
sergio
236684b1b7 Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2018-08-30 09:33:05 -07:00
sergio
089ca1a632 BUG: Init refCell to -1 instead of 0 for multi regions 2018-08-30 09:26:29 -07:00
mattijs
168b246873 ENH: overset: additional debug. See #810. 2018-08-27 09:19:35 +01:00
sergio
079eb373df ENH: Updating overPimpleDyMFoam solver 2018-08-09 13:33:47 -07:00
Mark Olesen
dd9ecd4988 ENH: add missing Hash function for List/UList (issue #966)
- there were previously no hashing mechanisms for lists so they
  would fall back to the definition for primitives and hash the
  memory location of the allocated List object.

- provide a UList::Hash<> sub-class for inheritance, and also a global
  specialization for UList<T>, List<T> such that the hash value for
  List<List<T>> cascades properly.

- provide similar function in triFace to ensure that it remains
  similar in behaviour to face.

- added SymmHash to Pair, for use when order is unimportant.

STYLE: use string::hash() more consistently

- no particular reason to use Hash<word>() which forwards to
  string::hash() anyhow
2018-08-08 23:54:27 +02:00
Mark Olesen
e0f83938ee ENH: ignore -noFunctionObjects option when disabled
- With argList::noFunctionObjects() we use the logic added in
  4b93333292 (issue #352)

  By removing the '-noFunctionObjects' option, we automatically
  suppress the creation of function-objects via Time (with argList
  as a parameter).
  There is generally no need in these cases for an additional

      runTime.functionObjects().off()  statement

  Use the argList::noFunctionObjects() for more direct configuration
  and reduce unnecessary clutter in the -help information.

  In previous versions, the -noFunctionObjects would have been redundant
  anyhow, so we can also just ignore it now instead.
2018-08-08 09:44:28 +02:00
Mark Olesen
cb919a6c41 ENH: tag some options as 'advanced' (only shown with -help-full)
General:
    * -roots, -hostRoots, -fileHandler

Specific:
    * -to <coordinateSystem> -from <coordinateSystem>

- Display -help-compat when compatibility or ignored options are available

STYLE: capitalization of options text
2018-07-31 11:54:15 +02:00
Mark Olesen
f00c7a655c COMP: rename dictionary::read<T> to dictionary::readEntry<T>
- avoids compiler ambiguity when virtual methods such as
  IOdictionary::read() exist.

- the method was introduced in 1806, and was thus not yet widely used
2018-07-30 15:52:40 +02:00
Mark Olesen
27bbb516a3 STYLE: return nullptr instead of tmp<...>() for NotImplemented methods
- as per 018124e3bf
2018-07-27 14:20:01 +02:00
Mark Olesen
dbe0db1d9a ENH: fvMeshSubset improvements (issue #951)
- what was previously termed 'setLargeCellSubset()' is now simply
  'setCellSubset()' and supports memory efficient interfaces.

  The new parameter ordering avoids ambiguities caused by default
  parameters.

  Old parameter order:

      setLargeCellSubset
      (
          const labelList& region,
          const label currentRegion,
          const label patchID = -1,
          const bool syncCouples = true
      );

  New parameter order:

      setCellSubset
      (
          const label regioni,
          const labelUList& regions,
          const label patchID = -1,
          const bool syncCouples = true
      );

   And without ambiguity:

      setCellSubset
      (
          const labelUList& selectedCells,
          const label patchID = -1,
          const bool syncCouples = true
      );

- support bitSet directly for specifying the selectedCells for
  memory efficiency and ease of use.

- Additional constructors to perform setCellSubset() immediately,
  which simplifies coding.

  For example,

      meshParts.set
      (
          zonei,
          new fvMeshSubset(mesh, selectedCells)
      );

  Or even

      return autoPtr<fvMeshSubset>::New(mesh, selectedCells);
2018-07-25 18:58:00 +02:00
Mark Olesen
4a3bb8a9bc COMP: overPimpleDyMFoam is missing some files or variables 2018-10-05 12:24:22 +02:00
Mark Olesen
13778f7647 ENH: use dictionary::readEntry for detection of input errors (#762, #1033)
- instead of   dict.lookup(name) >> val;
  can use      dict.readEntry(name, val);

  for checking of input token sizes.
  This helps catch certain types of input errors:

  {

      key1 ;                // <- Missing value
      key2 1234             // <- Missing ';' terminator
      key3 val;
  }

STYLE: readIfPresent() instead of 'if found ...' in a few more places.
2018-10-05 10:15:13 +02:00
Mark Olesen
b1996f348c COMP: avoid compiler warnings about phasePairKey friend functions
- improve alignment of various phasePairKey implementations
2018-07-24 10:51:12 +02:00
Johan Roenby
40618a3a86 BUG: First occurence of alpha1.prevIter() causes crash (closes #911)
- in interIsoFoam/alphaEqn.H changed to alpha1.prevIter() to
  alpha1.storePrevIter().
2018-07-19 23:36:42 +02:00
Mark Olesen
d82deea8e5 COMP: resolve compilation issues for single-precision (closes #932) 2018-07-11 19:24:16 +02:00
Will Bainbridge
2ae4bf73d9 fileHandler: Added flush method
This method waits until all the threads have completed IO operations and
then clears any cached information about the files on disk. This
replaces the deactivation of threading by means of zeroing the buffer
size when writing and reading of a file happen in sequence. It also
allows paraFoam to update the list of available times.

Patch contributed by Mattijs Janssens
Resolves bug report https://bugs.openfoam.org/view.php?id=2962
2018-06-27 11:45:58 +01:00
sergio
edcb649212 STY: Changing folder name for icoReactingMultiphaseInterFoam 2018-06-25 10:35:53 -07:00
Will Bainbridge
70bc72c2df twoPhaseMixtureThermo: Fix for collated file operation
twoPhaseMixtureThermo writes the temperatures during construction only
for them to be read again immediately after by construction of the
individual phases' thermo models. When running with collated file
handling this behaviour is not thread safe. This change deactivates
threading for the duration of this behaviour.

Patch contributed by Mattijs Janssens
2018-06-14 10:55:27 +01:00
Mark Olesen
4d6f0498d6 ENH: use vector::normalise and VectorSpace::normalised for clarity 2018-08-10 15:18:29 +02:00
Henry Weller
4fe6ed3c6a BUG: compressibleInterFoam: Corrected handling of thermal diffusivity with mixture turbulence model
Resolves bug-report https://bugs.openfoam.org/view.php?id=2958
2018-05-25 23:43:41 +01:00
Henry Weller
0cdb9d1ca0 BUG: rhoPimpleFoam: Only execute the density predictor if not in simpleRho mode 2018-06-10 22:45:46 +01:00
Mark Olesen
d56744a66a STYLE: Renamed source files to reflect solver names (issue #890) 2018-06-21 16:14:16 +02:00
Mark Olesen
736d358782 STYLE: code tidying for icoReactingMultiPhaseInterFoam
- use Enum instead of NamedEnum
- shorter form for dimensionedScalar

- reduce verbosity about missed seeding for DTRM cloud.
  Re-enable old warnings in debug mode.
2018-06-21 13:35:22 +02:00
sergio
2790f2da4e ENH: Editing tutorials, and Make/files 2018-06-20 12:27:12 -07:00
Andrew Heather
c103331a6a INT: integration updates 2018-06-20 16:28:48 +01:00
mattijs
636328fc1c ENH: icoReactingMultiPhaseInterFoam: thermo sharing T 2018-06-15 14:05:37 +01:00
sergio
4cb073e150 ENH: Up to date icoReactingMultiphaseInterFoam solver and libs
Adding tutorials and other minor changes
2018-06-04 11:25:59 -07:00
Mark Olesen
96b65a781d STYLE: remove spacing around forAll macros and template '> >' closing 2018-07-06 11:03:28 +02:00
Mark Olesen
84784c5061 Merge remote-tracking branch 'origin/master' into develop 2018-07-13 13:25:11 +02:00
Mark Olesen
0304911921 STYLE: more consistent use of dimensioned Zero, scalar decimal points
- use scalar(0) instead of scalar(0.0) etc
2018-07-13 10:28:48 +02:00
Mark Olesen
2662042d49 ENH: improve controls for Time (issue #910)
- relocate some standard functionality to TimePaths to allow a lighter
  means of managing time directories without using the entire Time
  mechanism.

- optional enableLibs for Time construction (default is on)
  and a corresponding argList::noLibs() and "-no-libs" option

STYLE:

- mark Time::outputTime() as deprecated MAY-2016

- use pre-increment for runTime, although there is no difference in
  behaviour or performance.
2018-07-02 10:20:01 +02:00
sergio
d68adc4d31 ENH: Final stage for laserDTRM model and new icoReactingMultiphaseFoam 2017-08-10 09:17:55 -07:00
Andrew Heather
12e2142db8 COMP: refactoring to resolve compiler warnings - see #886 2018-06-20 10:56:04 +01:00
Andrew Heather
cf7dbcd0e4 STYLE: Minor clean-up 2018-06-19 11:51:38 +01:00
Johan Roenby
e6fd82f173 ENH: interIsoFoam updates
- Reimplemented treatment of alpha1, phi and U in case of
  nOuterCorrectors > 1 based on storePrevIter() to avoid cluttering the
  solver with unnecessary fields in case of nOuterCorrectors = 1.
2018-06-13 11:46:21 +02:00
Johan Roenby
bab72d5139 ENH: multiple updates to interIsoFoam related code
- Updated tutorial headers
- Added copyright note to isoAdvector src
- Removed outcommented code lines in interIsoFoam solver
- Removed all LTS from interIsoFoam since this is not currently supported
- Confirmed that discInConstantFlow gives identical results with N subCylces and time step N*dt
- Confirmed that this also holds when nOuterCorrectors > 1.
2018-06-12 23:14:10 +02:00
Johan Roenby
25a7e4da7b INT: Initial update of isoAdvector and interIsoFoam to work with AMR. 2018-06-11 17:51:54 +02:00
Andrew Heather
c909a5df25 GIT: resolved merge conflict 2018-06-13 14:20:18 +01:00
Andrew Heather
616b91c06e Merge branch 'master' into develop 2018-06-13 14:17:47 +01:00
mattijs
765c2051aa BUG: fftw: missing normalisation. See #867. 2018-06-13 14:09:37 +01:00
Andrew Heather
8f22683615 STYLE: Renamed source files to reflect solver names 2018-06-11 13:44:25 +01:00
Andrew Heather
4e8fd19d3d ENH: Refactored creation of simplified meshes for -dry-run operation
TODO: migrate singleCellFvMesh into simplified mesh framework (?)
2018-06-11 12:42:09 +01:00
Mark Olesen
84b109219a STYLE: reduced usage of Switch
- Since 'bool' and 'Switch' use the _identical_ input mechanism
  (ie, both accept true/false, on/off, yes/no, none, 1/0), the main
  reason to prefer one or the other is the output.

  The output for Switch is as text (eg, "true"), whereas for bool
  it is label (0 or 1). If the output is required for a dictionary,
  Switch may be appropriate. If the output is not required, or is only
  used for Pstream exchange, bool can be more appropriate.
2018-06-01 20:51:48 +02:00
Mark Olesen
1c030f441d STYLE: missing newline in correctPhi.H 2018-05-30 16:18:20 +02:00
Mark Olesen
dc521b95df STYLE: consistent use of '= delete' 2018-05-30 12:03:17 +02:00
Andrew Heather
3530711219 ENH: Refactored the dummyFvMesh code 2018-06-05 16:10:04 +01:00
Mark Olesen
f9fe71815a STYLE: consistent use of '= delete' for removed constructors/assignments
- make the purpose more explicit, and reduces some work for the
  compiler as well.
2018-05-30 12:03:17 +02:00
Andrew Heather
885c47150e ENH: chemFoam - updated mesh creation 2018-01-11 21:34:27 +00:00
Andrew Heather
b50bbc7ef2 ENH: Added new dry-run options to solvers 2018-01-11 14:23:17 +00:00
mattijs
f51ee9a0e2 Merge remote-tracking branch 'origin/develop' into develop-pre-release 2018-05-31 17:34:16 +01:00
Andrew Heather
ad25e18c7f Merge remote-tracking branch 'origin/develop' into develop-pre-release 2018-05-18 12:18:13 +01:00
Andrew Heather
6180e0db8b INT: Additional integration updates/clean-up 2018-05-18 10:49:10 +01:00
Mark Olesen
48d654cf19 ENH: avoid memory leaks for HashPtrTable, PtrMap insertion (issue #749)
- disallow insert() of raw pointers, since a failed insertion
  (ie, entry already existed) results in an unmanaged pointer.

  Either insert using an autoPtr, or set() with raw pointers or autoPtr.

- IOobjectList::add() now takes an autoPtr instead of an object reference

- IOobjectList::remove() now returns an autoPtr instead of a raw pointer
2018-05-17 09:56:36 +01:00
sergio
b78d37e93c Merge branch 'develop-pre-release' of develop.openfoam.com:Development/OpenFOAM-plus into develop-pre-release 2018-05-18 01:31:17 -07:00
sergio
e0912a058c ENH: Adding pressure work terms for compressibleInterFoam
Removing temporary fix from compressibleInterDyFOAM to re-calculte Uf with morphing mesh
2018-05-18 01:27:13 -07:00
mattijs
d469bbae4b COMP: Allwmake: feed through 'objects' targer for wmakeCollect 2018-05-17 08:39:57 +01:00
Mark Olesen
4fe8ed8245 STYLE: use direct iteration for HashSet
- The iterator for a HashSet dereferences directly to its key.

- Eg,

      for (const label patchi : patchSet)
      {
          ...
      }
  vs.
      forAllConstIter(labelHashSet, patchSet, iter)
      {
          const label patchi = iter.key();
          ...
      }
2018-03-06 00:29:03 +01:00
Mark Olesen
dd8341f659 ENH: make format of ExecutionTime = ... output configurable (issue #788)
- controlled by the the 'printExecutionFormat' InfoSwitch in
  etc/controlDict

      // Style for "ExecutionTime = " output
      // - 0 = seconds (with trailing 's')
      // - 1 = day-hh:mm:ss

   ExecutionTime = 112135.2 s  ClockTime = 113017 s

   ExecutionTime = 1-07:08:55.20  ClockTime = 1-07:23:37

- Callable via the new Time::printExecutionTime() method,
  which also helps to reduce clutter in the applications.
  Eg,

     runTime.printExecutionTime(Info);

  vs

     Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
         << "  ClockTime = " << runTime.elapsedClockTime() << " s"
         << nl << endl;

--

ENH: return elapsedClockTime() and clockTimeIncrement as double

- previously returned as time_t, which is less portable.
2018-04-27 15:00:34 +02:00
Mark Olesen
ebfe46503f STYLE: improve wmkdepend parse error message
- parsing error state only arises from a missing final newline
  in the file (which the dnl macro does not capture).
  Report with a warning instead of modifying the dnl macro since
  we generally wish to know about this anyhow.

- add missing newline to YEqn.H file.
2018-04-25 14:37:59 +02:00
Mark Olesen
bac943e6fc ENH: new bitSet class and improved PackedList class (closes #751)
- The bitSet class replaces the old PackedBoolList class.
  The redesign provides better block-wise access and reduced method
  calls. This helps both in cases where the bitSet may be relatively
  sparse, and in cases where advantage of contiguous operations can be
  made. This makes it easier to work with a bitSet as top-level object.

  In addition to the previously available count() method to determine
  if a bitSet is being used, now have simpler queries:

    - all()  - true if all bits in the addressable range are empty
    - any()  - true if any bits are set at all.
    - none() - true if no bits are set.

  These are faster than count() and allow early termination.

  The new test() method tests the value of a single bit position and
  returns a bool without any ambiguity caused by the return type
  (like the get() method), nor the const/non-const access (like
  operator[] has). The name corresponds to what std::bitset uses.

  The new find_first(), find_last(), find_next() methods provide a faster
  means of searching for bits that are set.

  This can be especially useful when using a bitSet to control an
  conditional:

  OLD (with macro):

      forAll(selected, celli)
      {
          if (selected[celli])
          {
              sumVol += mesh_.cellVolumes()[celli];
          }
      }

  NEW (with const_iterator):

      for (const label celli : selected)
      {
          sumVol += mesh_.cellVolumes()[celli];
      }

      or manually

      for
      (
          label celli = selected.find_first();
          celli != -1;
          celli = selected.find_next()
      )
      {
          sumVol += mesh_.cellVolumes()[celli];
      }

- When marking up contiguous parts of a bitset, an interval can be
  represented more efficiently as a labelRange of start/size.
  For example,

  OLD:

      if (isA<processorPolyPatch>(pp))
      {
          forAll(pp, i)
          {
              ignoreFaces.set(i);
          }
      }

  NEW:

      if (isA<processorPolyPatch>(pp))
      {
          ignoreFaces.set(pp.range());
      }
2018-03-07 11:21:48 +01:00
Mark Olesen
b4d38ab468 ENH: improve handling of ThirdParty packages
- generalize some of the library extensions (.so vs .dylib).
  Provide as wmake 'sysFunctions'

- added note about unsupported/incomplete system support

- centralize detection of ThirdParty packages into wmake/ subdirectory
  by providing a series of scripts in the spirit of GNU autoconfig.
  For example,

      have_boost, have_readline, have_scotch, ...

  Each of the `have_<package>` scripts will generally provide the
  following type of functions:

      have_<package>          # detection
      no_<package>            # reset
      echo_<package>          # echoing

  and the following type of variables:

      HAVE_<package>          # unset or 'true'
      <package>_ARCH_PATH     # root for <package>
      <package>_INC_DIR       # include directory for <package>
      <package>_LIB_DIR       # library directory for <package>

  This simplifies the calling scripts:

      if have_metis
      then
          wmake metisDecomp
      fi

  As well as reducing clutter in the corresponding Make/options:

      EXE_INC = \
          -I$(METIS_INC_DIR) \
          -I../decompositionMethods/lnInclude

      LIB_LIBS = \
          -L$(METIS_LIB_DIR) -lmetis

  Any additional modifications (platform-specific or for an external build
  system) can now be made centrally.
2018-04-24 14:51:19 +02:00
Andrew Heather
ed4564a805 STYLE: Added backwards compatibility for old keywords 2018-04-18 13:32:49 +01:00
Andrew Heather
a230e8d408 STYLE: Correcting typos 2018-03-28 17:14:16 +01:00
Mark Olesen
018124e3bf STYLE: use 'return nullptr' for empty autoPtr/tmp returns
- both autoPtr and tmp are defined with an implicit construct from
  nullptr (but with explicit construct from a pointer to null).
  Thus is it safe to use 'nullptr' when returning an empty autoPtr or tmp.
2018-03-21 09:31:09 +01:00
Mark Olesen
2f86cdc712 STYLE: more consistent use of dimensioned Zero
- when constructing dimensioned fields that are to be zero-initialized,
  it is preferrable to use a form such as

      dimensionedScalar(dims, Zero)
      dimensionedVector(dims, Zero)

  rather than

      dimensionedScalar("0", dims, 0)
      dimensionedVector("zero", dims, vector::zero)

  This reduces clutter and also avoids any suggestion that the name of
  the dimensioned quantity has any influence on the field's name.

  An even shorter version is possible. Eg,

      dimensionedScalar(dims)

  but reduces the clarity of meaning.

- NB: UniformDimensionedField is an exception to these style changes
  since it does use the name of the dimensioned type (instead of the
  regIOobject).
2018-03-16 10:24:03 +01:00
Mark Olesen
36719bf55b STYLE: consistent lookupOrDefault template parameters
- in many cases can just use lookupOrDefault("key", bool) instead of
  lookupOrDefault<bool> or lookupOrDefault<Switch> since reading a
  bool from an Istream uses the Switch(Istream&) anyhow

STYLE: relocated Switch string names into file-local scope
2018-03-26 09:09:09 +02:00
Mark Olesen
f0435beb9c Merge remote-tracking branch 'origin/master' into develop 2018-03-16 23:38:29 +01:00
Andrew Heather
40e7d389d8 ENH: DPMFoam - extended RAS model selection. See #743 2018-03-13 12:48:16 +00:00
Mark Olesen
5d1fb23555 ENH: code reduction in PackedList, PackedBoolList (issue #751)
- eliminate iterators from PackedList since they were unused, had
  lower performance than direct access and added unneeded complexity.

- eliminate auto-vivify for the PackedList '[] operator.
  The set() method provides any required auto-vivification and
  removing this ability from the '[]' operator allows for a lower
  when accessing the values. Replaced the previous cascade of iterators
  with simpler reference class.

PackedBoolList:

- (temporarily) eliminate logic and addition operators since
  these contained partially unclear semantics.

- the new test() method tests the value of a single bit position and
  returns a bool without any ambiguity caused by the return type
  (like the get() method), nor the const/non-const access (like
  operator[] has). The name corresponds to what std::bitset uses.

- more consistent use of PackedBoolList test(), set(), unset() methods
  for fewer operation and clearer code. Eg,

      if (list.test(index)) ...    |  if (list[index]) ...
      if (!list.test(index)) ...   |  if (list[index] == 0u) ...
      list.set(index);             |  list[index] = 1u;
      list.unset(index);           |  list[index] = 0u;

- deleted the operator=(const labelUList&) and replaced with a setMany()
  method for more clarity about the intended operation and to avoid any
  potential inadvertent behaviour.
2018-03-13 08:32:40 +01:00
Andrew Heather
ac3a8bc3cb BUG: simpleCoalParcelFoam - corrected dimensions of Qdot. Fixes #742 2018-02-23 09:04:16 +00:00
Mark Olesen
451f8e0357 Merge remote-tracking branch 'origin/master' into develop 2018-03-07 18:08:07 +01:00
Mark Olesen
3d608bf06a ENH: remove reliance on the Xfer class (issue #639)
This class is largely a pre-C++11 holdover. It is now possible to
simply use move construct/assignment directly.

In a few rare cases (eg, polyMesh::resetPrimitives) it has been
replaced by an autoPtr.
2018-03-05 13:28:53 +01:00
Mark Olesen
57291e8692 STYLE: use autoPtr::New and tmp::New for simple return types 2018-02-26 14:00:30 +01:00
Mark Olesen
660f3e5492 ENH: cleanup autoPtr class (issue #639)
Improve alignment of its behaviour with std::unique_ptr

  - element_type typedef
  - release() method - identical to ptr() method
  - get() method to get the pointer without checking and without releasing it.
  - operator*() for dereferencing

Method name changes

  - renamed rawPtr() to get()
  - renamed rawRef() to ref(), removed unused const version.

Removed methods/operators

  - assignment from a raw pointer was deleted (was rarely used).
    Can be convenient, but uncontrolled and potentially unsafe.
    Do allow assignment from a literal nullptr though, since this
    can never leak (and also corresponds to the unique_ptr API).

Additional methods

  - clone() method: forwards to the clone() method of the underlying
    data object with argument forwarding.

  - reset(autoPtr&&) as an alternative to operator=(autoPtr&&)

STYLE: avoid implicit conversion from autoPtr to object type in many places

- existing implementation has the following:

     operator const T&() const { return operator*(); }

  which means that the following code works:

       autoPtr<mapPolyMesh> map = ...;
       updateMesh(*map);    // OK: explicit dereferencing
       updateMesh(map());   // OK: explicit dereferencing
       updateMesh(map);     // OK: implicit dereferencing

  for clarity it may preferable to avoid the implicit dereferencing

- prefer operator* to operator() when deferenced a return value
  so it is clearer that a pointer is involve and not a function call
  etc    Eg,   return *meshPtr_;  vs.  return meshPtr_();
2018-02-26 12:00:00 +01:00
Mark Olesen
ffd7b00ad5 ENH: fvMatrix::setReferences() single value variant 2018-03-02 13:27:34 +01:00
Mark Olesen
37e248c74b STYLE: consistent use of wordHashSet instead of HashSet<word>
- the wordHashSet typedef is always available when HashSet has been
  included.

- use default HashTable key (word) instead of explicitly mentioning it
2018-02-22 11:19:47 +01:00
Mark Olesen
3e3c97397e STYLE: simplify hashing to use struct instead of class
- more consistent with STL practices for function classes.

- string::hash function class now operates on std::string rather
  than Foam::string since we have now avoided inadvertent use of
  string conversion from int in more places.
2018-02-09 15:34:59 +01:00
Henry Weller
05f5a293bc ENH: MRF: Remove ddtCorr from MRF regions
MRFZone: Filter-out excluded patches from ddtCorr
2018-02-10 22:46:17 +00:00
Mark Olesen
17b82e5e7e Merge remote-tracking branch 'origin/master' into develop 2018-01-17 14:08:11 +01:00
Andrew Heather
1510c0aeb5 ENH: interIsoFoam - added linkage against wave modelling library 2018-01-11 14:30:26 +00:00
Henry Weller
fe4752d28a ENH: ddtScheme::fvcDdtPhiCoeff: Improved formulation providing better stability/accuracy balance
Resolves problem with pressure "staggering" when running with a very Courant
number.
2018-01-08 21:35:00 +00:00
Mark Olesen
345a2a42f1 ENH: simplify method names for reading argList options and arguments
- use succincter method names that more closely resemble dictionary
  and HashTable method names. This improves method name consistency
  between classes and also requires less typing effort:

    args.found(optName)        vs.  args.optionFound(optName)
    args.readIfPresent(..)     vs.  args.optionReadIfPresent(..)
    ...
    args.opt<scalar>(optName)  vs.  args.optionRead<scalar>(optName)
    args.read<scalar>(index)   vs.  args.argRead<scalar>(index)

- the older method names forms have been retained for code compatibility,
  but are now deprecated
2018-01-08 15:35:18 +01:00
Mark Olesen
4d72c2aac0 COMP: incorrect executable path sphereSurfactantFoam (closes #695) 2018-01-08 10:51:00 +01:00
Mark Olesen
4fd32bfdf2 COMP: incorrect executable path sphereSurfactantFoam (closes #695) 2018-01-08 10:51:00 +01:00
sergio
9eb00fde2c BUG: Fixing creating of turbulence after overset specific in createFields.H for overRhoPimpleDyMFoam 2017-12-22 12:53:40 -08:00
sergio
1eaa024a08 BUG: Change the calculation of dgdt term in the pEq plus reverting compressible pEqComp until
further investigation on the consequences on dynamic mesh for compressibleInterDyMFoam.
alphaSuSp.H has to be added in the solver folder in order to make it compatible with the alpha Eq.
2017-12-21 17:08:33 -08:00
sergio
5a3dfc60b6 BUG: Adding cellMask to constrainHbyA in pEq.H 2017-12-21 09:13:54 -08:00
sergio
576a226dbe BUG: Correcting HbyA constrain with cellMask in pEq.H 2017-12-21 07:37:40 -08:00
sergio
7230b3dc62 ENH: Adding postProcessing option to solver overPimpleDyMFoam 2017-12-19 12:31:54 -08:00
sergio
985a18df75 Adding overPotentialFoam and overRhoSimpleFoam and tutorials 2017-12-19 11:33:43 -08:00
Andrew Heather
22e0a05e8b STYLE: finiteArea doc and style updates 2017-12-18 11:25:53 +00:00
Andrew Heather
00a8c8bc5f BUG: liquidFilmFoam - corrected double looping 2017-12-18 11:21:07 +00:00
Andrew Heather
2728a96b9c ENH: finiteArea - faMesh now derived from faSolution, faSchemes and data classes 2017-12-18 10:50:37 +00:00
Will Bainbridge
f37ec93404 ENH: chtMultiRegionFoam: Added support for reactions
chtMultiRegionFoam now supports reaction/combustion modelling in fluid
regions in the same way as reactingFoam.

TUT: chtMultiRegionFoam: Added reverseBurner tutorial

This tutorial demonstrates chtMultiRegionFoam's combustion capability
2017-12-13 08:37:25 +00:00
Andrew Heather
dcad66f7d3 INT: Additional integration updates/clean-up 2018-05-14 13:21:22 +01:00
Will Bainbridge
2d238139b3 STYLE: thermo: Macro renaming
Thermo and reaction thermo macros have been renamed and refactored. If
the name is plural (make???Thermos) then it adds the model to all
selection tables. If not (make???Thermo) then it only adds to the
requested psi or rho table.
2017-12-14 16:37:21 +00:00
Will Bainbridge
8aabbec71e ENH: reactionThermo: Single component mixture
This mixture allows a reacting solver to be used with a single component
fluid without the additional case files usually required for reacting
thermodynamics.

reactionThermo: Instantiated more single component mixtures

ENH: reactionThermo: Select singleComponentMixture as pureMixture

A pureMixture can now be specified in a reacting solver. This further
enhances compatibility between non-reacting and reacting solvers.

To achieve this, mixtures now have a typeName function of the same form
as the lower thermodyanmic models. In addition, to avoid name clashes,
the reacting thermo make macros have been split into those that create
entries on multiple selection tables, and those that just add to the
reaction thermo table.
2017-12-01 11:12:05 +00:00
Will Bainbridge
2193c8e31a ENH: basicSpecieThermo: Updated solver references to mixture class 2017-12-01 11:05:28 +00:00
Will Bainbridge
22aae2816d ENH: combustionModels: Changed the construction order
The combustion and chemistry models no longer select and own the
thermodynamic model; they hold a reference instead. The construction of
the combustion and chemistry models has been changed to require a
reference to the thermodyanmics, rather than the mesh and a phase name.

At the solver-level the thermo, turbulence and combustion models are now
selected in sequence. The cyclic dependency between the three models has
been resolved, and the raw-pointer based post-construction step for the
combustion model has been removed.

The old solver-level construction sequence (typically in createFields.H)
was as follows:

    autoPtr<combustionModels::psiCombustionModel> combustion
    (
        combustionModels::psiCombustionModel::New(mesh)
    );

    psiReactionThermo& thermo = combustion->thermo();

    // Create rho, U, phi, etc...

    autoPtr<compressible::turbulenceModel> turbulence
    (
        compressible::turbulenceModel::New(rho, U, phi, thermo)
    );

    combustion->setTurbulence(*turbulence);

The new sequence is:

    autoPtr<psiReactionThermo> thermo(psiReactionThermo::New(mesh));

    // Create rho, U, phi, etc...

    autoPtr<compressible::turbulenceModel> turbulence
    (
        compressible::turbulenceModel::New(rho, U, phi, *thermo)
    );

    autoPtr<combustionModels::psiCombustionModel> combustion
    (
        combustionModels::psiCombustionModel::New(*thermo, *turbulence)
    );

ENH: combustionModel, chemistryModel: Simplified model selection

The combustion and chemistry model selection has been simplified so
that the user does not have to specify the form of the thermodynamics.

Examples of new combustion and chemistry entries are as follows:

    In constant/combustionProperties:

        combustionModel PaSR;

        combustionModel FSD;

    In constant/chemistryProperties:

        chemistryType
        {
            solver          ode;
            method          TDAC;
        }

All the angle bracket parts of the model names (e.g.,
<psiThermoCombustion,gasHThermoPhysics>) have been removed as well as
the chemistryThermo entry.

The changes are mostly backward compatible. Only support for the
angle bracket form of chemistry solver names has been removed. Warnings
will print if some of the old entries are used, as the parts relating to
thermodynamics are now ignored.

ENH: combustionModel, chemistryModel: Simplified model selection

Updated all tutorials to the new format

STYLE: combustionModel: Namespace changes

Wrapped combustion model make macros in the Foam namespace and removed
combustion model namespace from the base classes. This fixes a namespace
specialisation bug in gcc 4.8. It is also somewhat less verbose in the
solvers.

This resolves bug report https://bugs.openfoam.org/view.php?id=2787

ENH: combustionModels: Default to the "none" model

When the constant/combustionProperties dictionary is missing, the solver
will now default to the "none" model. This is consistent with how
radiation models are selected.
2017-11-23 16:57:12 +00:00
Henry Weller
255ec7366b ENH: multiphaseInterFoam: Merged dynamic mesh functionality of multiphaseInterDyMFoam into multiphaseInterFoam
and replaced multiphaseInterDyMFoam with a script which reports this change.

The multiphaseInterDyMFoam tutorials have been moved into the multiphaseInterFoam directory.

This change is one of a set of developments to merge dynamic mesh functionality
into the standard solvers to improve consistency, usability, flexibility and
maintainability of these solvers.

Henry G. Weller
CFD Direct Ltd.
2017-12-01 15:51:21 +00:00
Henry Weller
3666d90f31 ENH: interMixingFoam: Added support for mesh-motion and automatic refinement/unrefinement 2017-12-01 14:19:54 +00:00
Henry Weller
ede4759b80 ENH: interFoam: Merged dynamic mesh functionality of interDyMFoam into interFoam
and replaced interDyMFoam with a script which reports this change.

The interDyMFoam tutorials have been moved into the interFoam directory.

This change is one of a set of developments to merge dynamic mesh functionality
into the standard solvers to improve consistency, usability, flexibility and
maintainability of these solvers.

Henry G. Weller
CFD Direct Ltd.

interMixingFoam, multiphaseInterFoam: Updated for changes to interFoam
2017-11-30 23:56:42 +00:00
Henry Weller
e50af751a4 ENH: pimpleFoam, rhoPimpleFoam, interDyMFoam: Rationalized mesh-motion support
Added support for mesh-motion update within PIMPLE loop in pimpleFoam and rhoPimpleFoam.
2017-11-30 13:07:42 +00:00
Andrew Heather
889791060c INT: Additional integration updates 2018-05-11 12:04:33 +01:00
Henry Weller
2f888d1684 ENH: rhePimpleFoam: Merged dynamic mesh functionality of rhoPimpleDyMFoam into rhoPimpleFoam
and replaced rhoPimpleDyMFoam with a script which reports this change.

The rhoPimpleDyMFoam tutorials have been moved into the rhoPimpleFoam directory.

This change is the first of a set of developments to merge dynamic mesh
functionality into the standard solvers to improve consistency, usability,
flexibility and maintainability of these solvers.

Henry G. Weller
CFD Direct Ltd.

rhoReactingFoam: Updated for changes to rhoPimpleFoam files
2017-11-23 12:13:37 +00:00
Henry Weller
81cea09983 ENH: pimpleDyMFoam: Improved efficiency and consistency when running on a static mesh
Now pimpleDyMFoam is exactly equivalent to pimpleFoam when running on a
staticFvMesh.  Also when the constant/dynamicMeshDict is not present a
staticFvMesh is automatically constructed so that the pimpleDyMFoam solver can
run any pimpleFoam case without change.

pimpleDyMFoam: Store Uf as an autoPtr for better error handling

pimpleFoam: Set initial deltaT from the Courant number

for improved stability on start-up and compatibility with pimpleDyMFoam

ENH: pimpleFoam: Merged dynamic mesh functionality of pimpleDyMFoam into pimpleFoam

and replaced pimpleDyMFoam with a script which reports this change.

The pimpleDyMFoam tutorials have been moved into the pimpleFoam directory.

This change is the first of a set of developments to merge dynamic mesh
functionality into the standard solvers to improve consistency, usability,
flexibility and maintainability of these solvers.

Henry G. Weller
CFD Direct Ltd.

tutorials/incompressible/pimpleFoam: Updated pimpleDyMFoam tutorials to run pimpleFoam

Renamed tutorials/incompressible/pimpleFoam/RAS/wingMotion/wingMotion2D_pimpleDyMFoam

-> tutorials/incompressible/pimpleFoam/RAS/wingMotion/wingMotion2D_pimpleFoam
2017-11-18 01:13:48 +00:00
Andrew Heather
50d1ac15ef INT: Integration updates in preparation for merge into the develop branch 2017-09-27 09:30:59 +01:00
Andrew Heather
9aff74aaaf COMP: Updated to compile with Clang 3.7.1 2017-09-20 13:55:42 +01:00
Hrvoje Jasak
0c64622341 Finite area port, Hrvoje Jasak
- with sphereSurfactantFoam and sphereTransport test case
2017-09-15 12:02:25 +01:00
Andrew Heather
d523d0a634 Merge branch 'feature-overset-lsq' into 'develop'
ENH: overset: new solvers, new stencil

See merge request Development/OpenFOAM-plus!180
2017-12-14 15:43:59 +00:00
Mark Olesen
b37fc2d4b1 Merge branch 'feature-externalCoupled' into 'develop'
Feature external coupled

See merge request Development/OpenFOAM-plus!176
2017-12-13 19:58:09 +00:00
Mark Olesen
bc8420e14f STYLE: trailing whitespace, doxygen, error messages from fileOperation 2017-12-13 17:56:34 +01:00
mattijs
ddde330884 ENH: overset: new solvers, new stencil 2017-12-08 16:00:02 +00:00
mattijs
74b557d5f2 STYLE: indentation: trailing whitespace 2017-12-08 12:26:16 +00:00
Mark Olesen
0e2798399e ENH: add enthalpy sub-looping for chtMultiRegion* solvers 2017-12-05 12:00:00 +01:00
Andrew Heather
b137005449 Merge remote-tracking branch 'origin/master' into develop 2017-12-06 12:52:12 +00:00
Mark Olesen
416a3790ea STYLE: prefer autoPtr::reset() to autoPtr::set()
- in most cases already checked valid() so don't need additional check
  for setting an existing pointer
2017-11-22 19:11:11 +01:00
Mark Olesen
8730a7622a ENH: enumerations for known cell models in cellModel, ptr/ref lookups
- this provides a better typesafe means of locating predefined cell
  models than relying on strings. The lookup is now ptr() or ref()
  directly. The lookup functions behave like on-demand singletons when
  loading "etc/cellModels".

  Functionality is now located entirely in cellModel but a forwarding
  version of cellModeller is provided for API (but not ABI) compatibility
  with older existing user code.

STYLE: use constexpr for cellMatcher constants
2017-11-18 11:05:05 +01:00
sergio
a7095ceded Merge branch 'master' of develop.openfoam.com:Development/OpenFOAM-plus 2017-11-06 09:05:02 -08:00
sergio
454e609fbc ENH: Adding momemtum predictor to chtSimpleFoam 2017-11-06 09:03:42 -08:00
Mark Olesen
c0ba7bf05a STYLE: use Ostream writeEntry when writing key/value entries
- makes for clearer code

ENH: make writeIfDifferent part of Ostream
2017-11-06 00:49:24 +01:00
Andrew Heather
6aa7b6ac2a STYLE: Header clean-up 2017-11-07 11:22:58 +00:00
Andrew Heather
16649b3772 BUG: thermoFoam - corrected to enable restart and post-processing using thermoFoam -postProcess. Fixes #598 2017-09-25 13:25:34 +01:00
sergio
cfeb2c9233 ENH: adding oversetAdjustPhi to overInterFoam plus reconstructing U from phi in pEq. 2017-09-08 15:35:27 -07:00
Henry Weller
be9d388a68 ENH: MRF: Added support for mesh refinement/unrefinement and other topology changes 2017-08-18 22:22:47 +01:00
Will Bainbridge
c06f716555 ENH: reactingParcelFoam: Made YEqn diffusivity consistent with other solvers 2017-10-10 10:14:48 +01:00
Andrew Heather
910d1a3021 INT: Additional integration updates 2018-05-10 15:13:51 +01:00
Henry Weller
e2c4472ab6 STYLE: engineFoam: Renamed engineFoam -> XiEngineFoam and sprayEngineFoam -> engineFoam
XiEngineFoam is a premixed/partially-premixed combustion engine solver which
exclusively uses the Xi flamelet combustion model.

engineFoam is a general engine solver for inhomogeneous combustion with or
without spray supporting run-time selection of the chemistry-based combustion
model.
2017-09-19 17:01:54 +01:00
Henry Weller
3c58321b4b ENH: engineTime: Generalized to provide run-time selection of piston-motion
Standard crank-connecting rod and the new free-piston kinematics motion options
are provides, others can easily be added.

Contributed by Francesco Contino and Nicolas Bourgeois, BURN Research Group.
2017-09-19 09:26:26 +01:00
Henry Weller
293c0c3014 BUG: compressibleInterFoam family: Corrected transonic option
Resolves bug-report https://bugs.openfoam.org/view.php?id=2785

ENH: compressibleInterFoam family: merged two-phase momentum stress modelling from compressibleInterPhaseTransportFoam

The new momentum stress model selector class
compressibleInterPhaseTransportModel is now used to select between the options:

Description
    Transport model selection class for the compressibleInterFoam family of
    solvers.

    By default the standard mixture transport modelling approach is used in
    which a single momentum stress model (laminar, non-Newtonian, LES or RAS) is
    constructed for the mixture.  However if the \c simulationType in
    constant/turbulenceProperties is set to \c twoPhaseTransport the alternative
    Euler-Euler two-phase transport modelling approach is used in which separate
    stress models (laminar, non-Newtonian, LES or RAS) are instantiated for each
    of the two phases allowing for different modeling for the phases.

Mixture and two-phase momentum stress modelling is now supported in
compressibleInterFoam, compressibleInterDyMFoam and compressibleInterFilmFoam.
The prototype compressibleInterPhaseTransportFoam solver is no longer needed and
has been removed.
2017-12-09 21:03:59 +00:00
Henry Weller
798ac98aef BUG: simpleFoam: moved createFvOptions.H into createFields.H for -postProcess option
To unsure fvOptions are instantiated for post-processing createFvOptions.H must
be included in createFields.H rather than in the solver directly.

Resolves bug-report https://bugs.openfoam.org/view.php?id=2733

BUG: porousSimpleFoam: moved createFvOptions.H into createFields.H for -postProcess option

Resolves bug-report https://bugs.openfoam.org/view.php?id=2733

BUG: solvers: Moved fvOption construction into createFields.H for post-processing

This ensures that the fvOptions are constructed for the -postProcessing option
so that functionObjects which process fvOption data operate correctly in this
mode.
2017-10-23 22:20:52 +01:00
Henry Weller
5b5c209785 ENH: chtMultiRegionFoam: Added support for single solid region post-processing
Patch contributed by Bruno Santos

Resolves patch request https://bugs.openfoam.org/view.php?id=2684
2017-09-04 17:13:42 +01:00
Andrew Heather
4cc8e9d4be Merge remote-tracking branch 'origin/master' into develop 2017-10-13 14:03:13 +01:00
mattijs
caf4971261 BUG: rhoCentralFoam: correct/clean up oriented handling. Fixes #615. 2017-10-09 14:15:39 +01:00
Andrew Heather
20267c68b4 BUG: Corrected false integer divisions. Fixes #557 2017-08-07 11:53:54 +01:00
Andrew Heather
b85457fc35 STYLE: Updated directory names for interCondensatingEvaporatingFoam solver. Fixes #533 2017-07-19 08:24:17 +01:00
Henry Weller
f8a8857cae limitTemperature: added support for multiphase solvers
Based on patch contributed by Juho Peltola, VTT

Resolves feature request https://bugs.openfoam.org/view.php?id=2572
2017-09-04 16:52:03 +01:00
Henry Weller
cf0d7a604f BUG: compressibleMultiphaseInterFoam: Corrected update of dgdt for multiple phases
Resolves bug-report https://bugs.openfoam.org/view.php?id=2677
2017-08-29 14:48:32 +01:00
Henry Weller
791e1ca2d2 Merged reactingParcelFilmFoam into reactingParcelFoam
The combined solver includes the most advanced and general functionality from
each solver including:

    Continuous phase
    Lagrangian multiphase parcels
    Optional film
    Continuous and Lagrangian phase reactions
    Radiation
    Strong buoyancy force support by solving for p_rgh

The reactingParcelFoam and reactingParcelFilmFoam tutorials have been combined
and updated.
2017-08-29 09:33:45 +01:00
Henry Weller
5cb3bb7bc6 reactingParcelFilmFoam: Added LTS support 2017-08-22 14:00:42 +01:00
Henry Weller
151f641fee compressibleInterFilmFoam::VoFSolidificationMeltingSource: New VoF solidification fvOption 2017-07-20 18:15:27 +01:00
Will Bainbridge
f180ab7249 BUG: basicSpecieMixture: Removed duplicated molecular weight mixing
Mixture molecular weight is now evaluated in heThermo like everything
else, relying on the low level specie mixing rules. Units have also been
corrected.

SpecieMixture: Pure virtual definition for W to prevent Clang warning
2017-12-01 14:21:28 +00:00
Henry Weller
dbc111e6ee ENH: compressibleInterPhaseTransportFoam: New variant of compressibleInterFoam supporting separate phase stress models
In this version of compressibleInterFoam separate stress models (laminar,
non-Newtonian, LES or RAS) are instantiated for each of the two phases allowing
for completely different modeling for the phases.

e.g. in the climbingRod tutorial case provided a Newtonian laminar model is
instantiated for the air and a Maxwell non-Newtonian model is instantiated for
the viscoelastic liquid.  To stabilize the Maxwell model in regions where the
liquid phase-fraction is 0 the new symmTensorPhaseLimitStabilization fvOption is
applied.

Other phase stress modeling combinations are also possible, e.g. the air may be
turbulent but the liquid laminar and an RAS or LES model applied to the air
only.  However, to stabilize this combination a suitable fvOption would need to
be applied to the turbulence properties where the air phase-fraction is 0.

Henry G. Weller, Chris Greenshields
CFD Direct Ltd.
2017-10-30 09:36:43 +00:00
Henry Weller
d43c3438fe ENH: coldEngineFoam, engineFoam: Update logSummary to support collated IO
Resolves bug-report https://bugs.openfoam.org/view.php?id=2739
2017-10-27 12:10:45 +01:00
Henry Weller
a45b422b75 STYLE: DPMFoam, MPPICFoam: Renamed alphaPhic -> alphaPhi.<continuous phase name>
for consistency with multiphase solvers and compatibility with the generalized
TurbulenceModels library.
2017-10-11 23:04:42 +01:00
Henry Weller
efe4a9a4b7 ENH: TurbulenceModels: Obtain the group name from alphaRhoPhi rather than U
to support multiphase solvers in which the phases have the same velocity field.
2017-10-11 21:59:32 +01:00
Will Bainbridge
99bda24907 ENH: MultiComponentPhaseModel: Included laminar diffusion in YiEqns
Resolves bug report https://bugs.openfoam.org/view.php?id=2591
2017-10-03 08:36:12 +01:00
Henry Weller
4636f190da STYLE: engineFoam: Renamed engineFoam -> XiEngineFoam and sprayEngineFoam -> engineFoam
XiEngineFoam is a premixed/partially-premixed combustion engine solver which
exclusively uses the Xi flamelet combustion model.

engineFoam is a general engine solver for inhomogeneous combustion with or
without spray supporting run-time selection of the chemistry-based combustion
model.
2017-09-19 17:01:54 +01:00
Henry Weller
01efb2c85b ENH: engineTime: Generalized to provide run-time selection of piston-motion
Standard crank-connecting rod and the new free-piston kinematics motion options
are provides, others can easily be added.

Contributed by Francesco Contino and Nicolas Bourgeois, BURN Research Group.
2017-09-19 09:26:26 +01:00
Henry Weller
d425421c0a ENH: reactingTwoPhaseEulerFoam: Added continuity fvOption term to U equations
Patch contributed by Juho Peltola, VTT
Resolves bug-report https://bugs.openfoam.org/view.php?id=2699
2017-09-15 11:43:15 +01:00
sergio
00a5b61bd2 ENH: making pcEqn.H similar to pEqn.H.
STY: Fixing syntax in rhoPimpleDyMFoam/pEqn.H
2017-06-28 14:36:25 -07:00
sergio
e5f6d3166c Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2017-06-28 08:58:50 -07:00
sergio
e98214b0ad BUG: Updating rho at the end of the pEq for rhoPimpleDyMFoam and limiting is needed 2017-06-27 15:47:53 -07:00
Henry Weller
5bab287985 compressibleInterFilmFoam: Experimental VoF solver supporting VoF<->film transfer 2017-06-27 15:55:43 +01:00
Andrew Heather
e4bfefa396 STYLE: Minor tidying 2017-06-27 11:22:03 +01:00