Commit Graph

3590 Commits

Author SHA1 Message Date
062c956dfd foamGet: added directory target for scalar field s 2018-11-26 11:20:53 +00:00
e353a07ecf functionObjects/field/age: Added schemesField option
This allows scheme and solver settings used for the calculation of age
to be copied from another variable
20181125
2018-11-25 12:55:09 +00:00
b9f8eb8dd1 foamGet: selecting target directory based on file name 2018-11-23 19:16:27 +00:00
ecd30940d1 caseDicts: added example All* workflow scripts 2018-11-23 18:50:36 +00:00
01763b037d Allmesh scripts: removed unused variables and legacy syntax 2018-11-23 18:41:55 +00:00
b928e37677 functionObjects: Added age function object
This object calculates a field of the age of fluid in the domain; i.e.,
the time taken for a fluid particle to travel to a location from an
inlet. It outputs a field, named age, with dimensions of time, and
requires a solver and a div(phi,age) scheme to be specified. A number of
corrections for the solution procedure can be set, as well as the name
of the flux and density fields.

Example specification:

    age1
    {
        type    age;
        libs    ("libfieldFunctionObjects.so");
        nCorr   10;
        phi     phi;
        rho     rho;
    }

Example usage:

    postProcess -func age -fields "(phi)" -latestTime

This work was supported by Robert Secor and Lori Holmes, at 3M
2018-11-23 08:37:48 +00:00
e928eafa52 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2018-11-20 11:33:02 +00:00
bcf4e68901 Further rationalisation of the handling of "Final" solver settings
The selection of the "Final" solver settings is now handled automatically within
the "<equation>.solve()" call and there is no longer any need no provide a bool
argument for specific cases.  This simplifies the solution algorithm loop
structures and ensures consistency in behaviour across all solvers.

All tutorials have been updated to correspond to the now consistent rules.
2018-11-20 11:28:02 +00:00
f810b87dba solutionControl: Default simpleRho true when steady, and improved log messages 2018-11-19 13:53:11 +00:00
ee443e201f Rationalised the handling of "Final" solver and relaxation factor settings
Now for transient simulations "Final" solver settings are required for ALL
equations providing consistency between the solution of velocity, energy,
composition and radiation properties.

However "Final" relaxation factors are no longer required for fields or
equations and if not present the standard value for the variable will be
applied.  Given that relaxation factors other than 1 are rarely required for
transient runs and hence the same for all iterations including the final one
this approach provide simpler input while still providing the flexibility to
specify a different value for the final iteration if required.  For steady cases
it is usual to execute just 1 outer iteration per time-step for which the
standard relaxation factors are appropriate, and if more than one iteration is
executed it is common to use the same factors for both.  In the unlikely event
of requiring different relaxation factors for the final iteration this is still
possible to specify via the now optional "Final" specification.
2018-11-17 19:42:23 +00:00
ae28cb34d2 fanFvPatchField -> fanPressureJumpFvPatchScalarField: for consistency with fanPressureFvPatchScalarField
Description
    This boundary condition provides a pressure jump condition, using
    the \c cyclic condition as a base.

    The jump is specified as a \c Function1 type, to enable the use of, e.g.
    constant, polynomial, table values. This boundary condition can operate
    in two modes - standard and backward compatibility.
    In standard mode, jump is specified as a function of total volumetric
    flow rate through the patch. In backward compatibility mode, the boundary
    conditions serves as a direct replacement for the fanFvPatchField, where
    jump is defined as a function of local velocity.

Usage
    \table
        Property     | Description             | Required    | Default value
        patchType    | underlying patch type should be \c cyclic| yes |
        fanCurve     | fan curve, e.g. \c csvFile | yes      |
        jumpTable    | jump data (backward compatibility mode) | no       |
        reverse      | reverse jump direction  | no | false
        phi          | flux field name         | no          | phi
        rho          | density field name      | no          | rho
    \endtable

    Example of the boundary condition specification:
    \verbatim
    <patchName>
    {
        type            fan;
        patchType       cyclic;
        fanCurve       csvFile;
        csvFileCoeffs
        {
            hasHeaderLine   1;
            refColumn       0;
            componentColumns 1(1);
            separator       ",";
            file           "$FOAM_CASE/constant/pressureVsQ";
        }
        value           uniform 0;
    }
    \endverbatim

    The above example shows the use of a comma separated (CSV) file to specify
    the jump condition.

Contributed by Daniel Jasinski
Resolves bug-report https://bugs.openfoam.org/view.php?id=3102#c10159
20181117
2018-11-14 15:35:35 +00:00
ffd0f34c24 coupledPolyPatch, coupledPolyPatch: Added defaultTransform argument 2018-11-14 14:48:02 +00:00
3980cc887c interfacialCompositionModels/Henry: Updated documentation
Corrected spelling and made it clear that the supplied constants are
dimensionless solubilities.
2018-11-13 16:15:28 +00:00
11eaf751d3 distanceSurface, sampledCuttingPlane, foamyHexMeshBackgroundMesh: Updated for new isoSurface implementation 2018-11-13 14:50:08 +00:00
c4dc7f0f8e isoSurface: Improved iso-surface algorithm
Includes topological point generation and optional removal of all points (and
triangles) that do not originate from mesh edges.  This generates
polygons rather than triangles providing smoother surfaces and significantly
small files (~ factor of 3-4 smaller).

Contributed by Mattijs Janssens
2018-11-13 14:47:19 +00:00
0b99b5af1a sampling: Removed deprecated isoSurfaceCell 2018-11-13 12:14:13 +00:00
7b3cc689a6 chtMultiRegionFoam: Only do closed volume handling when running steady
This resolves bug report https://bugs.openfoam.org/view.php?id=3105
2018-11-13 09:24:30 +00:00
c3018b3f07 limitedSchemes OSPRE, vanAlbada: ensure r is positive
Patch contributed by Alberto Passalacqua
Resolves bug-report https://bugs.openfoam.org/view.php?id=3100
2018-11-12 22:48:13 +00:00
b80f0d3cdd chemFoam: Added support for constant temperature
By setting

    constantProperty temperature;

in constant/initialConditions the composition evolves at constant temperature.
2018-11-12 17:44:38 +00:00
ed629586c2 etc/templates: Added comments to aid conversion from steady to transient configuration 2018-11-12 17:15:09 +00:00
8c4fa9508e tutorials/incompressible/pimpleFoam/RAS/pitzDaily/system/fvSchemes: removed "bounded"
"bounded" filtering of the convection schemes is only appropriate for stead-state.
2018-11-12 16:50:40 +00:00
669c7d8405 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2018-11-12 16:50:15 +00:00
224814185c etc/templates: Updated the handling of pcorr 2018-11-12 16:49:34 +00:00
3e45506246 SubDimensionedField: Removed
This was not being used and had not been kept up to date. It also didn't
actually do dimension checking, so the name was misleading, and the
functionality added on top of SubField was minimal.
2018-11-12 15:03:36 +00:00
06d8f79814 coneInjection: Combined cone and coneNozzle injections
coneInjection has been extended to include the functionality of
coneNozzleInjection, and the latter has been removed.

Some parameters have changed names. The "positionAxis" entry from
coneInjection has been removed in preferance of coneNozzleInjection's
single "position" and "direction" entries. This means that only one
injection site is possible per model (dictionary substitutions mean that
only minimal additions are required to add further injection sites with
the same parameters). The name of the velocity magnitude has been
standardised as "Umag" and "innerDiameter" and "outerDiamater" have been
renamed "dInner" and "dOuter" for consistency with the inner and outer
spray angles.

Velocity magnitude and diameters are no longer read when they are not
required.

The randomisation has been altered so that the injections generate a
uniform distribution on an cross section normal to the direction of
injection. Previously there was an unexplained bias towards the
centreline.

An example specification with a full list of parameters is shown below.

    injectionModels
    {
        model1
        {
            type            coneInjection;

            // Times
            SOI             0;
            duration        1;

            // Quantities
            massTotal       0; // <-- not used with these settings
            parcelBasisType fixed;
            parcelsPerSecond 1000000;
            flowRateProfile constant 1;
            nParticle       1;

            // Sizes
            sizeDistribution
            {
                type        fixedValue;
                fixedValueDistribution
                {
                    value   0.0025;
                }
            }

            // Geometry
            positions       (-0.15 -0.1 0);
            directions      (1 0 0);
            thetaInner      0;
            thetaOuter      45;
            // - Inject at a point
            injectionMethod point;
            // - Or, inject over a disc:
            /*
            injectionMethod disc;
            dInner          0;
            dOuter          0.05;
            */

            // Velocity
            // - Inject with constant velocity
            flowType        constantVelocity;
            Umag            1;
            // - Or, inject with flow rate and discharge coefficient
            //   This also requires massTotal, dInner and dOuter
            /*
            flowType        flowRateAndDischarge;
            Cd              0.9;
            */
            // - Or, inject at a pressure
            /*
            flowType        pressureDrivenVelocity;
            Pinj            10e5;
            */
        }

        model2
        {
            // The same as model1, but at a different position
            $model1;
            position        (-0.15 0.1 0);
        }
    }
2018-11-12 15:02:03 +00:00
ecaa6fb966 totalFlowRateAdvectiveDiffusiveFvPatchScalarField: Generalised the turbulence models lookup to support LES and RAS
Patch provided by Daniel Jasinski
Resolves feature request https://bugs.openfoam.org/view.php?id=3075
20181110
2018-11-09 14:47:26 +00:00
5c86bafb82 etc/caseDicts/solvers/chemistry/TDAC: New configuration files for TDAC
to simplify reacting case setup.

Tutorials
    tutorials/combustion/chemFoam/ic8h18_TDAC
    tutorials/combustion/reactingFoam/RAS/SandiaD_LTS
    tutorials/combustion/reactingFoam/laminar/counterFlowFlame2DLTS_GRI_TDAC
    tutorials/combustion/reactingFoam/laminar/counterFlowFlame2D_GRI_TDAC
updated to benefit from the new configuration files.

Patch contributed by Francesco Contino
2018-11-08 23:06:52 +00:00
9ff8bf3ae4 etc/caseDicts: Remove inappropriate FoamFile entries from configuration files 2018-11-08 23:06:08 +00:00
c2e57015ee dictionary::includeEntry: Reinstate the parent dictionary FoamFile entry 2018-11-08 23:05:05 +00:00
5a988c068e paraFoam: Added check for ".orig" variants 2018-11-08 08:38:58 +00:00
7b59f1f169 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2018-11-08 07:20:19 +00:00
8ee41932d6 externalWallHeatFluxTemperature: Avoid floating point exception
Patch contributed by Juho Peltola, VTT.
Resolves bug-report https://bugs.openfoam.org/view.php?id=3101
2018-11-07 12:11:30 +00:00
1c35e8a2f5 reactingEulerFoam: Added update interval for population balance source terms.
This can be used to speedup simulations that converge to a steady state
by only updating the source terms once every few iterations. The number
of iterations between each update is set in fvSolution as follows:

    solvers
    {
        bubbles
        {
            sourceUpdateInterval 10;
        }

        // etc ...
    }

By default the interval is 1, and so the sources update every time.

Based on a patch contributed by Juho Peltola, VTT.
2018-11-05 09:28:03 +00:00
9ecbf3b46f Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2018-11-03 10:01:18 +00:00
3419593a95 liquidProperties::C3H6O: Corrected enthalpy coefficients
Patch contributed by Timo Niemi, VTT.
Resolves bug-report https://bugs.openfoam.org/view.php?id=3085
2018-11-03 09:59:52 +00:00
b1d3aefb6c rhoReactionThermos: Instantiated WLF transport model 2018-10-31 11:12:21 +00:00
b59c71a15e chtMultiRegionFoam: Removed Qdot from top-level solver
Qdot is only relevant for reacting cases, and even then it is only
written out for post-processing purposes. It has been removed from
chtMultiRegionFoam as this solvers' typical usage is for non-reacting
simulations.

If it is desired to obtain Qdot from a chtMultiRegionFoam simulation,
then a better way would be to implement a function object to look up the
reaction model and write it out.
2018-10-30 16:01:19 +00:00
b7c64995b0 IsothermalPhaseModel: Always correct thermo
Commit 674bff40 was in the right direction, but pressure dependence also
has to be corrected for, whether the phase is pure or not. The phase now
always updates the thermo whilst maintaining a constant temperature.
2018-10-30 15:35:41 +00:00
674bff4031 IsothermalPhaseModel: Correct base thermo
An isothermal phase still needs to trigger a thermo update in it's base
classes, primarily to ensure that any inert species fractions get
updated. This will not trigger an actual update of the thermodynamics,
as that is done in AnisothermalPhaseModel.
2018-10-30 14:27:39 +00:00
e1c95941e7 reactingEulerFoam: Added linearTsub diameter model
This is a model for the diameter of vapour bubbles. It calculates the
diameter as a linear function of the liquid sub-cooling.

Also removed the correct method from diameterModel, as it wasn't really
doing anything except facilitating the update of diameter fields to be
written out. Derived sub-models can control this locally without
polluting the base interface.

Based on patch contributed by by Juho Peltola, VTT.
2018-10-29 14:16:41 +00:00
c9d7131eef driftFluxFoam: Added support for LRR and SSG Reynolds stress models 2018-10-29 12:05:54 +00:00
ba9f8f271f HookFunctions: Fixed check for file extensions 2018-10-29 09:34:46 +00:00
30f4f70fda tutorials::wallBoilingIATE: Updated for consistency with the wallBoiling case
Resolves a thermodynamic stability problem.
20181028
2018-10-27 10:56:04 +01:00
80cc9603a1 thermophysicalModels::eRefConstThermo: New thermodynamics to be used with internal energy
in preference hRefConstThermo.
2018-10-26 18:19:44 +01:00
2cc3cb1b0d Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2018-10-26 11:43:34 +01:00
fc3861dacf functionObjects::turbulenceFields: The field name prefix "turbulenceProperties:" is now optional
By default the prefix is no longer added to the field names but the previous
behaviour can be reproduced by setting the optional "prefix" entry to "on" or
"yes".
2018-10-26 11:41:08 +01:00
0ae01264e4 HookFunctions: Exclude markdown files from trailing whitespace check 2018-10-26 09:31:29 +01:00
43da4fefb2 TwoResistanceHeatTransferPhaseSystem: Moved interface update to before the energy solution
This has some stability benefits for both wall boiling and evaporation
cases.

Patch contributed by Juho Peltola, VTT.
2018-10-26 08:56:49 +01:00
2249f8ad5c functionObject::turbulenceFields: Added support for basic compressible turbulence models without heat transfer support 2018-10-25 20:32:00 +01:00
0f422c2a54 thermophysicalModels: Changed constFluidEThermoPhysics and constEThermoPhysics to use eConstThermo rather than hConstThermo
to avoid the need to evaluate departure functions and simplify evaluation of the
temperature.  In general it makes more sense to use and e/Cv based
thermodynamics when solving for internal energy rather than h/Cp and have
convert between the energy forms.

All related tutorials and test cases have also been updated.
2018-10-25 10:45:45 +01:00