Pressure reduction is now applied only for entrained flow, fixed pressure is
applied to outflow to improve stability for complex recirculating flow exiting
the domain. This is the same approach used in the totalPressure boundary
condition.
The code relating to extending refinement to the span of the facet/triangles
intersected by the refinement distance referred to in report
https://bugs.openfoam.org/view.php?id=3361
and temporarily removed may now be selected by the optional
castellatedMeshControls:extendedRefinementSpan entry in snappyHexMeshDict. It
in not clear if this control is generally beneficial and very few users have
reported a preference and too few example cases have been provided to make a
balanced judgement so it has been decided to reinstate the previous default
behaviour and default extendedRefinementSpan to true.
Sampled sets and streamlines now write all their fields to the same
file. This prevents excessive duplication of the geometry and makes
post-processing tasks more convenient.
"axis" entries are now optional in sampled sets and streamlines. When
omitted, a default entry will be used, which is chosen appropriately for
the coordinate set and the write format. Some combinations are not
supported. For example, a scalar ("x", "y", "z" or "distance") axis
cannot be used to write in the vtk format, as vtk requires 3D locations
with which to associate data. Similarly, a point ("xyz") axis cannot be
used with the gnuplot format, as gnuplot needs a single scalar to
associate with the x-axis.
Streamlines can now write out fields of any type, not just scalars and
vectors, and there is no longer a strict requirement for velocity to be
one of the fields.
Streamlines now output to postProcessing/<functionName>/time/<file> in
the same way as other functions. The additional "sets" subdirectory has
been removed.
The raw set writer now aligns columns correctly.
The handling of segments in coordSet and sampledSet has been
fixed/completed. Segments mean that a coordinate set can represent a
number of contiguous lines, disconnected points, or some combination
thereof. This works in parallel; segments remain contiguous across
processor boundaries. Set writers now only need one write method, as the
previous "writeTracks" functionality is now handled by streamlines
providing the writer with the appropriate segment structure.
Coordinate sets and set writers now have a convenient programmatic
interface. To write a graph of A and B against some coordinate X, in
gnuplot format, we can call the following:
setWriter::New("gnuplot")->write
(
directoryName,
graphName,
coordSet(true, "X", X), // <-- "true" indicates a contiguous
"A", // line, "false" would mean
A, // disconnected points
"B",
B
);
This write function is variadic. It supports any number of
field-name-field pairs, and they can be of any primitive type.
Support for Jplot and Xmgrace formats has been removed. Raw, CSV,
Gnuplot, VTK and Ensight formats are all still available.
The old "graph" functionality has been removed from the code, with the
exception of the randomProcesses library and associated applications
(noise, DNSFoam and boxTurb). The intention is that these should also
eventually be converted to use the setWriters. For now, so that it is
clear that the "graph" functionality is not to be used elsewhere, it has
been moved into a subdirectory of the randomProcesses library.
To support mesh redistribution for load-balancing etc. all MeshObjects requiring
a special updateMesh(const mapPolyMesh&) function will also require a
distribute(const mapDistributePolyMesh&) to handle the redistribution of
no-field and unregistered mesh-related state data.
Fortunately there are not many MeshObjects requiring a special distribute(const
mapDistributePolyMesh&) implementation but it will take some time to implement
and test all those that do; this patch provides those for displacement-based
mesh-movers.
wallHeatFlux can now be used to calculate the phase wall heat-flux in
multiphase systems, e.g.
multiphaseEulerFoam -postProcess -func 'wallHeatFlux(phase=water)' -latestTime
wallShearStress can now be used to calculate the phase wall shear-stress in
multiphase systems, e.g.
multiphaseEulerFoam -postProcess -func 'wallShearStress(phase=water)' -latestTime
Description
This boundary condition provides an entrainment condition for pressure
including support for supersonic jets exiting the domain.
Usage
\table
Property | Description | Required | Default value
rho | Density field name | no | rho
psi | Compressibility field name | no | thermo:psi
gamma | Heat capacity ratio (cp/Cv) | yes |
phi | Flux field name | no | phi
p0 | Reference pressure | yes |
\endtable
Example of the boundary condition specification:
\verbatim
<patchName>
{
type transonicEntrainmentPressure;
gamma 1.4;
p0 uniform 1e5;
}
\endverbatim
See also
Foam::entrainmentPressureFvPatchScalarField
Foam::mixedFvPatchField
For some systems the thermal coupling between the solid and fluid regions
dominates overall convergence and it may be beneficial to sub-iterate over the
thermal system as the energy solution is cheaper than the pressure-velocity
system. To test this the new optional nEcorr entry in system/fvSolution is
provided which defaults to 1, e.g.
PIMPLE
{
nOuterCorrectors 1;
nEcorr 2;
}
If this proves useful it could be extended and improved by adding convergence
controls.
Note that the solution of the solid regions is now before the fluid regions as
it make more sense if solid regions are sources or sinks of heat to solve them
before the fluid.
Description
Transport package using the Andrade function for the natural logarithm of
dynamic viscosity and thermal conductivity of liquids:
\verbatim
log(mu) = muCoeffs[0] + muCoeffs[1]*T + muCoeffs[2]*sqr(T)
+ muCoeffs_[3]/(muCoeffs_[4] + T)
log(kappa) = kappaCoeffs[0] + kappaCoeffs[1]*T + kappaCoeffs[2]*sqr(T)
+ kappaCoeffs_[3]/(kappaCoeffs_[4] + T)
);
\endverbatim
References:
\verbatim
Andrade, E. D. C. (1934).
XLI. A theory of the viscosity of liquids.—Part I.
The London, Edinburgh, and Dublin Philosophical Magazine
and Journal of Science, 17(112), 497-511.
Andrade, E. D. C. (1934).
LVIII. A theory of the viscosity of liquids.—Part II.
The London, Edinburgh, and Dublin Philosophical Magazine
and Journal of Science, 17(113), 698-732.
\endverbatim
Usage
\table
Property | Description
muCoeffs | Dynamic viscosity polynomial coefficients
kappaCoeffs | Thermal conductivity polynomial coefficients
\endtable
Example of the specification of the transport properties for water@200bar:
\verbatim
transport
{
muCoeffs (-25.8542 0.031256 -2.2e-05 3289.918 -11.4784);
kappaCoeffs (-2.56543 0.008794 -9.8e-06 100.368 0);
}
\endverbatim
By default a streamline now stops at the cyclic and starts again at the
coupled location on the opposite cyclic.
There is also now an "outside" option that can be passed to the
streamlines function. This changes the default behaviour so that the
streamline continues outside of the mesh when it encounters a cyclic
patch. The following postProcess command uses the "outside" option in
this way:
postProcess -latestTime -func "
streamlinesPatch
(
patch=inlet,
nPoints=50,
outside=true,
fields=(p U)
)"
This prevents excessive duplication of surface geometry and makes
post-processing tasks in paraview more convenient.
The Nastran and Star-CD surface formats were found not to work, so
support for these output types has been removed. Raw, VTK, Foam and
Ensight formats are all still available.
for e.g. load-balancing. The fvMeshDistributor is selected via the new optional
distributor entry in dynamicMeshDict, e.g.
distributor
{
type decomposer;
libs ("libfvMeshDistributors.so");
}
Note that currently only the framework is included in this commit, the
fvMeshDistributors library is not yet fully functional and hence not released
yet.
This improves convergence of some steady-state chtMultiRegionFoam (which uses
the pEqn.H from buoyantPimpleFoam) cases but does not affect transient
simulations unless aggressive pressure relaxation is applied, i.e. transient
SIMPLE.
When limiting the pressure in p_rgh based solvers p typically has calculated BCs
which are now supported when calculating the max and min pressure from maxFactor
and minFactor.
The surfaceVectorField Uf is used instead of the flux field phi for ddtPhiCorr
in moving mesh cases to handle linear and rotating motion and must mapped from
the volVectorField U to new faces created by cell splitting or merging in mesh
refinement/unrefinement.
With the general run-time selectable fvMeshMovers engine compression simulations
can be performed with reactingFoam so there is no longer any need for engine
specific solvers or engineMesh.
An engineFoam script is provided to redirect users to reactingFoam with
instructions.
PDRFoam is a Xi combustion model solver including porosity distributed
resistance and shares code with XiFoam so it is more logical that it should be
in a sub-directory of XiFoam to simplify compilation dependency.
With the general run-time selectable fvMeshMovers engine compression simulations
can be performed with rhoPimpleFoam so there is no longer any need for engine
specific solvers.
A coldEngineFoam script is provided to redirect users to rhoPimpleFoam with
instructions.
With the addition of mesh-motion to XiFoam and the new engine fvMeshMover the
XiEngineFoam kivaTest simple IC engine example now runs in XiFoam and
XiEngineFoam has been removed. This simplifies maintenance provides greater
extensibility.