Mixture molecular weight is now evaluated in heThermo like everything
else, relying on the low level specie mixing rules. Units have also been
corrected.
This is a quick fix. What actually needs doing is the Random and
cachedRandom classes need rewriting in terms of the random number
functionality in the C++11 STL. These can be initialised/seeded
per-object, which makes this sort of bug go away.
This resolves bug report https://bugs.openfoam.org/view.php?id=2772
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
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)
);
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.
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.
The method used to calculate area overlaps between coupled AMI patches
has been made run-time selectable from the polyPatch dictionary. This
has primarily been done to facilitate the selection of the new swept AMI
method. The selection can be made within the constant/polyMesh/boundary
file as follows:
AMI1
{
type cyclicAMI;
inGroups 2(cyclicAMI rotating);
nFaces 524;
startFace 37176;
matchTolerance 0.0001;
transform unknown;
neighbourPatch AMI2;
method sweptFaceAreaWeightAMI; // <-- new entry
}
AMI2
{
type cyclicAMI;
inGroups 2(cyclicAMI rotating);
nFaces 524;
startFace 37700;
matchTolerance 0.0001;
transform unknown;
neighbourPatch AMI1;
method sweptFaceAreaWeightAMI; // <-- new entry
}
This can also be done within the patch specification section of the
blockMeshDict, or within a createBafflesDict.
The default remains the faceAreaWeightAMI method.
This change tests all edges when breaking strings, not just those
connected to collapsing cells. In rare cases a cell can collapse despite
none of it's connected edges being marked as collapsing, because enough
of it's points collapse together via other edges.
Another exception has been added to globalIndexAndTransform to prevent
transformations being generated from coupled patch pairs marked with
coincident-full-match transformations. Foamy generates such patches, and
the faces on them at intermediate stages of meshing can be degenerate,
making the calculation of transformations unreliable. This change
enforces the definition that coincident-full-match patch pairs are not
transformed.
In the event that matching centroids across a coupled patch pair fails,
we fall back to matching the face point average. The latter can be
obtained more reliably on degenerate faces as the calculation does not
involve division by the face area.
This fallback was already implemented as part of processorPolyPatch.
This change also applies it to the faceCoupleInfo class used by
reconstructParMesh.
Description
This boundary conditions interpolates the values from a set of supplied
points in space and time.
By default the data files should be provide in
constant/boundaryData/\<patch name\>/ directory:
- points : pointField of locations
- \<time\>/\<field\> : field of values at time \<time\>
Alternatively the names and locations of the points and field files may be
specified explicitly via the optional dictionary entries:
- dataDir \<optional top-level directory of the points and field data>;
- points \<optional path including name of points file relative to
dataDir\>;
- sample \<optional name of the sub-directory in the time directories
containing the fields\>;
This is particularly useful when mapping data from another case for which
the \c sample \c functionObject is used to obtain the patch field data for
mapping.
For example to specify that the point and field data should be mapped from
<source case name> the patch boundary condition would be written
<patch name>
{
type timeVaryingMappedFixedValue;
dataDir "../<source case name>/postProcessing/sample";
points "0/<sample name>/faceCentres";
sample <sample name>;
}
In the above the source case directory is referred to relative to the current
case but the file and directory names are expanded so that environment variables
may be used.
This method projects the source patch to the target using the point
normals. The projection fills space, which results in target weights
that correctly sum to unity. A source patch face can still project onto
an area larger or smaller than the face, so the source weights do not
(in general) sum to unity as a result of this method.
This has not been made the default AMI method. Further investigation is
needed to asses the benefits of this sort of projection.
The maximum walk angle determines the angle at which the face-face walk
stops. For some methods, this prevents calculation of overlaps on pairs
of faces which do not project on to each other. Derived AMI methods can
now override this angle as appropriate for their projection procedure.
The patch magSf calculation has been changed so that it uses the same
triangulation as the overlap algorithm. This improves consistency and
means that for exactly conforming patches (typically before any mesh
motion) the weights do not require normalisation.
so the write thread does not have to do any parallel communication. This avoids
the bugs in the threading support in OpenMPI.
Patch contributed by Mattijs Janssens
Resolves bug-report https://bugs.openfoam.org/view.php?id=2669