- New solver: `acousticFoam`
- New base finite-area region class: `regionFaModel`
- New base shell model classes:
- `vibrationShellModel`
- `thermalShellModel`
- New shell models:
- A vibration-shell model: `KirchhoffShell`
- A thermal-shell model: `thermalShell`
- New finite-area/finite-volume boundary conditions:
- `clampedPlate`
- `timeVaryingFixedValue`
- `acousticWaveTransmissive`
- New base classes for `fvOption` of finite-area methods: `faOption`
- New `faOption`s:
- `contactHeatFluxSource`
- `externalFileSource`
- `externalHeatFluxSource`
- `jouleHeatingSource`
- New tutorial: `compressible/acousticFoam/obliqueAirJet`
Signed-off-by: Kutalmis Bercin <kutalmis.bercin@esi-group.com>
- weight fields are combined by multiplication
- volFieldValue:
* 0-N scalar fields
- surfaceFieldValue:
* 0-N scalar fields
* 0-1 vector fields
In some cases this can be used to avoid creating additional
fields.
weightFields (rho U);
vs.
derivedFields (rhoU);
weightField rhoU;
- when sampling onto a meshed surface, the sampling surface may be
outside of the mesh region, or simply too far away to be considered
reasonable.
Can now specify a max search distance and default values for samples
that are too distant.
If a default value is not specified, uses Type(Zero).
Eg,
maxDistance 0.005;
defaultValue
{
"p.*" 1e5;
T 273.15;
U (-100 -100 -100);
}
- For slow oscillations it can be more intuitive to specify the
period.
ENH: separate mark/space for Square
- makes it easier to tailor the desired intervals.
BUG: incorrect square wave fraction with negative phase shifts
ENH: additional cosine Function1
STYLE: avoid code duplication by inheriting Cosine/Square from Sine.
- add -recentre option to shift points according to the bounding box
centre before performing other operations
- add -auto-origin to use the bounding box centre as the origin for
rotations. Has lower priority than the -origin option.
- surfaceTransformPoints now has distinct -read-scale, -write-scale
options (as per surfaceMeshConvert). Silently accepts -scale as
equivalent to -write-scale, for backwards compatibility and
similarity with transformPoints
- add -steps option for surfaceRefineRedGreen for successive
refinement
- in most cases this eliminates manually calculation of circumferential
points.
TUT: improve parameterization of sphere blockMeshDict
- allow separate parameterization of radius, ratio of inner to outer,
and the number of divisions in x/y/z and radial directions
- related to change c3571b7357 (does not affect 1912 or older).
Remnant check for data() should have used valid() method instead.
TUT: add fluxSummary cellZoneAndDirection to angledDuct/implicit
- use simpler decomposeParDict in tutorials, several had old
'boilerplate' decomposeParDict
- use simpler libs () format
- update surface sampling to use dictionary format
ENH: update libs of etc/caseDicts/postProcess items
ENH: ensure destructor=default
ENH: ensure constness
ENH: ensure no 'copy construct' and 'no copy assignment' exist
TUT: add examples of function objects with full set
of settings into a TUT if unavailable
TUT: update pisoFoam/RAS/cavity tutorial in terms of usage
The PIMPLE option finalOnLastPimpleIterOnly allows the call the Final
solver only in the last PIMPLE loop. The default is false which is
the present behavior.
- base level surface container is now a meshedSurface instead of
a triSurface. This avoid automatic triangulation of surfaces
when they are read, and simplifies the internals.
- sampling types:
* "meshedSurface" (compat: "sampledTriSurfaceMesh")
* "meshedSurfaceNormal" (compat: "sampledTriSurfaceMeshNormal")
- previously the store() method just set the ownedByRegistry flag.
Now ensure that it is indeed registered first.
- support register/store of tmp<> items.
The tmp parameter is not cleared, but changed from PTR to CREF
to allow further use.
The implicit registration allows code simplification using the
GeometricField::New factory method, for example.
Old Code
========
volScalarField* ptr = new volScalarField
(
IOobject
(
fieldName,
mesh.time().timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE,
true // Register
),
mesh,
dimless,
zeroGradientFvPatchField<scalar>::typeName
);
ptr->store();
New Code
========
auto tptr = volScalarField::New
(
fieldName,
mesh,
dimless,
zeroGradientFvPatchField<scalar>::typeName
);
regIOobject::store(tptr);
or even
regIOobject::store
(
volScalarField::New
(
fieldName,
mesh,
dimless,
zeroGradientFvPatchField<scalar>::typeName
)
);
- fits better into the general sampling framework, improves flexibilty
and allows code reduction.
ENH: include surface fields on sampledSurfaces that support it
- changed the sectorCoeffs keyword to 'point' from 'axisPt'
for more similarity with other dictionaries.
Continue to accept 'axisPt' for compatibility.
- Now also responds to the contents of the trigger file,
processing action= contents similar to used with external coupling.
Previously it only handled an action that was defined in the
dictionary. With this update, the user can chose a diferent action
simply by echoing the appropriate action string into the trigger
file.
- Uses the user-specified value for outputTemperature:
{
type externalCoupledTemperature;
outputTemperture fluid; // or wall;
}
Otherwises uses 'wall' as a default (for compatibility) and emits a
warning.
The T.out header now reflects the type of output. Eg,
# Values: area Tfluid qDot htc
- tutorials based on squareBend used Default_Boundary_Region explicitly
defined since they predated the defaultPatch renaming (2008).
The name 'Default_Boundary_Region' was for convenience as the default
name when converting to PROSTAR or CCM formation, but can now be
changed to something more generic.
- define wall boundary conditions for squareBend using a general regex
to allow future splitting of wall types by name.
- helps reduce clutter in the topoSetDict files.
Caveats when using this.
The older specification styles using "name" will conflict with the
set name. Eg,
{
name f0
type faceSet;
action add;
source patchToFace;
sourceInfo
{
name inlet;
}
}
would flattened to the following
{
name f0
type faceSet;
action add;
source patchToFace;
name inlet;
}
which overwrites the "name" used for the faceSet.
The solution is to use the updated syntax:
{
name f0
type faceSet;
action add;
source patchToFace;
patch inlet;
}
- old 'DELETE' enum was easily confused with 'REMOVE', which removes
the set, not the elements from the set.
- provide corresponding subtractSet() method
STYLE: HashSet set/unset instead of insert/erase methods in topoSetSource
- simplifies switching to/from bitSet storage
Update of overRhoPimpleDyMFoam and overInterDyMFoam solvers.
Adding corresponding tutorials with best possible settings
The main effort was put on reducing pressure spikes as the
stencil change with hole cells on the background mesh.
New name: findObject(), cfindObject()
Old name: lookupObjectPtr()
Return a const pointer or nullptr on failure.
New name: findObject()
Old name: --
Return a non-const pointer or nullptr on failure.
New name: getObjectPtr()
Old name: lookupObjectRefPtr()
Return a non-const pointer or nullptr on failure.
Can be called on a const object and it will perform a
const_cast.
- use these updated names and functionality in more places
NB: The older methods names are deprecated, but continue to be defined.
Previously the coordinate system functionality was split between
coordinateSystem and coordinateRotation. The coordinateRotation stored
the rotation tensor and handled all tensor transformations.
The functionality has now been revised and consolidated into the
coordinateSystem classes. The sole purpose of coordinateRotation
is now just to provide a selectable mechanism of how to define the
rotation tensor (eg, axis-angle, euler angles, local axes) for user
input, but after providing the appropriate rotation tensor it has
no further influence on the transformations.
--
The coordinateSystem class now contains an origin and a base rotation
tensor directly and various transformation methods.
- The origin represents the "shift" for a local coordinate system.
- The base rotation tensor represents the "tilt" or orientation
of the local coordinate system in general (eg, for mapping
positions), but may require position-dependent tensors when
transforming vectors and tensors.
For some coordinate systems (currently the cylindrical coordinate system),
the rotation tensor required for rotating a vector or tensor is
position-dependent.
The new coordinateSystem and its derivates (cartesian, cylindrical,
indirect) now provide a uniform() method to define if the rotation
tensor is position dependent/independent.
The coordinateSystem transform and invTransform methods are now
available in two-parameter forms for obtaining position-dependent
rotation tensors. Eg,
... = cs.transform(globalPt, someVector);
In some cases it can be useful to use query uniform() to avoid
storage of redundant values.
if (cs.uniform())
{
vector xx = cs.transform(someVector);
}
else
{
List<vector> xx = cs.transform(manyPoints, someVector);
}
Support transform/invTransform for common data types:
(scalar, vector, sphericalTensor, symmTensor, tensor).
====================
Breaking Changes
====================
- These changes to coordinate systems and rotations may represent
a breaking change for existing user coding.
- Relocating the rotation tensor into coordinateSystem itself means
that the coordinate system 'R()' method now returns the rotation
directly instead of the coordinateRotation. The method name 'R()'
was chosen for consistency with other low-level entities (eg,
quaternion).
The following changes will be needed in coding:
Old: tensor rot = cs.R().R();
New: tensor rot = cs.R();
Old: cs.R().transform(...);
New: cs.transform(...);
Accessing the runTime selectable coordinateRotation
has moved to the rotation() method:
Old: Info<< "Rotation input: " << cs.R() << nl;
New: Info<< "Rotation input: " << cs.rotation() << nl;
- Naming consistency changes may also cause code to break.
Old: transformVector()
New: transformPrincipal()
The old method name transformTensor() now simply becomes transform().
====================
New methods
====================
For operations requiring caching of the coordinate rotations, the
'R()' method can be used with multiple input points:
tensorField rots(cs.R(somePoints));
and later
Foam::transformList(rots, someVectors);
The rotation() method can also be used to change the rotation tensor
via a new coordinateRotation definition (issue #879).
The new methods transformPoint/invTransformPoint provide
transformations with an origin offset using Cartesian for both local
and global points. These can be used to determine the local position
based on the origin/rotation without interpreting it as a r-theta-z
value, for example.
================
Input format
================
- Streamline dictionary input requirements
* The default type is cartesian.
* The default rotation type is the commonly used axes rotation
specification (with e1/e2/3), which is assumed if the 'rotation'
sub-dictionary does not exist.
Example,
Compact specification:
coordinateSystem
{
origin (0 0 0);
e2 (0 1 0);
e3 (0.5 0 0.866025);
}
Full specification (also accepts the longer 'coordinateRotation'
sub-dictionary name):
coordinateSystem
{
type cartesian;
origin (0 0 0);
rotation
{
type axes;
e2 (0 1 0);
e3 (0.5 0 0.866025);
}
}
This simplifies the input for many cases.
- Additional rotation specification 'none' (an identity rotation):
coordinateSystem
{
origin (0 0 0);
rotation { type none; }
}
- Additional rotation specification 'axisAngle', which is similar
to the -rotate-angle option for transforming points (issue #660).
For some cases this can be more intuitive.
For example,
rotation
{
type axisAngle;
axis (0 1 0);
angle 30;
}
vs.
rotation
{
type axes;
e2 (0 1 0);
e3 (0.5 0 0.866025);
}
- shorter names (or older longer names) for the coordinate rotation
specification.
euler EulerRotation
starcd STARCDRotation
axes axesRotation
================
Coding Style
================
- use Foam::coordSystem namespace for categories of coordinate systems
(cartesian, cylindrical, indirect). This reduces potential name
clashes and makes a clearer declaration. Eg,
coordSystem::cartesian csys_;
The older names (eg, cartesianCS, etc) remain available via typedefs.
- added coordinateRotations namespace for better organization and
reduce potential name clashes.
- 'signed' input parameter only mandatory for distance > 0.
A distance <= 0 is always signed and the input parameter is ignored.
- Use normal distance when distance == 0. This has no effect when
the surface has no open edges, but improves on rounding issues
around the zero crossing when the surface has open edges.
This may still need future revisiting.
- takes a direct approach of determining which cells are cut and walks
the cell faces directly to build the resulting surface.
- better handling of corner cases.
* Avoids redundant points when the cut passes exactly through a
mesh point.
* Supresses generation of duplicates faces when the plane cut
coincides exactly with a mesh face.
- for severely concave cells where the plane cuts a face multiple times
there is currently no remedial action taken, except to note the
failure and unwind the insertion of the corresponding points and
faces.
- improve doxygen entries for searchable surfaces.
- support selection of searchable surfaces with shorter names.
Eg,
type box | cylinder | ...;
vs type searchableBox | searchableCylinder | ...;
- functionObjectLibs -> libs
- redirectType -> name
- change deprecated writeCompression flags types to Switch.
- cleanup some trailing ';;' from some dictionaries
- some paraview versions (eg, on windows) don't support float, only double.
This mostly affected the vtkSurfaceWriter.
The foamToVTK is also affected, but since it also supports the XML
output formats (vtp, vtu) these can be used instead.
The tutorial demonstrates generation of a C-grid mesh using blockMesh
The geometry is provided by a surface mesh (OBJ file) of the NACA0012 aerofoil
The case is setup with a freestream flow speed of Ma=0.72
Thanks to Kai Bastos at Duke University for the geometry and helpful input.
and replaced rhoPimpleDyMFoam with a script which reports this change.
The rhoPimpleDyMFoam tutorials have been moved into the rhoPimpleFoam 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.
rhoReactingFoam: Updated for changes to rhoPimpleFoam files
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.
pimpleDyMFoam: Store Uf as an autoPtr for better error handling
pimpleFoam: Set initial deltaT from the Courant number
for improved stability on start-up and compatibility with pimpleDyMFoam
ENH: pimpleFoam: Merged dynamic mesh functionality of pimpleDyMFoam into pimpleFoam
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.
tutorials/incompressible/pimpleFoam: Updated pimpleDyMFoam tutorials to run pimpleFoam
Renamed tutorials/incompressible/pimpleFoam/RAS/wingMotion/wingMotion2D_pimpleDyMFoam
-> tutorials/incompressible/pimpleFoam/RAS/wingMotion/wingMotion2D_pimpleFoam
- the problem arises since the various surface writers are stateless.
The collated output format hacks around this limitation by adding in
its own fieldDict caching (to disk).
Now include an updateMesh() method to hook into geometry changes.
This is considered a stop-gap measure until the surface output
handling is improved.
- improvement documentation for surface sampling.
- can now specify alternative sampling scheme for obtaining the
face values instead of just using the "cell" value. For example,
sampleScheme cellPoint;
This can be useful for cases when the surface is close to a boundary
cell and there are large gradients in the sampled field.
- distanceSurface now handles non-closed surfaces more robustly.
Unknown regions (not inside or outside) are marked internally and
excluded from consideration. This allows use of 'signed' surfaces
where not previously possible.
Support the following expansions when they occur at the start of a
string:
Short-form Equivalent
========= ===========
<etc>/ ~OpenFOAM/ (as per foamEtcFile)
<case>/ $FOAM_CASE/
<constant>/ $FOAM_CASE/constant/
<system>/ $FOAM_CASE/system/
These can be used in fileName expansions to improve clarity and reduce
some typing
"<constant>/reactions" vs "$FOAM_CASE/constant/reactions"