Commit Graph

4970 Commits

Author SHA1 Message Date
501f3de7b5 functionObjects::cylindricalFunctionObject: New functionObject to transform velocity into cylindrical polar coordinates
Description
    Transforms the specified velocity field into a
    cylindrical polar coordinate system or back to Cartesian.

    Example of function object specification to convert the velocity field U
    into cylindrical polar coordinates before averaging and returning the
    average to Cartesian coordinates:
    \verbatim
    cartesianToCylindrical
    {
        type        cylindrical;
        libs        ("libfieldFunctionObjects.so");

        origin      (0 0 0);
        axis        (0 0 1);

        field       U;

        writeControl    outputTime;
        writeInterval   1;
    }

    #includeFunc fieldAverage(cylindrical(U))

    cylindricalToCartesian
    {
        type        cylindrical;
        libs        ("libfieldFunctionObjects.so");

        origin      (0 0 0);
        axis        (0 0 1);

        field       cylindrical(U)Mean;
        toCartesian true;
        result      UMean;

        writeControl    outputTime;
        writeInterval   1;
    }
    \endverbatim
    This is particularly useful for cases with rotating regions, e.g. mixer
    vessels with AMI.

See tutorials/incompressible/pimpleFoam/laminar/mixerVesselAMI2D
2020-12-24 11:13:15 +00:00
e7af10060d coordinateSystems/coordinateRotation/cylindrical: Simplified use of R 2020-12-24 11:12:22 +00:00
d2d557cdba thermophysicalModels::hTabulatedThermo,eTabulatedThermo: Added Cp/Cv
Added Cv() function to hTabulatedThermo and Cp() function to eTabulatedThermo to
avoid the need for the rhoTabulated EoS to provide CpMCv().
2020-12-21 16:31:19 +00:00
6fe12e7361 NonUniformTable1: Added support for reading table values from separate file in FOAM or CSV format 2020-12-21 12:10:41 +00:00
cca0073619 UniformTable2: Simplified constructor 2020-12-21 12:10:20 +00:00
251c4b68d9 Table: Renamed table_ -> values_ for consistency with the other table forms 2020-12-21 12:09:10 +00:00
7652fe14fa Pair: Updated IO to ASCII only, consistent with Tuple2 2020-12-21 12:08:22 +00:00
17796ffa17 Tuple2: Added hash 2020-12-21 12:08:01 +00:00
aaf054c8fd Function1s::NonUniformTable, UniformTable: Templated on Type
Function1s::NonUniformTable,UniformTable can now be used for any primitive type
used for fields.
2020-12-18 18:40:20 +00:00
908f03b522 Function2::UniformTable: Templated on Type
Function2::UniformTable can now be used for any primitive type used for fields.
2020-12-18 16:06:30 +00:00
f44899b4c5 functionObjects::setWriteInterval: Added files 2020-12-18 16:06:03 +00:00
149df5143d Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2020-12-18 11:25:38 +00:00
bae95b1291 functionObjects::setTimeStepFunctionObject: New functionObject which updates the writeInterval as a Function1 of time
Description
    Updates the writeInterval as a Function1 of time.

    Examples of function object specification:
    \verbatim
    setWriteInterval
    {
        type setWriteInterval;
        libs ("libutilityFunctionObjects.so");

        writeInterval table
        (
            (0      0.005)
            (0.1    0.005)
            (0.1001 0.01)
            (0.2    0.01)
            (0.2001 0.02)
        );
    }
    \endverbatim
    will cause results to be written every 0.005s between 0 and 0.1s, every
    0.01s between 0.1 and 0.2s and every 0.02s thereafter.
2020-12-18 11:24:23 +00:00
3b4ea79e67 coolingCylinder2D: New conjugate heat transfer example of a solid cylinder cooled by water.
This tutorial demonstrates multi-region meshing using blockMesh and
solves transient heat transfer to steady-state.
20201218
2020-12-17 15:47:37 +00:00
87db97d020 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2020-12-17 10:42:08 +00:00
5e146ccf58 thermophysicalModels: Added caching of Cp and Cv for efficiency
In multi-specie systems the calculation of Cp and Cv is relatively expensive due
to the cost of mixing the coefficients of the specie thermo model, e.g. JANAF,
and it is significantly more efficient if these are calculated at the same time
as the rest of the thermo-physical properties following the energy solution.

Also the need for CpByCpv is also avoided by the specie thermo providing the
energy type in the form of a boolean 'enthalpy()' function which returns true if
the energy type is an enthalpy form.
2020-12-17 10:37:24 +00:00
984830768d radiation: Changes thermal solvers to select radiation via fvOptions
This simplifies and standardises the handling of radiation in all solvers which
include an energy equation, all of which now support radiation via the
'radiation' fvOption which is selected in the constant/fvOption or
constant/<region>/fvOption file:

radiation
{
    type    radiation;
    libs    ("libradiationModels.so");
}

The radiation model, parameters, settings and sub-models are specified in the
'radiationProperties' file as before.
2020-12-17 10:33:10 +00:00
6379011ee1 tutorials: Removed redundant entry neighbourFieldName from compressible::turbulentTemperatureCoupledBaffleMixed boundary types. 2020-12-16 17:19:08 +00:00
6ab1e05494 chtMultiRegionFoam: Standardised the names of fields and models between solid and fluid regions 2020-12-16 11:26:20 +00:00
a620e93fa7 reactingFoam: Added frozenFlow option
with frozenFlow set true in the PIMPLE sub-dictionary of fvSolution the p-U
system is not solved and the energy-composition system including reactions is
solved with the fixed flow.
2020-12-16 11:24:00 +00:00
e27f719aed Time: Removed temporary diagnostics 2020-12-16 10:13:37 +00:00
f5b0a27241 includeFunc: Added 'funcName' option to set the name of the functionObject entry in the functions list
This is used to set the directory name for the results of the functionObject, if
not specified a unique name is generated automatically from the function type
and argument list, e.g.

    #includeFunc patchAverage(name=inlet, fields=(p U))

writes surfaceFieldValue.dat in postProcessing/patchAverage(name=inlet,fields=(pU))/0 and

    #includeFunc patchAverage(funcName=inlet, name=inlet, fields=(p U))

writes surfaceFieldValue.dat in postProcessing/inlet/0.
2020-12-11 17:10:46 +00:00
b594bcb753 Time: Set writeTimeIndex_ to correspond to beginTime_ for restarted cases 2020-12-11 17:09:09 +00:00
7aca9bfa78 Time: Added beginTime used to rationalise the write times when restarting
Now if a case is restarted from an arbitrary time, for example one generated at
a premature stop condition, or with an increased writeInterval, the subsequent
time directories written are referenced to the original start time of the case
rather than the restart time.
2020-12-11 13:37:16 +00:00
1156a55669 wmake/makefiles/files: Updated comments 2020-12-11 07:51:52 +00:00
a09465f98d functionObjects::turbulenceFields: Added phase support
e.g. when used with multiphaseEulerFoam:

multiphaseEulerFoam -postProcess -func "turbulenceFields(omega,phase=air)"
2020-12-10 21:02:22 +00:00
66131bcd16 wmake: Simplified using -q option on grep 2020-12-10 16:31:40 +00:00
0a053fc5fe extrudeMesh: Added -dict option 2020-12-10 16:31:18 +00:00
7797091353 nonUnityLewisEddyDiffusivity: Corrected q() function 2020-12-10 13:51:38 +00:00
54813e8bee src/OSspecific/POSIX/Make/files: Minor improvement to formatting 2020-12-10 11:12:44 +00:00
cffe943d8d wmake/rules: Removed the now redundant CPP definitions 2020-12-10 11:12:14 +00:00
25e5031d2e dynamicCode: Updated the comments generated in Make/files and Make/options 2020-12-10 11:11:19 +00:00
a918deda09 wmake/makefiles/files: Preserve the indentation of the source file lines in Make/files 2020-12-10 08:24:28 +00:00
848ec1cd97 wmake: Simplified and standardised the Make/files files
cpp is no longer used to pre-process Make/files files allowing standard make '#'
syntax for comments, 'ifdef', 'ifndef' conditionals etc.  This is make possible
by automatically pre-pending SOURCE += to each of the source file names in
Make/files.

The list of source files compile can be specified either as a simple list of
files in Make/files e.g.

    # Note: fileMonitor assumes inotify by default. Compile with -DFOAM_USE_STAT
    # to use stat (=timestamps) instead of inotify
    fileMonitor.C

    ifdef SunOS64
        dummyPrintStack.C
    else
        printStack.C
    endif

    LIB = $(FOAM_LIBBIN)/libOSspecific

or

or directly as the SOURCE entry which is used in the Makefile:

    SOURCE = \
        adjointOutletPressure/adjointOutletPressureFvPatchScalarField.C \
        adjointOutletVelocity/adjointOutletVelocityFvPatchVectorField.C \
        adjointShapeOptimizationFoam.C

    EXE = $(FOAM_APPBIN)/adjointShapeOptimizationFoam

In either form make syntax for comments and conditionals is supported.
2020-12-10 08:09:49 +00:00
25926b505d Function2::None: New Function2 which generates an error when 'value' is called
Used for undefined but unused functions, providing run-time checking.
2020-12-09 16:14:49 +00:00
0bf60492fa sixDoFMotion, sixDoFAccelerationSource:: Added None Function1 2020-12-09 15:54:57 +00:00
59d9ce6a05 Function1::None: Minor consistency corrections 2020-12-09 15:52:56 +00:00
a0fc5c1f55 thermophysicalModels::liquid: Reinstated support for undefined functions which are not used
Uses the new None Function1 which throws an error when either the 'value' or
'integral' functions are called.
2020-12-09 15:41:43 +00:00
1c87b1e7e5 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2020-12-09 13:39:38 +00:00
30e6e02d29 wmake: Removed the cpp processing of the Make/options file
so that it can be included directly into the wmake Makefile to allow full
support of gmake syntax, variables, functions etc.

The Make/files file handled in the same manner as the Make/options file if it
contains the SOURCE entry otherwise it is first processed by cpp for backward
compatibility.
2020-12-09 13:35:14 +00:00
c7591fa357 codeTemplates/BC: Updated constructor documentation 2020-12-09 12:37:54 +00:00
b448d4cc73 codeTemplates/BC: Updated constructors to disallow copy without setting internal field reference 2020-12-09 11:41:13 +00:00
4eddb8b164 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2020-12-08 19:20:07 +00:00
ff766fe6ac wmake: Added support for gmake directives in Make/files
The list of source files compile can now be specified either as a simple list of
files in Make/files e.g.

adjointOutletPressure/adjointOutletPressureFvPatchScalarField.C
adjointOutletVelocity/adjointOutletVelocityFvPatchVectorField.C
adjointShapeOptimizationFoam.C

EXE = $(FOAM_APPBIN)/adjointShapeOptimizationFoam

or directly as the SOURCE entry which is used in the Makefile:

SOURCE = \
    adjointOutletPressure/adjointOutletPressureFvPatchScalarField.C \
    adjointOutletVelocity/adjointOutletVelocityFvPatchVectorField.C \
    adjointShapeOptimizationFoam.C

EXE = $(FOAM_APPBIN)/adjointShapeOptimizationFoam

In both cases the Make/files is first parsed by cpp to handle #if, #ifdef
etc. directives but in the latter form gmake directives like ifeq can be also be
used to optionally select files to compile, typically using

SOURCE += anotherFile.C

statements.
2020-12-08 19:10:21 +00:00
828b81f809 coolingSphere, singleFluidCHT: Replaced text manipulations in Allclean with foamDictionary 2020-12-08 12:45:44 +00:00
90497c9ce7 Function1::PolynomialEntry: Renamed Polynomial1 2020-12-07 10:35:07 +00:00
28037ad3d9 src/lagrangian/parcel: Corrected typos 2020-12-07 10:34:17 +00:00
2732b8b50a demandDrivenEntry: Moved to src/lagrangian/basic 2020-12-07 10:20:31 +00:00
b43dac58f5 PrghPressureFvPatchScalarField: Added optional "rho" name specification
Resolves bug-report https://bugs.openfoam.org/view.php?id=3605
2020-12-06 22:19:13 +00:00
0c79b63f2e thermophysicalFunctions: Merged into Function1 and Function2
All thermophysicalFunctions, NSRDS, API and the fast uniform and non-uniform
tables have now been converted into the corresponding Function1<scalar> and
Function2<scalar> so that they can be used in other contexts, e.g. diffusion
coefficients for multi-component diffusion and in conjunction with other
Function1 and Function2s.  This also enables 'coded' Function1 and Function2 to
be used for thermo-physical properties.

Now all run-time selectable functions are within a single general framework
improving usability and simplifying maintenance.
2020-12-04 18:46:05 +00:00