This tutorial simulates solid particle coalescence and breakage through
a 90 degree pipe bend.
Patch contributed by Kasper Gram Bilde and Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
On unstructured collocated meshes the Reynolds stress tends to decouple from the
velocity creating pronounced staggering patterns in the solution. This effect
is reduced or eliminated by a special coupling algorithm which replaces the
gradient diffusion component of the Reynolds stress with the equivalent compact
representation on the mesh, i.e. div-grad with Laplacian in the DivDevRhoReff function:
template<class BasicMomentumTransportModel>
template<class RhoFieldType>
Foam::tmp<Foam::fvVectorMatrix>
Foam::ReynoldsStress<BasicMomentumTransportModel>::DivDevRhoReff
(
const RhoFieldType& rho,
volVectorField& U
) const
{
tmp<volTensorField> tgradU = fvc::grad(U);
const volTensorField& gradU = tgradU();
const surfaceTensorField gradUf(fvc::interpolate(gradU));
// Interpolate Reynolds stress to the faces
// with either a stress or velocity coupling correction
const surfaceVectorField Refff
(
(this->mesh().Sf() & fvc::interpolate(R_))
// Stress coupling
+ couplingFactor_
*(this->mesh().Sf() & fvc::interpolate(this->nut()*gradU))
// or velocity gradient coupling
// + couplingFactor_
// *fvc::interpolate(this->nut())*(this->mesh().Sf() & gradUf)
- fvc::interpolate(couplingFactor_*this->nut() + this->nu())
*this->mesh().magSf()*fvc::snGrad(U)
- fvc::interpolate(this->nu())*(this->mesh().Sf() & dev2(gradUf.T()))
);
return
(
fvc::div(fvc::interpolate(this->alpha_*rho)*Refff)
- correction(fvm::laplacian(this->alpha_*rho*this->nuEff(), U))
);
}
In the above two options for the coupling term are provided, one based on the
stress correction (un-commented) and an alternative based an the velocity
gradient correction (commented). Tests run so far indicate that the stress
correction provides better coupling while minimising the error introduced.
A new tutorial case ductSecondaryFlow is provided which demonstrates the updated
coupling algorithm on the simulation of the classic secondary flow generated in
rectangular ducts.
Transformation can now be restricted to a specific point set by means of
a new -pointSet option. For example, to move the rotating part of a
geometry through 45 degrees around the Z axis, the following command
could be used:
transformPoints -pointSet rotating "Rz=45"
This assumes a point set called "rotating" has been defined during
meshing or by calling topoSet.
The topology changes occur in the intermediate steps during mesh sub-division
and addition, there is no need to update meshObjects during this phase, these
are updated at the end of the redistribution by the distribute function called
for each. The distribute functions for nearWallDist and wallDist have been
updated accordingly.
Now stationary MRF regions may be embedded in moving mesh cases. While in
principle MRF regions moving with the mesh is supported by this development
there is no special handling with the MRF implementation to support the required
specification of the motion of the MRF regions.
A wall distance computation will not be correct on a disconnected
processor case. This is also more efficient.
Resolves bug report https://bugs.openfoam.org/view.php?id=3833
The population balance model considers dilatation originating from density
change and mass transfer via source terms describing nucleation as well as
"drift" of the size distribution to smaller or larger sizes. Numerically, the
treatment does not necessarily equal the total dilatation, hence a correction is
introduced to ensure boundedness of the size group fractions.
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
and VTT Technical Research Centre of Finland Ltd.
The refinement cell set is now generated directly using boxToCell. The
mesh now uses cyclic, rather than cyclicAMI, patches so that propagation
of the refinement across the coupling can be tested. Field files have
been simplified by using #includeEtc to set constraints. A best practice
velocity/pressure specification has been set for the outlet boundary.
Unused fields and settings have been removed.
New interpolation and snGrad schemes to help stabilise multiphaseEulerFoam runs
on poor meshes by reverting to a bounded form when the phase-fraction
corresponding to the phase of the field argument is less than 1e-3. If this
approach proves effective and it would be useful to adjust the phase-fraction
limit it could be made a user input.
Class
Foam::phaseStabilised
Description
Phase-stabilised interpolation scheme
which applies upwind to the faces at which the upwind phase-fraction is less
than 1e-3.
Class
Foam::fv::phaseStabilisedSnGrad
Description
snGrad scheme with phase-fraction limited non-orthogonal correction.
When the phase-fraction is less than 1e-3 the non-orthogonal correction is
set to 0.
Example specification in fvSchemes:
gradSchemes
{
default Gauss linear;
limited cellLimited Gauss linear 1;
}
divSchemes
{
default none;
.
.
.
"div\(alphaRhoPhi.*,U.*\)" Gauss phaseStabilised linearUpwindV limited;
"div\(phi.*,U.*\)" Gauss phaseStabilised linearUpwindV limited;
"div\(alphaRhoPhi.*,(h|e).*\)" Gauss phaseStabilised limitedLinear 1;
"div\(alphaRhoPhi.*,K.*\)" Gauss phaseStabilised limitedLinear 1;
"div\(alphaRhoPhi.*,\(p\|thermo:rho.*\)\)" Gauss phaseStabilised limitedLinear 1;
.
.
.
}
laplacianSchemes
{
default Gauss linear limited corrected 0.33;
phaseStabilised Gauss linear phaseStabilised limited corrected 0.33;
laplacian(((alpha.air*thermo:rho.air)*nuEff.air),U.air) $phaseStabilised;
laplacian(((alpha.water*thermo:rho.water)*nuEff.water),U.water) $phaseStabilised;
laplacian((alpha.air*alphaEff),h.air) $phaseStabilised;
laplacian((alpha.water*alphaEff),e.water) $phaseStabilised;
}
PrimitivePatch is a geometry engine. Is not used, and is not designed to
be used, as an abstract interface. That function is left to
PrimitivePatch's immediate derivations, such as polyPatch and
MeshedSurface.
This change means this function is determining the sequence in which
points are plotted topologically. This makes it possible to plot a layer
average along a pipe that goes through many changes of direction.
Previously, the function determined the order by means of a geometric
sort in the plot direction. This only worked when the layers were
perpendicular to one of the coordinate axes.
This is a simple function that provides a convenient way for a user to
call fvc::reconstruct for the purposes of post-processing flux fields;
e.g., to construct a cell velocity from a face flux.
It can be used to generate output during a run by adding the following
settings to a case's controlDict:
functions
{
#includeFunc reconstruct(phi)
}
Or it can be executed as a postProcessing step by calling:
postProcess -func "reconstruct(phi)"
epsilonm is obtained by combining epsilon.gas and epsilon.liquid in a two-phase
system, each of which will apply the epsilonWallFunction at walls; the
epsilonmWallFunction propagates the resulting wall epsilonm into the near-wall
cells.
If the 0/epsilonm file is provided the epsilonmWallFunction should be specified
for walls, if the 0/epsilonm file is not provided it will be generated
automatically and the epsilonmWallFunction applied to walls for which the
epsilonWallFunction is specified in the epsilon.liquid file.
Rather than rely on the MRF rotation the effect of acceleration due to flow
curvature on the dispersed is now handled directly using the Ud.grad(Ud) term
derived from the phase momentum equation. This means that any flow curvature
from bulk rotation to recirulation zones now affect the separation of the
dispersed phase from the continuous phase in a physical manner.
fvMesh::update() now executes at the beginning of the time-step, before time is
incremented and handles topology change, mesh to mesh mapping and redistribution
without point motion. Following each of these mesh changes fields are mapped
from the previous mesh state to new mesh state in a conservative manner. These
mesh changes not occur at most once per time-step.
fvMesh::move() is executed after time is incremented and handles point motion
mesh morphing during the time-step in an Arbitrary Lagrangian Eulerian approach
requiring the mesh motion flux to match the cell volume change. fvMesh::move()
can be called any number of times during the time-step to allow iterative update
of the coupling between the mesh motion and field solution.
With fvMeshTopoChangers::meshToMesh it is now possible to map the solution to a
specified sequence of pre-generated meshes at run-time to support arbitrary mesh
changes, refinements, un-refinements, changes in region topology, geometry,
etc. Additionally mesh-motion between the sequence of meshes is supported to
allow for e.g. piston and valve motion in engines.
The tutorials/incompressible/pimpleFoam/laminar/movingCone case has been updated
to provide a demonstration of the advantages of this run-time mesh-mapping by
mapping to meshes that are finer behind the cone and coarser in front of the
cone as the cone approaches the end of the domain, thus maintaining good
resolution while avoiding excessive cell aspect ratio as the mesh is squeezed.
The dynamicMeshDict for the movingCone case is;
mover
{
type motionSolver;
libs ("libfvMeshMovers.so" "libfvMotionSolvers.so");
motionSolver velocityComponentLaplacian;
component x;
diffusivity directional (1 200 0);
}
topoChanger
{
type meshToMesh;
libs ("libmeshToMeshTopoChanger.so");
times (0.0015 0.003);
timeDelta 1e-6;
}
which lists the mesh mapping times 0.0015s 0.003s and meshes for these times in
directories constant/meshToMesh_0.0015 and constant/meshToMesh_0.003 are
generated in the Allrun script before the pimpleFoam run:
runApplication -a blockMesh -dict blockMeshDict.2
rm -rf constant/meshToMesh_0.0015
mkdir constant/meshToMesh_0.0015
mv constant/polyMesh constant/meshToMesh_0.0015
runApplication -a blockMesh -dict blockMeshDict.3
rm -rf constant/meshToMesh_0.003
mkdir constant/meshToMesh_0.003
mv constant/polyMesh constant/meshToMesh_0.003
runApplication -a blockMesh -dict blockMeshDict.1
runApplication $application
Note: This functionality is experimental and has only undergone basic testing.
It is likely that it does not yet work with all functionObject, fvModels
etc. which will need updating to support this form of mesh topology change.