Commit Graph

2325 Commits

Author SHA1 Message Date
16b559c109 fvOptions: limitVelocity: Fixed the correction factor
Resolves bug report https://bugs.openfoam.org/view.php?id=2634
2017-07-27 15:16:36 +01:00
4a8a2635bb surfaceFilmModels::filmViscosityModels: Corrected docs 2017-07-26 16:12:58 +01:00
b8e4b8134f surfaceFilmModels::function1Viscosity: New viscosity modifier
Description
    The Foam::Function1 temperature-dependent viscosity model multiplies the
    viscosity of a base model by a Function1 temperature function.
2017-07-26 15:01:08 +01:00
b11b28db06 surfaceFilmModels::transferModelList: Resolve problem with the Intel C++ compiler 2017-07-25 12:19:37 +01:00
3fba921563 POSIX::fileStat: Avoid warning from gcc 2017-07-25 00:03:09 +01:00
d1b59e976d MULES: Improve handling of very small geometries 2017-07-24 10:35:54 +01:00
c6f365f6cc refineMesh: Correct parallel operation
Patch contributed by Mattijs Janssens
Resolves bug-report https://bugs.openfoam.org/view.php?id=2621
2017-07-22 22:39:40 +01:00
0c4175bec7 surfaceFilmModels: 0.333 -> 1.0/3.0 and 0.666 -> 2.0/3.0
Resolves bug-report https://bugs.openfoam.org/view.php?id=2629
2017-07-21 17:38:31 +01:00
53a524a280 Simplified scalar(0.0) -> scalar(0) and scalar(1.0) -> scalar(1) 2017-07-21 17:37:37 +01:00
1937f7bca2 Radiation: Renamed Qin -> qin, Qem -> qem for consistency with qr
See also commit 8aac0a1808
2017-07-21 09:25:52 +01:00
e879da1341 lagrangian: Fixed infinite loops
Tracking through an inverted region of the mesh happens in a reversed
direction relative to a non-inverted region. Usually, this allows the
tracking to propagate normally, regardless of the sign of the space.
However, in rare cases, it is possible for a straight trajectory to form
a closed loop through both positive and negative regions. This causes
the tracking to loop indefinitely.

To fix this, the displacement through inverted regions has been
artifically increased by a small amount (1% at the moment). This has the
effect that the change in track fraction over the negative part of the
loop no longer exactly cancels the change over the positive part, and
the track therefore terminates.
2017-07-19 16:56:58 +01:00
177d1d762c reactingOneDim: Correct reporting of temperature range in parallel
Patch Contributed by Karl Meredith, FM Global.
Resolves bug-report https://bugs.openfoam.org/view.php?id=2621
2017-07-19 12:45:23 +01:00
829a109b2f New BCs: Updated for clang 2017-07-17 17:02:42 +01:00
01fe45deef New BCs: Updated for single-precision compilation 2017-07-17 16:54:48 +01:00
12d5d001d2 matchedFlowRateOutletVelocity: New flow-rate outlet BC
Velocity outlet boundary condition which corrects the extrapolated velocity
to match the flow rate of the specified corresponding inlet patch.
2017-07-17 15:48:39 +01:00
a10d2c3b3a swirlInletVelocity: New general swirl inlet BC
which support the specification of the individual velocity components (axial,
radial and tangential) as Function1s.
2017-07-17 15:47:24 +01:00
4fa0192e1d flowRateInletVelocity extrapolated: Removed reverse flow and correct only the normal component
Improved stability and convergence.
2017-07-17 12:18:47 +01:00
ba50e560aa flowRateInletVelocity, flowRateOutletVelocity BCs: Updated docs 2017-07-16 22:59:30 +01:00
ddc01e5b8c flowRateOutletVelocityFvPatchVectorField: Outlet equivalent of flowRateOutletVelocityFvPatchVectorField BC
Velocity outlet boundary condition which corrects the extrapolated velocity to
match the specified flow rate.
2017-07-16 21:36:32 +01:00
702a4274cd decompositionModel: Corrected support for "-case" option to decomposePar
Patch contributed by Mattijs Janssens
Resolves bug-report https://bugs.openfoam.org/view.php?id=2610
2017-07-14 23:22:36 +01:00
549337c367 triSurfaceMesh: corrected parallel operation of 'file' specification
Patch contributed by Mattijs Janssens
Resolves bug-report https://bugs.openfoam.org/view.php?id=2614
2017-07-14 12:38:21 +01:00
81c4f1ee8a lagrangian: Corrected patch data
The KinematicCloud::patchData method has been made consistent on moving
meshes and/or when the time-step is being sub-cycled.

It has also been altered to calculate the normal component of a moving
patch's velocity directly from the point motions. This prevents an
infinite loop occuring due to inconsistency between the velocity used to
calculate a rebound and that used when tracking.

Some minor style improvements to the particle class have also been made.
2017-07-14 09:46:23 +01:00
96b8cfc541 tmpNrc: Updated to use clone 2017-07-14 09:32:02 +01:00
11e4a71463 Function1: made the clone function pure virtual
Avoids potential problems with derived classes which do not define a clone function.
2017-07-13 23:24:14 +01:00
205ab925e5 swirlFlowRateInletVelocity: updated documentation 2017-07-13 17:05:44 +01:00
61459c0e7f Function1::ramp function: Added clone function 2017-07-13 17:04:33 +01:00
fc4101df16 cylindricalInletVelocityFvPatchVectorField: Rationalized naming convention
for consistency with other rotating BCs.
2017-07-13 16:09:11 +01:00
371bec2048 swirlFlowRateInletVelocity: Added support for specifying the origin and axis of rotation 2017-07-13 16:08:30 +01:00
593df2e92a Removed unintended integer divisions 2017-07-13 09:23:11 +01:00
4d6a47972f surfaceFilmModels::phaseChange: Updated energy transfer for consistency energy equation
Currently heat is assumed to be removed by heat-transfer to the wall so the
energy remains unchanged by the phase-change.  This approximation can only be
removed if the interface to the transfer models is extended to support transfers
to and from the film AND the primary region.
2017-07-12 14:30:38 +01:00
b4e88f260b masterUncollatedFileOperation: Updated to avoid warning from clang 2017-07-11 15:11:38 +01:00
4e024cd274 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2017-07-10 12:26:35 +01:00
8b8e5b9492 functionObjects::residuals: Writes "N/A" for fields not solved
Patch contributed by Bruno Santos
Resolves bug-report https://bugs.openfoam.org/view.php?id=2608
2017-07-10 12:23:52 +01:00
f3ef79b829 ParticleCollector: Prevented missing and duplicate collections
The particle collector was collecting some particles twice due to a
tolerance extending the tracked path. This has been removed. The new
tracking algorithm does not generate the same sorts of spurious
tolerance-scale motions that the old one did, so this extension of the
tracking path is unnecessary.

Some particles were also not being collected at all as they were hitting
a diagonal of the collection polygon and registering as not having hit
either of the adjacent triangles. The hit criteria has been rewritten. A
hit now occurs when the normals of the triangles created by joining the
intersection point with the polygon edges are all in the same direction
as the overall polygon normal. This calculation is not affected by the
polygon's diagonals.

The issue was raised by, and resolved with support from, Karl Meredith
at FM Global.

This resolves bug-report https://bugs.openfoam.org/view.php?id=2595
2017-07-10 09:36:45 +01:00
784d28d440 thermoSingleLayer::q: Use a local "alpha" without hydrophilic/phobic adjustment
Resolves bug-report https://bugs.openfoam.org/view.php?id=2605
2017-07-10 08:25:09 +01:00
ab06d3f14e masterOFstream: Rename private function to avoid clash with virtual function of same name 2017-07-07 21:04:03 +01:00
5f1a8f824b fileHandler::collatedFileOperation: Added useful message concerning threading control 2017-07-07 20:49:53 +01:00
58ebb37b9b masterUncollatedFileOperation: Renamed filePath to avoid conflict with virtual function
Avoids warning from clang
2017-07-07 14:09:18 +01:00
7c301dbff4 Parallel IO: New collated file format
When an OpenFOAM simulation runs in parallel, the data for decomposed fields and
mesh(es) has historically been stored in multiple files within separate
directories for each processor.  Processor directories are named 'processorN',
where N is the processor number.

This commit introduces an alternative "collated" file format where the data for
each decomposed field (and mesh) is collated into a single file, which is
written and read on the master processor.  The files are stored in a single
directory named 'processors'.

The new format produces significantly fewer files - one per field, instead of N
per field.  For large parallel cases, this avoids the restriction on the number
of open files imposed by the operating system limits.

The file writing can be threaded allowing the simulation to continue running
while the data is being written to file.  NFS (Network File System) is not
needed when using the the collated format and additionally, there is an option
to run without NFS with the original uncollated approach, known as
"masterUncollated".

The controls for the file handling are in the OptimisationSwitches of
etc/controlDict:

OptimisationSwitches
{
    ...

    //- Parallel IO file handler
    //  uncollated (default), collated or masterUncollated
    fileHandler uncollated;

    //- collated: thread buffer size for queued file writes.
    //  If set to 0 or not sufficient for the file size threading is not used.
    //  Default: 2e9
    maxThreadFileBufferSize 2e9;

    //- masterUncollated: non-blocking buffer size.
    //  If the file exceeds this buffer size scheduled transfer is used.
    //  Default: 2e9
    maxMasterFileBufferSize 2e9;
}

When using the collated file handling, memory is allocated for the data in the
thread.  maxThreadFileBufferSize sets the maximum size of memory in bytes that
is allocated.  If the data exceeds this size, the write does not use threading.

When using the masterUncollated file handling, non-blocking MPI communication
requires a sufficiently large memory buffer on the master node.
maxMasterFileBufferSize sets the maximum size in bytes of the buffer.  If the
data exceeds this size, the system uses scheduled communication.

The installation defaults for the fileHandler choice, maxThreadFileBufferSize
and maxMasterFileBufferSize (set in etc/controlDict) can be over-ridden within
the case controlDict file, like other parameters.  Additionally the fileHandler
can be set by:
- the "-fileHandler" command line argument;
- a FOAM_FILEHANDLER environment variable.

A foamFormatConvert utility allows users to convert files between the collated
and uncollated formats, e.g.
    mpirun -np 2 foamFormatConvert -parallel -fileHandler uncollated

An example case demonstrating the file handling methods is provided in:
$FOAM_TUTORIALS/IO/fileHandling

The work was undertaken by Mattijs Janssens, in collaboration with Henry Weller.
2017-07-07 11:39:56 +01:00
c1cb13307b interpolation: Optimise by using particle local coordinates
This change changes the point-tetIndices-face interpolation function
method to take barycentric-tetIndices-face arguments instead. This
function is, at present, only used for interpolating Eulerian data to
Lagrangian particles.

This change prevents an inefficiency in cellPointInterpolation whereby
the position of the particle is calculated from it's barycentric
coordinates, before immediately being converted back to barycentric
coordinates to perform the interpolation.
2017-07-05 14:38:15 +01:00
14cc288672 tetrahedron: triangle: Improved barycentric handling on tets and tris
Updated the tetrahedron and triangle classes to use the barycentric
primitives. Removed duplicate code for generating random positions in
tets and tris, and fixed bug in tri random position.
2017-07-05 14:37:53 +01:00
7a2c87c10f MPPIC: Optimised the averaging methods
The averaging methods now take the particle barycentric coordinates as
inputs rather than global positions. This change significantly optimises
Dual averaging, which is the most commonly used method. The run time of
the lagrangian/MPPICFoam/Goldschmidt tutorial has been reduced by a
factor of about two.
2017-07-05 14:27:20 +01:00
3a85d0c91a tetIndices: Removed duplicate logic
The logic for generating tetrahedra from a face base point and an offset
was duplicated in a few places. It is now confined to the tetIndices
class.
2017-07-05 14:24:37 +01:00
1b377dd439 interfaceHeight: Improved the description 2017-06-30 12:08:00 +01:00
2d866e281b compressibleInterFilmFoam::VoFPatchTransfer: corrected parallel handling of all patch option 2017-06-28 15:03:40 +01:00
0c24327b32 functionObjects::fieldMinMax: corrected parallel operation of the file logging 2017-06-28 14:20:28 +01:00
791cc32c45 kinematicSingleLayer: Updated primaryMassTrans() 2017-06-28 11:25:38 +01:00
2a6601e1ca surfaceFilmModels::transferModels: Now defaults to a null list for backward-compatibility 2017-06-27 21:45:53 +01:00
d74f354f0c compressibleInterFilmFoam: Experimental VoF solver supporting VoF<->film transfer 2017-06-27 15:55:43 +01:00
9a4851faf9 lagrangian::InjectionModels: Corrected documentation 2017-06-27 08:24:18 +01:00