Commit Graph

310 Commits

Author SHA1 Message Date
c70c12a2bb functionObjects: Simplified organization and naming 2016-05-03 23:37:28 +01:00
32762aa1f9 Change field loop index from "fieldI" to "fieldi" 2016-05-02 18:20:48 +01:00
0534a225fd functionObjects: Moved into the functionObjects namespace and rationalized and simplified failable construction
Rather than requiring each functionObject to handle failed construction
internally (using the active_ flag) the static member function "viable"
is provided which returns true if construction of the functionObject is
likely to be successful.  Failed construction is then handled by the
wrapper-class which constructs the functionObject,
e.g. "OutputFilterFunctionObject".
2016-05-02 16:28:24 +01:00
09262f5273 src/postProcessing/functionObjects: Moving the functionObjects into the "functionObjects" namespace 2016-05-01 14:48:30 +01:00
3c053c2fe6 GeometricField: Renamed internalField() -> primitiveField() and dimensionedInternalField() -> internalField()
These new names are more consistent and logical because:

primitiveField():
primitiveFieldRef():
    Provides low-level access to the Field<Type> (primitive field)
    without dimension or mesh-consistency checking.  This should only be
    used in the low-level functions where dimensional consistency is
    ensured by careful programming and computational efficiency is
    paramount.

internalField():
internalFieldRef():
    Provides access to the DimensionedField<Type, GeoMesh> of values on
    the internal mesh-type for which the GeometricField is defined and
    supports dimension and checking and mesh-consistency checking.
2016-04-30 21:40:09 +01:00
67e2d02800 functionObjectFile: Separated into functionObjectFile and functionObjectFiles
functionObjectFile provides basic directory, file and formatting functions
functionObjectFiles provides multi-file cache
2016-04-30 09:18:42 +01:00
81041e5d3c functionObjects/field/histogram: New functionObject to write the volume-weighted histogram of a volScalarField
e.g.
    pressureHistogram
    {
        type            histogram;

        functionObjectLibs ("libfieldFunctionObjects.so");

        field           p;
        nBins           100;
        min             -5;
        max             5;
        setFormat       gnuplot;
    }
2016-04-28 20:40:32 +01:00
ea5401c770 GeometricField::GeometricBoundaryField -> GeometricField::Boundary
When the GeometricBoundaryField template class was originally written it
was a separate class in the Foam namespace rather than a sub-class of
GeometricField as it is now.  Without loss of clarity and simplifying
code which access the boundary field of GeometricFields it is better
that GeometricBoundaryField be renamed Boundary for consistency with the
new naming convention for the type of the dimensioned internal field:
Internal, see commit 4a57b9be2e

This is a very simple text substitution change which can be applied to
any code which compiles with the OpenFOAM-dev libraries.
2016-04-28 07:22:02 +01:00
f790663b78 src/postProcessing/functionObjects/field/Make/files: Corrected 2016-04-26 20:38:33 +01:00
070515e9db Revert "src/postProcessing/functionObjects/field/Make/files: Corrected"
This reverts commit 3cfc54ba09.
2016-04-26 20:33:45 +01:00
3cfc54ba09 src/postProcessing/functionObjects/field/Make/files: Corrected 2016-04-26 20:31:58 +01:00
dc2951ca2f GeometricField::dimensionedInternalField() -> GeometricField::dimensionedInternalFieldRef()
See also commit 22f4ad32b1
2016-04-26 16:29:43 +01:00
450728ea84 Standardized cell, patch, face and processor loop index names 2016-04-25 12:00:53 +01:00
43beb06018 Standardized cell, patch and face loop index names 2016-04-25 10:28:32 +01:00
7c12f7743b boundaryField() -> boundaryFieldRef() 2016-04-23 23:16:30 +01:00
730f89dc9d Use Zero rather than pTraits<Type>::zero unless a static typed '0' is required 2016-03-22 17:46:52 +00:00
7ba41e0095 Removed duplicate, inconsistent and spurious comments in .C files 2016-02-29 18:33:54 +00:00
95d146ecdf Rationalized the indentation of C-preprocessor directives 2016-02-29 15:42:03 +00:00
cd852be3da OpenFOAM: Updated all libraries, solvers and utilities to use the new const-safe tmp
The deprecated non-const tmp functionality is now on the compiler switch
NON_CONST_TMP which can be enabled by adding -DNON_CONST_TMP to EXE_INC
in the Make/options file.  However, it is recommended to upgrade all
code to the new safer tmp by using the '.ref()' member function rather
than the non-const '()' dereference operator when non-const access to
the temporary object is required.

Please report any problems on Mantis.

Henry G. Weller
CFD Direct.
2016-02-26 17:31:28 +00:00
f4ba71ddd0 OpenFOAM libraries: Updated to use the new const-safe tmp 2016-02-26 08:13:59 +00:00
aca5a68dc4 fieldAverage: Updated documentation 2016-02-03 20:56:27 +00:00
9ab6aa9e97 fieldAverage: Name the field averaging properties file "<functionObject name>Properties"
rather than the fixed name "fieldAveragingProperties" to allow for the
same field to be averaged more than once.

Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1336
2016-02-03 20:50:35 +00:00
43dbe9ec0a fieldAverage: Minor update to the documentation 2016-01-30 11:26:31 +00:00
451cc4e620 fieldAverage: Added periodicRestart option and rationalized naming of restart options
When restarting form a previous calculation, the averaging is continuous or
    may be restarted using the \c restartOnRestart option.

    The averaging process may be restarted after each calculation output time
    using the \c restartOnOutput option or restarted periodically using the \c
    periodicRestart option and setting \c restartPeriod to the required
    averaging period.

    Example of function object specification:
    \verbatim
    fieldAverage1
    {
        type fieldAverage;
        functionObjectLibs ("libfieldFunctionObjects.so");
        ...
        restartOnRestart  false;
        restartOnOutput   false;
        periodicRestart false;
        restartPeriod   0.002;
        fields
        (
            U
            {
                mean            on;
                prime2Mean      on;
                base            time;
                window          10.0;
                windowName      w1;
            }
            p
            {
                mean            on;
                prime2Mean      on;
                base            time;
            }
        );
    }
    \endverbatim

    \heading Function object usage
    \table
        Property        | Description           | Required    | Default value
        type            | type name: fieldAverage | yes |
        restartOnRestart  | Restart the averaging on restart | no | no
        restartOnOutput   | Restart the averaging on output | no | no
        periodicRestart | Periodically restart the averaging | no | no
        restartPeriod   | Periodic restart period | conditional |
        fields          | list of fields and averaging options | yes |
    \endtable
2016-01-30 11:23:38 +00:00
5779e4fd16 Info -> InfoInFunction and updated comments 2016-01-20 16:21:37 +00:00
34d4cfaca3 Make disallowed member functions private
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1977
2016-01-20 10:41:14 +00:00
56fa7c0906 Update code to use the simpler C++11 template syntax removing spaces between closing ">"s 2016-01-10 22:41:16 +00:00
f900abd83b functionObjects: Format time according to the specification in controlDict
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1921
2015-11-20 13:22:51 +00:00
c4d5f65a10 Completed update ...ErrorIn -> ...ErrorInFunction
Avoids the clutter and maintenance effort associated with providing the
function signature string.
2015-11-11 09:03:39 +00:00
ce844e6f5b cellSource: Added weightedVolAverage option
faceSource: Added weightedAreaAverage option
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1769
2015-06-30 11:20:02 +01:00
afe7e3eee9 Update headers 2015-05-18 12:10:10 +01:00
dd04dd9c2c messageStream: Remove confusing argument-based conditional output
This had been used in functionObjects:

    Info(log)<< "messages" << data << ....

in which it is not at all clear what the "log" argument does whereas

    if (log) Info<< "messages" << data << ....

is totally clear and more efficient.
2015-05-18 11:54:56 +01:00
7edfb4d08d faceSource: Corrected handling of totalArea in parallel
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1693
2015-05-17 14:57:33 +01:00
9b382a36d5 fieldMinMax: add optional switch to control the output of max/min location
and simplify output format for graphing

With "location yes;"

log:
    fieldMinMax fieldMinMax output:
        min/max(mag(U.air)) = 0 28.309442
        min/max(mag(U.water)) = 0 27.221734

file:
    # Field minima and maxima
    # Time          min(U.air)      max(U.air)      min(U.water)    max(U.water)
    4.00061050e-01  0.00000000e+00  2.87015987e+01  0.00000000e+00  2.71025731e+01
    4.00134265e-01  0.00000000e+00  2.86505310e+01  0.00000000e+00  2.71134246e+01
    4.00222098e-01  0.00000000e+00  2.85937449e+01  0.00000000e+00  2.71255302e+01

With "location no;"

log:
    fieldMinMax fieldMinMax output:
        min(mag(U.air)) = 0 at location (-0.058373423 -0.15376628 0.021017389)
        max(mag(U.air)) = 28.701599 at location (-0.24002836 0.0053456235 3.8964638)
        min(mag(U.water)) = 0 at location (-0.058373423 -0.15376628 0.021017389)
        max(mag(U.water)) = 27.102573 at location (-0.24002836 0.0053456235 3.8964638)

file:
    # Field minima and maxima
    # Time          field           min             location(min)   max             location(max)
    4.00061050e-01  U.air           0.00000000e+00  (-5.83734226e-02 -1.53766281e-01 2.10173892e-02)        2.87015987e+01  (-2.40028359e-01 5.34562354e-03 3.89646377e+00)
    4.00061050e-01  U.water         0.00000000e+00  (-5.83734226e-02 -1.53766281e-01 2.10173892e-02)        2.71025731e+01  (-2.40028359e-01 5.34562354e-03 3.89646377e+00)
2015-05-05 15:41:32 +01:00
062d6d3d08 Updated header 2015-04-26 21:38:29 +01:00
ef3ba43cf4 cellSource: Writing the volume of the cellSource (sum(V)) for each time is now optional
Previous behavior which may be useful for moving-mesh cases can be
selected using the optional entry:
    writeVolume  yes;

The initial volume is written in the log and data file header e.g.:

 #   Source : all
 #   Cells  : 3829
 #   Volume : 9.943164e-01

Also added
    sumMag        | sum of component magnitudes
2015-04-26 21:35:25 +01:00
e393bbbaca Updated header 2015-04-26 21:35:09 +01:00
aa965f6612 faceSource: Changed option to write faceSource area to 'writeArea' 2015-04-26 21:34:27 +01:00
7bfa1dce7c Update headers 2015-04-26 16:37:43 +01:00
083d7059fc faceSource: Writing the total area of the faceSource (sum(magSf)) for each time is now optional
Previous behavior which may be useful for moving-mesh cases can be
selected using the optional entry:
    writeTotalArea  yes;

The initial total area is written in the log and data file header e.g.:

 #   Source : faceZone f0
 #   Faces  : 8
 #   Area   : 1.063860e-02
2015-04-26 16:32:19 +01:00
5dad962f44 fieldAverage: Correct handling of resetOnOutput
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1653
Thanks to Armin Wehrfritz for proposed fixes
2015-04-09 16:05:33 +01:00
8cd3023439 Rationalize position searching and add cell->tet decomposition as the default cell-search algorithm
Resolves issues with probes and findRefCell for meshes in which all cell face-pyramids are positive.
2015-02-25 10:57:06 +00:00
1d4ce1f660 lagrangian: Improved handling of binary transfers
Now using memory offsets to calculate transfer block sizes rather than
sum of 'sizeof' to ensure word alignment is accounted for
2015-02-22 12:14:46 +00:00
8628ef2fea Corrected capitalization of Doxygen documentation comments 2015-02-14 13:10:15 +00:00
9fb26d59d3 GIT: Repo update 2014-12-11 08:35:10 +00:00
56ea04255b STYLE: nearWallFields: unused object 2014-09-16 09:55:37 +01:00
6a7f2f2969 fieldCoordinateSystemTransform: Remove N^2 loop over the field 2014-09-09 20:50:57 +01:00
5b215dce4c BUG: faceSource: #1364 2014-08-05 15:25:14 +01:00
5dd91c2a3d BUG: [cell|face]Source - updated CoV calculation 2014-07-10 12:07:38 +01:00
307ddb9a78 BUG: faceSource - corrections for oriented fields 2014-07-02 16:08:50 +01:00