Commit Graph

2325 Commits

Author SHA1 Message Date
b06ab58a18 OSspecific: Removed unused random generator functions 2018-06-11 11:01:11 +01:00
002e7d7b06 Random: Replaced drand48 with an in-class implementation
This is faster than the library functionality that it replaces, as it
allows the compiler to do inlining. It also does not utilise any static
state so generators do not interfere with each other. It is also faster
than the the array lookup in cachedRandom. The cachedRandom class
therefore offers no advantage over Random and has been removed.
2018-06-11 11:01:11 +01:00
88a218ce84 treeBoundBox: Removed unecessary randomisation
Tree bound boxes are expanded asymmetrically to reduce the liklihood of
octree faces aliging with mesh faces and edges. The asymmetry is now
generated using hard-coded irrational numbers, rather than using a
random generator.

The asymmetry was effectively already hard coded. The random numbers are
only pseudo random, so the same numbers were being applied to the bound
boxes every time. This change simply removes the overhead of creating
the generator, and also gets rid of some duplicated code.
2018-06-11 11:01:11 +01:00
a6e159ae5f Make/options: Rationalized the layout of the EXE_INC statements 2018-06-10 17:11:22 +01:00
338af65685 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2018-06-08 23:02:33 +01:00
8ab5b6152e CSV: Updated writing of componentColumns for consistency with construction for binary IO
Resolves bug-report https://bugs.openfoam.org/view.php?id=2950
2018-06-08 23:01:24 +01:00
50a965f886 particle: Fixed topology error in locate method
Fixes problem introduced by commit 89de5349
2018-06-08 15:58:22 +01:00
89de534923 particle: Improved robustness of locate method 2018-06-07 12:10:29 +01:00
99bdbfae15 particle: Improved debugging for tracking on moving meshes 2018-06-07 09:23:01 +01:00
873d2c9c23 seulex: changed monotonicity check to correspond to original implementation
Resolves bug-report https://bugs.openfoam.org/view.php?id=2972
2018-06-06 15:13:08 +01:00
7f49d6e2cc scale: function object to multiply a field by a scale factor 2018-06-06 09:41:04 +01:00
1223da98f7 cyclicRepeatAMI: Added error message for zero-sized transform patch
Sometimes decomposition can remove a cyclic patch entirely, converting
it into a processor cyclic. If this patch is being used to specify the
transform for a cyclicRepeatAMI patch then the calculation will fail.
This change adds a check for this situation, and errors with the
suggestion that the transform patch be preserved during decomposition.
2018-06-04 10:50:56 +01:00
11a3b3b99f ConeInjection, ConeNozzleInjection: Synchronised random numbers
The use of random numbers for positioning within the cone injection
models has been made consistent across all cores. Some calls have been
synchronised by means of the globalSample methods, whilst others have
been replaced by non-randomised algorithms.

This resolves bug report https://bugs.openfoam.org/view.php?id=2956
2018-05-31 17:08:20 +01:00
1e4f0e06a9 POSIX::readDir: filter .orig from name of filtergz set 2018-05-31 16:47:15 +01:00
b989b81d16 VectorSpace, Vector: Added findMin, findMax and perpendicular functions
The functions findMin and findMax return the index of the minimum or
maximum component, consistently with the functions in ListOps.H. The
perpendicular function returns an arbitrary vector perpendicular to the
supplied vector, with the same magnitude.
2018-05-31 15:15:40 +01:00
e7d68ad8a4 radiationCoupledBase: Improved error message when solid region radiation is not defined 2018-05-30 16:54:43 +01:00
d5903c3897 fileName: moved file operation global function to fileOperation 2018-05-30 12:48:48 +01:00
64da5dab55 fileName: Added cpFiles function
//- Copy all the files from the source to the target directory
void cpFiles(const fileName& srcDir, const fileName& targetDir);
2018-05-28 22:14:22 +01:00
63a185450b genericPolyPatch: Avoid writing duplicate entry for "inGroups" and "faces"
Resolves bug-report https://bugs.openfoam.org/view.php?id=2955
2018-05-24 14:38:33 +01:00
f14637a965 regIOobject: Avoid segmentation fault when destroying objectRegistry with debug on 2018-05-24 13:29:11 +01:00
6c560795cb externalWallHeatFluxTemperature: Use the surface emissivity for both emission and absorption
Resolves bug-report https://bugs.openfoam.org/view.php?id=2953
2018-05-23 14:14:01 +01:00
567fc90492 Corrected "fileName" -> "file" in header documentation
Patch contributed by Bruno Santos
Resolves bug-report https://bugs.openfoam.org/view.php?id=2951
2018-05-22 22:30:46 +01:00
5caa5a3e9b snappyHexMesh::layerParameters: Increased the maximum number of layer expansion iterations to 100
Resolves bug-report https://bugs.openfoam.org/view.php?id=2938
2018-05-22 20:03:27 +01:00
314e464f7d Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2018-05-22 20:01:39 +01:00
26ec6f8ceb freestreamPressureFvPatchScalarField: Added support for supersonic freestream
Set the new optional switch "supersonic" to true if the freestream flow is
supersonic.
2018-05-22 20:00:30 +01:00
9dcdf23a6b waveSuperposition: Corrected copy construction of heightAboveWave flag
Resolves bug report https://bugs.openfoam.org/view.php?id=2930
2018-05-21 11:06:32 +01:00
ceebbf8740 semiPermeableBaffle: Spelling corrections 2018-05-21 09:01:51 +01:00
4bd59d64db pimpleLoop: Fixed bug when convergence occurs on last iteration
Resolves bug report https://bugs.openfoam.org/view.php?id=2940
2018-05-17 17:53:15 +01:00
c667687dd2 thermophysicalModels: Instantiations for reacting liquids
Stabilisation has also been added to the perfectFluid == operator to
allow for use of this equation of state in a reacting fluid.
2018-05-16 16:21:15 +01:00
598ea11563 PatchInteractionModel: Removed MultiInteraction
MultiInteraction appeared to have been written for combining the usual
patch interaction models with a model called
CoincidentBaffleInteraction, which was never released. None of the
remaining patch interaction models make sense operating in combination,
so the MultiInteraction model has been removed. All documentation
references to CoincidentBaffleInteraction have also been deleted.

Resolves bug report https://bugs.openfoam.org/view.php?id=2939
2018-05-16 12:55:50 +01:00
4e21098cb5 MPPICParcel: Retain effect of patch interactions on correction velocity
This prevents infinite loops occurring during correction steps as a
result of a fixed correction velocity repeatedly pushing the particle
towards a rebound patch.

Resolves bug report https://bugs.openfoam.org/view.php?id=2935
2018-05-16 11:52:34 +01:00
d0dfb1a843 decomposePar, reconstructPar: Rationalized the handling of the allRegions option 2018-05-14 19:51:54 +01:00
e57a62b400 solidificationMeltingSource: Improved documentation
Patch contributed by Lorenzo Trevisan
Resolves patch request https://bugs.openfoam.org/view.php?id=2932
2018-05-14 17:23:34 +01:00
d030bb35c3 fixedTemperatureConstraint: corrected documentation
Patch contributed by Bruno Santos
Resolves bug-report https://bugs.openfoam.org/view.php?id=2927
2018-05-14 16:52:05 +01:00
f9fc13da5c Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2018-05-14 16:49:54 +01:00
8217f0d4ac solidificationMeltingSource: Changed default for alpha1e_ to 0.0
Resolves bug-report https://bugs.openfoam.org/view.php?id=2931
2018-05-14 16:48:34 +01:00
e7a9581d79 particle: Added trackToCell function
This is equivalent to track to face, but it additionally crosses
internal faces at the end of the track to move into the next cell. This
is a common procedure when performing post-processing tracking
operations.
2018-05-14 15:16:13 +01:00
5cca0a119a EDC: Corrected documentation 2018-05-11 16:24:22 +01:00
c60fb65681 NamedEnum: Check range of names array index to avoid warning from gcc 2018-05-11 16:10:50 +01:00
1f96fbc89f mappedPatchBase: Added diagnostic message in the case the mapping fails 2018-05-11 10:33:38 +01:00
d501e87ec2 rigidBodyDynamics: Added some 0-DoF joints
The new "rigid" joint permits no motion at all, "function" specifies the
position of the joint as a function of the position of it's parent, and
"functionDot" specifies the position of the joint as a function of the
velocity of it's parent. Note that the functions are applied uniformly
to each component of the parent joint's position/motion. Example
specifications are shown below.

    joint
    {
        type    rigid;
    }

    joint
    {
        type    function;
        function table ((-1 0) (0 1) (1 0));
    }

    joint
    {
        type    functionDot;
        function table ((-1 0) (0 1) (1 0));
    }

This work was supported by Caitlin Worden Hodge, at Zyba
2018-05-09 16:03:16 +01:00
f39bf2d84d rigidBodyDynamics: Added support for 0-DoF joints
This allows for fixed joints or joints which completely constrain the
motion as a function of some other aspect of the model. The latter has
also been facilitaed by adding a reference to the rigid body model to
the base joint class.
2018-05-09 15:15:23 +01:00
3682e7ad9d Added support for gcc-8.1 2018-05-08 19:57:47 +01:00
c3be52bcd6 Corrected 'Class' entries in headers
Using script provided by Bruno Santos
See https://bugs.openfoam.org/view.php?id=2919
2018-05-07 14:18:44 +01:00
4ba4613eca regionModels: Corrected 'Class' entries in headers
Patch contributed by Bruno Santos
Resolves patch request https://bugs.openfoam.org/view.php?id=2919
2018-05-07 13:41:30 +01:00
c8562a14f2 energyJumpFvPatchScalarField.H: Removed unused #include
Patch contributed by Bruno Santos
Resolves bug-report https://bugs.openfoam.org/view.php?id=2919
2018-05-07 13:37:32 +01:00
400cd4a889 wmake options files: Removed -I options referring to non-existent directories
Resolves bug-report https://bugs.openfoam.org/view.php?id=2917
2018-05-04 17:16:46 +01:00
19efd8e696 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2018-05-03 16:02:58 +01:00
3c000dabec wmake, wmakeLnIncludeAll: Automated the creation of the lnInclude directories based on dependency
Now lnInclude are created as required by the presence of entries in the EXE_INC
variable in the Make/options file.  This removes the need for calling
wmakeLnInclude in various Allwmake files to ensure the existence of the
lnInclude directories prior to compilation of dependent libraries.
2018-05-03 15:59:50 +01:00
bad26bee71 solidificationMeltingSource: Added support for non-isothermal phase-change
Requires the following changes to the corresponding entry in the fvOptions dictionary:

   i.  Use Tsol instead Tmelt as previously to define melting temperature in
       isothermal phase change (for pure substance or eutectic mixture -> Tsol = Tliq);

   ii. Optionally define new Tliq > Tsol to consider liquidus temperature in
       non-isothermal phase change (for miscible mixture), where previous
       defined Tsol defines solidus temperature;

   iii. optionally define also alpha1e to consider max eutectic melt
        fraction (that should be the percentage of solvent phase changed from
        initial to eutectic liquid concentration) in partially isothermal (at
        Tsol=Teutectic) and non-isothermal (from Tsol=Teutectic to Tliq) phase
        change (for solid not miscible mixture) (alpha1e=0 -> pure substance;
        alpha1e=1 -> eutectic mixture that is strictely not permitted).

Description
    This source is designed to model the effect of solidification and melting
    processes, e.g. windhield defrosting.

    The isotherm phase change occurs at the melting temperature, \c Tsol (= \c
    Tliq). The not isotherm phase change occurs between solidus and liquidus
    temperature, \c Tsol < \c Tliq respectively, as long as the melt fraction is
    greater than the max eutectic melt fraction, \c alpha1e (0 =
    pure_substance, 1 = eutectic_mixture is not permitted) , i.e. eutectic to
    initial solvent concentration difference, where a linear eutectic melt
    fraction to temperature relation is considered - lever rule.

    The presence of the solid phase in the flow field is incorporated into the
    model as a momentum porosity contribution; the energy associated with the
    phase change is added as an enthalpy contribution.

    References:
    \verbatim
        Voller, V. R., & Prakash, C. (1987).
        A fixed grid numerical modelling methodology for convection-diffusion
        mushy region phase-change problems.
        International Journal of Heat and Mass Transfer, 30(8), 1709-1719.

        Swaminathan, C. R., & Voller, V. R. (1992).
        A general enthalpy method for modeling solidification processes.
        Metallurgical transactions B, 23(5), 651-664.
    \endverbatim

    The model generates the field \c \<name\>:alpha1 which can be visualised to
    to show the melt distribution as a fraction [0-1].

Usage
    Example usage:
    \verbatim
    solidificationMeltingSource1
    {
        type            solidificationMeltingSource;
        active          yes;

        selectionMode   cellZone;
        cellZone        iceZone;

        Tsol            273;
        L               334000;
        thermoMode      thermo;
        beta            50e-6;
        rhoRef          800;
    }
    \endverbatim

    Where:
    \table
        Property   | Description                     | Required | Default value
        Tsol       | Solidus temperature [K]             | yes      |
        Tliq       | Liquidus temperature [K]            | no       | Tsol
        alpha1e    | Max eutectic melt fraction [0-1[    | no       | 0
        L          | Latent heat of fusion [J/kg]        | yes      |
        relax      | Relaxation coefficient [0-1]        | no       | 0.9
        thermoMode | Thermo mode [thermo|lookup]         | yes      |
        rhoRef     | Reference (solid) density [kg/m^3]  | yes      |
        rho        | Name of density field               | no       | rho
        T          | Name of temperature field           | no       | T
        Cp         | Name of specific heat field         | no       | Cp
        U          | Name of velocity field              | no       | U
        phi        | Name of flux field                  | no       | phi
        Cu         | Model coefficient [1/s]             | no       | 100000
        q          | Model coefficient                   | no       | 0.001
        beta       | Thermal expansion coefficient [1/K] | yes      |
        g          | Accelerartion due to gravity        | no       |
    \endtable

Patch contributed by Lorenzo Trevisan and integrated by CFD Direct.

Resolves patch request https://bugs.openfoam.org/view.php?id=2907
2018-05-01 15:59:00 +01:00