Commit Graph

363 Commits

Author SHA1 Message Date
Kutalmis Bercin
18bc876c93 ENH: rhoCentralFoam: add dynamic-mesh motion capabilities
ENH: discard rhoCentralDyMFoam by merging it with rhoCentralFoam
2021-12-15 10:15:37 +00:00
Andrew Heather
6be31e3feb ENH: pimpleFoam - added LTS support 2021-12-10 14:34:05 +00:00
sergio
b62306ddc5 ENH: Adding regionFaModels library to solvers 2021-07-16 16:38:06 +00:00
Mark Olesen
2a438385a3 STYLE: make polyMesh constructor explicit
- use polyMesh::defaultRegion instead of fvMesh::defaultRegion and
  others via static inheritance. (92 vs ~25 occurrences)
2021-05-12 11:24:57 +02:00
Mark Olesen
03526e2097 ENH: centralize more libraries in src/phaseSystemModels
- prelude to code refactoring

NOTE
    no source code change in this commit, only relocation,
    renaming and adjustment of Make/{files,options}
2020-08-05 18:56:22 +01:00
Andrew Heather
013a52238d COMP: some resolved compiler warnings 2020-06-25 10:02:50 +01:00
OpenFOAM bot
01ec92fd35 GIT: remove leading/trailing blank lines, trailing whitespace 2020-06-17 10:46:26 +02:00
Mark Olesen
3e43edf056 ENH: unify use of dictionary method names
- previously introduced `getOrDefault` as a dictionary _get_ method,
  now complete the transition and use it everywhere instead of
  `lookupOrDefault`. This avoids mixed usage of the two methods that
  are identical in behaviour, makes for shorter names, and promotes
  the distinction between "lookup" access (ie, return a token stream,
  locate and return an entry) and "get" access (ie, the above with
  conversion to concrete types such as scalar, label etc).
2020-06-02 17:26:03 +02:00
Mark Olesen
595579e01d COMP: use -iquotedir for including the local '.' directory
- adds into the include-quoted search list instead the general (-Idir)
  search list.

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

  * removes clutter in some Make/options files

COMP: add missing linkage libraries
2020-05-06 13:06:40 +02:00
Mark Olesen
87b3006566 STYLE: backslash doxygen commands, email address, typos in error messages 2020-01-31 17:06:30 +01:00
Andrew Heather
87bba9ae14 ENH: add selectable update control/interval to pimpleFoam, rhoPimpleFoam
- Allows user-defined control of when the mesh motion occurs,
  which can be especially useful in situations where the mesh motion
  is much slower than any of the fluid physics.

  For example, in constant/dynamicMeshDict:

      updateControl   runTime;
      updateInterval  0.5;

  to have mesh motion triggered every 1/2 second.

  Note that the _exact_ time that the mesh motion actually occurs may
  be slightly differently since the "runTime" triggering is fuzzy in
  nature. It will trigger when the threshold has been crossed, which
  will depend on the current time-step size.
2019-12-11 20:25:18 +00:00
Mark Olesen
98467036b3 STYLE: regularize quoting and exit on failed 'cd' 2019-11-13 13:19:16 +01:00
Mark Olesen
ec7e3c88e4 ENH: test for WM_PROJECT_DIR being set/unset in scripts 2019-11-06 09:18:51 +01:00
OpenFOAM bot
e9219558d7 GIT: Header file updates 2019-10-31 14:48:44 +00: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
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
mattijs
5f527c28aa ENH: rhoPimpleAdiabaticFoam: unused code 2019-03-14 12:45:02 +00:00
OpenFOAM bot
154029ddd0 BOT: Cleaned up header files 2019-02-06 12:28:23 +00: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
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
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
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
68ec561df8 STYLE: add usage notes to more utilities and solvers 2018-12-11 15:25:27 +01:00
Mark Olesen
a7a346b206 STYLE: indentation for FatalIOErrorInFunction calls 2018-11-06 09:49:22 +01: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
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
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
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
Andrew Heather
c909a5df25 GIT: resolved merge conflict 2018-06-13 14:20:18 +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
Andrew Heather
b50bbc7ef2 ENH: Added new dry-run options to solvers 2018-01-11 14:23:17 +00:00
Andrew Heather
6180e0db8b INT: Additional integration updates/clean-up 2018-05-18 10:49:10 +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
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
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
a230e8d408 STYLE: Correcting typos 2018-03-28 17:14:16 +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
sergio
9eb00fde2c BUG: Fixing creating of turbulence after overset specific in createFields.H for overRhoPimpleDyMFoam 2017-12-22 12:53:40 -08:00
sergio
5a3dfc60b6 BUG: Adding cellMask to constrainHbyA in pEq.H 2017-12-21 09:13:54 -08:00
sergio
985a18df75 Adding overPotentialFoam and overRhoSimpleFoam and tutorials 2017-12-19 11:33:43 -08:00
mattijs
ddde330884 ENH: overset: new solvers, new stencil 2017-12-08 16:00:02 +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
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