Commit Graph

4830 Commits

Author SHA1 Message Date
a50ded5b9a MomentumTransportModels::mixtureKEpsilon: Reverted change to Gd and Gc 2020-10-22 15:46:38 +01:00
b4e411b897 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2020-10-22 12:40:43 +01:00
b7b000be3b functionObjects::writeObjects: Changed the default executeAtStart to 'no'
This avoids attempting to write temporary fields before they have been created.
The executeAtStart can be set to 'yes' in the writeObjects dictionary or the

functions
{
    #includeFunc writeObjects(executeAtStart = yes, <field1>, <field2>...)
}
2020-10-22 12:36:47 +01:00
ea3e7f50bf tutorials/.../TJunction: Added OBJ-based flow rate monitoring
This tutorial now serves as an example of how to compute flow-rates
through zones defined by triangulated surfaces.

A small fix has also been added to searchableSurfaceToFaceZone to
improve robustness on ambiguous cases.
2020-10-22 11:19:13 +01:00
89b9e2d24c topoSet: searchableSurfaceToFaceZone: Improved robustness
This set now produces a contiguous face zone even when cell centres fall
exactly on the plane of the searchable surface.

The set now calculates the intersections between the
cell-centre-to-cell-centre vectors for every face, and uses those to to
categorise the adjacent cells either side of the set as either above or
below the surface. Then, faces which border both an above and a below
cell are included. This guarantees a contiguous result.

Previously faces for which an intersection was found were included
directly, which resulted in a non-contiguous result when the
intersections became ambiguous; i.e., when the surface passed very close
to the cell centres.
2020-10-22 10:40:48 +01:00
a7de472748 multiphaseEulerFoam::phasePressureModel: Updated to use *Field::New 2020-10-22 10:21:27 +01:00
c8f6ba2305 OpenFOAM::tmp: Added support for non-reusable temporaries
Temporary fields returned from functions which are then reused by the calling
function can now be cached by declaring them as non-reusable to guarantee their
integrity.  *Field::New functions have been updated to use this new
functionality and it is recommended to use these functions to create temporary
fields rather than "new *Field".
2020-10-22 08:56:55 +01:00
ffbcf8a4fb multiphaseEulerFoam::SchaefferFrictionalStress: Updated allocation of temporary using volScalarField::New 2020-10-22 08:55:22 +01:00
1cd08407e9 chemistryModel: Split chemistrySolvers.C, chemistryReductionMethods.C and chemistryTabulationMethods.C
to reduces the memory requirement for compilation and speed-up parallel
compilation.
2020-10-20 14:33:14 +01:00
e326af2b4f distributionModels/general: Fixed copy constructor
Patch contributed by Timo Niemi, VTT.
Resolves bug-report https://bugs.openfoam.org/view.php?id=3569
2020-10-13 10:21:58 +01:00
48c06ad843 PVReaders: Remove old libvtkPV* libraries during build or clean
This is to make sure the old paths do not get linked in preference,
which could cause errors on updating
2020-10-13 08:29:09 +01:00
52a10b0505 Reaction: Added a reaction mass balance check 20201010 20201012 2020-10-07 14:59:33 +01:00
48cc85c19b setWaves: Fix typo in documentation 2020-10-07 10:10:07 +01:00
077e35dc83 DimensionedField: Corrected component and T functions
Resolves bug-report https://bugs.openfoam.org/view.php?id=3564
2020-10-05 11:03:14 +01:00
23bd252137 Correcting template cases. Removed enthalpy from fvOptions and baffles transform changed to none. 2020-10-05 10:48:01 +01:00
1b49f08c6d Fixing mencoderCreateVideo function. Passing the file type variable. 2020-10-04 11:46:36 +01:00
164972b19c fixedNormalInletOutletVelocityFvPatchVectorField: Provide the internal field to the clone of the normalVelocity 2020-10-03 22:23:57 +01:00
7e3f4976a8 PatchFields: Removed simple copy constructors and clone functions
These do not necessarily set the internal field reference correctly and it is
safer that the correct internal field is provided as an argument.
2020-10-03 22:16:10 +01:00
cdd2db01cc applications/test: Updated 2020-10-01 16:09:02 +01:00
d89a8d3daa compressibleMultiphaseInterFoam: updated mixing of thermophysical properties
Thermodynamic properties are now mass-fraction mixed
Transport properties remain volume-fraction mixed
2020-10-01 15:24:14 +01:00
90e4222db3 twoPhaseMixtureThermo: Added documentation for Alpha1,2 2020-10-01 12:45:16 +01:00
268c2e5aed twoPhaseMixtureThermo: Correct gamma functions 2020-10-01 11:27:22 +01:00
8fa6bfcded compressibleInterFoam: Updated to use the thermo:rho 2020-10-01 10:44:36 +01:00
4889e8bbc4 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2020-09-30 20:16:56 +01:00
1988e3df7f compressibleInterFoam: Updated mixing of thermophysical properties
Thermodynamic properties are now mass-fraction mixed
Transport properties remain volume-fraction mixed
2020-09-30 20:15:36 +01:00
15b280c11a interpolation: Fixed Clang warnings about hidden virtual methods 2020-09-30 16:20:09 +01:00
b7b79a59c2 solidThermo: Removed unnecessary pure virtuals from implementation class 2020-09-30 15:58:19 +01:00
2362899f3e solutionControl: Execute function objects after residual check
Function objects that write need to execute after the residual checks so
that the associated modification of the time state correctly makes them
write on the final iteration.

This reverts commit c6089ae3a6, meaning
that residual controls can no longer apply to fields solved for as part
of function object executions.

Creating a system which permits solutions done within function objects
to be subject to residual control, *and* which correctly causes function
objects to write on final iterations, would be significantly more
complex.
2020-09-30 11:05:02 +01:00
a854372f50 writeObjects: Wrap all temporary object names with "tmp<...>"
This is a slight modification of the previous commit. All cached
temporary fields are now written to disk with the name enclosed by
"tmp<...>". This still allows for automatically constructed
field names to be read by paraFoam and other post-processing tools. It
also creates a consistent convention for naming all cached temporary
fields that are written to disk.
2020-09-30 10:17:33 +01:00
06af648dc3 writeObjects: Prepend field expression names with "expr"
for example

cacheTemporaryObjects
(
    "((1|((1|(1|A(U)))-H(1)))-(1|A(U)))"
);

functions
{
    #includeFunc writeObjects(regExp=off, "((1|((1|(1|A(U)))-H(1)))-(1|A(U)))")
}

writes the temporary field with the name
"expr((1|((1|(1|A(U)))-H(1)))-(1|A(U)))" so that it can be read by paraFoam and
other post-processing tools.
2020-09-29 17:21:06 +01:00
99cc2c4514 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2020-09-29 16:10:41 +01:00
fe5e403cf9 surfaceMeshConvert,surfaceMeshConvert,surfaceMeshImport: Updated coordinateSystem support 2020-09-29 16:10:06 +01:00
b0d91b53a7 semiPermeableBaffleMassFraction: Removed unused method declaration
Resolves bug report https://bugs.openfoam.org/view.php?id=3554
2020-09-29 15:13:04 +01:00
1238383597 Coded classes: Fixed IO of compilation settings 2020-09-29 15:13:04 +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