Commit Graph

5552 Commits

Author SHA1 Message Date
451fbb40d4 Moved kivaTest to tutorials/combustion/XiFoam/RAS/kivaTest 2021-11-06 00:23:27 +00:00
8f14b69fba XiFoam: Added mesh-motion to replace XiEngineFoam
With the addition of mesh-motion to XiFoam and the new engine fvMeshMover the
XiEngineFoam kivaTest simple IC engine example now runs in XiFoam and
XiEngineFoam has been removed.  This simplifies maintenance provides greater
extensibility.
2021-11-05 22:32:42 +00:00
941ea19930 fvMeshMovers::engine, layeredEngine: New fvMesh movers for engine simulations
derived from engineMesh and layeredEngineMesh.
2021-11-05 17:50:22 +00:00
dc6f4ab34c tutorials/combustion/coldEngineFoam/freePiston: Removed pending the completion of the rewrite of engineMesh 2021-11-05 09:57:09 +00:00
55467aaa7f momentumTransportModel, twoPhaseMixture: Updated for clang
The use of move semantics differs between gcc and clang requiring a different
approach when returning a registered IOdictionary
2021-11-05 08:02:44 +00:00
e10830632e engineTime: Completely replaced engineTime derived from Time
with the run-time selectable engine userTime embedded in Time.

All parts of the original engineTime relating to the engine geometry have been
moved to engineMesh.  This is part of the process of integrating engine
simulations within the standard moving-mesh solvers.
2021-11-03 19:33:41 +00:00
7f56646aba multiphaseEulerFoam::MovingPhaseModel: Register phase divU for refinement/unrefinement mapping 2021-11-03 11:40:15 +00:00
30a16cc88c tutorials/multiphase/interFoam/RAS/floatingObject: Improved surface initialisation 2021-11-02 17:40:09 +00:00
d3022ae1d7 reconstruct::processorMeshes: Disable reading of dynamicMeshDict during reconstruction 2021-11-02 17:33:16 +00:00
a075e1a774 rigidBodyMeshMotion: Added support for mesh refinement/unrefinement with multiple bodies 2021-11-02 16:54:51 +00:00
a817efc9c6 Updates to avoid warning messages from Clang 2021-11-02 16:54:25 +00:00
37c7d6b9ac rigidBodyMeshMotion: Added support for dynamic mesh refinement/unrefinement
The floatingObject tutorial has been update to demonstrate this functionality by
adding the following topoChanger entry to dynamicMeshDict:

topoChanger
{
    type    refiner;

    libs    ("libfvMeshTopoChangers.so");

    // How often to refine
    refineInterval  1;

    // Field to be refinement on
    field           alpha.water;

    // Refine field in between lower..upper
    lowerRefineLevel 0.001;
    upperRefineLevel 0.999;

    // Have slower than 2:1 refinement
    nBufferLayers   1;

    // Refine cells only up to maxRefinement levels
    maxRefinement   1;

    // Stop refinement if maxCells reached
    maxCells        200000;

    // Flux field and corresponding velocity field. Fluxes on changed
    // faces get recalculated by interpolating the velocity. Use 'none'
    // on surfaceScalarFields that do not need to be reinterpolated.
    correctFluxes
    (
        (phi none)
        (nHatf none)
        (rhoPhi none)
        (alphaPhi.water none)
        (meshPhi none)
        (ghf none)
    );

    // Write the refinement level as a volScalarField
    dumpLevel       true;
}

Note that currently only single rigid body motion is supported (but multi-body
support will be added shortly) and the Crank-Nicolson scheme is not supported.
2021-11-02 14:11:52 +00:00
465b9382c0 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2021-11-02 11:28:43 +00:00
2d1c97f4fa Function2::UniformTable2: Corrected and updated documentation
Resolves bug-report https://bugs.openfoam.org/view.php?id=3750
2021-11-02 11:27:54 +00:00
80c1a65bc8 movingWallSlipVelocity: Added boundary condition
This boundary condition specifies a slip velocity on moving walls. It
works similarly to movingWallVelocity, except that the tangential
velocity is not constrained. It can be specified as follows:

    <patchName>
    {
        type            movingWallSlipVelocity;
        value           uniform (0 0 0); // Initial value
    }
2021-11-02 10:32:33 +00:00
a13826f1d6 Test-liquid: Separate data blocks for gnuplot 2021-10-29 13:09:29 +01:00
81f6cf91d0 liquidProperties: Added properties for NH3 (ammonia) 2021-10-29 12:51:46 +01:00
f376c1b087 TDACChemistryModel: Added test for reduction before updating active composition
to remove parallel overhead when integrating chemistry without reduction.

Resolves bug-report https://bugs.openfoam.org/view.php?id=3748
2021-10-29 10:48:07 +01:00
3b312710c3 fvConstraints::limitPressure: Added optional 'p' entry to specify the name of the pressure field
Description
    Limits the specified pressure field to be between specified minimum and
    maximum limits.

Usage
    Example usage:
    \verbatim
    limitp
    {
        type            limitPressure;

        // p               p_rgh; // Optional entry to specify the pressure

        min             200;
        max             500;
    }
    \endverbatim
2021-10-28 15:17:41 +01:00
8cc05a479e MULES: Removed use of slicing and syncTools
MULES no longer synchronises the limiter field using syncTools. Surface
boundary field synchronisation is now done with a surface-field-specific
communication procedure that should result in scaling benefits relative
to syncTools. This change also means that the limiter does not need to
be continuous face field which is then sliced; it can be a standard
surface field.
2021-10-28 13:10:48 +01:00
49bf52b469 Removed redundant files 2021-10-27 16:32:21 +01:00
40e072670e constAnIsoSolidTransport: Updated typeName
Resolves bug-report https://bugs.openfoam.org/view.php?id=3747
2021-10-27 16:31:40 +01:00
a90b60e57d Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2021-10-27 16:04:11 +01:00
aa6c04a43a functionObjects::scalarTransport: Added support for MULES with sub-cycling and semi-implicit options
Description
    Evolves a passive scalar transport equation.

    - To specify the field name set the \c field entry
    - To employ the same numerical schemes as another field set
      the \c schemesField entry,
    - The \c diffusivity entry can be set to \c none, \c constant, \c viscosity
    - A constant diffusivity is specified with the \c D entry,
    - If a momentum transport model is available and the \c viscosity
      diffusivety option specified an effective diffusivity may be constructed
      from the laminar and turbulent viscosities using the diffusivity
      coefficients \c alphal and \c alphat:
      \verbatim
          D = alphal*nu + alphat*nut
      \endverbatim

    Example:
    \verbatim
        #includeFunc scalarTransport(T, alphaD=1, alphaDt=1)
    \endverbatim

    For incompressible flow the passive scalar may optionally be solved with the
    MULES limiter and sub-cycling or semi-implicit in order to maintain
    boundedness, particularly if a compressive, PLIC or MPLIC convection
    scheme is used.

    Example:
    \verbatim
        #includeFunc scalarTransport(tracer, diffusion=none)

    with scheme specification:
        div(phi,tracer)     Gauss interfaceCompression vanLeer 1;

    and solver specification:
        tracer
        {
            nCorr      1;
            nSubCycles 3;

            MULESCorr       no;
            nLimiterIter    5;
            applyPrevCorr   yes;

            solver          smoothSolver;
            smoother        symGaussSeidel;
            tolerance       1e-8;
            relTol          0;

            diffusion
            {
                solver          smoothSolver;
                smoother        symGaussSeidel;
                tolerance       1e-8;
                relTol          0;
            }
        }
    \endverbatim
2021-10-27 16:01:46 +01:00
7266aa8728 GeometricFieldFunctions: Added cmptMag function 2021-10-27 13:01:58 +01:00
c8c015ddb8 fvMesh: Standardised names of non-const geometry access methods 2021-10-27 13:01:58 +01:00
cd80831261 string: Added const replace and replaceAll
which return the replaced string rather than modify the string the function is
called for.
2021-10-25 10:15:44 +01:00
ad28cb49b5 codedBase: Added support for '-' in entry names
by mapping '-' to '_' in the generation of the code name.

Resolves bug-report https://bugs.openfoam.org/view.php?id=3744
2021-10-24 11:38:55 +01:00
cdefd71521 fieldCoordinateSystemTransform: Updated coordinateSystem construction and documentation
Resolves bug-report http://bugs.openfoam.org/view.php?id=3746
2021-10-24 11:33:56 +01:00
c515e74e00 unityLewisFourier: Corrected unityLewisFourier::j for FickianFourier which inherits it
Resolves bug-report https://bugs.openfoam.org/view.php?id=3743
2021-10-22 22:31:25 +01:00
c01118589f functionObjects: Added fields() function to provide list of required fields to postProcess
With this change each functionObject provides the list of fields required so
that the postProcess utility can pre-load them before executing the list of
functionObjects.  This provides a more convenient interface than using the
-field or -fields command-line options to postProcess which are now redundant.
2021-10-21 09:23:34 +01:00
777e5aeece functionObjects::probes: Ensure selected fields are loaded in postProcess mode 2021-10-19 13:13:53 +01:00
71b5714fad coldEngineFoam: Updated for changes in XiEngineFoam 2021-10-19 12:05:57 +01:00
d8dbe3101c engineTime: Avoid clash with the new userTimes::engine 2021-10-19 10:14:09 +01:00
3ef3e96c3f Time: Added run-time selectable userTime option
replacing the virtual functions overridden in engineTime.

Now the userTime conversion function in Time is specified in system/controlDict
such that the solver as well as all pre- and post-processing tools also operate
correctly with the chosen user-time.

For example the user-time and rpm in the tutorials/combustion/XiEngineFoam/kivaTest case are
now specified in system/controlDict:

userTime
{
    type     engine;
    rpm      1500;
}

The default specification is real-time:

userTime
{
    type     real;
}

but this entry can be omitted as the real-time class is instantiated
automatically if the userTime entry is not present in system/controlDict.
2021-10-19 09:09:01 +01:00
0a54efe189 XiEngineFoam: Updated handling of ddtCorr 2021-10-18 22:09:55 +01:00
686f7fb21a Time: Simplification and rationalisation of userTime
First step towards merging userTime into Time so that post-processing tools
operate with the same userTime mode as the solvers.
2021-10-14 15:05:14 +01:00
45c8a4695a functionObjects::comfort: Corrected warning message
Resolves bug-report https://bugs.openfoam.org/view.php?id=3739
2021-10-14 14:36:37 +01:00
cd1f69599e constTransport: Added the option to specify kappa
The "const" transport model now supports the following input where the
thermal condiuctivity is explicitly specified:

    transport
    {
        mu          1.82e-05;
        kappa       0.0258;
    }

The input in which Prandtl number is specified is also still available:

    transport
    {
        mu          1.82e-05;
        Pr          0.71;
    }

If both kappa and Pr are specified then an error will be generated.
2021-10-12 13:36:41 +01:00
fb53b915b2 fvConstraints::limitTemperature: Added options energy/temperature field name
The energy field limited to limit the temperature is obtained automatically from
the thermo package for the phase except for compressibleInterFoam which uniquely
solves for mixture temperature directly rather than energy.  To limit this
temperature rather than the energy the optional 'field' entry should be set to
'T', e.g.:

    limitT
    {
        type limitTemperature;
        selectionMode all;
        field T;
        min 310;
        max 500;
    }
2021-10-12 12:28:27 +01:00
12dc41d0fb compressibleInterFoam::TEqn: Added internal energy formulation option
The temperature equation in compressibleInterFoam is derived from the phase
total internal energy equations including the kinetic energy source terms.
While this formulation handles pressure loss more accurately the kinetic energy
source terms can cause numerical problems and more likely to induce negative
temperatures in regions where the pressure drops rapidly.  For such cases it may
be beneficial to solve a temperature equation derived from the phase internal
energy equations, i.e. without the kinetic energy source terms which is now
selectable by setting the optional totalInternalEnergy entry in
constant/phaseProperties to false:

    totalInternalEnergy false;

When this entry is omitted the total energy form is used providing
backward-compatibility.
2021-10-11 14:22:29 +01:00
2fe74a5bd2 twoPhaseMixture: Updated support for re-reading of phaseProperties 2021-10-11 14:21:56 +01:00
1a6b662b41 surfaceInterpolate: Made consistent with other function objects
The surfaceInterpolate function object is now a field expression. This
means it works in the same way as mag, grad, etc... It also now has a
packaged configuration and has been included into the postProcessing
test case.

It can be used in the following ways. On the command line:

   postProcess -func "surfaceInterpolate(rho, result=rhof)"

   rhoPimpleFoam -postProcess -func "surfaceInterpolate(thermo:rho, result=rhof)"

In the controlDict:

   functions
   {
       #includeFunc surfaceInterpolate(rho, result=rhof)
   }

By running:

   foamGet surfaceInterpolate

Then editing the resulting system/surfaceInterpolate file and then
running postProcess or adding an #includeFunc entry without arguments.
2021-10-08 09:10:27 +01:00
3a1897d0d8 foamInfo: improved handling of fvModels 2021-10-07 15:54:02 +01:00
51446a76df fvModels: Standardised directory structure
All library-specific fvModels are now in an fvModels/<modelName>
sub-directory of the library
2021-10-07 12:12:07 +01:00
4e445a8dec thermophysicalModels/specie/thermo: Corrected documentation
Resolves bug-report https://bugs.openfoam.org/view.php?id=3735
2021-10-06 08:20:29 +01:00
14f68613ec hConstThermo, eConstThermo: Corrected documentation
Resolves bug-report https://bugs.openfoam.org/view.php?id=3735
2021-10-05 09:19:10 +01:00
d1e6971bea fvMesh: Completed the mover and topoChanger logic in the new update function 2021-10-04 08:48:55 +01:00
905eea9115 etc/templates: Renamed thermophysicalProperties -> physicalProperties 2021-10-01 20:53:17 +01:00
10f67e994f fluxLimitedLangmuirHinshelwoodReactionRate: Corrected loop range 2021-10-01 20:47:23 +01:00