Commit Graph

632 Commits

Author SHA1 Message Date
Andrew Heather
d71a7857bf Merge remote-tracking branch 'origin/develop' into integration-foundation 2017-05-18 12:43:15 +01:00
Andrew Heather
20fd33e37c TUT: Moved laminar case from RAS->laminar directories 2017-05-18 11:44:52 +01:00
Andrew Heather
8a3915eb67 STYLE: Corrected header text 2017-05-17 17:35:27 +01:00
Andrew Heather
91b90da4f3 Integrated Foundation code to commit 104aac5 2017-05-17 16:35:18 +01:00
Henry Weller
5c51836501 The "<type>Coeffs" sub-dictionary is now optional for most model parameters
except turbulence and lagrangian which will also be updated shortly.

For example in the nonNewtonianIcoFoam offsetCylinder tutorial the viscosity
model coefficients may be specified in the corresponding "<type>Coeffs"
sub-dictionary:

transportModel  CrossPowerLaw;

CrossPowerLawCoeffs
{
    nu0         [0 2 -1 0 0 0 0]  0.01;
    nuInf       [0 2 -1 0 0 0 0]  10;
    m           [0 0 1 0 0 0 0]   0.4;
    n           [0 0 0 0 0 0 0]   3;
}

BirdCarreauCoeffs
{
    nu0         [0 2 -1 0 0 0 0]  1e-06;
    nuInf       [0 2 -1 0 0 0 0]  1e-06;
    k           [0 0 1 0 0 0 0]   0;
    n           [0 0 0 0 0 0 0]   1;
}

which allows a quick change between models, or using the simpler

transportModel  CrossPowerLaw;

nu0         [0 2 -1 0 0 0 0]  0.01;
nuInf       [0 2 -1 0 0 0 0]  10;
m           [0 0 1 0 0 0 0]   0.4;
n           [0 0 0 0 0 0 0]   3;

if quick switching between models is not required.

To support this more convenient parameter specification the inconsistent
specification of seedSampleSet in the streamLine and wallBoundedStreamLine
functionObjects had to be corrected from

    // Seeding method.
    seedSampleSet   uniform;  //cloud; //triSurfaceMeshPointSet;

    uniformCoeffs
    {
        type        uniform;
        axis        x;  //distance;

        // Note: tracks slightly offset so as not to be on a face
        start       (-1.001 -0.05 0.0011);
        end         (-1.001 -0.05 1.0011);
        nPoints     20;
    }

to the simpler

    // Seeding method.
    seedSampleSet
    {
        type        uniform;
        axis        x;  //distance;

        // Note: tracks slightly offset so as not to be on a face
        start       (-1.001 -0.05 0.0011);
        end         (-1.001 -0.05 1.0011);
        nPoints     20;
    }

which also support the "<type>Coeffs" form

    // Seeding method.
    seedSampleSet
    {
        type        uniform;

        uniformCoeffs
        {
            axis        x;  //distance;

            // Note: tracks slightly offset so as not to be on a face
            start       (-1.001 -0.05 0.0011);
            end         (-1.001 -0.05 1.0011);
            nPoints     20;
        }
    }
2017-04-20 09:14:48 +01:00
Chris Greenshields
23d9e2e912 Admin: fixed file permissions from wall boiling model refinements 2017-04-16 18:27:19 +01:00
Henry Weller
8b55ea4fb1 fvOptions: The "<type>Coeffs" sub-dictionary is now optional
For example the actuationDiskSource fvOption may now be specified

disk1
{
    type            actuationDiskSource;

    fields      (U);

    selectionMode   cellSet;
    cellSet         actuationDisk1;
    diskDir         (1 0 0);    // Orientation of the disk
    Cp              0.386;
    Ct              0.58;
    diskArea        40;
    upstreamPoint   (581849 4785810 1065);
}

rather than

disk1
{
    type            actuationDiskSource;
    active          on;

    actuationDiskSourceCoeffs
    {
        fields      (U);

        selectionMode   cellSet;
        cellSet         actuationDisk1;
        diskDir         (1 0 0);    // Orientation of the disk
        Cp              0.386;
        Ct              0.58;
        diskArea        40;
        upstreamPoint   (581849 4785810 1065);
    }
}

but this form is supported for backward compatibility.
2017-04-13 13:30:17 +01:00
Henry Weller
aef09b8daf tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/steamInjection: Improved stability
Main changes in the tutorial:
  - General cleanup of the phaseProperties of unnecessary entries
  - sensibleEnthalpy is used for both phases
  - setTimeStep functionObject is used to set a sharp reduction in time step near the start of the injection
  - Monitoring of pressure minimum and maximum

Patch contributed by Juho Peltola, VTT.
2017-04-11 20:48:32 +01:00
Henry Weller
97d12d8b43 surfaceTensionModels::liquidProperties: New temperature-dependent surface tension model
Description
    Temperature-dependent surface tension model in which the surface tension
    function provided by the phase Foam::liquidProperties class is used.

Usage
    \table
        Property     | Description               | Required    | Default value
        phase        | Phase name                | yes         |
    \endtable

    Example of the surface tension specification:
    \verbatim
        sigma
        {
            type    liquidProperties;
            phase   water;
        }
    \endverbatim

for use with e.g. compressibleInterFoam, see
tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D
2017-04-05 14:36:11 +01:00
Henry Weller
1f5b9dbbcf tutorials/multiphase: Removed unnecessary specification of name and dimensions for transport properties 2017-03-31 17:11:30 +01:00
Andrew Heather
332c8acdcd ENH: Clean-up after latest Foundation integrations 2017-03-31 15:36:28 +01:00
Andrew Heather
fb724ce113 MRG: Integrated Foundation code to commit 9f37c3c 2017-03-31 15:34:28 +01:00
Henry Weller
dfd611aeac surfaceTensionModels: New class hierarchy for run-time selectable surface tension models
These models have been particularly designed for use in the VoF solvers, both
incompressible and compressible.  Currently constant and temperature dependent
surface tension models are provided but it easy to write models in which the
surface tension is evaluated from any fields held by the mesh database.
2017-03-31 14:32:38 +01:00
Andrew Heather
e6b67f6790 ENH: Clean-up after latest Foundation integrations 2017-03-28 14:21:07 +01:00
Andrew Heather
45381b1085 MRG: Integrated Foundation code to commit 19e602b 2017-03-28 11:30:10 +01:00
Chris Greenshields
4c52f8ff1d sloshingCylinder tutorial: sloshing in cylinder under zero gravity
Demonstrates meshing a cylinder with hemispehrical ends using snappyHexMesh with
a polar background mesh that uses the point and edge projection feature of blockMesh.
The case prescribes a multiMotion on the cylinder, combining an oscillatingLinearMotion
and transverse rotatingMotion.
2017-03-24 14:43:53 +00:00
Chris Greenshields
f3feb1aa0a tutorials: moved laminar interDyMFoam examples into "laminar" directory 2017-03-24 12:33:37 +00:00
Andrew Heather
dcb1a95e35 MRG: Integrated Foundation code to commit 7d6845d 2017-03-23 14:33:33 +00:00
Andrew Heather
436ec1cf1f MRG: Integrated Foundation code to commit ba4dbed 2017-03-23 12:11:49 +00:00
Henry Weller
98de229365 Function1: Added "Ramp" to the names of the ramp functions to avoid conflict
with more general forms of those functions.
2017-03-18 17:10:48 +00:00
Henry Weller
7aed8c2904 tutorials: Updated pcorr settings in fvSolution to provide pcorrFinal if required 2017-03-07 11:48:20 +00:00
Mark Olesen
31555346cc Merge remote-tracking branch 'origin/master' into develop 2017-03-10 13:30:39 +01:00
Mark Olesen
d3911dd167 STYLE: avoid old-style shell backticks in various places 2017-02-20 09:30:58 +01:00
Henry Weller
f6dacfb484 liquidThermo: rhoThermo instantiated on liquidProperties
This allows single, multi-phase and VoF compressible simulations to be performed
with the accurate thermophysical property functions for liquids provided by the
liquidProperty classes.  e.g. in the
multiphase/compressibleInterFoam/laminar/depthCharge2D tutorial water can now be
specified by

thermoType
{
    type            heRhoThermo;
    mixture         pureMixture;
    properties      liquid;
    energy          sensibleInternalEnergy;
}

mixture
{
    H2O;
}

as an alternative to the previous less accurate representation defined by

thermoType
{
    type            heRhoThermo;
    mixture         pureMixture;
    transport       const;
    thermo          hConst;
    equationOfState perfectFluid;
    specie          specie;
    energy          sensibleInternalEnergy;
}

mixture
{
    specie
    {
        molWeight   18.0;
    }
    equationOfState
    {
        R           3000;
        rho0        1027;
    }
    thermodynamics
    {
        Cp          4195;
        Hf          0;
    }
    transport
    {
        mu          3.645e-4;
        Pr          2.289;
    }
}

However the increase in accuracy of the new simpler and more convenient
specification and representation comes at a cost: the NSRDS functions used by
the liquidProperties classes are relatively expensive to evaluate and the
depthCharge2D case takes ~14% longer to run.
2017-02-19 16:44:00 +00:00
Henry Weller
c52e4b58a1 thermophysicalModels: Changed specie thermodynamics from mole to mass basis
The fundamental properties provided by the specie class hierarchy were
mole-based, i.e. provide the properties per mole whereas the fundamental
properties provided by the liquidProperties and solidProperties classes are
mass-based, i.e. per unit mass.  This inconsistency made it impossible to
instantiate the thermodynamics packages (rhoThermo, psiThermo) used by the FV
transport solvers on liquidProperties.  In order to combine VoF with film and/or
Lagrangian models it is essential that the physical propertied of the three
representations of the liquid are consistent which means that it is necessary to
instantiate the thermodynamics packages on liquidProperties.  This requires
either liquidProperties to be rewritten mole-based or the specie classes to be
rewritten mass-based.  Given that most of OpenFOAM solvers operate
mass-based (solve for mass-fractions and provide mass-fractions to sub-models it
is more consistent and efficient if the low-level thermodynamics is also
mass-based.

This commit includes all of the changes necessary for all of the thermodynamics
in OpenFOAM to operate mass-based and supports the instantiation of
thermodynamics packages on liquidProperties.

Note that most users, developers and contributors to OpenFOAM will not notice
any difference in the operation of the code except that the confusing

    nMoles     1;

entries in the thermophysicalProperties files are no longer needed or used and
have been removed in this commet.  The only substantial change to the internals
is that species thermodynamics are now "mixed" with mass rather than mole
fractions.  This is more convenient except for defining reaction equilibrium
thermodynamics for which the molar rather than mass composition is usually know.
The consequence of this can be seen in the adiabaticFlameT, equilibriumCO and
equilibriumFlameT utilities in which the species thermodynamics are
pre-multiplied by their molecular mass to effectively convert them to mole-basis
to simplify the definition of the reaction equilibrium thermodynamics, e.g. in
equilibriumCO

    // Reactants (mole-based)
    thermo FUEL(thermoData.subDict(fuelName)); FUEL *= FUEL.W();

    // Oxidant (mole-based)
    thermo O2(thermoData.subDict("O2")); O2 *= O2.W();
    thermo N2(thermoData.subDict("N2")); N2 *= N2.W();

    // Intermediates (mole-based)
    thermo H2(thermoData.subDict("H2")); H2 *= H2.W();

    // Products (mole-based)
    thermo CO2(thermoData.subDict("CO2")); CO2 *= CO2.W();
    thermo H2O(thermoData.subDict("H2O")); H2O *= H2O.W();
    thermo CO(thermoData.subDict("CO")); CO *= CO.W();

    // Product dissociation reactions

    thermo CO2BreakUp
    (
        CO2 == CO + 0.5*O2
    );

    thermo H2OBreakUp
    (
        H2O == H2 + 0.5*O2
    );

Please report any problems with this substantial but necessary rewrite of the
thermodynamic at https://bugs.openfoam.org

Henry G. Weller
CFD Direct Ltd.
2017-02-17 11:22:14 +00:00
sergio
4f736b5c41 temperatureCoupledBase: alphaAni set to none by default
boundaryRadiationProperties: updating to new format
dynamicMeshDict and snappyHexMeshDict in utorials/multiphase/interDyMFoam/RAS/motorBike to follow Mattijs Git lab id 381
2017-02-10 11:40:15 -08:00
Henry Weller
b167c95f19 compressibleInterFoam: Completed LTS and semi-implicit MULES support
Now the interFoam and compressibleInterFoam families of solvers use the same
alphaEqn formulation and supporting all of the MULES options without
code-duplication.

The semi-implicit MULES support allows running with significantly larger
time-steps but this does reduce the interface sharpness.
2017-02-09 17:31:57 +00:00
Henry Weller
8264c3b988 interDyMFoam: Reinstate alphaPhiCorr0 for moving meshes without topology change 2017-02-07 09:59:19 +00:00
Henry Weller
1e36c99588 PaSR: Removed deprecated "turbulentReaction" switch
To run with laminar reaction rates choose the "laminar" combustion model rather
than setting "turbulentReaction no;" in the "PaSR" model.
2017-01-20 17:17:14 +00:00
Henry Weller
1c2093c8b3 Multi-phase solvers: Improved handling of inflow/outflow BCs in MULES
Avoids slight phase-fraction unboundedness at entertainment BCs and improved
robustness.

Additionally the phase-fractions in the multi-phase (rather than two-phase)
solvers are adjusted to avoid the slow growth of inconsistency ("drift") caused
by solving for all of the phase-fractions rather than deriving one from the
others.
2017-01-17 22:43:47 +00:00
Andrew Heather
02ba3a2d44 ENH: InjectedParticleDistributionInjection model - added protection for the case of zero particles; updated tutorial scripts. See #363 2016-12-22 10:30:15 +00:00
sergio
8d65da5b5c ENH: Adding parallel running for compressibleDyInterFoam tutorial 2016-12-20 09:45:52 -08:00
sergio
8a11a492f1 Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2016-12-19 15:42:01 -08:00
sergio
a7c8d1cfca ENH: changing rhoSimpleFoam to rhothermo and bounding thermo.rho between minRho and maxRho.
Bounding thermo.rho in rhoPorousSimpleFoam.
Changing initial time step in externalSolarLoad tutorial.
Commenting out momemtun source term in steamInjection which causes problems
2016-12-19 15:39:13 -08:00
Andrew Heather
f41c88000f ENH: Tutorial updates 2016-12-16 20:24:02 +00:00
Andrew Heather
28e37bbec9 STYLE: Consistency updates 2016-12-16 14:36:48 +00:00
Andrew Heather
bd86b155aa Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2016-12-16 13:26:39 +00:00
Andrew Heather
30d8fc3459 ENH: Tutorial updates and clean-up 2016-12-16 13:26:28 +00:00
Andrew Heather
501ad5a607 ENH: Tutorial script update 2016-12-15 17:46:37 +00:00
sergio
d5301772f7 Update of interCondensingEvaporatingFoam and its tutorial 2016-12-15 12:36:48 -08:00
Andrew Heather
6baf1d7d8f Merge branch 'integration-ihcantabria' into 'develop'
Integration of ihcantabria wave models

Integration of functionality produced by The Environmental Hydraulics Institute "IHCantabria" (http://www.ihcantabria.com/en/)

- Original code introduced in commit 95e9467e
- Restructured and updated by OpenCFD into a new `waveModels` library available to the interFoam family of solvers

Main source:
`$FOAM_SRC/waveModels`

Tutorials:
`$FOAM_TUTORIALS/multiphase/interFoam/waveExample*`

Capabilities include:
- Wave generation
- Solitary wave using Boussinesq theory
- Cnoidal wave theory
- StokesI, StokesII, StokesV wave theory
    
- Active wave absorption at the inflow/outflow boundaries based on shallow water theory

IHCantabria Authors:
- Javier Lopez Lara (jav.lopez@unican.es)
- Gabriel Barajas (barajasg@unican.es)
- Inigo Losada (losadai@unican.es)

See merge request !88
2016-12-15 13:38:13 +00:00
Andrew Heather
95f3adb1fb ENH: waveModels - moved to main source tree and simplified 2016-12-15 12:45:14 +00:00
Andrew Heather
f0a046fa81 GIT: Resolved conflict 2016-12-14 15:56:58 +00:00
Andrew Heather
7f2907f617 ENH: Added tutorials to show extraction of particle data from eulerian cases and subsequent injjection via lagrangian cases 2016-12-14 15:51:11 +00:00
sergio
c0a2c16f6c Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2016-12-12 10:36:33 -08:00
sergio
88128e0392 ENH: compressibleInterDyMFoam enhancements for mesh motion and sphere drop test case tutorial 2016-12-12 10:34:49 -08:00
Andrew Heather
c0f44ac4f3 MRG: Integrated foundation code 2016-12-12 12:10:29 +00:00
Henry Weller
ab760b6cd1 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling.*: Correct q entry
Patch contributed by Mattijs Janssens
2016-12-02 12:22:30 +00:00
Henry Weller
1c687baa35 dynamicMotionSolverListFvMesh: New mesh-motion solver supporting multiple moving regions
e.g. the motion of two counter-rotating AMI regions could be defined:

dynamicFvMesh   dynamicMotionSolverListFvMesh;

solvers
(
    rotor1
    {
        solver solidBody;

        cellZone        rotor1;

        solidBodyMotionFunction  rotatingMotion;
        rotatingMotionCoeffs
        {
            origin        (0 0 0);
            axis          (0 0 1);
            omega         6.2832; // rad/s
        }
    }

    rotor2
    {
        solver solidBody;

        cellZone        rotor2;

        solidBodyMotionFunction  rotatingMotion;
        rotatingMotionCoeffs
        {
            origin        (0 0 0);
            axis          (0 0 1);
            omega         -6.2832; // rad/s
        }
    }
);

Any combination of motion solvers may be selected but there is no special
handling of motion interaction; the motions are applied sequentially and
potentially cumulatively.

To support this new general framework the solidBodyMotionFvMesh and
multiSolidBodyMotionFvMesh dynamicFvMeshes have been converted into the
corresponding motionSolvers solidBody and multiSolidBody and the tutorials
updated to reflect this change e.g. the motion in the mixerVesselAMI2D tutorial
is now defined thus:

dynamicFvMesh   dynamicMotionSolverFvMesh;

solver solidBody;

solidBodyCoeffs
{
    cellZone        rotor;

    solidBodyMotionFunction  rotatingMotion;
    rotatingMotionCoeffs
    {
        origin        (0 0 0);
        axis          (0 0 1);
        omega         6.2832; // rad/s
    }
}
2016-12-01 15:57:15 +00:00
Andrew Heather
7734d7ffd7 ENH: Tutorial updates 2016-11-24 12:11:43 +00:00