Commit Graph

4328 Commits

Author SHA1 Message Date
3631f13a98 sampledSurface/writers: Removed unnecessary "verbose" argument 2020-01-28 22:46:00 +00:00
ac22da9499 sampledSurface/writers: Rationally renamed writeTemplate -> write 2020-01-28 20:24:22 +00:00
622f472283 vtkSurfaceWriter: Rationalised writing to use vtkWriteOps
avoiding code duplication and providing support for writing binary.
2020-01-28 17:33:29 +00:00
9ff1e2e168 foamToVTK: Rationalised the low-level write function to avoid 3x duplication
Moved the writeFuns into the vtkWriteOps namespace which is extensible, see the
the write functions in setSet as an example of this.
2020-01-28 16:12:57 +00:00
a296733a76 hashedWordList: Removed the "contains" member function
the same functionality is provided by the standard HashTable "found" function.
2020-01-28 16:09:03 +00:00
6e32ca010a globalIndexAndTransform: Correction to handle rotation around a non-zero centre 2020-01-27 17:06:39 +00:00
55b982eeea transformer: Generalised to permit scaling and improved abstraction
Transformer now supports scaling matrices. The number of ways in which
transformer can be constructed has also been reduced to null (i.e.,
identity), pure translation, pure scaling and pure rotation. Compound
translations must be constructed by combining transformers with the
dot-product (&) operator. In this way, the details of in what order the
different parts of the transformation are applied have been abstracted.
2020-01-27 16:35:52 +00:00
ea3e891dab tutorials/mesh/snappyHexMesh/pipe: Calculate closeness from the pipe wall only 2020-01-27 15:14:11 +00:00
f4e47fccbc Corrected typos in comments
Patch contributed by Timo Niemi, VTT.
Resolves patch request https://bugs.openfoam.org/view.php?id=3437
2020-01-26 13:40:14 +00:00
8a6cb87b79 createPatch: Removed obsolete code
Removed a synchronisation step that is no longer necessary now that
coupled patches have uniform transformations
2020-01-24 15:38:31 +00:00
95e96634f8 particle: Prevent divide by zero when debugging 2020-01-24 15:35:30 +00:00
509f15a0c5 snappyHexMesh: Added new experimental region refinement strategy based on the local span
In the new tutorial mesh/snappyHexMesh/pipe the pipe diameter changes by a factor
of 2 but the number of cells across the pipe is specified to be constant along
the length using the new "span" refinement mode in which the number of cells
across the span is set to be at least 40:

    refinementRegions
    {
        pipe
        {
            mode span;
            levels ((1000 2));  // Maximum distance and maximum level
            cellsAcrossSpan 40;
        }
    }

This operates in conjunction with the "pointCloseness" option in surfaceFeatures
which writes a surfacePointScalarField of the local span of the domain.  Note
that the behaviour of this option is critically dependent on the quality of this
field and the surface may need to be re-triangulated more isotropically to
ensure the "pointCloseness" is accurate and representative of the domain and the
required mesh distribution.
2020-01-24 15:19:38 +00:00
3217f90703 refineWallLayer: Further improvement to the cellSet selection 2020-01-24 13:49:37 +00:00
f67fa33417 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2020-01-24 11:56:17 +00:00
8e6d792ff5 sampledPlane: Removed unused and broken constructor
Resolves bug report https://bugs.openfoam.org/view.php?id=3434
2020-01-24 11:55:41 +00:00
76a725b7b0 cyclicPolyPatch, GeometricBoundaryField: Updated diagnostic messages 2020-01-24 11:55:26 +00:00
c8a1c95b06 IOobject: Added localPath and localObjectPath member functions
For many information and diagnostic messages the absolute path of the object is
not required and the local path relative to the current case is sufficient; the
new localObjectPath() member function of IOobject provides a convenient way of
printing this.
2020-01-24 11:52:45 +00:00
3c1456571e foamUpgradeCyclics: Removed, no longer required 2020-01-24 11:43:09 +00:00
0876ca78c6 refineWallLayer: Improved efficiency of the -inSet option 2020-01-24 10:52:05 +00:00
d7a452ccf2 refineWallLayer: Changed name of the -useSet option to -inSet, corrected operation and documentation
Resolves bug-report https://bugs.openfoam.org/view.php?id=3435
2020-01-24 10:39:58 +00:00
5b6fd01949 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2020-01-23 22:09:32 +00:00
7d03aeee92 surfaceFilmModels: lag the capillary pressure term
to avoid staggering patterns created by an unstable coupling between this term
and the film thickness.  Further relaxation of this term may be required for
cases dominated by surface tension effects.
2020-01-23 22:07:25 +00:00
e433a505fd cyclicTransform: Backwards compatibility 2020-01-23 13:17:13 +00:00
f550db1a5f Scotch: Upgrade to 6.0.9
This is to resolve a bug in the ptscotch rebalancing of the LES
motorBike mesh when running with the new coupled patch ordering
2020-01-22 11:48:50 +00:00
87bce82854 coupledPolyPatch: Rewrite transformations and ordering
The calculation and input/output of transformations has been rewritten
for all coupled patches. This replaces multiple duplicated, inconsistent
and incomplete implementations of transformation handling which were
spread across the different coupled patch types.

Transformations are now calculated or specified once, typically during
mesh construction or manipulation, and are written out with the boundary
data. They are never re-calculated. Mesh changes should not change the
transformation across a coupled interface; to do so would violate the
transformation.

Transformations are now calculated using integral properties of the
patches. This is more numerically stable that the previous methods which
functioned in terms of individual faces. The new routines are also able
to automatically calculate non-zero centres of rotation.

The user input of transformations is backwards compatible, and permits
the user to manually specify varying amounts of the transformation
geometry. Anything left unspecified gets automatically computed from the
patch geometry. Supported specifications are:

    1) No specification. Transformations on cyclics are automatically
    generated, and cyclicAMI-type patches assume no transformation. For
    example (in system/blockMeshDict):

        cyclicLeft
        {
            type                cyclic;
            neighbourPatch      cyclicRight;
            faces               ((0 1 2 3));
        }

        cyclicRight
        {
            type                cyclic;
            neighbourPatch      cyclicLeft;
            faces               ((4 5 6 7));
        }

    2) Partial specification. The type of transformation is specified
    by the user, as well as the coordinate system if the transform is
    rotational. The rotation angle or separation vector is still
    automatically generated. This form is useful as the signs of the
    angle and separation are opposite on different sides of an interface
    and can be difficult to specify correctly. For example:

        cyclicLeft
        {
            type                cyclic;
            neighbourPatch      cyclicRight;
            transformType       translational;
            faces               ((0 1 2 3));
        }

        cyclicRight
        {
            type                cyclic;
            neighbourPatch      cyclicLeft;
            transformType       translational;
            faces               ((4 5 6 7));
        }

        cyclicAMILeft
        {
            type                cyclicAMI;
            neighbourPatch      cyclicAMIRight;
            transformType       rotational;
            rotationAxis        (0 0 1);
            rotationCentre      (0.05 -0.01 0);
            faces               ((8 9 10 11));
        }

        cyclicAMIRight
        {
            type                cyclicAMI;
            neighbourPatch      cyclicAMILeft;
            transformType       rotational;
            rotationAxis        (0 0 1);
            rotationCentre      (0.05 -0.01 0);
            faces               ((12 13 14 15));
        }

    3) Full specification. All parameters of the transformation are
    given. For example:

        cyclicLeft
        {
            type                cyclic;
            neighbourPatch      cyclicRight;
            transformType       translational;
            separaion           (-0.01 0 0);
            faces               ((0 1 2 3));
        }

        cyclicRight
        {
            type                cyclic;
            neighbourPatch      cyclicLeft;
            transformType       translational;
            separaion           (0.01 0 0);
            faces               ((4 5 6 7));
        }

        cyclicAMILeft
        {
            type                cyclicAMI;
            neighbourPatch      cyclicAMIRight;
            transformType       rotational;
            rotationAxis        (0 0 1);
            rotationCentre      (0.05 -0.01 0);
            rotationAngle       60;
            faces               ((8 9 10 11));
        }

        cyclicAMIRight
        {
            type                cyclicAMI;
            neighbourPatch      cyclicAMILeft;
            transformType       rotational;
            rotationAxis        (0 0 1);
            rotationCentre      (0.05 -0.01 0);
            rotationAngle       60;
            faces               ((12 13 14 15));
        }

Automatic ordering of faces and points across coupled patches has also
been rewritten, again replacing multiple unsatisfactory implementations.

The new ordering method is more robust on poor meshes as it
geometrically matches only a single face (per contiguous region of the
patch) in order to perform the ordering, and this face is chosen to be
the one with the highest quality. A failure in ordering now only occurs
if the best face in the patch cannot be geometrically matched, whether
as previously the worst face could cause the algorithm to fail.

The oldCyclicPolyPatch has been removed, and the mesh converters which
previously used it now all generate ordered cyclic and baffle patches
directly. This removes the need to run foamUpgradeCyclics after
conversion. In addition the fluent3DMeshToFoam converter now supports
conversion of periodic/shadow pairs to OpenFOAM cyclic patches.
2020-01-22 11:45:18 +00:00
d38a680dae surfaceFeatures: Separated "closness" option into "faceCloseness" and "pointCloseness"
For complex geometries the calculation of surface face and point "closeness" can
be quite time consuming and usually only one or other is required; the new
options allow the user to specify which should be calculated and written.
20200120
2020-01-18 23:04:49 +00:00
05966af49c surfaceFeatureExtract: Removed deprecated utility, replaced by surfaceFeatures 2020-01-18 23:04:00 +00:00
3097097003 gmshToFoam: Updated the reading of tags starting with '$' as variables rather than words
Resolves bug-report https://bugs.openfoam.org/view.php?id=3431
2020-01-17 15:03:05 +00:00
86f2d8a40c reactingEulerFoam/.../populationBalanceModel: Reset source update counter on restart
The source update counter is now always initialised to zero. Previously
an attempt was made to determine the current number of iterations
reached so that on restart the source updates occur at the same
intervals as they would have had the simulation not been stopped. The
problem with this is that the sources themselves are not stored to disk,
so on restart a simulation could progress for quite some time before the
sources were properly initialised at the next update.

Resetting the counter to zero does not give a perfect restart (i.e., as
if the simulation had continued without stopping), but it does provide a
stable and consistent solution sequence. Perfect restart could only be
achieved with this iteration procedure by writing all the sources to
disk and reading them back in again. This is considered a worse
compromise due to the amount of disk space that it would require.

Patch contributed by Timo Niemi, VTT.
2020-01-16 12:22:04 +00:00
aedb440750 reactingEulerFoam/.../ThermalPhaseChangePhaseSystem: Improvements
The thermal phase system now operates with saturation models specified
per phase-pair, and can therefore represent multiple transfer processes
across different interfaces. There is no longer a "phaseChange" switch;
instead the selection of a saturation model for a given interface
enables phase change across that interface. This includes both
interfacial phase change and nucleate wall boiling.

Both interfacial phase change and wall boiling models now include
support for there being a single specified volatile component which
undergoes phase change.

A correction has been made to the phase change energy transfer when only
interfacial phase change is enabled.

The thermal phase change tutorials have all been updated to reflect
these changes in the user interface.

Patch contributed by Juho Peltola, VTT.
2020-01-16 11:34:15 +00:00
26c0b39729 tutorials/mesh/foamyHexMesh/mixerVessel: Removed pending further development of foamyHexMesh
The mixerVessel case is currently fragile and needs some improvement along with
further development of foamyHexMesh to mesh reliably.
2020-01-15 23:33:25 +00:00
393ff23b48 transformer: Corrected &= and & operators for combined translation and rotation 2020-01-14 16:31:28 +00:00
2771c1f85c coupledPolyPatch: Added initialisation of ordering_ data member
Resolves bug-report https://bugs.openfoam.org/view.php?id=3428
2020-01-13 19:55:18 +00:00
7fdfe4224a transformer: Added the translates boolean to the IO 20200112 2020-01-10 15:59:50 +00:00
c26037e4d9 dictionary::functionEntry: Added support for efficiently passing un-expanded functionEnties between processors 2020-01-10 12:59:17 +00:00
961d071691 UIPstream: Added support for parsing functionName in dictionaries 2020-01-10 12:58:44 +00:00
a227fa6238 functionEntry: Resolved issue with the parallel transfer of unexpanded functionEntries 2020-01-09 22:05:17 +00:00
2f8254901b Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2020-01-08 15:04:39 +00:00
2b82c3564e surfaceFilmModels::laminar: Corrected the surface velocity
obtained from a parabolic profile assumption.
2020-01-08 15:03:55 +00:00
30f3d5e886 molecule: Updated transformations for position data 2020-01-08 12:53:48 +00:00
9c5dd03456 snappyHexMesh: Fixed "cannot find triSurfaceMesh" error message 2020-01-08 10:36:20 +00:00
d8209247b1 foamDictionary: Allow functionEntry expansion with -entry option
Resolves bug-report https://bugs.openfoam.org/view.php?id=3422
2020-01-07 21:25:09 +00:00
8eba55f5d2 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2020-01-07 21:24:54 +00:00
50d1355fa1 coupled patches: Refactored transformPosition function
reducing code duplication and removing associated errors thus simplifying
maintenance.
2020-01-07 21:23:09 +00:00
47ae10a310 sampledSet: Corrected header documentation 2020-01-06 14:25:19 +00:00
cfead3c2c0 sampledSet: Added cellSet and faceSet sampled sets
Added sets for sampling the cell-centres and face-centres of a cellSet
or faceSet. Example usage:

    sets
    (
        c0
        {
            type cellSet;
            set c0;
            axis xyz;
        }

        f0
        {
            type faceSet;
            set f0;
            axis xyz;
        }
    );
2020-01-06 14:22:33 +00:00
a79f8966b0 filmViscosityModel::thixotropicViscosity: Corrected for clang 2020-01-05 09:58:01 +00:00
5c81c1f478 processorFvPatchField: Removed unnecessary template specialisation 2020-01-05 09:56:25 +00:00
bf6de2bcc2 Rationalised and standardised the naming of neighbour patch functions in the cyclic patch implementations 2020-01-04 19:32:52 +00:00
43602e0e18 coupledPolyPatch: Refactored to separate transformation into the separate class cyclicTransform
All cyclic patches now derive from cyclicTransform to localise the calculation
and application of cyclic transformation and aid the rationalisation of the
calculation methods.
2020-01-04 14:26:50 +00:00