Commit Graph

29 Commits

Author SHA1 Message Date
6045c63e36 searchableSurface, topoSet: Checked unit conversion of input parameters 2024-05-16 15:19:26 +01:00
3123551bfa Zones: Now derived from PtrListDictionary to provide faster lookup
Now the HashTable underlying PtrListDictionary is used for zone lookup by name
which is a lot faster than the linear search method used previously if there are
a large number of zones.
2024-03-28 20:25:29 +00:00
b6d1d308d6 porosityModel, sampledIsoSurfaceSurface: Removed unused multi cellZone support
This reduces the code complexity and allows for a future plan to make zones
dynamic rather than a static fixed indexed list.
2023-11-08 14:37:29 +00:00
c7ccc2dee9 mappedPatchBase: Fixed mapping with interpolation
Mapping with interpolation now behaves correctly when a single cell maps
to multiple faces. In addition, the mapping structure is more compact
and no longer results in copies being made of entire internal fields.

This has been achieved by rewriting the mapping strategy in
mappedPatchBase so that it maps from a reduced set of sampling locations
to the patch faces, rather than directly from the cells/faces to the
patch faces. This is more efficient, but it also permits multiple
sampling locations to be sent to a single cell/face. Values can then be
interpolated to these points before being sent back to the patch faces.

Previously a single cell/face could only be sent a single location onto
which to interpolate; typically that of the first associated patch face.
The resulting interpolated value was then sent back to all associated
patch faces. This meant that some (potentially most) patch faces did
receive a value interpolated to the correct position.
2022-08-23 13:37:29 +01:00
acd5528557 rotatedBoxToFace: New faceSource, the face equivalent of rotatedBoxToCell
Description
    A topoSetSource to select faces based on cell centres inside a rotated
    and/or skewed box.

    The box can be defined with an origin and three vectors; i, j, and k. The
    origin is one corner of the box, and the vectors are the edges connected to
    that corner.

    For example, the following defines a box rotated 45 degrees around the
    z-axis, with width and depth of 0.2, height of 200, and with a bottom left
    corner at (0.4 0.4 -100):

    \verbatim
        origin  (0.4 0.4 -100);
        i       (0.141421 0.141421 0);
        j       (-0.141421 0.141421 0);
        k       (0 0 200);
    \endverbatim

    Alternatively, the box can be defined using a non-rotated box and details
    of how it should be rotated. This syntax is triggered by the presence of
    the keyword "box". A standard bounding box is supplied, along with a centre
    of rotation and two vectors, n1 and n2. The rotation is taken to be that
    which transforms n1 onto n2.

    The above example can be equivalently specified in this alternative form as
    follows:

    \verbatim
        box     (0.4 0.4 -100) (0.6 0.6 100);
        centre  (0.4 0.4 0);
        n1      (1 0 0);
        n2      (1 1 0);
    \endverbatim
2022-03-21 10:37:42 +00:00
b9123328fb typeIOobject: Template typed form of IOobject for type-checked object file and header reading
used to check the existence of and open an object file, read and check the
header without constructing the object.

'typeIOobject' operates in an equivalent and consistent manner to 'regIOobject'
but the type information is provided by the template argument rather than via
virtual functions for which the derived object would need to be constructed,
which is the case for 'regIOobject'.

'typeIOobject' replaces the previous separate functions 'typeHeaderOk' and
'typeFilePath' with a single consistent interface.
2021-08-12 10:12:03 +01:00
6a657c4338 topoSet: Rationalised the name keyword for zones and patches
For a set to zone conversion the name of the zone is now specified with the
'zone' keyword.

For a patch to set conversion the name of the patch is now specified with the
'patch' keyword.

Backward-compatibility is supported for both these changes.

Additionally the file name of a searchableSurface file is specified with the
'file' keyword.  This should be 'surface' but that keyword is currently and
confusingly used for the surface type rather than name and this cannot be
changed conveniently while maintaining backward compatibility.
2021-07-27 15:44:08 +01:00
15a27fee87 topoSet: the sourceInfo sub-dictionary of the topoSetDict actions is now optional
and only needed if there is a name clash between entries in the source
specification and the set specification, e.g. "name":

    {
        name    rotorCells;
        type    cellSet;
        action  new;
        source  zoneToCell;
        sourceInfo
        {
            name    cylinder;
        }
    }
2021-07-27 14:07:37 +01:00
6cc34206c3 patchFluxToFace: New topoSetSource to select patch faces according to the flux direction
Description
    A topoSetSource to select patch faces according to the flux direction.

Usage
    Example topoSetDict to generate faceSets for inflow and outflow faces
    on the outlet patch:
    \verbatim
    actions
    (
        {
            action  new;
            type    faceSet;
            name    inflow;
            source  patchFluxToFace;
            sourceInfo
            {
                field       phi;
                patch       outlet;
                inflow      true;
            }
        }

        {
            action  new;
            type    faceSet;
            name    outflow;
            source  patchFluxToFace;
            sourceInfo
            {
                field       phi;
                patch       outlet;
                inflow      false;
            }
        }
    );
    \endverbatim
2021-07-26 16:54:13 +01:00
976de0baf5 topoSetSources: Removed redundant code 2021-07-26 16:48:14 +01:00
8d887e0a86 Completed the replacement of setSet with topoSet
topoSet is a more flexible and extensible replacement for setSet using standard
OpenFOAM dictionary input format rather than the limited command-line input
format developed specifically for setSet.  This replacement allows for the
removal of a significant amount of code simplifying maintenance and the addition
of more topoSet sources.
2021-07-23 19:22:50 +01:00
ee777e4083 Standardise on British spelling: -ize -> -ise
OpenFOAM is predominantly written in Britain with British spelling conventions
so -ise is preferred to -ize.
2021-06-01 19:11:58 +01:00
9e947d1644 topoSet: Renamed point entries for cylinder sources
End points of topoSet cylinder sources should now be specified as
"point1" and "point2", which is consistent with other parts of the code.

The previous keywords, "p1" and "p2" have been retained for backwards
compatibility but may be removed in future.
2021-01-14 08:33:57 +00:00
def4772281 Documentation: Centred the Class Declaration comment
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2020-08-28 13:28:58 +01:00
d82d47c74b regIOobject.H: Rationalised includes 2020-08-21 08:40:47 +01:00
4deaba90f7 cylinderAnnulusToFace, cylinderToFace: Corrected setType
Resolves bug-report https://bugs.openfoam.org/view.php?id=3453
2020-02-14 17:06:22 +00:00
5eaf74c3a4 dictionary scalar lookup: simplified syntax using the type templated lookup function
Replaced
    readScalar(dict.lookup("name"))
with
    dict.lookup<scalar>("name")
2019-11-27 14:56:32 +00:00
5e09cccd9c topoSet: Corrected output of size of zones and patches in parallel 2019-10-01 14:57:17 +01:00
8e9f692aa4 Standardised the class declaration section comments to correspond to the foamNewSource template 2019-06-13 21:26:33 +01:00
bf54ab67e1 Updated OpenFOAM Foundation web-link in headers 2018-07-06 21:42:54 +01:00
fc2b2d0c05 OpenFOAM: Rationalized the naming of scalar limits
In early versions of OpenFOAM the scalar limits were simple macro replacements and the
names were capitalized to indicate this.  The scalar limits are now static
constants which is a huge improvement on the use of macros and for consistency
the names have been changed to camel-case to indicate this and improve
readability of the code:

    GREAT -> great
    ROOTGREAT -> rootGreat
    VGREAT -> vGreat
    ROOTVGREAT -> rootVGreat
    SMALL -> small
    ROOTSMALL -> rootSmall
    VSMALL -> vSmall
    ROOTVSMALL -> rootVSmall

The original capitalized are still currently supported but their use is
deprecated.
2018-01-25 09:46:37 +00:00
b552b4eae5 cylinderToFace, cylinderAnnulusToFace: New face sources
Face equivalents of cylinderToCell and cylinderAnnulusToCell.

Tested-by: Henry Weller <http://openfoam.org>
2017-11-27 11:37:03 +00:00
4500971827 Further standardization of loop index naming: pointI -> pointi, patchI -> patchi 2016-05-18 21:20:42 +01:00
a8bf4be58a Standardized cell, patch, face and processor loop index names 2016-04-25 12:00:53 +01:00
8c4f6b8fcb Standardized cell, patch and face loop index names 2016-04-25 10:28:32 +01:00
287603474a vector::zero -> Zero 2016-04-16 18:34:41 +01:00
5e6a7ea282 Completed update ...ErrorIn -> ...ErrorInFunction
Avoids the clutter and maintenance effort associated with providing the
function signature string.
2015-11-11 09:03:39 +00:00
f58fd14271 Corrected capitalization of Doxygen documentation comments 2015-02-14 13:10:15 +00:00
446e5777f0 Add the OpenFOAM source tree 2014-12-10 22:40:10 +00:00