Commit Graph

4797 Commits

Author SHA1 Message Date
fe5e403cf9 surfaceMeshConvert,surfaceMeshConvert,surfaceMeshImport: Updated coordinateSystem support 2020-09-29 16:10:06 +01:00
31891a38b2 coordinateSystems: Corrected, updated and tested
It is now possible to define coordinate systems in a central location and
selected them by name for any model requiring one, e.g. the
explicitPorositySource.

Description
    Provides a centralized coordinateSystem collection.

    For example with the porous region specified in \c constant/fvOptions as

    \verbatim
    porosity
    {
        type            explicitPorositySource;

        explicitPorositySourceCoeffs
        {
            selectionMode   cellZone;
            cellZone        porousBlockage;

            type            DarcyForchheimer;

            // D 100;  // Very little blockage
            // D 200;  // Some blockage but steady flow
            // D 500;  // Slight waviness in the far wake
            D 1000; // Fully shedding behavior

            d   ($D $D $D);
            f   (0 0 0);

            coordinateSystem porousBlockage;
        }
    }
    \endverbatim

    the corresponding coordinate system \c porousBlockage is looked-up
    automatically from the \c constant/coordinateSystems dictionary:

    \verbatim
    porousBlockage
    {
        type    cartesian;
        origin  (0 0 0);
        coordinateRotation
        {
            type    axesRotation;
            e1  (1 0 0);
            e2  (0 1 0);
        }
    }
    \endverbatim

    See \c tutorials/incompressible/pisoFoam/laminar/porousBlockage
2020-09-29 15:09:58 +01:00
b23c3465f9 coordinateSystems: Added missing clone functions 2020-09-29 09:34:12 +01:00
e8c5163f82 coordinateSystems: Initial work to simplify and rationalise
There is much more to be done, a complete rewrite of coordinateSystems would be
best.
2020-09-28 20:47:33 +01:00
081f2d5726 writeObjectsBase: Append explicit names (regExp = false) directly to the list 2020-09-27 20:13:56 +01:00
5e68311191 heSolidThermo: Corrected handling of KappaLocal boundary values 2020-09-25 23:05:02 +01:00
f1a4caa3fb tutorials/heatTransfer/chtMultiRegionFoam/shellAndTubeHeatExchanger: Updated for changes to solid heat-flux 2020-09-25 21:13:21 +01:00
d3b2217949 ThermophysicalTransportModels: Changed q() and j() to return surfaceScalarFields
such that div(q()) = divq(...)
and       div(j()) = divj(...)

to unsure consistency between the reported heat (e.g. by the wallHeatFlux
functionObject) and mass fluxes and those used in the energy and specie
mass-fraction equations.
2020-09-25 19:37:01 +01:00
77b31c7f3a temperatureCoupledBase: Updated to use solidThermo::KappaLocal 2020-09-25 17:15:42 +01:00
8221b25875 coded classes: Added "codeOptions"
Resolves bug-report https://bugs.openfoam.org/view.php?id=3555
2020-09-25 16:41:47 +01:00
1bd316e69a solidDisplacementThermo: Updated adding q and divq functions 2020-09-25 16:29:15 +01:00
f15d150ca8 chtMultiRegionFoam, heSolidThermo: Moved the solid heat flux model into heSolidThermo
and changed to be an energy implicit correction to a temperature gradient
based heat-flux.  This formulation is both energy conservative and temperature
consistent.

The wallHeatFlux functionObject has been updated to use a consistent heat-flux
from the heSolidThermo.
2020-09-25 16:09:18 +01:00
a972b208ee twoPhaseMixture/interfaceCompression/Make: Redundant, removed 2020-09-24 17:39:51 +01:00
6ca68b0ebe multiphaseThermophysicalTransportModels: Added temperature gradient based heat flux models 2020-09-24 17:00:31 +01:00
3901c09dc6 etc/templates/singleFluidCHT: Updated to use the new eddyDiffusivity thermophysical transport model 2020-09-23 19:46:44 +01:00
747cea6d0f ThermophysicalTransportModels: Added temperature gradient based heat flux models
Fourier, eddyDiffusivity and nonUnityLewisEddyDiffusivity thermophysical
transport models now apply an implicit energy correction to a temperature
gradient based heat-flux to provide computational stability and efficiency while
converging to temperature gradient based solution.  This ensures consistent heat
exchange between fluid and solid regions in CHT cases and with heat-flux
boundaries.

The Fourier and eddyDiffusivity models support single specie systems only
whereas nonUnityLewisEddyDiffusivity supports specie diffusion with independent
specification of turbulent Prandtl and Schmidt numbers, i.e. non-unity Lewis
number.

The unityLewisFourier and unityLewisEddyDiffusivity thermophysical transport
models use an implicit energy gradient based heat-flux which is optimal for
numerical stability and convergence but does not guarantee consistent heat
exchange between fluid and solid regions and heat-flux boundaries in the
presence of gradients of heat capacity.  Both of these models support specie
diffusion with the restriction that the laminar and turbulent Prandtl and
Schmidt numbers are equal, i.e. unity Lewis number.

The thermophysical transport model is specified in the optional
thermophysicalTransport dictionary; if this file is not present the
unityLewisFourier model is selected for laminar and unityLewisEddyDiffusivity
for turbulent cases for backward compatibility.

The chtMultiRegionFoam tutorial cases have been updated to use the most
appropriate of the new thermophysical transport models.
2020-09-23 16:15:38 +01:00
f3c21b74a8 Minor corrections to options files
Resolves bug-report https://bugs.openfoam.org/view.php?id=3553
2020-09-22 17:29:58 +01:00
16da54acda wallHeatFlux: Updated to use the thermophysicalTransportModel::q() function
providing consistency between the reported heat fluxes and those used in the
energy equation.
2020-09-22 15:30:28 +01:00
77ee78b47e functionObjects::volFieldValue: corrected parallel operation of writeFields = true
Resolves bug-report https://bugs.openfoam.org/view.php?id=3552
2020-09-21 10:55:49 +01:00
560fb1a64b foamDictionary: Ignore function name in substitution list
so that foamDictionary conveniently supports the same format as the #includeFunc
argument list, e.g.

foamDictionary -set 'fieldAverage(U, p, prime2Mean = yes)' fieldAverage

The unnamed field arguments 'U' and 'p' are ignored by foamDictionary.
2020-09-20 09:28:20 +01:00
560db98b34 dictionary: Standardised and centralised the argument list parser
to simplify maintenance
20200920
2020-09-19 15:52:09 +01:00
ad33cc2cc8 functionObject: Added support for scoped keyword lookup in the argument list
functions
{
    #includeFunc        singleGraph(setConfig/axis = y)
    .
    .
    .
}
2020-09-18 21:39:40 +01:00
312a56e7e3 foamDictionary: Extended the -set option to support a substitution list
e.g.

    foamDictionary -set '(purgeWrite=3, maxDeltaT=0.1, functions/rho/writeControl=writeTime)' controlDict

or

    foamDictionary -set 'purgeWrite=3, maxDeltaT=0.1, functions/rho/writeControl=writeTime' controlDict

are equivalent to

    foamDictionary -entry purgeWrite -set 3 controlDict
    foamDictionary -entry maxDeltaT -set 0.1 controlDict
    foamDictionary -entry functions/rho/writeControl -set writeTime controlDict
2020-09-18 18:25:51 +01:00
067ab99f0f wmkdep: terminate sourcePath string explicitly
Resolves bug-report https://bugs.openfoam.org/view.php?id=3550
2020-09-18 13:55:37 +01:00
07f6ffa2b8 TimeIO: uint -> unsigned int
Resolves bug-report https://bugs.openfoam.org/view.php?id=3549
2020-09-18 13:31:41 +01:00
6c62efade7 lduMatrix, LduMatrix: Updated type logic to handle parallel cases
in which there is 0 or 1 cell on some processors.
2020-09-18 08:19:04 +01:00
d05a831fc3 lduMatrix,LduMatrix: Added logic to the matrix type selection to handle empty coefficient fields
This ensures that the diagonal solver is selected for 0D cases even if the upper
and lower coefficient fields exist but are empty.
2020-09-17 19:14:18 +01:00
c4f98e7835 surfaces: Corrected pre-configuration for changes to plane specification 2020-09-17 10:51:29 +01:00
1d9f39761e interpolation: Added field evaluation
The field evaluations have been optimised using an additional
fieldInterpolation base class so that a virtual call happens only once
per field. This is the same pattern as that used to optimise Function1.
2020-09-17 08:49:59 +01:00
ea777f806b Time: Read locally modified info switches 2020-09-16 14:45:02 +01:00
861a955cc9 fvOptions/.../codedSource: Corrected application of phase sources 2020-09-15 16:48:01 +01:00
aa8e4b407c masterUncollatedFileOperation: Updated to handle parallel distribution of binary IOdictionaries 2020-09-14 17:16:39 +01:00
0c75318250 IOdictionary: Pstream transfer is now ASCII unless binary is specified in the file 2020-09-14 16:38:28 +01:00
ea036dfec8 foamDictionary: Set expanded dictionary format to ascii 2020-09-14 12:13:09 +01:00
f72a30fe62 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2020-09-14 11:57:52 +01:00
915b9d7221 table2DThermophysicalFunction: Corrected pressure table index check 2020-09-14 11:57:19 +01:00
3220c10f7a IOdictionary: changed read stream type to binary for parallel transfer efficiency 2020-09-14 11:55:50 +01:00
f98d878457 OpenFOAM: Rationalised naming convention for file path
pathName, pathname -> filePath
2020-09-14 11:27:05 +01:00
abac2a03f5 PVReaders: Moved vtk libraries into $PV_PLUGIN_PATH
The vtk libraries are not fully independent of the paraview
installation, so in order to have multiple valid compilations of the
PVReaders (which is useful for testing) we need multiple versions of
these libraries, too. So, these libraries have been put into
$PV_PLUGIN_PATH, which is a paraview-version-specific subdirectory of
$FOAM_LIBBIN.
2020-09-11 11:50:18 +01:00
80eecb3d95 dictionary::includeEntry: Added support for included files containing binary data 2020-09-10 21:50:23 +01:00
ce413b50ba Matrix: Added token::compound support for binary IO of matrices within dictionaries 2020-09-10 17:29:07 +01:00
73e5ea961d basicThermo: Added volScalarField overload of THE 2020-09-10 14:41:02 +01:00
01205c98fb tutorials/multiphase/multiphaseEulerFoam/RAS/bubblePipe: Added tutorial
This tutorial demonstrates the use of the population balance modeling
capability of multiphaseEulerFoam for the case of a vertical pipe. It
superseeds all bubbleColumnPolydisperse cases, which have been removed.

Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2020-09-09 13:36:26 +01:00
7a133ea556 basicThermo: Minor formatting change 2020-09-09 13:36:26 +01:00
ca0ed722a7 tutorials/multiphase/multiphaseEulerFoam/RAS/Grossetete: Rename and corrections
Renamed the bubblePipe tutorial to Grossetete after the study on which
the case is based. Also fixed the mapped patch setup.
2020-09-09 13:36:01 +01:00
0efc492a77 multiphaseEulerFoam: Mass/heat transfer consistency and linearisation
All heat transfers that result from mass-transfer are now implemented in
terms of sensible enthalpy, so that they are consistent regardless of
which form of energy is being solved for. This has removed some spurious
temperature anomalies from a number of cases involving mass-transfer.

All heat transfers that result from mass-transfer are now linearised. In
the case of multi-specie systems this requires the specification of a
residual mass fraction, which is given by a new "residualY" keyword in
the constant/phaseProperties dictionary. If this entry is omitted for
multi-specie systems then linearisation is deactivated.

**** Details for developers ****

Methods have been added to the base heat transfer phase systems to
permit energy transfer as a result of phase change, without coupling to
a diffusive heat transfer model. These functions require a "weight" to
be specified in the call to define how the latent heat is divided
between either side of the interface. A weight of 0 indicates that the
latent heat is dissipated entirely in the upwind phase, and 1 means it
is entirely in the downwind phase.

The forms of latent heat calculation and transfer have been standardised
between the various phase systems. There are now two methods of
calculating the latent heat, and two methods of applying the transfer
(see below for details). These options are currently hard-coded into the
systems that use them, but they could be made user modifiable
per-mass-transfer in future.

Interface temperatures are now stored by the derived phase systems
alongside their corresponding mass transfer rates. These temperatures
are passed by argument to the phase-change heat transfer methods
provided by the base heat transfer systems. This allows multiple
mechanisms of mass transfer each involving different interface state to
occur across the same interface.

These changes have allowed all phase systems to use the same set of
base energy-transfer functionality.

**** Even more details for developers ****

The two forms of latent heat scheme available are:

    symmetric: The latent heat is calculated as the difference between
               the interface enthalpies on either side of an interface.
               This is the simplest form.

       upwind: The latent heat is calculated as the difference between
               the bulk enthalpy on the side of the interface that mass
               is being transferred from and the interface enthalpy on
               the side of the interface that mass is transferring to.
               This form may confer some stability benefits.

The two format of latent heat transfer are:

         heat: The latent heat is applied by transferring heat unequally
               on either side of an interface using the difference
               between the bulk phase temperatures and the interface
               temperature. No explicit latent heat source is required.
               This method has a stability advantage over the "mass"
               option, but the transfer is not energy conservative
               unless the interface temperature is exactly correct.

         mass: The latent heat is applied as an explicit mass transfer
               source to both sides of an interface. The ratio between
               the heat transfer coefficients on either side determines
               what proportion of the latent heat source ends up in each
               phase. Heat transfer is calculated equally on both sides
               of an interface using bulk phase temperatures and is not
               coupled to the thermal effect of phase change. This
               method has the advantage of being energy conservative
               even if the interface temperature is not exact, but it is
               less stable than the "heat" option at extreme conditions.
2020-09-08 16:26:37 +01:00
1d91ec3a6b Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2020-09-04 22:11:41 +01:00
8bb988b0ce Minor formatting correction 2020-09-04 22:11:24 +01:00
b929550ffc multiphaseEulerFoam: Added isothermalGrowth test case
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2020-09-04 15:01:44 +01:00
6da85169ad thermophysicalModels::tabulated: Updated documentation 2020-09-04 09:41:08 +01:00