Commit Graph

3138 Commits

Author SHA1 Message Date
06ade28f93 blockMesh: Stabilised arc-cosine argument for 180 degree arcs 2018-05-01 13:06:10 +01:00
87e32ab499 Code style: Updated line comments to start with a space
//This is a comment   ->   // This is a comment
2018-05-01 11:57:50 +01:00
9ffc025b08 wmkdep: Simplified file scanning for dependencies avoiding too many open files
This change ensures only one include file is open at a time by storing the
included files on a dynamic list rather than scanning the tree and holding a
list of open buffers.  This new approach is a bit faster and avoids the "too
many open files" error on machines with low limits on the number of file
descriptors allocated to users.
2018-05-01 11:12:38 +01:00
35c3c814ce tutorials: Allrun: Corrected subshell handling of logging function 20180501 2018-04-30 17:41:58 +01:00
826e009c2e cycicACMI: Removed duplicate code in fv and fvs patches and fields 2018-04-30 14:33:15 +01:00
785a7d9e3f cyclicRepeatAMI: New constraint patch type
A new constraint patch has been added which permits AMI coupling in
cyclic geometries. The coupling is repeated with different multiples of
the cyclic transformation in order to achieve a full correspondence.
This allows, for example, a cylindrical AMI interface to be used in a
sector of a rotational geometry.

The patch is used in a similar manner to cyclicAMI, except that it has
an additional entry, "transformPatch". This entry must name a coupled
patch. The transformation used to repeat the AMI coupling is taken from
this patch. For example, in system/blockMeshDict:

boundary
(
    cyclic1
    {
        type cyclic;
        neighbourPatch cyclic2;
        faces ( ... );
    }

    cyclic2
    {
        type cyclic;
        neighbourPatch cyclic1;
        faces ( ... );
    }

    cyclicRepeatAMI1
    {
        type cyclicRepeatAMI;
        neighbourPatch cyclicRepeatAM2;
        transformPatch cyclic1;
        faces ( ... );
    }

    cyclicRepeatAMI2
    {
        type cyclicRepeatAMI;
        neighbourPatch cyclicRepeatAMI1;
        transformPatch cyclic1;
        faces ( ... );
    }

    // other patches ...
);

In this example, the transformation between cyclic1 and cyclic2 is used
to define the repetition used by the two cyclicRepeatAMI patches.
Whether cyclic1 or cyclic2 is listed as the transform patch is not
important.

A tutorial, incompressible/pimpleFoam/RAS/impeller, has been added to
demonstrate the functionality. This contains two repeating AMI pairs;
one cylindrical and one planar.

A significant amount of maintenance has been carried out on the AMI and
ACMI patches as part of this work. The AMI methods now return
dimensionless weights by default, which prevents ambiguity over the
units of the weight field during construction. Large amounts of
duplicate code have also been removed by deriving ACMI classes from
their AMI equivalents. The reporting and writing of AMI weights has also
been unified.

This work was supported by Dr Victoria Suponitsky, at General Fusion
2018-04-30 09:23:52 +01:00
c1b380c867 solutionControl: Fixed failure to reset some solution indices
This resolves bug report https://bugs.openfoam.org/view.php?id=2913
20180428
2018-04-26 15:36:50 +01:00
26c79928b5 tutorials: Clean up of Allrun and Alltest scripts 2018-04-26 10:44:52 +01:00
c14303bd51 tutorials: Added exit code to Allrun and Alltest scripts
Patch contributed by Institute of Fluid Dynamics, Helmholtz-Zentrum
Dresden - Rossendorf (HZDR)
2018-04-26 09:45:50 +01:00
b7d5bc98de solutionControl: Fix repeat-write when converged at a write time
Solution controls now detect when convergence occurs at a write time and
avoid writing the final directory twice. This also resolves the issue
whereby a purgeWrite setting would remove an extra directory.

This resolves bug report https://bugs.openfoam.org/view.php?id=2904
2018-04-25 12:35:34 +01:00
484c16a5da stitchMesh: Do not write the meshModifiers file with the "overwrite" option 2018-04-24 14:04:26 +01:00
4e0081d231 Time: Allow the adjustDeltaT function to increase the time-step up to 1%
when adjusting the time-step to conform to the write time to avoid rapid
fluctuations in the time-step and round-off comparison issues.
2018-04-24 12:10:34 +01:00
f12cb590b2 forceCoeffs: Corrected documentation
Resolves bug-report https://bugs.openfoam.org/view.php?id=2909
2018-04-24 10:11:07 +01:00
b2b2b38a1c reactingEulerFoam: Corrected blending for two-resistance models 2018-04-23 14:11:21 +01:00
e6c2246276 reactingEulerFoam: Added phaseForces functionObject
Added a function object for the reacting Euler-Euler solvers which
evaluates and writes out the blended interfacial forces acting on a
given phase (drag, virtual mass, lift, wall lubrication and turbulent
dispersion).

Patch contributed by Institute of Fluid Dynamics, Helmholtz-Zentrum
Dresden - Rossendorf (HZDR)
2018-04-23 10:10:07 +01:00
9de5f9e761 reactingEulerFoam: Added Laakkonen et al (2006) breakup model
Patch contributed by Institute of Fluid Dynamics, Helmholtz-Zentrum
Dresden - Rossendorf (HZDR)
2018-04-23 10:10:07 +01:00
ee6216b4e7 reactingEulerFoam: Improved Sauter mean diameter calculation
The Sauter mean diameter calculation has been modified to be more stable
in the limit of vanishing phase fraction. The calculation of the overall
Sauter mean diameter for a populationBalance involving more than one
velocityGroup has been removed. This calculation depends upon the phase
fraction and it is not stable as the fractions tend to zero. The overall
Sauter mean diameter is only used for post-processing and can still be
recovered from the individual diameter fields of the involved
velocityGroups.

Some parts of the population balance modeling have also been renamed and
refactored.

Patch contributed by Institute of Fluid Dynamics, Helmholtz-Zentrum
Dresden - Rossendorf (HZDR)
2018-04-23 10:09:52 +01:00
af88b75e2c wallShearStress: Removed reference to non-existent pressureTools functionObject 20180421 2018-04-20 23:21:31 +01:00
c464cd6fe4 tutorials::annularThermalMixer: Update Allrun to use surfaceFeatures 2018-04-20 17:16:39 +01:00
aaed6290d0 surfaceFeatures: New version of surfaceFeatureExtract with simplied controls
Surfaces are specified as a list and the controls applied to each, e.g. in the
rhoPimpleFoam/RAS/annularThermalMixer tutorial:

    surfaces
    (
        "AMI.obj"
        "shaft.obj"
        "wall.obj"
        "statorBlades.obj"
        "rotorBlades.obj"
    );

    includedAngle   150;  // Identifes a feature when angle
                      // between faces < includedAngle
    trimFeatures
    {
        minElem         10;   // minimum edges within a feature
    }

    writeObj        yes;  // writes out _edgeMesh.obj files to view features

If different controls are required for different surfaces multiple
sub-dictionaries can be used:

    AMIsurfaces
    {
        surfaces
        (
            "AMI.obj"
        );

        includedAngle   140;  // Identifes a feature when angle
                          // between faces < includedAngle
        trimFeatures
        {
            minElem         8;   // minimum edges within a feature
        }

        writeObj        yes;  // writes out _edgeMesh.obj files to view features
    }

    otherSurfaces
    {
        surfaces
        (
            "shaft.obj"
            "wall.obj"
            "statorBlades.obj"
            "rotorBlades.obj"
        );

        includedAngle   150;  // Identifes a feature when angle
                          // between faces < includedAngle
        trimFeatures
        {
            minElem         10;   // minimum edges within a feature
        }

        writeObj        yes;  // writes out _edgeMesh.obj files to view features
    }

Existing feature edge files corresponding to particular surfaces can be specified using
the "files" association list:

    surfaces
    (
        "AMI.obj"
        "shaft.obj"
        "wall.obj"
        "statorBlades.obj"
        "rotorBlades.obj"
    );

    files
    (
        "AMI.obj" "constant/triSurface/AMI.obj.eMesh";
    );

    includedAngle   150;  // Identifes a feature when angle
                      // between faces < includedAngle
    trimFeatures
    {
        minElem         10;   // minimum edges within a feature
    }

    writeObj        yes;  // writes out _edgeMesh.obj files to view features
2018-04-20 15:23:28 +01:00
8144cfb516 waves: Control additions
An "inletOutlet" switch has been added to the wave velocity boundary
condition to allow the boundary to be fixed, as is possible for the
corresponding alpha condition.

A "heightAboveWave" option has been added to the wave superposition
class to calculate velocity based on the height above the wave, rather
than above the origin. This may improve initialisation but it may also
generate divergence in the initial velocity field.

The alpha condition has also been completed so that it applies a
modelled gradient when the flow points out and a wave pressure condition
is in use.
2018-04-19 10:51:28 +01:00
a0a19c7f38 fvcAverage and fvcReconstruct: Return zero for 0-D cases
fvcAverage and fvcReconstruct both do divisions or inverses of surface
summed fields. A single-cell zero-dimension case, has no genuine faces
on which to sum, so surface sums are identically zero. This change
detects this situation and returns a zero value instead of failing due
to a divide by zero.

This allows the multiphase test cases to be reduced to just one cell.
2018-04-19 09:05:29 +01:00
60b81b38da wmkdep: Added path string substitution support
to avoid the need for sed'ing the output.  This improves performance by avoiding
the need for calling additional commands and generating a temporary file.
2018-04-18 21:16:25 +01:00
a10c244686 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2018-04-18 12:53:32 +01:00
354a5173d9 wmkdep: Removed the unused -i<file> option and other legacy code
The -i<file> option is inconsistent with the -isystem include syntax and would
have to be changed if it were needed.
2018-04-18 12:52:10 +01:00
6f059eb213 NonRandomTwoLiquid: Corrected dimensions of molecular weight 2018-04-18 12:14:26 +01:00
32d44d3322 VectorSpace: Added normalised function
This is useful for creating const unit vectors
2018-04-18 09:56:38 +01:00
ab81dffe4e vectorTensorTransform: Primitive transformations 2018-04-18 09:51:44 +01:00
61f1fe8834 wmake: Improved handling of dependencies when files are removed 2018-04-17 20:38:49 +01:00
1b0e09faf0 surfaceFeatureExtract: Moved feature edge editing functions to the surfaceFeatures class 2018-04-17 20:38:15 +01:00
ded92d5951 surfaceFeatureExtract: Updated included files 2018-04-17 00:22:03 +01:00
2730fbad5c surfaceFeatureExtract: Further refactoring to move the extract surface closeness functionality
to triSurfaceMesh
2018-04-17 00:16:12 +01:00
d2085c7420 Ignore ycm files 20180415 2018-04-14 23:13:00 +01:00
40600b3cd5 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2018-04-14 11:05:24 +01:00
06adb18299 thermophysicalModels::liquidProperties: Added initial write-to-dict functionality
Needs further work to make read and write of dictionary consistent.
2018-04-14 11:04:12 +01:00
a1cc703bf8 Cloud: Removed unused data 2018-04-13 14:25:28 +01:00
8e453f3874 AttouFerschneider: Correction to cube-root of volume fraction ratio 2018-04-13 14:04:49 +01:00
c2b169c8dd vectorTensorTransform: Inverse and tensor field transforms 2018-04-13 14:04:49 +01:00
00645cdc1a functionObjects: Corrected namespace for NamedEnum
Resolves bug-report https://bugs.openfoam.org/view.php?id=2901
2018-04-13 01:11:20 +01:00
410700c7a9 compressibleInterFoam: Generalized the handling of phase temperature BCs
Resolves bug-report https://bugs.openfoam.org/view.php?id=2899
2018-04-12 23:40:00 +01:00
cd4445270f reactingEulerFoam: Fixed memory error introduced by commit efad85b0 2018-04-12 11:19:19 +01:00
ed5f44e7e8 surfaceFeatureExtract: Refactoring surface closeness functions 2018-04-12 07:42:25 +01:00
4e2074419b MomentumTransferPhaseSystem: Fixed spelling error 2018-04-11 15:34:31 +01:00
efad85b0e6 reactingEulerFoam: Mixture properties for moving phases only
The calculations for mixture rho and U have been changed so that they
represent phase-averaged quantities over the moving phases only.

The mixture density is used as part of the pressure solution to
calculate buoyancy forces. The pressure within a stationary phase is
considered to be decoupled from the moving phases; i.e., it is
considered self-supporting. Therefore the stationary phase density
should not form a part of buoyancy calculations. This change to the
definition of mixture density ensures this.
2018-04-11 14:50:13 +01:00
47a2dbcb29 reactingEulerFoam: Removed unnecessary U-grad-U calculation 2018-04-11 14:24:13 +01:00
6f4e9ec164 reactingEulerFoam: Order-independent lookup of unordered pair models
Lookup of models associated with unordered phase pairs now searches for
both possible pair names; e.g. gasAndLiquid and liquidAndGas.

Patch contributed by Institute of Fluid Dynamics, Helmholtz-Zentrum
Dresden - Rossendorf (HZDR)
2018-04-11 11:47:13 +01:00
3e1ab675f6 surfaceFeatureExtract: Refactored pointIndexHitList functionality into corresponding core classes 2018-04-10 23:08:56 +01:00
388b3107c8 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2018-04-10 21:53:30 +01:00
a908847b9c surfaceFeatureExtract: Refactored core line and edge functions corresponding classes 2018-04-10 21:52:44 +01:00
b9d7740e1f reactingEulerFoam: Update and instantiate interface composition models
The nonRandomTwoLiquid and Roult interface composition models have been
instantiated (and updated so that they compile), and a fuller set of
multi-component liquids and multi-component and reacting gases have been
used.

The selection name of the saturated and nonRandomTwoLiquid models have
also been changed to remove the capitalisation from the first letter, as
is consistent with other sub-models that are not proper nouns.
2018-04-09 09:58:00 +01:00