Commit Graph

1159 Commits

Author SHA1 Message Date
8b4f866b51 timeVaryingMappedFixedValueFvPatchField: Refactored so the underlying mapping function can be used in other BCs
The new patch field mapping class timeVaryingMappedFvPatchField has been
factored out of the timeVaryingMappedFixedValueFvPatchField BC so that it can be
used to map data onto fields stored within other BCs.

In the process the writeEntryIfDifferent function had to be moved from
fvPatchField to dictionary so that it can still be used in the
timeVaryingMappedFvPatchField class and it made good sense to create the
non-conditional variant writeEntry to simplify the patch field write functions.
This rationalisation has been propagated all other patch fields.
2019-01-29 10:09:38 +00:00
5e2f17a9af populationBalanceModel: phaseChange: Improvements
A number of improvements have been made to the population balance phase
change drift model.

- The model now checks the ordering of the phase pairs and changes the
sign of the drift rate accordingly.

- The phase change mass flux and weights are calculated for each
velocity group, so the drift rate and phase change mass flux should be
consistent for each velocity group.

- By default the phase change mass flux is distributed between the size
groups based on the interfacial area of each group. For backward
compatibility number weighting can be enabled with a new
"numberWeighted" option.

The model now requires the user to provide a list of phase pairs in the
usual parenthesised form, rather than using the name. For example:

    phaseChange
    {
        pairs ((gas and liquid));
    }

Patch contributed by Juho Peltola, VTT.
2019-01-28 16:47:34 +00:00
dc6b7d7803 ThermalPhaseChangePhaseSystem: Fix for building with Clang 2019-01-28 11:59:01 +00:00
7e799e9fef TwoResistanceHeatTransferPhaseSystem: Changed stabilisation term
The stabilisation term for the heat transfer with the interface
temperature has been changed to mirror the local heat transfer in the
phase, rather than an effective heat transfer across both phases. This
makes the stabilisation term match the actual temperature-based transfer
terms more accurately. The difference is particularly significant when
the mass transfer rate is high, and cases of this type gain a
significant stability benefit from this change as a result.

Patch contributed by Juho Peltola, VTT.
2019-01-25 11:00:32 +00:00
653b88d411 ThermalPhaseChangeSystem: Evaluate latent heat at Tsat
Latent heat is now evaluated at Tsat instead of Tf for the thermal phase
change method. This provides a smooth transition of the interface
temperature field as the phase fraction tends to zero.

Patch contributed by Juho Peltola, VTT.
2019-01-24 18:43:35 +00:00
765ae50d32 reactingEulerFoam: phaeseForces: Standardised phase keyword
The phase which the function object relates to is now selected with the
keyword "phase", rather than "phaseName". This is consistent with other
name entries such as the "phi" entry for an inletOutlet boundary.
2019-01-24 14:30:02 +00:00
4221e43dfc combustion: Removed Qdot field from solvers
The Qdot field has been removed from all reacting solvers, in favour of
computing on the fly whenever it is needed. It can still be generated
for post-processing purposes by means of the Qdot function object. This
change reduces code duplication and storage for all modified solvers.

The Qdot function object has been applied to a number of tutorials in
order to retain the existing output.

A fix to Qdot has also been applied for multi-phase cases.
2019-01-24 14:29:17 +00:00
cd8aee2d76 PrimitivePatch: Simplified templating 2019-01-21 09:08:03 +00:00
0dfde5ca4f reactingEulerFoam: heatTransferModel: Added constantNu model
This is a heat transfer model with a constant fixed value for the
Nusselt number. It requires a single "Nu" entry to be specified.

Patch contributed by Juho Peltola, VTT
2019-01-17 09:30:42 +00:00
512ef88e8e reactingEulerFoam: Reinstated diameterModel::correct
This had been removed by commit e1c95941, as most of the time it was
only being used to control writing of the diameter field. IATE does
require it, however, so it has been reinstated for that model.
2019-01-15 14:39:31 +00:00
66c26af922 mesh manipulation utilities: Rationalized field handling and added -noFields option 2019-01-08 21:10:19 +00:00
953e725eb5 chtMultiRegionFoam: Added fvOption source to p_rgh equation
to support mass sources.

Resolves bug-report https://bugs.openfoam.org/view.php?id=3146
2019-01-02 14:42:04 +00:00
6dc48b62d9 Changed tmp<volField> and tmp<surfaceField> construction to use the new simpler "New" method
avoiding unnecessary database registration of temporary fields
2018-12-21 18:37:13 +00:00
146a59e46c GeometricField: Temporary fields are no longer registered on the database by default
Registration occurs when the temporary field is transferred to a non-temporary
field via a constructor or if explicitly transferred to the database via the
regIOobject "store" methods.
2018-12-20 11:00:37 +00:00
6faadcb45c Removed the unnecessary ".0" from dimensionedScalar constructors 2018-12-19 14:24:41 +00:00
e592540951 setWaves: Prevent overwrite of wall fixed-value boundaries
Resoves bug report https://bugs.openfoam.org/view.php?id=3135
2018-12-19 11:23:47 +00:00
5925868fb7 waves: Moved mean velocity specification back into the wave models
With the inclusion of boundary layer modelling in the gas, the
separation of wave perturbation from and mean flow became less useful,
and potentially prevents further extension to support similar boundary
layer modelling in the liquid.

The mean velocity entry, UMean, is now needed in the
constant/waveProperties file rather than in the waveVelocity boundary
condition.
2018-12-18 10:34:40 +00:00
ae63ebfbe6 reactingMultiphaseEulerFoam: Fixed potential double usage of rho tmp 2018-12-13 16:38:49 +00:00
3c0ce7b152 reactingMultiphaseEulerFoam: Updated EEqns for stationary phase
Resolves bug report https://bugs.openfoam.org/view.php?id=3132
2018-12-13 16:01:49 +00:00
d0dc341eb0 Removed unused binary file 2018-12-12 21:16:28 +00:00
ba76758702 MultiComponentPhaseModel: Rename Sc to Sct
This is to make it clear that this is a turbulent Schmidt number
2018-12-11 11:57:30 +00:00
967edc9425 waves: Split mean flow from wave perturbation modelling
In order to increase the flexibility of the wave library, the mean flow
handling has been removed from the waveSuperposition class. This makes
waveSuperposition work purely in terms of perturbations to a mean
background flow.

The input has also been split, with waves now defined as region-wide
settings in constant/waveProperties. The mean flow parameters are sill
defined by the boundary conditions.

The new format of the velocity boundary is much simpler. Only a mean
flow velocity is required.

    In 0/U:

        boundaryField
        {
            inlet
            {
                type            waveVelocity;
                UMean           (2 0 0);
            }
            // etc ...
        }

Other wave boundary conditions have not changed.

The constant/waveProperties file contains the wave model selections and
the settings to define the associated coordinate system and scaling
functions:

    In constant/waveProperties:

        origin          (0 0 0);
        direction       (1 0 0);
        waves
        (
            Airy
            {
                length      300;
                amplitude   2.5;
                phase       0;
                angle       0;
            }
        );
        scale           table ((1200 1) (1800 0));
        crossScale      constant 1;

setWaves has been changed to use a system/setWavesDict file rather than
relying on command-line arguments. It also now requires a mean velocity
to be specified in order to prevent ambiguities associated with multiple
inlet patches. An example is shown below:

    In system/setWavesDict:

        alpha   alpha.water;
        U       U;
        liquid  true;
        UMean   (1 0 0);
2018-12-10 13:39:06 +00:00
d61ca8d8d8 foamDictionary: Added -dict option to set, add and merge
With the -dict option the set, add and merge options read the entry from the
dictionary name argument rather than directly from the argument string.
2018-12-06 23:07:53 +00:00
abde9a8a7c foamDictionary: Added -merge option
which merges the new entry with the corresponding entry in the dictionary
2018-12-05 15:04:01 +00:00
c39816f032 alphatWallBoilingWallFunction: Fix for clang
Patch contributed by Juho Peltola, VTT.
2018-12-04 12:11:33 +00:00
8d8369a5e7 reactingEulerFoam: corrected file permissions 2018-12-02 20:30:39 +00:00
d38ddea17e vtkPVFoam: use the fileHandler readDir
Patch contributed by Mattijs Janssens
2018-11-30 15:11:00 +00:00
d83d943ffe decomposePar: Added -noFields option
Patch contributed by Mattijs Janssens
2018-11-30 15:09:43 +00:00
1aa36fbea5 vtkPVFoam: added support for FOAM_LIBS for loading new file handlers at start-up
Patch contributed by Mattijs Janssens
2018-11-30 15:08:42 +00:00
69b40df84b ThermalPhaseChangePhaseSystem: Consistency when solving for internal energy
The energy transfer associated with phase change has been corrected in
the case that the variable being solved for is internal energy.

Patch contributed by Juho Peltola, VTT.
2018-11-29 11:57:34 +00:00
95815460c0 Comment spelling corrections 2018-11-28 10:24:26 +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
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
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
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
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
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
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
80cc9603a1 thermophysicalModels::eRefConstThermo: New thermodynamics to be used with internal energy
in preference hRefConstThermo.
2018-10-26 18:19:44 +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
214ae651ec reactingEulerFoam: Formatted references according the style guide
Patch contributed by Institute of Fluid Dynamics, Helmholtz-Zentrum
Dresden - Rossendorf (HZDR)
2018-10-19 11:06:25 +01:00
91d3f06846 polynomialFunction: Removed unused class 2018-10-17 18:52:28 +01:00
0546089b7d solidEquilibriumDisplacementFoam: Updated zeroing of Dcorr field 2018-10-17 16:01:08 +01:00
a8fc88b8ee DimensionedField, GeometricField: Added assignment to zero
Zeroing a dimensioned field can now be achieved by assignment to the
zero type. This prevents the clutter associated with constructing an
appropriate dimensioned type, or having to use multiply-equals-zero as a
workaround.
2018-10-17 13:41:16 +01:00