Commit Graph

4938 Commits

Author SHA1 Message Date
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
a806e1bc6b thermophysicalFunction: Initial work to convert into Function1 and Function2 2020-12-03 19:22:50 +00:00
b07fbddf4f faceCoupleInfo: Bypass geometric matching if faces are already ordered 2020-12-03 08:30:51 +00:00
1a6bdd1498 thermophysicalFunctions: Renamed f(p, T) -> value(p, T) for consistency with Function1 and Function2 2020-12-02 16:33:26 +00:00
00a4d4fd0f Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2020-12-02 16:17:34 +00:00
57b1655934 Function1: Renamed integrate -> integral for consistency with value
The integral function returns the integral as the value function returns the
value.
2020-12-02 16:15:55 +00:00
9197d7047f bin/foamSequenceVTKFiles: update, file numbering start with 0. 2020-12-02 16:15:23 +00:00
f85dbc557f polyBoundaryMesh: Update indices in neighbour patches on reorder 2020-12-02 11:01:55 +00:00
685664b3ca fvMeshDistribute: Corrected ordering of processor cyclics 2020-12-02 11:01:55 +00:00
983f77e19c snappyHexMesh: Fixed syncronisation of position averages
Sums of positions cannot be syncronised directly, as they are neither a
true position or a displacement, so that cannot be transformed across
coupled interfaces. The difference to the point/edge/face should be
summed instead, and syncronised as a displacement. The point/edge/face
location can then be added on again after syncronisation.

This resolves bug report https://bugs.openfoam.org/view.php?id=3602
2020-12-02 11:01:55 +00:00
f874d4f7a8 surfaceFilmModels::filmThermoModel: Corrected backward compatibility support 2020-12-02 09:28:36 +00:00
2ec6ae8a8c etc/templates/singleFluidCHT/templates/constant/solid/fvOptions: updated 2020-12-01 21:23:08 +00:00
19b3a5c385 Sub-models, fvOptions: Removed 'active' switch
It is better to not select and instantiate a model, fvOption etc. than to create
it and set it inactive as the creation process requires reading of settings,
parameters, fields etc. with all the associated specification and storage
without being used.  Also the incomplete implementation added a lot of
complexity in the low-level operation of models introducing a significant
maintenance overhead and development overhead for new models.
2020-12-01 18:50:20 +00:00
3838df8eac surfaceFilmModels: Rationalised and standardised the surfaceFilmProperties dictionary
The convoluted separate ".*Coeffs" dictionary form of model coefficient
specification is now deprecated and replaced with the simpler sub-dictionary
form but support is provided for the deprecated form for backward comparability.

e.g.

thermophysicalProperties
{
    type        liquid;

    useReferenceValues  no;
    liquid      H2O;
}

rather than

    filmThermoModel liquid;

    liquidCoeffs
    {
        useReferenceValues no;
        liquid      H2O;
    }

and

forces
{
    thermocapillary;

    distributionContactAngle
    {
        Ccf             0.085;

        distribution
        {
            type            normal;
            normalDistribution
            {
                minValue        50;
                maxValue        100;
                expectation     75;
                variance        100;
            }
        }

        zeroForcePatches ();
    }
}

rather than

    forces
    (
        thermocapillary
        distributionContactAngle
    );

    distributionContactAngleCoeffs
    {
        Ccf             0.085;

        distribution
        {
            type            normal;
            normalDistribution
            {
                minValue        50;
                maxValue        100;
                expectation     75;
                variance        100;
            }
        }

        zeroForcePatches ();
    }

All the tutorial cases containing a surface film have been updated for guidance,
e.g. tutorials/lagrangian/buoyantReactingParticleFoam/hotBoxes/constant/surfaceFilmProperties

surfaceFilmModel thermoSingleLayer;

regionName      wallFilmRegion;

active          true;

thermophysicalProperties
{
    type        liquid;

    useReferenceValues  no;
    liquid      H2O;
}

viscosity
{
    model        liquid;
}

deltaWet    1e-4;
hydrophilic no;

momentumTransport
{
    model       laminar;
    Cf          0.005;
}

forces
{
    thermocapillary;

    distributionContactAngle
    {
        Ccf             0.085;

        distribution
        {
            type            normal;
            normalDistribution
            {
                minValue        50;
                maxValue        100;
                expectation     75;
                variance        100;
            }
        }

        zeroForcePatches ();
    }
}

injection
{
    curvatureSeparation
    {
        definedPatchRadii
        (
            ("(cube[0-9][0-9]_side[0-9]_to_cube[0-9][0-9]_side[0-9])" 0)
        );
    }

    drippingInjection
    {
        cloudName    reactingCloud1;
        deltaStable  0;

        particlesPerParcel 100.0;

        parcelDistribution
        {
            type         RosinRammler;
            RosinRammlerDistribution
            {
                minValue        5e-04;
                maxValue        0.0012;
                d               7.5e-05;
                n               0.5;
            }
        }
    }
}

phaseChange
{
    model           standardPhaseChange;
    Tb              373;
    deltaMin        1e-8;
    L               1.0;
}

upperSurfaceModels
{
    heatTransfer
    {
        model       mappedConvectiveHeatTransfer;
    }
}

lowerSurfaceModels
{
    heatTransfer
    {
        model       constant;
        c0              50;
    }
}
2020-11-30 16:31:44 +00:00
21bb6c549d Function1, Function2: Rationalising, simplifying and standardising writing 2020-11-28 19:50:39 +00:00
156734571f Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2020-11-27 11:54:03 +00:00
5369ae2fad etc/templates: Added Phi to fvSolution for potentialFoam 2020-11-27 11:53:40 +00:00
f779ddae15 interfaceCompositionModels/Raoult: Included in build 2020-11-26 08:48:36 +00:00
5e16ae0d11 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2020-11-25 15:12:42 +00:00
0d42b151f0 ZoneMesh: Changed zone selection from keyType to wordRe
It is more logical to use wordRe rather than keyType for name-based selection
including regular expression support as keyType now support other forms of
dictionary keyword including function and variable names which are not
relevant for selecting zones by name.
2020-11-25 15:10:22 +00:00
9a4ed9ce2f sampledSet/boundaryRandom: Simplified and moved points inside mesh
The patch triangulation done as part of this set construction is now
done using polyMeshTetDecomposition. This has simplified the
implementation and permitted the addition of a small tolerance to move
the points within the mesh bounds, resulting in the removal of a number
of warning messages.
2020-11-25 13:17:02 +00:00
1416938f39 streamLine: Added parallel distribution of age data 2020-11-25 11:50:54 +00:00
45bfe725c9 sampledSet/boundaryRandom: Corrected patch indexing 2020-11-25 11:19:40 +00:00
eb29342dbe radiationModels: Added errors when used in unsupported transforming geometries 2020-11-25 11:19:35 +00:00
6dc65790c0 sampledSurface::sampledCuttingPlane: Added isoSurfPtr_.clear() 2020-11-24 17:00:35 +00:00
a008316870 sampledSurface::distanceSurface: Added zone support using zoneKey
combining functionality from sampledCuttingPlane and sampledPlane.
Updated sampledCuttingPlane to use zoneKey.
2020-11-24 16:25:47 +00:00
c716ff78be viewFactorsGen: Added test for transforming patches and issue an error 2020-11-24 15:06:17 +00:00
528a04244f Function1::TableFileReader: Updated write 2020-11-23 15:55:11 +00:00
92c9b112f0 twoPhaseModels::interfaceProperties: Correct alpha2 after alpha1 contact angle BCs are updated
Resolves bug-report https://bugs.openfoam.org/view.php?id=3594
2020-11-23 14:53:34 +00:00
d7d1221cd4 surfaceFilmModels::curvatureSeparation: Added deltaStable control
to provide the same numerical stability control as the other injection models:
BrunDrippingInjection, drippingInjection

        //- Stable film thickness - drips only formed if thickness
        //  exceeds this threshold value
        scalar deltaStable_;

Resolves bug-report https://bugs.openfoam.org/view.php?id=2456
2020-11-23 12:05:29 +00:00
9694b1aa77 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2020-11-23 11:26:35 +00:00
bdbb2ae0a8 externalWallHeatFluxTemperatureFvPatchScalarField: Corrected and generalised handling of radiative heat transfer
The new simpler implementation handles both heat loss and heat gain by radiative
heat transfer with the boundary.

Resolves bug-report https://bugs.openfoam.org/view.php?id=3581
2020-11-23 11:24:34 +00:00
7a1de27e78 wallHeatTransferCoeffModels::kappaEff Corrected reading Lchar. 2020-11-18 00:03:49 +00:00