Commit Graph

309 Commits

Author SHA1 Message Date
sergio
00a5b61bd2 ENH: making pcEqn.H similar to pEqn.H.
STY: Fixing syntax in rhoPimpleDyMFoam/pEqn.H
2017-06-28 14:36:25 -07:00
sergio
e5f6d3166c Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2017-06-28 08:58:50 -07:00
sergio
e98214b0ad BUG: Updating rho at the end of the pEq for rhoPimpleDyMFoam and limiting is needed 2017-06-27 15:47:53 -07:00
Andrew Heather
e4bfefa396 STYLE: Minor tidying 2017-06-27 11:22:03 +01:00
Andrew Heather
e84c788b03 ENH: Updated the maxwellSlipU BC to derive from the partialSlip BC 2017-06-26 20:12:11 +01:00
Andrew Heather
bd5c0a3036 ENH: Updated partialSlip BC to enable users to specify the value at zero
slip

The old behaviour assumed that the no-slip value was zero.  This has
been extended to enable the user to supply a refValue - the value at
zero slip.

This was similar to the mixedFixedValueSlipFvPatchField behaviour in the
rhoCentralFoam library - now deprecated in favour of the templated
partialSlip version.
2017-06-26 20:07:18 +01:00
Andrew Heather
65071b9598 ENH: Updated dpdt and K field construction 2017-06-21 12:20:58 +01:00
Andrew Heather
2883311a23 ENH: rhoPimple[DyM]Foam - updated treatment for dpdt 2017-06-15 14:51:27 +01:00
Andrew Heather
ead256f506 INT: Integration of rhoPimpleAdiabaticFoam
Solver for low Mach no. flows with adiabatic thermodynamics and updated
pressure-velocity coupling given by the RCM interpolation procedure
described in

    \verbatim
        Knacke, T. (2013).
        Potential effects of Rhie & Chow type interpolations in airframe
        noise simulations. In: Schram, C., Dénos, R., Lecomte E. (ed):
        Accurate and efficient aeroacoustic prediction approaches for
        airframe noise, VKI LS 2013-03.
    \endverbatim

Original code supplied by Thilo Knacke, CFD E+F GmbH
contact: info@cfd-berlin.com

Integrated into OpenFOAM by OpenCFD Ltd.
2017-06-09 10:23:47 +01:00
sergio
73460a2993 Test on second order restart using backward time scheme 2017-04-18 14:04:27 -07:00
Andrew Heather
111c1d2d12 ENH: Added include file to calculate the mechanical energy 2017-04-04 12:51:35 +01:00
mattijs
fd665b4a3c ENH: overset: Initial release of overset capability.
Adds overset discretisation to selected physics:
- diffusion : overLaplacianDyMFoam
- incompressible steady : overSimpleFoam
- incompressible transient : overPimpleDyMFoam
- compressible transient: overRhoPimpleDyMFoam
- two-phase VOF: overInterDyMFoam

The overset method chosen is a parallel, fully implicit implementation
whereby the interpolation (from donor to acceptor) is inserted as an
adapted discretisation on the donor cells, such that the resulting matrix
can be solved using the standard linear solvers.

Above solvers come with a set of tutorials, showing how to create and set-up
simple simulations from scratch.
2017-06-14 09:51:02 +01:00
sergio
486a82fad6 Updating rho with thermo rho at the end of the pEq.H, independently of
simpleRho or limiting p.
2017-06-07 16:26:43 +01:00
sergio
c44322ebb8 Adding correctRho plus rhoMin and rhoMax limiters to thermos.
Update pEq for close domains.
2017-06-07 12:11:01 +01:00
sergio
d1b651533f Modification on rhoPimpleFoam pEq's for handling rho thermo and incompressible EoS. Adding rho limiters if p is limited.
This is important when LTS stepping or large Co number is used.

Updating rhoBuoyantPimpleFoam to handle closed domain for rho thermo and incompressible Eos.
Consolidating chtMultiRegionSimpleFoam and chtMultiRegionFoam pEqs to use the same formulation as rhoBuoyantPimpleFoam and
rhoBuoyantSimpleFoam
2017-06-01 12:39:28 -07:00
Henry Weller
39476bde1c GIT: Resolve conflict associated with cherry-pick of Foundation commit 79ff91350
79ff91350 - rhoPimpleFoam: Improved support for compressible liquids
(2017-05-17 17:05:43 +0100) <Henry Weller>
2017-05-17 17:05:43 +01:00
Henry Weller
b83af3b085 rhoPimpleDyMFoam: Updated transonic formulation for consistency with sonicFoam 2017-05-12 18:34:00 +01:00
Henry Weller
7b825d0817 rhoPimpleFoam: Updated transonic option to be consistent with sonicFoam
Improves stability on start-up and allows running at slightly larger time-steps.
2017-05-12 11:04:38 +01:00
Andrew Heather
9a864bdd85 GIT: Resolved merge conflict when merging develop branch 2017-05-24 12:30:09 +01:00
Andrew Heather
b5ed93a40a ENH: orientedFields - refectored and simplified usage 2017-05-24 12:26:12 +01:00
Andrew Heather
28868f8d4d ENH: Updated reading of dimensioned types from transportProperties dictionary to avoid the need to provide the dimension set 2017-05-18 14:44:52 +01:00
Andrew Heather
91b90da4f3 Integrated Foundation code to commit 104aac5 2017-05-17 16:35:18 +01:00
Andrew Heather
976ad36776 ENH: Initial attempt to track oriented surface fields 2017-04-24 10:34:05 +01:00
Henry Weller
707abb910e DPMDyMFoam, MPPICDyMFoam: New dynamic mesh versions of DPMFoam and MPPICFoam
supporting both mesh morphing and topology change.
2017-04-11 10:33:34 +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
Andrew Heather
b708c23cfc ENH: Clean-up after latest Foundation integrations 2017-03-27 14:34:01 +01:00
Andrew Heather
dcb1a95e35 MRG: Integrated Foundation code to commit 7d6845d 2017-03-23 14:33:33 +00:00
Henry Weller
96ad725a0b Updated UPstream::commsTypes to use the C++11 enum class 2017-03-10 19:54:55 +00:00
Henry Weller
50516486a4 rhoPimpleFoam: Added support for transonic flow of liquids and real gases
Both stardard SIMPLE and the SIMPLEC (using the 'consistent' option in
fvSolution) are now supported for both subsonic and transonic flow of all
fluid types.

rhoPimpleFoam now instantiates the lower-level fluidThermo which instantiates
either a psiThermo or rhoThermo according to the 'type' specification in
thermophysicalProperties, see also commit a1c8cde310
2017-02-28 11:14:59 +00:00
Henry Weller
7d6845defa rhoSimpleFoam: Added support for transonic flow of liquids and real gases
Both stardard SIMPLE and the SIMPLEC (using the 'consistent' option in
fvSolution) are now supported for both subsonic and transonic flow of all
fluid types.
2017-02-24 16:20:06 +00:00
Henry Weller
a1c8cde310 rhoSimpleFoam: added support for compressible liquid flows
rhoSimpleFoam now instantiates the lower-level fluidThermo which instantiates
either a psiThermo or rhoThermo according to the 'type' specification in
thermophysicalProperties, e.g.

thermoType
{
    type            hePsiThermo;
    mixture         pureMixture;
    transport       sutherland;
    thermo          janaf;
    equationOfState perfectGas;
    specie          specie;
    energy          sensibleInternalEnergy;
}

instantiates a psiThermo for a perfect gas with JANAF thermodynamics, whereas

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

mixture
{
    H2O;
}

instantiates a rhoThermo for water, see new tutorial
compressible/rhoSimpleFoam/squareBendLiq.

In order to support complex equations of state the pressure can no longer be
unlimited and rhoSimpleFoam now limits the pressure rather than the density to
handle start-up more robustly.

For backward compatibility 'rhoMin' and 'rhoMax' can still be used in the SIMPLE
sub-dictionary of fvSolution which are converted into 'pMax' and 'pMin' but it
is better to set either 'pMax' and 'pMin' directly or use the more convenient
'pMinFactor' and 'pMinFactor' from which 'pMax' and 'pMin' are calculated using
the fixed boundary pressure or reference pressure e.g.

SIMPLE
{
    nNonOrthogonalCorrectors 0;

    pMinFactor      0.1;
    pMaxFactor      1.5;

    transonic       yes;
    consistent      yes;

    residualControl
    {
        p               1e-3;
        U               1e-4;
        e               1e-3;
        "(k|epsilon|omega)" 1e-3;
    }
}
2017-02-24 11:18:01 +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
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
c0f44ac4f3 MRG: Integrated foundation code 2016-12-12 12:10:29 +00:00
Henry Weller
80db302666 Allwmake: Remove 'set -x' which generates a lot of noise
'set -x' should be used for debugging.

Added command printing into wmake and Allwmake as a replacement for
'set -x' to log current target.
2016-11-13 18:08:22 +00:00
Andrew Heather
bd0e982d99 MRG: Initial commit after latest Foundation merge 2016-09-30 11:16:28 +01:00
Andrew Heather
9fbd612672 GIT: Initial state after latest Foundation merge 2016-09-20 14:49:08 +01:00
Henry Weller
b32bd3f295 solvers: Moved createRDeltaT.H into createFields.H so that it is available with the -postProcess option
Required to support LTS with the -postProcess option with sub-models dependent on ddt
terms during construction, in particular reactingTwoPhaseEulerFoam.
2016-09-19 22:08:39 +01:00
Henry Weller
b8614eca07 Make/options: Removed duplicate entries
Thanks to Bruno Santos for providing the script to check the files
Resolves bug-report http://bugs.openfoam.org/view.php?id=2169
2016-08-01 20:55:16 +01:00
Henry Weller
dea6a3c6e8 wmake/Allwmake: Completed support for targetType 'objects'
Patch contributed by Mattijs Janssens
2016-06-24 15:25:11 +01:00
Henry Weller
71fdcab771 Updated header documentation processed by Doxygen 2016-06-19 21:23:54 +01:00
Henry Weller
b3f3562d3c Doxygen documentation: Use the standard 'Usage' rather than the '\heading....' 2016-06-17 17:22:24 +01:00
Chris Greenshields
288ead131d Descriptions of solvers corrected and made more consistent and more user-friendly 2016-06-09 18:59:40 +01:00
Henry Weller
3eec5854be Standardized the selection of required and optional fields in BCs, fvOptions, functionObjects etc.
In most boundary conditions, fvOptions etc. required and optional fields
to be looked-up from the objectRegistry are selected by setting the
keyword corresponding to the standard field name in the BC etc. to the
appropriate name in the objectRegistry.  Usually a default is provided
with sets the field name to the keyword name, e.g. in the
totalPressureFvPatchScalarField the velocity is selected by setting the
keyword 'U' to the appropriate name which defaults to 'U':

        Property     | Description             | Required    | Default value
        U            | velocity field name     | no          | U
        phi          | flux field name         | no          | phi
        .
        .
        .

However, in some BCs and functionObjects and many fvOptions another
convention is used in which the field name keyword is appended by 'Name'
e.g.

        Property     | Description             | Required    | Default value
        pName        | pressure field name     | no          | p
        UName        | velocity field name     | no          | U

This difference in convention is unnecessary and confusing, hinders code
and dictionary reuse and complicates code maintenance.  In this commit
the appended 'Name' is removed from the field selection keywords
standardizing OpenFOAM on the first convention above.
2016-05-21 20:28:20 +01:00
Henry Weller
008086f64c applications/solvers/compressible: Added -postProcess option
See also commit cc455173ff
2016-05-09 15:16:22 +01:00
Henry Weller
81f31acbb3 Updated headers 2016-04-30 21:53:19 +01:00
Henry Weller
3c053c2fe6 GeometricField: Renamed internalField() -> primitiveField() and dimensionedInternalField() -> internalField()
These new names are more consistent and logical because:

primitiveField():
primitiveFieldRef():
    Provides low-level access to the Field<Type> (primitive field)
    without dimension or mesh-consistency checking.  This should only be
    used in the low-level functions where dimensional consistency is
    ensured by careful programming and computational efficiency is
    paramount.

internalField():
internalFieldRef():
    Provides access to the DimensionedField<Type, GeoMesh> of values on
    the internal mesh-type for which the GeometricField is defined and
    supports dimension and checking and mesh-consistency checking.
2016-04-30 21:40:09 +01:00
Henry Weller
ccd958a8f1 GeometricField::dimensionedInteralFieldRef() -> GeometricField::ref()
In order to simplify expressions involving dimensioned internal field it
is preferable to use a simpler access convention.  Given that
GeometricField is derived from DimensionedField it is simply a matter of
de-referencing this underlying type unlike the boundary field which is
peripheral information.  For consistency with the new convention in
"tmp"  "dimensionedInteralFieldRef()" has been renamed "ref()".
2016-04-30 18:43:51 +01:00
Henry Weller
dc2951ca2f GeometricField::dimensionedInternalField() -> GeometricField::dimensionedInternalFieldRef()
See also commit 22f4ad32b1
2016-04-26 16:29:43 +01:00