Commit Graph

333 Commits

Author SHA1 Message Date
Chris Greenshields
344f435f54 Tutorials fvSolution files: removed solver entries which use default
values; formatted Switch entries consistently across all cases
2016-06-15 07:39:12 +01:00
Chris Greenshields
3d810c11dc Tutorials: made laplacianSchemes consistent and correct 2016-06-13 23:38:03 +01:00
Henry Weller
d9f423ec85 Utility sample: replaced by 'postProcess -func sample'
To re-use existing 'sampleDict' files simply add the following entries:

    type sets;
    libs ("libsampling.so");

and run

    postProcess -func sampleDict

It is probably better to also rename 'sampleDict' -> 'sample' and then run

    postProcess -func sampleDict
2016-06-13 14:27:46 +01:00
Henry Weller
3eec5854be Standardized the selection of required and optional fields in BCs, fvOptions, functionObjects etc.
In most boundary conditions, fvOptions etc. required and optional fields
to be looked-up from the objectRegistry are selected by setting the
keyword corresponding to the standard field name in the BC etc. to the
appropriate name in the objectRegistry.  Usually a default is provided
with sets the field name to the keyword name, e.g. in the
totalPressureFvPatchScalarField the velocity is selected by setting the
keyword 'U' to the appropriate name which defaults to 'U':

        Property     | Description             | Required    | Default value
        U            | velocity field name     | no          | U
        phi          | flux field name         | no          | phi
        .
        .
        .

However, in some BCs and functionObjects and many fvOptions another
convention is used in which the field name keyword is appended by 'Name'
e.g.

        Property     | Description             | Required    | Default value
        pName        | pressure field name     | no          | p
        UName        | velocity field name     | no          | U

This difference in convention is unnecessary and confusing, hinders code
and dictionary reuse and complicates code maintenance.  In this commit
the appended 'Name' is removed from the field selection keywords
standardizing OpenFOAM on the first convention above.
2016-05-21 20:28:20 +01:00
Henry Weller
78d2971b21 functionObjects: rewritten to all be derived from 'functionObject'
- Avoids the need for the 'OutputFilterFunctionObject' wrapper
  - Time-control for execution and writing is now provided by the
    'timeControlFunctionObject' which instantiates the processing
    'functionObject' and controls its operation.
  - Alternative time-control functionObjects can now be written and
    selected at run-time without the need to compile wrapped version of
    EVERY existing functionObject which would have been required in the
    old structure.
  - The separation of 'execute' and 'write' functions is now formalized in the
    'functionObject' base-class and all derived classes implement the
    two functions.
  - Unnecessary implementations of functions with appropriate defaults
    in the 'functionObject' base-class have been removed reducing
    clutter and simplifying implementation of new functionObjects.
  - The 'coded' 'functionObject' has also been updated, simplified and tested.
  - Further simplification is now possible by creating some general
    intermediate classes derived from 'functionObject'.
2016-05-15 16:40:01 +01:00
Henry Weller
1b34231340 tutorials: Renamed .org -> .orig
See http://www.openfoam.org/mantisbt/view.php?id=2076
  - .org is the file extension for emacs org-mode as well
  - .orig is more to the point (.org isn't always recognized as "original")
  - .original is too long, although more consistent with the convention
    of source code file naming

Update script contributed by Bruno Santos
2016-04-30 21:53:50 +01:00
Henry Weller
4bc77e6aff Sprucing up the tutorials folder and adding -dict to "collapseEdges"
Patch provided by Bruno Santos
Resolves patch application request http://www.openfoam.org/mantisbt/view.php?id=2015
2016-03-06 19:06:44 +00:00
Henry Weller
acac7d786b tutorials: Added missing 'value' entry for 'calculatedFvPatchField's 2016-02-24 16:21:50 +00:00
Henry Weller
350d03246e scripts: Reformat with consistent section separators 2016-02-15 18:30:24 +00:00
Henry Weller
fc2ce73723 Solvers: Added support for extrapolated pressure boundary conditions
The boundary conditions of HbyA are now constrained by the new "constrainHbyA"
function which applies the velocity boundary values for patches for which the
velocity cannot be modified by assignment and pressure extrapolation is
not specified via the new
"fixedFluxExtrapolatedPressureFvPatchScalarField".

The new function "constrainPressure" sets the pressure gradient
appropriately for "fixedFluxPressureFvPatchScalarField" and
"fixedFluxExtrapolatedPressureFvPatchScalarField" boundary conditions to
ensure the evaluated flux corresponds to the known velocity values at
the boundary.

The "fixedFluxPressureFvPatchScalarField" boundary condition operates
exactly as before, ensuring the correct flux at fixed-flux boundaries by
compensating for the body forces (gravity in particular) with the
pressure gradient.

The new "fixedFluxExtrapolatedPressureFvPatchScalarField" boundary
condition may be used for cases with or without body-forces to set the
pressure gradient to compensate not only for the body-force but also the
extrapolated "HbyA" which provides a second-order boundary condition for
pressure.  This is useful for a range a problems including impinging
flow, extrapolated inlet conditions with body-forces or for highly
viscous flows, pressure-induced separation etc.  To test this boundary
condition at walls in the motorBike tutorial case set

    lowerWall
    {
        type            fixedFluxExtrapolatedPressure;
    }

    motorBikeGroup
    {
        type            fixedFluxExtrapolatedPressure;
    }

Currently the new extrapolated pressure boundary condition is supported
for all incompressible and sub-sonic compressible solvers except those
providing implicit and tensorial porosity support.  The approach will be
extended to cover these solvers and options in the future.

Note: the extrapolated pressure boundary condition is experimental and
requires further testing to assess the range of applicability,
stability, accuracy etc.

Henry G. Weller
CFD Direct Ltd.
2016-02-13 17:48:26 +00:00
Henry Weller
daf44fda3d tutorials and templates: Updated wall BC for velocity to noSlip 2016-02-09 20:08:34 +00:00
Henry Weller
b3d47f0423 bin/tools/RunFunctions: runParallel now obtains the number of processors from numberOfSubdomains
in decomposeParDict.

This default number of processors may be overridden by the new "-np"
option to runParallel which must be specified before the application
name e.g.:

runParallel -np 4 pisoFoam
2016-01-27 14:19:25 +00:00
Henry Weller
33fdce88f5 porosityModels: Specification of name and dimensions of porosity coefficients is now optional
e.g.

    DarcyForchheimerCoeffs
    {
        d   (5e7 -1000 -1000);
        f   (0 0 0);

        coordinateSystem
        {
            type    cartesian;
            origin  (0 0 0);
            coordinateRotation
            {
                type    axesRotation;
                e1      (1 0 0);
                e2      (0 0 1);
            }
        }
    }
2015-11-17 12:05:57 +00:00
Henry Weller
d98136e122 tutorials: Removed unnecessary "boundary" files 2015-11-13 20:05:37 +00:00
Henry Weller
f5a3702e58 Corrected headers 2015-10-27 16:26:40 +00:00
Henry Weller
37cfc3ab46 tutorials: Removed unnecessary spaces between parentheses and values in vectors 2015-07-21 20:55:44 +01:00
Henry Weller
365f9b0006 dimensioned<Type>: Added constructor from name, dimensions and dictionary
to simplify construction of dimensionedScalar properties and avoid the
duplication of the name string in the constructor call.
2015-07-21 12:57:07 +01:00
Henry Weller
4c21f24a8c Input of dimensionedScalars: update read-construction of dimensionedScalar in applications
so that the specification of the name and dimensions are optional in property dictionaries.

Update tutorials so that the name of the dimensionedScalar property is
no longer duplicated but optional dimensions are still provided and are
checked on read.
2015-07-20 22:52:53 +01:00
Henry Weller
0fb6a01280 fluxRequired: Added setFluxRequired function to fvSchemes class
Added calls to setFluxRequired for p, p_rgh etc. in all solvers which
avoids the need to add fluxRequired entries in fvSchemes dictionaries.
2015-07-15 21:57:16 +01:00
Henry
3a004fda10 fvOptions: Separate options for all cells, cellSets and inter-region coupling
by introducing rational base-classes rather than using the hideous
'switch' statement.  Further rationalization of the cell-selection
mechanism will be implemented via an appropriate class hierarchy to
replace the remaining 'switch' statement.

Mesh-motion is currently handled very inefficiently for cellSets and not
at all for inter-region coupling.  The former will be improved when the
cell-selection classes are written and the latter by making the
meshToMesh class a MeshObject after it has been corrected for mapFields.
2015-05-31 16:38:01 +01:00
Henry
c3ee2348a6 MRF: Separate MRF from fvOptions
fvOptions does not have the appropriate structure to support MRF as it
is based on option selection by user-specified fields whereas MRF MUST
be applied to all velocity fields in the particular solver.  A
consequence of the particular design choices in fvOptions made it
difficult to support MRF for multiphase and it is easier to support
frame-related and field related options separately.

Currently the MRF functionality provided supports only rotations but
the structure will be generalized to support other frame motions
including linear acceleration, SRF rotation and 6DoF which will be
run-time selectable.
2015-05-29 23:35:43 +01:00
Henry
0a6ca7ae45 includeEtcEntry: New dictionary include directive: #includeEtc "etcFile"
Description
    Specify an etc file to include when reading dictionaries, expects a
    single string to follow.

    Searches for files from user/group/shipped directories.
    The search scheme allows for version-specific and
    version-independent files using the following hierarchy:
    - \b user settings:
      - ~/.OpenFOAM/\<VERSION\>
      - ~/.OpenFOAM/
    - \b group (site) settings (when $WM_PROJECT_SITE is set):
      - $WM_PROJECT_SITE/\<VERSION\>
      - $WM_PROJECT_SITE
    - \b group (site) settings (when $WM_PROJECT_SITE is not set):
      - $WM_PROJECT_INST_DIR/site/\<VERSION\>
      - $WM_PROJECT_INST_DIR/site/
    - \b other (shipped) settings:
      - $WM_PROJECT_DIR/etc/

    An example of the \c \#includeEtc directive:
    \verbatim
        #includeEtc "etcFile"
    \endverbatim

    The usual expansion of environment variables and other constructs is
    retained.
2015-04-26 10:44:11 +01:00
Henry
50ada7c994 blockMesh: Change default location of blockMeshDict from constant/polyMesh to system
For multi-region cases the default location of blockMeshDict is now system/<region name>

If the blockMeshDict is not found in system then the constant directory
is also checked providing backward-compatibility
2015-04-24 22:29:57 +01:00
Henry
5ecfb06398 tutorials: remove unnecessary under-relax fields entry 2015-02-22 16:52:21 +00:00
Henry
c6874965f8 tutorials: rationalized log 2015-02-19 08:39:32 +00:00
Henry
7be1393fef tutorials: corrected comments in snappyHexMeshDict
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1541
2015-02-17 23:59:59 +00:00
Henry
77a6995346 tutorials: Simplify rhoMax and rhoMin specification 2015-02-17 10:55:02 +00:00
Henry
8628ef2fea Corrected capitalization of Doxygen documentation comments 2015-02-14 13:10:15 +00:00
Henry
d919d6758a tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/system/air/topoSetDict.1: further correction to avoid duplicate registration 2015-02-14 10:13:11 +00:00
Henry
0ea062816e Correct section comment: there can only be one destructor 2015-02-12 21:57:29 +00:00
Henry
332c3cc37f Tutorials: change topoSetDicts to avoid duplicate names 2015-02-12 10:01:31 +00:00
Henry
78ca0ce02c Add simulationType entry even for simpleFoam cases
so that generic utilities like yPlus select the appropriate turbulence model
2015-01-21 21:08:19 +00:00
Henry
2aec249647 Updated the whole of OpenFOAM to use the new templated TurbulenceModels library
The old separate incompressible and compressible libraries have been removed.

Most of the commonly used RANS and LES models have been upgraded to the
new framework but there are a few missing which will be added over the
next few days, in particular the realizable k-epsilon model.  Some of
the less common incompressible RANS models have been introduced into the
new library instantiated for incompressible flow only.  If they prove to
be generally useful they can be templated for compressible and
multiphase application.

The Spalart-Allmaras DDES and IDDES models have been thoroughly
debugged, removing serious errors concerning the use of S rather than
Omega.

The compressible instances of the models have been augmented by a simple
backward-compatible eddyDiffusivity model for thermal transport based on
alphat and alphaEff.  This will be replaced with a separate run-time
selectable thermal transport model framework in a few weeks.

For simplicity and ease of maintenance and further development the
turbulent transport and wall modeling is based on nut/nuEff rather than
mut/muEff for compressible models so that all forms of turbulence models
can use the same wall-functions and other BCs.

All turbulence model selection made in the constant/turbulenceProperties
dictionary with RAS and LES as sub-dictionaries rather than in separate
files which added huge complexity for multiphase.

All tutorials have been updated so study the changes and update your own
cases by comparison with similar cases provided.

Sorry for the inconvenience in the break in backward-compatibility but
this update to the turbulence modeling is an essential step in the
future of OpenFOAM to allow more models to be added and maintained for a
wider range of cases and physics.  Over the next weeks and months more
turbulence models will be added of single and multiphase flow, more
additional sub-models and further development and testing of existing
models.  I hope this brings benefits to all OpenFOAM users.

Henry G. Weller
2015-01-21 19:21:39 +00:00
Henry
3dd0c19758 Rename foamClearPolyMesh -> foamCleanPolyMesh for consistency with the other foamClear.* scripts 2015-01-11 15:42:10 +00:00
Henry
69ff8aa4d2 wallDist: now a MeshObject cached and updated automatically with a run-time selected algorithm
When using models which require the wallDist e.g. kOmegaSST it will
request the method to be used from the wallDist sub-dictionary in
fvSchemes e.g.

wallDist
{
    method meshWave;
}

specifies the mesh-wave method as hard-coded in previous OpenFOAM versions.
2015-01-08 10:40:23 +00:00
Henry
41368addc9 Minor change to comment 2014-12-14 21:50:14 +00:00
OpenFOAM-admin
9fb26d59d3 GIT: Repo update 2014-12-11 08:35:10 +00:00
mattijs
8f9a454bc1 BUG: iglooWithFridges: single-region surface names 2014-02-18 09:16:24 +00:00
OpenFOAM-admin
fbb3ddf2c4 Updated for release 2.3.0 2014-02-17 10:21:46 +00:00
william
333818408f STYLE: sh instead of bash for tutorial scripts 2014-02-05 16:53:44 +00:00
william
11416d066d BUG: removed bash-dependent test for the existence of gnuplot 2014-02-05 16:20:53 +00:00
william
55ac19dcf6 BUG: removed bash-specific scripting in externalCoupledCavity/externalSolver 2014-02-04 11:56:16 +00:00
mattijs
ac95756498 NEH: multiRegionHeaterRadiation: parallel running 2014-01-31 10:52:07 +00:00
Henry
349eddef0d Merge branch 'master' of ssh://opencfd:8007/home/dm4/OpenFOAM/repositories/OpenFOAM-dev 2014-01-30 13:02:22 +00:00
Henry
d648760ead Update headers 2014-01-30 13:02:02 +00:00
Henry
ee4e19ef85 Renamed folder -> directory for consistency with POSIX and the rest of OpenFOAM 2014-01-30 13:01:04 +00:00
Sergio Ferraris
684dd9e71a Commenting out reconstructPar in multiRegionHeaterRadiation tutorial 2014-01-30 12:44:15 +00:00
mattijs
8acfa4692a STYLE: snappyHexMeshDict: removed optional parameter 2014-01-27 12:25:56 +00:00
Sergio Ferraris
54b98a8ce1 BUG: Bug in F for DarcyForchheimer porosity model.
Changing to Lists the contact resistances of turbulentTemperatureRadCoupledMixed and turbulentTemperatureCoupled BC's
Updating fvOption in heatExchanger tutorial
2014-01-08 17:12:46 +00:00
Sergio Ferraris
a2d6fe298d ENH: Updating combustion and heat transfer tutorials 2014-01-08 10:15:01 +00:00