Commit Graph

7140 Commits

Author SHA1 Message Date
b9a8910739 includeFvModel: now searches the constant directory for local configuration files 20230829 2023-08-28 23:31:54 +01:00
30940e0e1d Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2023-08-28 20:32:49 +01:00
6054b1fea0 objectRegistry, regIOobject: Added support for automatic re-reading of dependent class
Now with the addition of the optional dependenciesModified() function classes
which depend on other classes which are re-read from file when modified are also
automatically updated via their read() function called by
objectRegistry::readModifiedObjects.

This significantly simplifies the update of the solutionControls and modular
solvers when either the controlDict or fvSolution dictionaries are modified at
run-time.
2023-08-28 20:28:39 +01:00
7390fc15a9 Merge branch 'master' of github.com:OpenFOAM/OpenFOAM-dev 2023-08-28 10:50:49 +01:00
53e40f6c8d packaged fvConstraints: formatting 2023-08-28 10:29:30 +01:00
11c6751927 constrainHbyA: Removed the now redundant constrainH function 2023-08-26 17:07:19 +01:00
5fd30443f3 multiphaseEuler: New implicit drag algorithm replaces partial-elimination corrector
The momentum equation central coefficient and drag matrix is formulated,
inverted and used to eliminate the drag terms from each of the phase momentum
equations which are combined for formulate a drag-implicit pressure equation.
This eliminates the lagged drag terms from the previous formulation which
significantly improves convergence for small particle and Euler-VoF high-drag
cases.

It would also be possible to refactor the virtual-mass terms and include the
central coefficients of the phase acceleration terms in the drag matrix before
inversion to further improve the implicitness of the phase momentum-pressure
coupling for bubbly flows.  This work is pending funding.
2023-08-26 10:09:38 +01:00
49c69872e5 externalTemperatureFvPatchScalarField: Changed fixesValue() to true
With the change the boundary temperature is updated only via the evaluate call
rather than derived from the corresponding energy solution.  This has proved
more stable and convergent for the wallBoiling cases.
2023-08-26 10:07:02 +01:00
46ececfc19 genericFvPatchFields: Fix documentation typo 2023-08-25 10:13:47 +01:00
0433bd3e00 genericFields: Library reorganisation and reduce duplication 2023-08-25 09:46:40 +01:00
ba416ac909 fvMeshStitcher: Standardise mesh change hooks 2023-08-24 12:10:45 +01:00
089aa672d5 caseDicts: added skeleton fvModels and fvConstraints files 2023-08-23 12:55:40 +01:00
af0552e9f0 templates/compressibleInflowOutflow: corrected fvSchemes 2023-08-23 12:46:56 +01:00
075c358fb9 snappyHexMeshConfig: layers can be specified for individual surfaces 2023-08-22 16:48:11 +01:00
be88a99ecd Cloud: Delete all particles that fail to map 2023-08-22 11:40:30 +01:00
bf8b8596f8 polyMesh: Use appropriate boundary meshes when swapping patches 2023-08-22 11:40:30 +01:00
af9afec754 snappyHexMeshConfig: allow a cylindrical background mesh without a rotating zone 2023-08-18 16:46:06 +01:00
66d3b49eb5 contactAngleFvPatchScalarField: Added documentation 2023-08-18 10:32:50 +01:00
4e7ee7ed65 primitiveFaceZone: Removed
This definition was incorrect, and the correct form is not needed as it
is the same as indirectPrimitivePatch

Resolves bug report https://bugs.openfoam.org/view.php?id=4008
2023-08-18 08:54:25 +01:00
dd23a7dbe8 Template cases: automatically set relaxationFactors for steady-state and transient simulation 2023-08-17 09:21:39 +01:00
07b434e098 Template cases: remove redundant PISO settings in fvSolution 2023-08-16 18:45:22 +01:00
e3b53f2727 multiphaseEuler: Fix indexing bug in partial elimination 2023-08-16 16:03:32 +01:00
7ab2321a07 multicomponentThermo: Fix for singleComponentMixture
This prevents a segfault when using singleComponentMixture and no mass
fraction fields are stored

Resolves bug report https://bugs.openfoam.org/view.php?id=4006
2023-08-16 09:34:17 +01:00
6d9bc62fa9 foamDictionary: Added -output option
to specify the path name of the output dictionary to which the expanded and/or
changed dictionary is written.

Usage: foamDictionary [OPTIONS] <dictionary file>
options:
  -add <value>      Add a new entry
  -case <dir>       specify alternate case directory, default is the cwd
  -dict             Set, add or merge entry from a dictionary.
  -diff <dict>      Write differences with respect to the specified dictionary
  -entry <name>     report/select the named entry
  -expand           Read the specified dictionary file and expand the macros
                    etc.
  -fileHandler <handler>
                    override the fileHandler
  -hostRoots <((host1 dir1) .. (hostN dirN))>
                    slave root directories (per host) for distributed running
  -includes         List the #include/#includeIfPresent files to standard output
  -keywords         list keywords
  -libs '("lib1.so" ... "libN.so")'
                    pre-load libraries
  -merge <value>    Merge entry
  -noFunctionObjects
                    do not execute functionObjects
  -output <path name>
                    Path name of the output dictionary
  -parallel         run in parallel
  -remove           Remove the entry.
  -roots <(dir1 .. dirN)>
                    slave root directories for distributed running
  -set <value>      Set entry value, add new entry or apply list of
                    substitutions
  -value            Print entry value
  -writePrecision <label>
                    Write with the specified precision
  -srcDoc           display source code in browser
  -doc              display application documentation in browser
  -help             print the usage

manipulates dictionaries
2023-08-10 21:24:44 +01:00
89db32a3a7 foamDictionary: Corrected handling of the -case option
Now if the -case option is specified the dictionary path provided is treated as
relative to the case path, e.g.

foamDictionary -expand -case shockFluid/shockTube system/controlDict
2023-08-10 20:28:54 +01:00
9e296d3040 dimensionedType: Make read flexible as to the presence of a name 2023-08-10 10:37:33 +01:00
cce5bc9e40 HookFunctions: Prevent expansion prior to command evaluation 2023-08-09 16:29:00 +01:00
a2314a5a23 multicomponentThermo: Construct Yslicer on demand
This fixes a crash caused by the pointers to the mass fraction boundary
fields being invalidated by mesh-to-mesh mapping
2023-08-09 15:10:23 +01:00
b790a69507 DimensionedFunction1: Permit setting argument-dimensions of inline functions
Both argument and value dimensions can be set for inline-constructable
function1-s. For example, this inline table function:

    massFlowRate table [CAD] [g/s]
    (
        (0 0.46)
        (0.17 1.9)
        (0.31 4.8)
    );

Is equivalent to this dictionary specification:

    massFlowRate
    {
        type    table;
        xDimensions [CAD];
        dimensions [g/s];
        values
        (
             (0 0.46)
             (0.17 1.9)
             (0.31 4.8)
        );
    }

In the inline form, the argument/x-dimensions come first, and the value
dimensions second. If there only one dimension set provided, then this
is assumed to be the value dimensions.
2023-08-09 12:30:44 +01:00
9a7b9e9229 ConeInjection: Permit unit specification for dInner/dOuter 2023-08-08 16:29:51 +01:00
a693bf009d IrreversibleReaction: Formatting 2023-08-08 16:18:01 +01:00
95589f6973 dimensionSets: Removed writeSets
The functionality necessary to write in a different unit set has been
removed. This was excessivelty complex, never used in practice, and of
little practical usage. Output numeric data, in general, is not designed
to be conveniently user-readable, so it is not important what unit
system it is written in.
2023-08-08 16:17:57 +01:00
fd2f932bfe DimensionSets: Added milliseconds [ms] and microseconds [us] 2023-08-08 13:12:03 +01:00
bf044f5c47 DimensionedFunction1: Function1 with dimensions
This can be used identically to a standard Function1. In addition, it
also permits specification of the dimensions. This allows the dimensions
to be checked. It also permits unit conversions. For example:

    <name>
    {
        type        table;

        // Dimensions
        xDimensions [CAD];  // Optional. Argument dimensions/units.
                            // Here, this specifies coordinates are in
                            // crank angle degrees (available if using
                            // engine time).
        dimensions  [mm];   // Optional. Value dimensions/units.
                            // Here, values are in mm.

        // Tablulated data
        values
        (
            (0 0)
            (60 12)         // <-- i.e., 12 mm at 60 degrees
            (180 20)
            (240 8)
            (360 0)
        );
        outOfBounds repeat;
    }

This replaces TimeFunction1, as it allows per-function control over
whether the function is considered to be one of real-time or user-time.
2023-08-08 13:11:59 +01:00
3a52ee2ac5 src/OpenFOAM/Make/files: added stepInterpolationWeights.C 2023-08-07 14:28:44 +01:00
a05d7f15e5 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2023-08-07 12:11:08 +01:00
50c0530276 stepInterpolationWeights: New interpolation weight for Function1s::Table
Description
    Generates the weight for step-wise interpolation and integration

    The step transitions are at the end of each interval.

The value returned by the Table::value function returns the value set for the
start of each interval within that interval and transitions abruptly to the next
interval value at the start of the next interval.
2023-08-07 12:08:05 +01:00
71ccf51ba5 decomposePar, reconstructPar: Do all regions simultaneously
DecomposePar and reconstructPar now interleave the processing of
multiple regions. This means that with the -allRegions option, the
earlier times are completed in their entirety before later times are
considered. It also lets regions to access each other during
decomposition and reconstruction, which will be important for
non-conformal region interfaces.

To aid interpretation of the log, region prefixing is now used by both
utilities in the same way as is done by foamMultiRun.

DecomposePar has been overhauled so that it matches reconstructPar much
more closely, both in terms of output and of iteration sequence. All
meshes and addressing are loaded simultaneously and each field is
considered in turn. Previously, all the fields were loaded, and each
process and addressing set was considered in turn. This new strategy
optimises memory usage for cases with lots of fields.
2023-08-01 14:25:28 +01:00
58e15f296c Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2023-07-29 16:33:06 +01:00
77f0e7fbdc compressibleVoF/fvModels::VoFTurbulenceDamping: corrected documentation
Resolves bug-report https://bugs.openfoam.org/view.php?id=4000
2023-07-29 16:32:08 +01:00
32a877d236 polyMesh: Prevent "no points/cells" warnings on processor cases 2023-07-28 14:52:04 +01:00
2f579ca041 fluidSolvers: Stabilise rDeltaT calculation
When the flow is stationary (e.g., at the beginning of a run) the
rDeltaT calculation now requires a maxDeltaT setting in the PIMPLE
sub-section of the fvSolution dictionary. This prevents floating point
errors associated with rDeltaT approaching zero.
2023-07-27 12:16:05 +01:00
9cba18a073 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2023-07-27 10:58:46 +01:00
1e79d0245c MomentumTransferPhaseSystem::partialElimination: Removed the phase velocity mean adjustment
The phase velocity mean adjustment was introduced for consistency with phase
flux mean adjustment which is necessary to ensure the mean flux divergence is
preserved.  However for systems with very high drag it has proved preferable to
not adjust the velocity of the phases to conserve momentum rather than ensure
consistency with the fluxes.
2023-07-27 10:54:52 +01:00
4acddc6ab0 solidThermo: Add rhoThermo interface
The old fluid-specific rhoThermo has been split into a non-fluid
specific part which is still called rhoThermo, and a fluid-specific part
called rhoFluidThermo. The rhoThermo interface has been added to the
solidThermo model. This permits models and solvers that access the
density to operate on both solid and fluid thermophysical models.
2023-07-27 09:20:43 +01:00
65f3050b35 thermophysicalModels: Renamed he*Thermo classes
The he*Thermo classes have been renamed to match their corresponding
basic thermo classes. E.g., rhoThermo now corresponds to RhoThermo,
rather than heRhoThermo.
2023-07-27 08:39:58 +01:00
3c542d664b thermophysicalModels: Primitive mixture classes
Mixture classes (e.g., pureMixtrure, coefficientMulticomponentMixture),
now have no fvMesh or volScalarField dependence. They operate on
primitive values only. All the fvMesh-dependent functionality has been
moved into the base thermodynamic classes. The 'composition()' access
function has been removed from multi-component thermo models. Functions
that were once provided by composition base classes such as
basicSpecieMixture and basicCombustionMixture are now implemented
directly in the relevant multi-component thermo base class.
2023-07-27 08:39:58 +01:00
966457788c IOerror: Split location into separate class
This simplifies the IOerror constructors and allows for the location to
be conveniently cached for errors that can't be triggered until after
the IO operation.
2023-07-27 08:39:58 +01:00
87ff44aeb8 tutorials: Simplified dimensionless specification from [0 0 0 0 0 0 0] -> [] 2023-07-26 18:37:57 +01:00
66188fac7a XiFluid, PDRFoam: Updated so that coefficients can be specified without dimensions
All associated combustion tutorials have been simplified using this functionality.
2023-07-26 14:44:10 +01:00