Commit Graph

20884 Commits

Author SHA1 Message Date
Will Bainbridge
66b3934ab6 ENH: foamyHexMesh: Set no refinement iterations in global dictionary
ENH: foamyHexMesh: Made default region volume type that of it's parent

Foamy surface conformation entries have a "meshableSide" entry which
controls which side of the surface is to be meshed. Typically this is
set "inside" for boundaries and "both" for baffles. A sub-region's
default entry is now taken from it's parent, rather than a specific
value (it was "inside"). This is consistent with how other entries are
handled.

surfaceConformation
{
    locationInMesh      (0 0 0);

    geometryToConformTo
    {
        baffle
        {
            featureMethod           extractFeatures;
            includedAngle           120;
            meshableSide            both; // <-- per-surface setting

            regions
            {
                disk
                {
                    meshableSide    both; // <-- per-region setting*

                    // *in this example, this entry is not needed, as it
                    // is taken from the per-surface setting above
                }
            }
        }

        // ...
    }
}

ENH: foamyHexMesh: Added (reinstated) baffle patches

A patch can now be assigned to a baffle surface. This assignment will
take precedence over any face-zones.

surfaceConformation
{
    locationInMesh      (0 0 0);

    geometryToConformTo
    {
        disk
        {
            featureMethod           extractFeatures;
            includedAngle           120;
            meshableSide            both; // <-- baffle
            patchInfo
            {
                type wall;
                inGroups (walls);
            }
        }

        // ...
    }
}

STYLE: foamyHexMesh: Switched off output of all the secondary meshes
2017-09-15 15:04:16 +01:00
Will Bainbridge
4ee0af6b08 ENH: gitignore: Added temporary vi/vim files to the ignore list 2017-10-05 09:39:48 +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
Will Bainbridge
581914f597 STYLE: fvMeshSubset: Removed debugging output 2017-09-28 08:44:56 +01:00
Will Bainbridge
a1679efa80 ENH: lagrangian: Rewrite of integration schemes and transfer terms
The integration of force and heat transfer onto the particle is
facilitated by a run-time-selectable integration scheme. These schemes
were written to generate the value at the end of an intregration step
and also an average value over the step from which the total transfer
was computed.

The average value in the Euler scheme was implemented incorrectly, which
resulted in the momentum and heat transfer processes being
non-conservative. Implementing the average correctly, however, would
have inteoduced a number of trancendental functions which would have
negated the purpose of the Euler scheme as the cheap and stable option.

The schemes have been rewritten to generate changes over the step,
rather than the final value. This change is then used to calculate the
transfers. Regardless of the scheme, this formulation is guaranteed to
be conservative, and the Euler scheme remains computationally
inexpensive.

This change was made with help from Timo Niemi, VTT
This resolves bug report https://bugs.openfoam.org/view.php?id=2666

ENH: integrationSchemes: Further simplification and optimisation

Removed templating from integration schemes, improved the name
convention, and optimised the utilisation so that the virtual call is
only made once per integration in the KinematicParcel and the
ThermoParcel.

BUG: integrationSchemes: Corrections to coupled/non-coupled force splitting

The integration splitting implemented in commit a5806207 has been shown
to be incorrect in some cases. A new procedure has been implemented
which can correctly split the implicit-explicit integral into a number
of pieces, in order to calculate the contribution of each. This is
intended for integrating coupled and non-coupled particle momentum and
heat transfers.

However, currently there is only ever one implicit coefficient used in
these transfers (there is no implicit non-coupled contribution). The
evaluation has therefore been short-cutted to only do the integration
with respect to the coupled contributions. The splitting functionality
has been retained in case additional separate implicit coefficients are
required in the future.

This change was made with help from Timo Niemi, VTT
This resolves bug report https://bugs.openfoam.org/view.php?id=2666
2017-09-20 16:06:48 +01:00
Henry Weller
2b47b72fa8 ENH: thermoSingleLayer: Reinstate support for externalWallHeatFluxTemperature 2017-09-22 11:55:18 +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
436b43b61f ENH: mergePatchPairs: Updated 2017-09-19 09:30:26 +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
Henry Weller
1ad3c4c2b1 ENH: viscosityModels::powerLaw: Changed VSMALL to SMALL to avoid potential overflow 2017-09-14 21:57:47 +01:00
Henry Weller
96bdb82918 ENH: ideasUnvToFoam: Added test for no cells (e.g. 2D mesh)
Patch contributed by Bruno Santos
Resolves patch request https://bugs.openfoam.org/view.php?id=2691
2017-09-09 22:33:06 +01:00
Henry Weller
ef9c6b5abc ENH: kinematicSingleLayer: Refactored to remove "netMass" 2017-09-06 14:20:58 +01:00
Andrew Heather
56231b5b5f STYLE: use FatalIOError and minor changes to log output 2018-05-09 12:43:11 +01:00
Andrew Heather
16f3eac7d6 ENH: reference FO - position entry is now optional 2018-05-09 12:15:43 +01:00
Andrew Heather
050628c7b1 COMP: Corrections for clang 3.7.1 2018-05-08 15:54:08 +01:00
mattijs
8c5d0cd8b2 Merge remote-tracking branch 'origin/develop' into develop 2018-05-08 13:56:16 +01:00
Andrew Heather
0d7c582293 STYLE: Minor typo corrections 2018-05-08 13:24:38 +01:00
Andrew Heather
091d847094 ENH: Added a new function object to create a field relative to a field value
Calculates and outputs a field whose values are offset to a reference
    value obtained by sampling the field at a user-specified location.

    The field values are calculated using:

    \f[
        f_c = s(f_{c,t} - f_p + f_{off})
    \f]

    where
    \vartable
        f_c     | field values at cell
        s       | optional scale factor (default = 1)
        f_{c,t} | current field values at cell at this time
        f_p     | field value at position
        f_{off} | offset field value (default = 0)
    \endvartable

Usage
    Example of function object specification to calculate the reference
field:
    \verbatim
    pRef
    {
        type        reference;
        libs        ("libfieldFunctionObjects.so");
        ...
        field       p;
        result      pRef;
        position    (0 0 0);
        scale       1.2;
        offset      100000;
    }
    \endverbatim
2018-05-08 13:19:46 +01:00
Mark Olesen
5c60cbe34d ENH: improve ensightWrite handling of moving mesh
- now treat all mesh geometries as moving, since we cannot know
  beforehand if this is the case.
2018-05-08 12:41:06 +02:00
mattijs
e3706cdc69 COMP: wallDistData: incorrect templates 2018-05-08 10:33:58 +01:00
Mark Olesen
f99880cbea ENH: add nodeValues option for ensightWrite function object (closes #734) 2018-05-08 09:51:15 +02:00
Mark Olesen
b24bd516ae ENH: write ensightWrite case on each write (closes #733)
- allows processing of the data during the calculation.
2018-05-08 09:25:07 +02:00
Mark Olesen
9531212f14 ENH: disable ensightWrite, vtkWrite function objects in post-process mode
- prevents accidental overwrite of runtime conversions.
2018-05-08 09:16:00 +02:00
Mark Olesen
dbe16de58c ENH: cleaner, more consistent ensight case surface output files
- use same data mask width as ensightCase (8 digits)

- consolidate geometry time steps with data time steps if possible,
  for a cleaner case file.
2018-05-08 08:15:31 +02:00
Mark Olesen
2f567e53de COMP: silence some compiler warnings/errors
- catch (value)
- forward declarations for operator<<()
- non-const access to Reaction name()
- spurious return statement
2018-05-07 17:21:56 +02:00
Mark Olesen
272e09b051 CONFIG: add Gcc81 2018-05-07 17:21:30 +02:00
Mark Olesen
01a313d889 BUG: collated ensight not working with isosurfaces (closes #318)
- the problem arises since the various surface writers are stateless.
  The collated output format hacks around this limitation by adding in
  its own fieldDict caching (to disk).

  Now include an updateMesh() method to hook into geometry changes.
  This is considered a stop-gap measure until the surface output
  handling is improved.
2018-05-07 16:59:15 +02:00
Mark Olesen
b0648f2ba0 ENH: improvements in the surface sampling infrastructure
- improvement documentation for surface sampling.

- can now specify alternative sampling scheme for obtaining the
  face values instead of just using the "cell" value. For example,

      sampleScheme    cellPoint;

  This can be useful for cases when the surface is close to a boundary
  cell and there are large gradients in the sampled field.

- distanceSurface now handles non-closed surfaces more robustly.
  Unknown regions (not inside or outside) are marked internally and
  excluded from consideration. This allows use of 'signed' surfaces
  where not previously possible.
2018-05-07 11:29:00 +02:00
Andrew Heather
5268b5e61d BUG: Corrected no-op in reverse transform multi-D fft - see #813 2018-05-03 14:54:09 +01:00
Mark Olesen
ef882e542a ENH: zero initialize memory for Pstream send (issue #814)
- this avoids some valgrind messages

      "Uninitialised byte(s) found during client check request"
2018-05-02 14:02:55 +02:00
Mark Olesen
6d89a3ec38 ENH: additional convenience for mpirunDebug
- a -valgrind option for logging with valgrind

- determine number of processors from system/decomposeParDict
  or -decomposeParDict if -np was not specified
2018-05-02 11:49:33 +02:00
Mark Olesen
0ea44eda59 ENH: bitSet::find_first_not() method (issue #751)
- find the position of the first bit off - symmetrical with find_first()
2018-05-02 08:33:49 +02:00
Mark Olesen
4653beaa49 ENH: report illegal cellId for getRefCellValue (FULLDEBUG)
-  this should normally not be triggered, provided that setRefCell was
   used. However, if getRefCellValue() was called without any previous
   checking on refCelli, it is possible to provoke errors.
2018-04-30 14:25:37 +02:00
Mark Olesen
b4a2876c56 ENH: use move construct for cellZone/faceZone 2018-03-07 11:28:05 +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
mattijs
2a6ac7edce BUG: nearWallFields: correct exit condition for particles. Fixes #812. 2018-04-30 13:08:58 +01:00
Mark Olesen
e2361b102f COMP: inplaceMapValue relocated to ListOps 2018-04-30 14:05:54 +02:00
Mattijs Janssens
153323e1f6 Merge branch 'feature-regionsplit' into 'develop'
Feature regionsplit

See merge request Development/OpenFOAM-plus!201
2018-04-30 11:21:45 +01:00
Mark Olesen
f3d1e41d76 COMP: label-size 64 compilation of fft (issue #813) 2018-04-30 08:24:38 +02:00
Mark Olesen
f86c129fd5 STYLE: additional comment when completion not found (issue #719)
No completion added for XXX
    ... incorrect platform, or not yet compiled?
2018-04-30 07:50:48 +02:00
Mark Olesen
ed2722745d ENH: revert regionSplit to older algorithm (issue #805)
- the algorithm was last used in OpenFOAM-2.4, after which it was
  replaced with a FaceCellWave version.

  Whereas the original (2.4.x) version exhibited performance
  degradation on very large meshes (with explicit constraints), the
  FaceCellWave version exhibited performance issues with large numbers
  of blocked faces.

  With large numbers of blocked faces, the FaceCellWave regionSplit
  could take between 10 to 100 times longer due to the slow
  propagation speed through blocked faces.

  The 2.4 regionSplit has been revamped to avoid local memory
  allocations, which appears to have been the source of the original
  performance issues on large meshes.

  For additional performance, intermediate renumbering is also avoided
  during the consolidation of regions over processor domains.
2018-04-27 15:51:33 +02: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
0743b61a3c STYLE: minor cleanup in decompositionMethod
- reduce cell looping. Avoid initial looping over blockFace.

- make early return (no processor sets, connections, or blocked faces)
  more apparent.
2018-04-26 12:36:24 +02:00
Mark Olesen
4dcd052ffc STYLE: remove old/dead decompositionMethod::calcCellCells code
- alternative calcCellCells that handled explicitConnections was
  deactivated (2014 or earlier) and finally removed APR-2018.
2018-04-27 11:16:18 +02:00
Mark Olesen
10b69fa2b4 ENH: ListOp::inplaceMapValue using a Map<label> for the mapping.
For example, with some HashTable or Map container of models

    { model0 => 1, model1 => 4, model2 => 5, model3 => 12, model4 => 15, }

specify the remapping

    Map<label> mapper({{1, 3}, {2, 6}, {3, 12}, {5, 8}});

inplaceMapValue(mapper, models) then yields

    { model0 => 3, model1 => 4, model2 => 8, model3 => 12, model4 => 15, }

--

ENH: extend bitSet::count() to optionally count unset bits instead.

--

ENH: BitOps compatibility methods for boolList.

- These ease coding that uses a boolList instead of bitSet and use
  short-circuit logic when possible.

  Eg, when 'bitset' and 'bools' contain the same information

      bitset.count()  <->  BitOps::count(bools)
      bitset.all()    <->  BitOps::all(bools)
      bitset.any()    <->  BitOps::any(bools)
      bitset.none()   <->  BitOps::none(bools)

  These methods can then be used directly in parameters or in logic.
  Eg,

      returnReduce(bitset.any(), orOp<bool>());
      returnReduce(BitOps::any(bools), orOp<bool>());

      if (BitOps::any(bools)) ...
2018-04-27 10:43:32 +02:00
Mark Olesen
c0766ce8ea STYLE: consistent '// End namespace' markers 2018-04-27 09:51:35 +02:00
mattijs
a9fbaa4b08 ENH: volPointInterpolate: improved debug message 2018-04-26 17:08:50 +01:00
mattijs
a645b2b5c8 BUG: annularThermalMixer: incorrect shm setup. Fixes #811. 2018-04-25 11:43:52 +01:00
Mark Olesen
0226485c77 BUG: extraneous '}' in FULLDEBUG 2018-04-26 14:49:49 +02:00