Commit Graph

2325 Commits

Author SHA1 Message Date
4f3c3eaab1 functionObjects: phaseScalarTransport: Made writing of alpha*s switchable 2019-02-18 15:20:40 +00:00
c56f2a2e15 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2019-02-18 12:29:06 +00:00
d2bddb8cca pressureControl: Added p.correctBoundaryConditions() after the pressure limiting
to ensure boundary consistency.
2019-02-18 12:26:52 +00:00
a86fe1f3ac functionObjects: phaseScalarTransport: Solution control update 2019-02-15 16:55:18 +00:00
111cdf3a65 solutionControl: Renaming and improved final logic
The sub-loops of the solution control are now named more consistently,
with ambiguously named methods such as finalIter replaced with ones
like finalPimpleIter, so that it is clear which loop they represent.

In addition, the final logic has been improved so that it restores state
after a sub-iteration, and so that sub-iterations can be used on their
own without an outer iteration in effect. Previously, if the
non-orthogonal loop were used outside of a pimple/piso iteration, the
final iteration would not execute with final settings.
2019-02-15 16:55:11 +00:00
7b1840c7d3 functionObjects: Added phaseScalarTransport function
This is like the scalarTrasport function except that the transported
scalar is confined to a single phase of a multiphase simulation. In
addition to the usual specification for the scalarTransport function
(i.e., a field, schemes and solution parameters), the user needs to
specify the phase-flux or a pressure field which can be used to generate
it.

Example usage for interFoam:

    phaseScalarTransport1
    {
        type            phaseScalarTransport;
        libs            ("libsolverFunctionObjects.so");

        field           s.water;
        p               p_rgh;
    }

Example usage for reactingTwoPhaseEulerFoam:

    phaseScalarTransport1
    {
        type            phaseScalarTransport;
        libs            ("libsolverFunctionObjects.so");

        field           s.water;
        alphaPhi        alphaRhoPhi.water;
        rho             thermo:rho.water;
    }

The function will write out both the per-unit-phase field that is solved
for (s.water in the above examples) and also the mixture-total field
(alphaS.water), which is often more convenient for post-processing.
2019-02-15 10:56:33 +00:00
dfc10f67a4 equationOfState::perfectFluid: Added Cp departure function 2019-02-14 10:11:00 +00:00
7a398ae297 specie::thermo: Added better diagnostics to the energy->temperature iteration
If the iteration fails it now re-runs the iteration printing the temperature,
energy, heat-capacity and updated temperature for each iteration to help
diagnose which of the properties is causing the convergence failure.
2019-02-14 10:08:28 +00:00
ea02796f31 particle: Fixed ACMI transfers
The optimisation work done as commit 81947c80 introduced a failure mode
where an ACMI interaction could repeat indefinitely. This has now been
corrected.

Resolves bug report https://bugs.openfoam.org/view.php?id=3166
2019-02-12 15:33:16 +00:00
682caa71b1 Revert "snappyHexMesh: Changed the default for the writing of pointLevels and cellLevels files in the polyMesh directory"
This reverts commit 799db4d958.
2019-02-12 09:41:00 +00:00
c59c82ac0e radiationModels: Relocation, namespace changes, and fixed Qdot access
The radiation modelling library has been moved out of
thermophysicalProperties into the top-level source directory. Radiation
is a process, not a property, and belongs alongside turbulence,
combustion, etc...

The namespaces used within the radiation library have been made
consistent with the rest of the code. Selectable sub-models are in
namespaces named after their base classes. Some models have been
renamed remove the base type from the suffix, as this is unnecessary.
These renames are:

    Old name:                       New name:

    binaryAbsorptionEmission        binary
    cloudAbsorptionEmission         cloud
    constantAbsorptionEmission      constant
    greyMeanAbsorptionEmission      greyMean/greyMeanCombustion
    greyMeanSolidAbsorptionEmission greyMeanSolid
    wideBandAbsorptionEmission      wideBand/wideBandCombustion

    cloudScatter                    cloud
    constantScatter                 constant

    mixtureFractionSoot             mixtureFraction

Some absorption-emission models have been split into versions which do
and don't use the heat release rate. The version that does has been
given the post-fix "Combustion" and has been moved into the
combustionModels library. This removes the dependence on a registered
Qdot field, and makes the models compatible with the recent removal of
that field from the combustion solvers.
2019-02-11 08:38:56 +00:00
11fa53fb66 blockMeshMerge: Minor update for consistency with the "fast" algorithm 2019-02-08 15:16:20 +00:00
c81abfef05 isoSurface: Fix for isoSurface 'eroding' surfaces down to nothing
The occurrence is from cells with vertices that are shared between two faces
only (these vertices can originate from hex refinement). Decomposing both faces
can occasionally produce triangles with identical vertices and this results in a
non-manifold edge which triggers the erosion procedure.

Avoided by detecting cells with these special vertices and making sure the tet-decomposition
never uses the same points on the faces using them.

Patch contributed by Mattijs Janssens
2019-02-08 14:45:54 +00:00
57a7e718b9 sampling: lineFace: Filtering of duplicate segments
Sometimes the initial point and boundary intersection searches can
generate duplicate information which can lead to line-type sampled sets
having duplicated points. This change explicitly filters these
additional points out, so that the resulting set is optimal.

Resolves bug report https://bugs.openfoam.org/view.php?id=3161
2019-02-07 11:34:41 +00:00
960baec5ef particle: Improve robustness of tracking along edges
The tracking hit criteria have been modified slightly so that particles
do not exit a tetrahedron due to a local displacement smaller than the
round-off error. This prevents unresolvable interactions along edges
where the particle considers itself to be leaving every tet along the
edge.
2019-02-07 11:31:31 +00:00
d31f4f7aae freestream[Pressure|Velocity]FvPatchScalarField: Updated for clang 2019-02-05 22:11:23 +00:00
d3a02cff1e freestreamVelocity/Pressure BC: stabilise in the limit of mag(Up) = 0 2019-02-04 20:55:37 +00:00
015ad0a0a0 specieCoeffs: Separated from the Reaction class 2019-02-04 18:10:56 +00:00
e600bb0482 dynamicCode: Trigger recompile on changes to options and libs 2019-02-04 15:15:19 +00:00
b292fc6d8d radiation: Changed to dictionary constructors for dimensioned types
This allows coefficients of the constantAbsorptionEmission and
constantScatter to be entered as pure numbers, with the name and
dimensions set automatically, rather than having to specify them
manually.
2019-02-04 09:18:37 +00:00
528dccc094 dynamicCode: Fixed handling of options and libs 2019-02-04 09:18:36 +00:00
220ba4989d src/OpenFOAM/Make/files: Added incGamma.C
Patch contributed by Institute of Fluid Dynamics, Helmholtz-Zentrum
Dresden - Rossendorf (HZDR)
2019-02-02 14:39:39 +00:00
f24a901084 scalar: Added incomplete gamma functions
Patch contributed by Institute of Fluid Dynamics, Helmholtz-Zentrum
Dresden - Rossendorf (HZDR)
2019-02-02 14:38:15 +00:00
5afec3aae0 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2019-02-01 14:10:22 +00:00
67cfa3f257 reactingMultiphaseEulerFoam::multiphaseSystem: Applied the new generalised subCycle
which now handles lists of fields.  This avoids problems with the interaction
between sub-cycling and outer-iteration.
2019-02-01 14:08:49 +00:00
700f11fa11 dynamicCode: Put code entries on a list
The dynamic code functionality has been generalised so that the names of
the code entries in the specifying dictionary can be set by the caller.
This means that functions which utilise dynamic code but use different
entry names (e.g., codedFunctionObject uses codeExecute, codeEnd,
etc..., instead of code) now function correctly. The differently named
entries now form part of the library hash, and re-building triggers
appropriately as they are modified.
2019-02-01 09:17:26 +00:00
0497d2a170 snappyHexMesh: Per-patch face merging options
Face merging in the layer addition phase can now be controlled at a
per-patch level. By default, faces that are connected to the same cell
and patch, and which do not differ in orientation by more than the
planar angle, are merged if the patch they belong to is associated with
meshed geometry. This has not changed, but it can now be overridden with
a new "mergeFaces" keyword. This can be set in addLayersControls to
control the default behaviour on all patches, and it can be overridden
in the layer settings associated with each patch. For example:

addLayersControls
{
    mergeFaces true; // <-- Merge faces on all patches, not just those
                     // associated with geometry

    layers
    {
        wall1
        {
            nSurfaceLayers 2;
        }
        wall2
        {
            nSurfaceLayers 2;
            mergeFaces false; // <-- Do not merge faces on this patch
        }
    }
}

In addition, the patch-association has been fixed so that faces are no
longer merged on patches which are set not to merge, but are
cell-connected to patches which are.

This change makes it possible to guarantee that the surface mesh retains
the same geometry before and after layer addition, and therefore add
layers to coupled interfaces.
2019-01-31 09:00:18 +00:00
799db4d958 snappyHexMesh: Changed the default for the writing of pointLevels and cellLevels files in the polyMesh directory
These files are now only written if the "refinement" write flag is set:

writeFlags
(
    .
    .
    .
    refinement
);
2019-01-30 17:50:23 +00:00
20cefd3b81 timeVaryingMappedFixedValueFvPatchField: Corrected rmap of the timeVaryingMappedFvPatchField 2019-01-30 11:43:46 +00:00
e5532ff568 Changed writeKeyword to the new simpler writeEntry form where appropriate 2019-01-29 22:32:42 +00:00
8b4f866b51 timeVaryingMappedFixedValueFvPatchField: Refactored so the underlying mapping function can be used in other BCs
The new patch field mapping class timeVaryingMappedFvPatchField has been
factored out of the timeVaryingMappedFixedValueFvPatchField BC so that it can be
used to map data onto fields stored within other BCs.

In the process the writeEntryIfDifferent function had to be moved from
fvPatchField to dictionary so that it can still be used in the
timeVaryingMappedFvPatchField class and it made good sense to create the
non-conditional variant writeEntry to simplify the patch field write functions.
This rationalisation has been propagated all other patch fields.
2019-01-29 10:09:38 +00:00
f070388e5b liquidProperties::N2: Corrected mu coefficient
Resolves bug-report https://bugs.openfoam.org/view.php?id=3136
2019-01-28 17:37:56 +00:00
4221e43dfc combustion: Removed Qdot field from solvers
The Qdot field has been removed from all reacting solvers, in favour of
computing on the fly whenever it is needed. It can still be generated
for post-processing purposes by means of the Qdot function object. This
change reduces code duplication and storage for all modified solvers.

The Qdot function object has been applied to a number of tutorials in
order to retain the existing output.

A fix to Qdot has also been applied for multi-phase cases.
2019-01-24 14:29:17 +00:00
dc25f10202 combustionModels: Added Qdot function object
This function object writes out the heat release rate field for a
combustion model. This is useful for solvers where combustion is
optional, and which do not therefore write out the heat release rate by
default; e.g., chtMultiRegionFoam and reactingTwoPhaseEulerFoam.
2019-01-24 10:10:05 +00:00
faf6e24ba3 motionSolvers::motionSolverList: New motion solver where the motion of the mesh specified as a list of motion solvers
The motion solvers are executed in order and the resulting displacements
accumulated into an overall displacement and the displaced point positions
returned.

This functionality replaces the dynamicMotionSolverListFvMesh class with the
equivalent specification of a "solvers" list rather than a "solver" entry in
dynamicMeshDict e.g.

dynamicFvMesh   dynamicMotionSolverFvMesh;

solvers
(
    Rotor
    {
        solver solidBody;

        solidBodyCoeffs
        {
            cellZone region1;

            solidBodyMotionFunction rotatingMotion;

            rotatingMotionCoeffs
            {
                origin        (0 0 0);
                axis          (0 0 1);
                omega         100; // rad/s
            }
        }
    }

    Piston
    {
        solver velocityComponentLaplacian;

        motionSolverLibs ("libfvMotionSolvers.so");

        velocityComponentLaplacianCoeffs
        {
            component       z;
            diffusivity  inverseDistance 1(wall1);
        }
    }
);
2019-01-23 16:37:08 +00:00
f96a431bc0 functionObject::age: Changed from "execute" to "write" control 2019-01-22 15:12:25 +00:00
457c02e63f sampledSurface::writers:noSurfaceWriter: new rational and consistent class to disable surface writing
Selected by

    surfaceFormat none;

rather than the previous inconsistent

    surfaceFormat null;
2019-01-22 11:10:24 +00:00
8baec3bc5d sampledSurface: Created a sampledSurfaces namespace for the sampledSurface classes
to rationalise the structure and class names to avoid the need for the confusing
addNamedToRunTimeSelectionTable and use instead use the standard
addToRunTimeSelectionTable to populate the run-time selection table.
2019-01-21 19:58:18 +00:00
cd8aee2d76 PrimitivePatch: Simplified templating 2019-01-21 09:08:03 +00:00
19c3584d4b functionObject::timeControl: Rationalised naming timeStart -> startTime, timeEnd -> endTime
Support for timeStart and timeEnd is maintained for backward-compatibility but
these names are deprecated.
2019-01-18 13:41:08 +00:00
9038c49a18 functionObjects::age: Added support for relaxation 2019-01-18 13:13:01 +00:00
f4e92c3322 vtkUnstructuredReader: Added support for VTK files with METADATA
Patch contributed by Timo Niemi, VTT.
Resolves patch request https://bugs.openfoam.org/view.php?id=3149
2019-01-16 11:23:01 +00:00
18cda8d02c vtkUnstructuredReader: Added support for VTK files with METADATA
Patch contributed by Timo Niemi, VTT.
Resolves patch request https://bugs.openfoam.org/view.php?id=3149
2019-01-16 10:02:51 +00:00
ce8ccc483b kOmega: Added missing dummy source functions 2019-01-11 08:58:04 +00:00
f5d684b034 kOmega: Added support for k and omega sources in derived models
Updated sources to use internal fields.
2019-01-10 10:39:52 +00:00
66c26af922 mesh manipulation utilities: Rationalized field handling and added -noFields option 2019-01-08 21:10:19 +00:00
b9ecc29687 basicChemistryModelTemplates: Added a space in message 2019-01-08 16:44:20 +00:00
7957f3a8fd waves: Added waveInletOutlet condition
This is an inlet-outlet condition where the inlet value differs above
and below a wave interface. It can be used as follows:

    inlet
    {
        type    waveInletOutlet;
        inletValueAbove 0.01;
        inletValueBelow 0.1;
    }
2019-01-04 12:00:41 +00:00
70021b1268 fvPatchField: Corrected propagation of patchType
The construction of some patch fields has been corrected so that the
patchType setting always propagates on mapping, IO, clone, etc...
Dictionary and mapping-based patch field constructors now call the
corresponding constructor from the base class, regardless of whether
dictionary settings or mapping are actually needed.

A "mappingRequired" flag has been added to some of the base constructors
in order to prevent unecessary mapping of field data and retain the
previous level of optimisation.

Resolves bug report https://bugs.openfoam.org/view.php?id=3144
2019-01-04 10:01:17 +00:00
5da333af44 snappyHexMesh: Removed unused references 2019-01-04 10:01:17 +00:00