A volumetric flow rate through a tri-surface can now be obtained using
the volumetricFlowRateTriSurface preconfigured function object, using
the following entry in system/controlDict:
fuctions
{
#includeFunc "volumetricFlowRateTriSurface(name=surface.stl)"
}
Where "surface.stl" is a tri-surface file in the constant/triSurface
directory. An example of this has been added to the
incompressible/pimpleFoam/RAS/impeller tutorial case.
Note that when possible, it is preferable to use the flowRatePatch or
flowRateFaceZone functions, as these make direct use of the flux and
therefore report a value that is exactly that computed by the solver.
volumetricFlowRateTriSurface, by contrast, does interpolation of the
velocity field which introduces error.
In addition, a minor fix has been made to the underlying
surfaceFieldValue function object so that it does not need a zone/set
name when values on a searchable surface are requested.
Geometric point merging has an inherent chance of failure that occurs
when a mesh contains valid distinct points that are closer together than
the supplied tolerance. It is beneficial to avoid such merging whenever
possible.
reconstructParMesh does not need explicit point merging any more. Points
may be duplicated temporarily when processor meshes are combined which
share points and edges but not faces. Ultimately, however,
reconstructParMesh reconstructs the entire mesh so everything eventually
gets face-connected and all point duplications get resolved.
fvMeshDistribute requires point-merging, as the entire mesh is not
constructed. However, since 5d4c8f5d, this process has been purely
topological and has not relied on any of the geometric merging processes
triggered by utilised code.
As such, all geometric point merging operations and tolerances have been
removed from these two implementations, as well as in lower level code
in faceCoupleInfo and polyMeshAdder. faceCoupleInfo has also had support
for face and edge splits removed as this was not being used. This change
will have improved the robustness of both reconstruction and
redistributuon and has greatly reduced the total amount of code
involved.
The only geometric tolerance-based matching still being performed by
either of these processes is as a result of coupled patch ordering in
fvMeshDistribute. It is possible that this is not necessary either
(though at present coupled patch ordering is certainly needed
elsewhere). This warrants further investigation.
Very occasionally a coupled patch contains two faces that are connected
by an edge, but which are numbered in opposite directions. Such faces
are not actually connected in a manifold sense. They just happen to
share two points. The edge in question should really be duplicated and
both should be considered to be part of the perimeter of the surface.
Walk patch ordering has been fixed so that it does not attempt to cross
edges such as these. This fixes a rare failure in snappyHexMesh.
Description
Multi-component Fickian and Fourier based temperature gradient heat flux
model laminar flow with optional Soret thermal diffusion of species.
Currently the diffusion coefficients are constant but temperature and
pressure dependency will be added.
The heat flux source is implemented as an implicit energy correction to the
temperature gradient based flux source. At convergence the energy
correction is 0.
Usage
\verbatim
laminar
{
model FickianFourier;
D (1e-5 2e-5 1e-5); // [m^2/s]
DT (1e-5 2e-5 1e-5); // [kg/m/s] Optional
}
\endverbatim
Description
Thixotropic viscosity momentum transport model based on the evolution of
the structural parameter \f$ \lambda \f$:
\f[
\frac{D\lambda}{Dt} = a(1 - \lambda)^b - c \lambda \dot{\gamma}^d
\f]
The viscosity is then calculated using the expression
\f[
\nu = \frac{\nu_{\infty}}{{1 - K \lambda}^2}
\f]
Where the parameter K is given by:
\f[
K = 1 - \sqrt{\frac{\nu_{\infty}}{\nu_{0}}}
\f]
Here:
\vartable
\lambda | structural parameter
a | model coefficient
b | model coefficient
c | model coefficient
d | model coefficient
\dot{\gamma} | stress rate [1/s]
\nu_{0} | limiting viscosity when \f$ \lambda = 1 \f$
\nu_{\infty} | limiting viscosity when \f$ \lambda = 0 \f$
\endvartable
Reference:
\verbatim
Barnes H A, 1997. Thixotropy - a review. J. Non-Newtonian Fluid
Mech 70, pp 1-33
\endverbatim
Description
Transforms the specified velocity field into a
cylindrical polar coordinate system or back to Cartesian.
Example of function object specification to convert the velocity field U
into cylindrical polar coordinates before averaging and returning the
average to Cartesian coordinates:
\verbatim
cartesianToCylindrical
{
type cylindrical;
libs ("libfieldFunctionObjects.so");
origin (0 0 0);
axis (0 0 1);
field U;
writeControl outputTime;
writeInterval 1;
}
#includeFunc fieldAverage(cylindrical(U))
cylindricalToCartesian
{
type cylindrical;
libs ("libfieldFunctionObjects.so");
origin (0 0 0);
axis (0 0 1);
field cylindrical(U)Mean;
toCartesian true;
result UMean;
writeControl outputTime;
writeInterval 1;
}
\endverbatim
This is particularly useful for cases with rotating regions, e.g. mixer
vessels with AMI.
See tutorials/incompressible/pimpleFoam/laminar/mixerVesselAMI2D
Description
Updates the writeInterval as a Function1 of time.
Examples of function object specification:
\verbatim
setWriteInterval
{
type setWriteInterval;
libs ("libutilityFunctionObjects.so");
writeInterval table
(
(0 0.005)
(0.1 0.005)
(0.1001 0.01)
(0.2 0.01)
(0.2001 0.02)
);
}
\endverbatim
will cause results to be written every 0.005s between 0 and 0.1s, every
0.01s between 0.1 and 0.2s and every 0.02s thereafter.
In multi-specie systems the calculation of Cp and Cv is relatively expensive due
to the cost of mixing the coefficients of the specie thermo model, e.g. JANAF,
and it is significantly more efficient if these are calculated at the same time
as the rest of the thermo-physical properties following the energy solution.
Also the need for CpByCpv is also avoided by the specie thermo providing the
energy type in the form of a boolean 'enthalpy()' function which returns true if
the energy type is an enthalpy form.
This simplifies and standardises the handling of radiation in all solvers which
include an energy equation, all of which now support radiation via the
'radiation' fvOption which is selected in the constant/fvOption or
constant/<region>/fvOption file:
radiation
{
type radiation;
libs ("libradiationModels.so");
}
The radiation model, parameters, settings and sub-models are specified in the
'radiationProperties' file as before.
with frozenFlow set true in the PIMPLE sub-dictionary of fvSolution the p-U
system is not solved and the energy-composition system including reactions is
solved with the fixed flow.
This is used to set the directory name for the results of the functionObject, if
not specified a unique name is generated automatically from the function type
and argument list, e.g.
#includeFunc patchAverage(name=inlet, fields=(p U))
writes surfaceFieldValue.dat in postProcessing/patchAverage(name=inlet,fields=(pU))/0 and
#includeFunc patchAverage(funcName=inlet, name=inlet, fields=(p U))
writes surfaceFieldValue.dat in postProcessing/inlet/0.
Now if a case is restarted from an arbitrary time, for example one generated at
a premature stop condition, or with an increased writeInterval, the subsequent
time directories written are referenced to the original start time of the case
rather than the restart time.
cpp is no longer used to pre-process Make/files files allowing standard make '#'
syntax for comments, 'ifdef', 'ifndef' conditionals etc. This is make possible
by automatically pre-pending SOURCE += to each of the source file names in
Make/files.
The list of source files compile can be specified either as a simple list of
files in Make/files e.g.
# Note: fileMonitor assumes inotify by default. Compile with -DFOAM_USE_STAT
# to use stat (=timestamps) instead of inotify
fileMonitor.C
ifdef SunOS64
dummyPrintStack.C
else
printStack.C
endif
LIB = $(FOAM_LIBBIN)/libOSspecific
or
or directly as the SOURCE entry which is used in the Makefile:
SOURCE = \
adjointOutletPressure/adjointOutletPressureFvPatchScalarField.C \
adjointOutletVelocity/adjointOutletVelocityFvPatchVectorField.C \
adjointShapeOptimizationFoam.C
EXE = $(FOAM_APPBIN)/adjointShapeOptimizationFoam
In either form make syntax for comments and conditionals is supported.