Commit Graph

421 Commits

Author SHA1 Message Date
8b44230384 MRF tutorials: Change rotor velocity boundary condition to fixedValue
Using the noSlip boundary condition for rotating wall in an MRF region
interferes with post-processing by resetting the wall velocity to 0 rather than
preserving the value set by the MRF zone.
2018-01-05 15:13:46 +00:00
9f54506fbf reactingEulerFoam: improvements to population balance modeling
Removed possibility for the user to specify a driftRate in the constantDrift
model which is independent of a fvOptions mass source. The driftRate must be
calculated from/be consistent with the mass source in order to yield a particle
number conserving result.

Made calculation of the over-all Sauter mean diameter of an entire population
balance conditional on more than one velocityGroup being present. This diameter
field is for post-processing purposes only and would be redundant in case of one
velocityGroup being used.

Solution control is extended to allow for solution of the population balance
equation at the last PIMPLE loop only, using an optional switch. This can be
beneficial in terms of simulation time as well as coupling between the
population balance based diameter calculation and the rest of the equation
system.

Patch contributed by Institute of Fluid Dynamics, Helmholtz-Zentrum Dresden - Rossendorf
(HZDR) and VTT Technical Research Centre of Finland Ltd.
2018-01-04 17:23:00 +00:00
f578347934 tutorials: Corrected headers 2017-12-31 20:15:10 +00:00
57fa56ae7b tutorials/multiphase/reacting.*EulerFoam Allrun Allclean: Corrected file permissions 2017-12-31 20:09:10 +00:00
3e577d8515 reactingEulerFoam: Added population balance modeling capability
This patch enables the reactingEulerFoam solvers to simulate polydisperse flow
situations, i.e. flows where the disperse phase is subject to a size
distribution.

The newly added populationBalanceModel class solves the integro-partial
differential population balance equation (PBE) by means of a class method, also
called discrete or sectional method. This approach is based on discretizing the
PBE over its internal coordinate, the particle volume. This yields a set of
transport equations for the number concentration of particles in classes with a
different representative size. These are coupled through their source-terms and
solved in a segregated manner. The implementation is done in a way, that the
total particle number and mass is preserved for coalescence, breakup and drift
(i.e. isothermal growth or phase change) processes, irrespective of the chosen
discretization over the internal coordinate.

A population balance can be split over multiple velocity (temperature) fields,
using the capability of reactingMultiphaseEulerFoam to solve for n momentum
(energy) equations. To a certain degree, this takes into account the dependency
of heat- and momentum transfer on the disperse phase diameter. It is also possible
to define multiple population balances, e.g. bubbles and droplets simultaneously.

The functionality can be switched on by choosing the appropriate phaseSystem
type, e.g. populationBalanceMultiphaseSystem and the newly added diameterModel
class called velocityGroup. To illustrate the use of the functionality, a
bubbleColumnPolydisperse tutorial was added for reactingTwoPhaseEulerFoam and
reactingMultiphaseEulerFoam.

Furthermore, a reactingEulerFoam-specific functionObject called sizeDistribution
was added to allow post-Processing of the size distribution, e.g. to obtain the
number density function in a specific region.

Patch contributed by Institute of Fluid Dynamics, Helmholtz-Zentrum Dresden - Rossendorf
(HZDR) and VTT Technical Research Centre of Finland Ltd.
2017-12-31 19:59:47 +00:00
d3a237f560 reactingEulerFoam: Multiphase thermal phase change and support for multiple mass transfer mechanisms
- Thermal phase change and wall boiling functionality has been generalized to
  support two- and multi- phase simulations.
- Thermal phase change now also allows purePhaseModel, which simplifies case setup.
- The phaseSystem templates have been restructured in preparation of multiple
  simultaneous mass transfer mechanisms. For example, combination of thermal phase
  and inhomogeneous population balance models.

Patch contributed by VTT Technical Research Centre of Finland Ltd and Institute
of Fluid Dynamics, Helmholtz-Zentrum Dresden - Rossendorf (HZDR).
2017-12-31 19:50:22 +00:00
233d8dea12 reactionThermo: Select singleComponentMixture as pureMixture
A pureMixture can now be specified in a reacting solver. This further
enhances compatibility between non-reacting and reacting solvers.

To achieve this, mixtures now have a typeName function of the same form
as the lower thermodyanmic models. In addition, to avoid name clashes,
the reacting thermo make macros have been split into those that create
entries on multiple selection tables, and those that just add to the
reaction thermo table.
2017-12-18 08:39:28 +00:00
18f4d60690 chtMultiRegionFoam: Added reverseBurner tutorial
This tutorial demonstrates chtMultiRegionFoam's combustion capability
2017-12-18 08:39:28 +00:00
7c237a59d0 chtMultiRegionFoam: Added support for reactions
chtMultiRegionFoam now supports reaction/combustion modelling in fluid
regions in the same way as reactingFoam.
2017-12-18 08:39:04 +00:00
d2d99bb7a5 tutorials: blockMesh: Added missing face projections to pipe tutorial 2017-12-14 12:59:15 +00:00
15a2e7f6e9 combustionModel, chemistryModel: Simplified model selection
Updated all tutorials to the new format
2017-12-11 15:20:47 +00:00
61cab84fa6 combustionModel, chemistryModel: Simplified model selection
The combustion and chemistry model selection has been simplified so
that the user does not have to specify the form of the thermodynamics.

Examples of new combustion and chemistry entries are as follows:

    In constant/combustionProperties:

        combustionModel PaSR;

        combustionModel FSD;

    In constant/chemistryProperties:

        chemistryType
        {
            solver          ode;
            method          TDAC;
        }

All the angle bracket parts of the model names (e.g.,
<psiThermoCombustion,gasHThermoPhysics>) have been removed as well as
the chemistryThermo entry.

The changes are mostly backward compatible. Only support for the
angle bracket form of chemistry solver names has been removed. Warnings
will print if some of the old entries are used, as the parts relating to
thermodynamics are now ignored.
2017-12-11 14:49:21 +00:00
46704f121b interFoam: Merged dynamic mesh functionality of interDyMFoam into interFoam
and replaced interDyMFoam with a script which reports this change.

The interDyMFoam tutorials have been moved into the interFoam directory.

This change is one of a set of developments to merge dynamic mesh functionality
into the standard solvers to improve consistency, usability, flexibility and
maintainability of these solvers.

Henry G. Weller
CFD Direct Ltd.
2017-11-30 23:56:42 +00:00
7d6b1be4b3 pimpleFoam, rhoPimpleFoam, interDyMFoam: Rationalized mesh-motion support
Added support for mesh-motion update within PIMPLE loop in pimpleFoam and rhoPimpleFoam.
2017-11-30 13:07:42 +00:00
d63d6ea915 rhePimpleFoam: Merged dynamic mesh functionality of rhoPimpleDyMFoam into rhoPimpleFoam
and replaced rhoPimpleDyMFoam with a script which reports this change.

The rhoPimpleDyMFoam tutorials have been moved into the rhoPimpleFoam directory.

This change is the first of a set of developments to merge dynamic mesh
functionality into the standard solvers to improve consistency, usability,
flexibility and maintainability of these solvers.

Henry G. Weller
CFD Direct Ltd.
2017-11-23 12:13:37 +00:00
7c2ba70deb Renamed tutorials/incompressible/pimpleFoam/RAS/wingMotion/wingMotion2D_pimpleDyMFoam
-> tutorials/incompressible/pimpleFoam/RAS/wingMotion/wingMotion2D_pimpleFoam
2017-11-22 21:41:08 +00:00
b9e4111b2c tutorials/incompressible/pimpleFoam: Updated pimpleDyMFoam tutorials to run pimpleFoam 2017-11-22 16:37:45 +00:00
d1fa9b6339 pimpleFoam: Merged dynamic mesh functionality of pimpleDyMFoam into pimpleFoam
and replaced pimpleDyMFoam with a script which reports this change.

The pimpleDyMFoam tutorials have been moved into the pimpleFoam directory.

This change is the first of a set of developments to merge dynamic mesh
functionality into the standard solvers to improve consistency, usability,
flexibility and maintainability of these solvers.

Henry G. Weller
CFD Direct Ltd.
2017-11-22 16:31:30 +00:00
94666e5a95 tutorials/lagrangian/reactingParcelFoam/hotBoxes: Corrected Allrun-parallel script
Patch contributed by Federico Piscaglia
Resolves bug-report https://bugs.openfoam.org/view.php?id=2757
2017-11-14 20:48:53 +00:00
4b5a10d167 compressibleInterFoam family: merged two-phase momentum stress modelling from compressibleInterPhaseTransportFoam
The new momentum stress model selector class
compressibleInterPhaseTransportModel is now used to select between the options:

Description
    Transport model selection class for the compressibleInterFoam family of
    solvers.

    By default the standard mixture transport modelling approach is used in
    which a single momentum stress model (laminar, non-Newtonian, LES or RAS) is
    constructed for the mixture.  However if the \c simulationType in
    constant/turbulenceProperties is set to \c twoPhaseTransport the alternative
    Euler-Euler two-phase transport modelling approach is used in which separate
    stress models (laminar, non-Newtonian, LES or RAS) are instantiated for each
    of the two phases allowing for different modeling for the phases.

Mixture and two-phase momentum stress modelling is now supported in
compressibleInterFoam, compressibleInterDyMFoam and compressibleInterFilmFoam.
The prototype compressibleInterPhaseTransportFoam solver is no longer needed and
has been removed.
2017-11-14 10:03:20 +00:00
e98f0b6ce3 tutorials/multiphase/compressibleInterPhaseTransportFoam/climbingRod: Improved stability
for a wider range of phase initialization.
2017-11-09 15:04:18 +00:00
eea9f8dd86 tutorials/multiphase/multiphaseInterDyMFoam/laminar/mixerVesselAMI2D: Removed
This tutorial is not currently run due to conservation issues with AMI
2017-11-08 10:31:28 +00:00
6c8102bd9a climbingRod tutorial: added case information in README 2017-11-03 17:59:41 +00:00
04b562cd7a climbingRod tutorial: renamed fluid phase -> liquid 2017-11-01 10:00:30 +00:00
6b023ff9ac climbingRod tutorial: adjusted setFields box
so it does not coincide with cell centres
2017-11-01 09:23:26 +00:00
c3c777ee08 climbingRod tutorial: renamed water phase -> fluid 2017-11-01 09:21:37 +00:00
e96e40bb6c compressibleInterPhaseTransportFoam: New variant of compressibleInterFoam supporting separate phase stress models
In this version of compressibleInterFoam separate stress models (laminar,
non-Newtonian, LES or RAS) are instantiated for each of the two phases allowing
for completely different modeling for the phases.

e.g. in the climbingRod tutorial case provided a Newtonian laminar model is
instantiated for the air and a Maxwell non-Newtonian model is instantiated for
the viscoelastic liquid.  To stabilize the Maxwell model in regions where the
liquid phase-fraction is 0 the new symmTensorPhaseLimitStabilization fvOption is
applied.

Other phase stress modeling combinations are also possible, e.g. the air may be
turbulent but the liquid laminar and an RAS or LES model applied to the air
only.  However, to stabilize this combination a suitable fvOption would need to
be applied to the turbulence properties where the air phase-fraction is 0.

Henry G. Weller, Chris Greenshields
CFD Direct Ltd.
2017-10-30 09:36:43 +00:00
3055587a5c semiPermeableBaffle: Added two new boundary conditions and a tutorial
Two boundary conditions for the modelling of semi-permeable baffles have
been added. These baffles are permeable to a number of species within
the flow, and are impermeable to others. The flux of a given species is
calculated as a constant multipled by the drop in mass fraction across
the baffle.

The species mass-fraction condition requires the transfer constant and
the name of the patch on the other side of the baffle:

boundaryField
{
    // ...

    membraneA
    {
        type            semiPermeableBaffleMassFraction;
        samplePatch     membranePipe;
        c               0.1;
        value           uniform 0;
    }
    membraneB
    {
        type            semiPermeableBaffleMassFraction;
        samplePatch     membraneSleeve;
        c               0.1;
        value           uniform 1;
    }
}

If the value of c is omitted, or set to zero, then the patch is
considered impermeable to the species in question. The samplePatch entry
can also be omitted in this case.

The velocity condition does not require any special input:

boundaryField
{
    // ...

    membraneA
    {
        type            semiPermeableBaffleVelocity;
        value           uniform (0 0 0);
    }
    membraneB
    {
        type            semiPermeableBaffleVelocity;
        value           uniform (0 0 0);
    }
}

These two boundary conditions must be used in conjunction, and the
mass-fraction condition must be applied to all species in the
simulation. The calculation will fail with an error message if either is
used in isolation.

A tutorial, combustion/reactingFoam/RAS/membrane, has been added which
demonstrates this transfer process.

This work was done with support from Stefan Lipp, at BASF.
2017-10-19 11:51:38 +01:00
56ed10b666 DPMFoam, MPPICFoam: Renamed alphaPhic -> alphaPhi.<continuous phase name>
for consistency with multiphase solvers and compatibility with the generalized
TurbulenceModels library.
2017-10-11 23:04:42 +01:00
f18ffee22e tutorials: Put the foamyHexMesh flange tutorial back in the test loop 2017-10-06 11:46:33 +01:00
50912f87cf engineFoam: Renamed engineFoam -> XiEngineFoam and sprayEngineFoam -> engineFoam
XiEngineFoam is a premixed/partially-premixed combustion engine solver which
exclusively uses the Xi flamelet combustion model.

engineFoam is a general engine solver for inhomogeneous combustion with or
without spray supporting run-time selection of the chemistry-based combustion
model.
2017-09-19 17:01:54 +01:00
24a06d3bae Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2017-09-19 09:31:29 +01:00
04d5f803b9 engineTime: Generalized to provide run-time selection of piston-motion
Standard crank-connecting rod and the new free-piston kinematics motion options
are provides, others can easily be added.

Contributed by Francesco Contino and Nicolas Bourgeois, BURN Research Group.
2017-09-19 09:26:26 +01:00
85cdd78143 foamyHexMesh: Corrected surface utility calls in mixerVessel tutorial 2017-09-19 08:38:37 +01:00
cd4d486f14 planarCouette tutorial: fixed permissions on Allrun/clean scripts 2017-09-16 13:35:02 +01:00
f53f52a691 createPatch: writing the cyclic match OBJ files is now optional
The new optional switch 'writeCyclicMatch' can be set to 'true' to enable the writing of
the cyclic match OBJ files; defaults to 'false'.

Patch contributed by Bruno Santos
Resolves patch request https://bugs.openfoam.org/view.php?id=2685
2017-09-09 23:00:27 +01:00
7dc61879a6 sixDoFRigidBodyState: New functionObject which writes the rigid-body state
Based on code contributed by SeongMo Yeon
Resolves feature request https://bugs.openfoam.org/view.php?id=2656
2017-09-09 19:00:56 +01:00
30602652da tutorials/multiphase/interFoam/laminar/wave: Consistency updates 2017-09-08 14:58:18 +01:00
7d9a91661c MPPIC: Standardised cyclone tutorial scripts 2017-09-04 12:01:29 +01:00
82675f0976 Merged reactingParcelFilmFoam into reactingParcelFoam
The combined solver includes the most advanced and general functionality from
each solver including:

    Continuous phase
    Lagrangian multiphase parcels
    Optional film
    Continuous and Lagrangian phase reactions
    Radiation
    Strong buoyancy force support by solving for p_rgh

The reactingParcelFoam and reactingParcelFilmFoam tutorials have been combined
and updated.
2017-08-29 09:33:45 +01:00
531cab4ccb reactingParcelFilmFoam: Updated to use rhoThermo rather than psiThermo
for generality and consistency with reactingParcelFoam
2017-08-24 14:28:55 +01:00
c2d8052e1c cloudSolution: Check consistency between the transient option
and the continuous-phase simulation type

For LTS and steady-state simulations the transient option does not need to be
provided as only steady-state tracking is appropriate.  For transient running
the Lagrangian tracking may be steady or transient.
2017-08-22 13:58:25 +01:00
d800287447 tutorials/incompressible/porousSimpleFoam/straightDuctImplicit: Only run if FOAMY_HEX_MESH set 2017-07-25 23:05:44 +01:00
793aa95738 tutorials/mesh/foamy.*Mesh::Allrun: Only run if FOAMY_HEX_MESH set 2017-07-25 17:37:06 +01:00
53a524a280 Simplified scalar(0.0) -> scalar(0) and scalar(1.0) -> scalar(1) 2017-07-21 17:37:37 +01:00
8c5f4b36f8 tutorials: updated triSurface entries to logical format
supported by commit 80e22788e4
2017-07-13 12:47:34 -05:00
7c301dbff4 Parallel IO: New collated file format
When an OpenFOAM simulation runs in parallel, the data for decomposed fields and
mesh(es) has historically been stored in multiple files within separate
directories for each processor.  Processor directories are named 'processorN',
where N is the processor number.

This commit introduces an alternative "collated" file format where the data for
each decomposed field (and mesh) is collated into a single file, which is
written and read on the master processor.  The files are stored in a single
directory named 'processors'.

The new format produces significantly fewer files - one per field, instead of N
per field.  For large parallel cases, this avoids the restriction on the number
of open files imposed by the operating system limits.

The file writing can be threaded allowing the simulation to continue running
while the data is being written to file.  NFS (Network File System) is not
needed when using the the collated format and additionally, there is an option
to run without NFS with the original uncollated approach, known as
"masterUncollated".

The controls for the file handling are in the OptimisationSwitches of
etc/controlDict:

OptimisationSwitches
{
    ...

    //- Parallel IO file handler
    //  uncollated (default), collated or masterUncollated
    fileHandler uncollated;

    //- collated: thread buffer size for queued file writes.
    //  If set to 0 or not sufficient for the file size threading is not used.
    //  Default: 2e9
    maxThreadFileBufferSize 2e9;

    //- masterUncollated: non-blocking buffer size.
    //  If the file exceeds this buffer size scheduled transfer is used.
    //  Default: 2e9
    maxMasterFileBufferSize 2e9;
}

When using the collated file handling, memory is allocated for the data in the
thread.  maxThreadFileBufferSize sets the maximum size of memory in bytes that
is allocated.  If the data exceeds this size, the write does not use threading.

When using the masterUncollated file handling, non-blocking MPI communication
requires a sufficiently large memory buffer on the master node.
maxMasterFileBufferSize sets the maximum size in bytes of the buffer.  If the
data exceeds this size, the system uses scheduled communication.

The installation defaults for the fileHandler choice, maxThreadFileBufferSize
and maxMasterFileBufferSize (set in etc/controlDict) can be over-ridden within
the case controlDict file, like other parameters.  Additionally the fileHandler
can be set by:
- the "-fileHandler" command line argument;
- a FOAM_FILEHANDLER environment variable.

A foamFormatConvert utility allows users to convert files between the collated
and uncollated formats, e.g.
    mpirun -np 2 foamFormatConvert -parallel -fileHandler uncollated

An example case demonstrating the file handling methods is provided in:
$FOAM_TUTORIALS/IO/fileHandling

The work was undertaken by Mattijs Janssens, in collaboration with Henry Weller.
2017-07-07 11:39:56 +01:00
b18b6e5568 tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater: Corrected Allclean
Resolves bug-report https://bugs.openfoam.org/view.php?id=2597
2017-06-29 16:49:36 +01:00
e8daaa5c76 compressibleInterFoam: Improved mass conservation
using the continuity error correction formulation developed for
twoPhaseEulerFoam and reactingEulerFoam.
2017-06-22 14:42:36 +01:00
faa1ae242d tutorials/basic/potentialFoam: Changed "streamFunction" to "postProcess
-func streamFunction"
2017-06-05 11:47:18 +01:00