Commit Graph

600 Commits

Author SHA1 Message Date
Henry Weller
ed2cff905c tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allrun.pre: Updated for latest version of collapseEdges 2016-03-06 21:34:31 +00: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
350d03246e scripts: Reformat with consistent section separators 2016-02-15 18:30:24 +00:00
Henry Weller
cfa7678ba8 foamRunTutorials: Rationalized support for the "-test" option
RunFunctions: Added "isTest()" argument parsing function
tutorials: Updated Allrun scripts to propagate the "-test" option
tutorials: Removed the lower Alltest scripts and updated the Allrun to
    use the "isTest()" function to handle test-specific operation
2016-02-15 15:49:05 +00:00
Henry Weller
caf3c353d3 tutorials: Simplified the Allrun and Allclean scripts 2016-02-14 18:32:34 +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
e405c69c39 tutorials/incompressible/icoFoam: Simplified the handling of the wall BCs in cavityClipped 2016-02-12 18:09:21 +00:00
Henry Weller
0315d654d9 tutorials: Add pFinal to PISO settings in icoFoam and mhdFoam tutorials 2016-02-12 15:48:10 +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
9233361899 noSlip: New wall boundary condition for velocity
noSlip is equivalent to fixedValue with a value of (0 0 0) but is
simpler to specify e.g.

     upperWall
     {
         type            noSlip;
     }
2016-02-09 18:45:13 +00:00
Henry Weller
011177665f porousBlockage: New pisoFoam tutorial to demonstrate the porosity source fvOption
To see the different behavior of flow through and around the blockage
change D in constant/fvOptions:

        // D 100;  // Very little blockage
        // D 200;  // Some blockage but steady flow
        // D 500;  // Slight waviness in the far wake
        D 1000; // Fully shedding behavior
2016-02-09 13:42:39 +00:00
Henry Weller
923f39a9f8 tutorials/incompressible/nonNewtonianIcoFoam: Added pFinal 2016-02-02 20:06:08 +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
f23ab37eca tutorials/incompressible/pimpleDyMFoam/wingMotion/Allrun: Updated to handle missing polyMesh dir 2015-12-14 10:22:06 +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
Chris Greenshields
ad24568623 Redundant boundary.org files removed from tutorial cases 2015-11-13 16:59:58 +00:00
Henry Weller
d073e483b8 tutorials/incompressible/simpleFoam/pitzDaily: Change default model to kEpsilon
and reduce relaxation factors to improve stability over a range of
models and systems.
2015-11-01 12:24:25 +00:00
Henry Weller
f4202d9ee6 sixDoFSolver: Run-time selectable solver (integrator) for sixDoFRigidBodyMotion
The built-in explicit symplectic integrator has been replaced by a
general framework supporting run-time selectable integrators.  Currently
the explicit symplectic, implicit Crank-Nicolson and implicit Newmark
methods are provided, all of which are 2nd-order in time:

Symplectic 2nd-order explicit time-integrator for 6DoF solid-body motion:

    Reference:
        Dullweber, A., Leimkuhler, B., & McLachlan, R. (1997).
        Symplectic splitting methods for rigid body molecular dynamics.
        The Journal of chemical physics, 107(15), 5840-5851.

    Can only be used for explicit integration of the motion of the body,
    i.e. may only be called once per time-step, no outer-correctors may be
    applied.  For implicit integration with outer-correctors choose either
    CrankNicolson or Newmark schemes.

    Example specification in dynamicMeshDict:
    solver
    {
        type    symplectic;
    }

Newmark 2nd-order time-integrator for 6DoF solid-body motion:

    Reference:
        Newmark, N. M. (1959).
        A method of computation for structural dynamics.
        Journal of the Engineering Mechanics Division, 85(3), 67-94.

    Example specification in dynamicMeshDict:
    solver
    {
        type    Newmark;
        gamma   0.5;    // Velocity integration coefficient
        beta    0.25;   // Position integration coefficient
    }

Crank-Nicolson 2nd-order time-integrator for 6DoF solid-body motion:

    The off-centering coefficients for acceleration (velocity integration) and
    velocity (position/orientation integration) may be specified but default
    values of 0.5 for each are used if they are not specified.  With the default
    off-centering this scheme is equivalent to the Newmark scheme with default
    coefficients.

    Example specification in dynamicMeshDict:
    solver
    {
        type    CrankNicolson;
        aoc     0.5;    // Acceleration off-centering coefficient
        voc     0.5;    // Velocity off-centering coefficient
    }

Both the Newmark and Crank-Nicolson are proving more robust and reliable
than the symplectic method for solving complex coupled problems and the
tutorial cases have been updated to utilize this.

In this new framework it would be straight forward to add other methods
should the need arise.

Henry G. Weller
CFD Direct
2015-10-19 14:03:46 +01:00
Henry Weller
81e083fc59 wingMotion tutorials: added missing ';' 2015-10-01 14:07:29 +01:00
Henry Weller
7be9bb61e6 tutorials/incompressible/SRFSimpleFoam/mixer: Improved case setup and schemes 2015-07-24 17:01:27 +01:00
Henry Weller
37cfc3ab46 tutorials: Removed unnecessary spaces between parentheses and values in vectors 2015-07-21 20:55:44 +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
15198a34bd fluxRequired: Added setFluxRequired function to fvSchemes class
Added calls to setFluxRequired for p in all incompressible solvers which
avoids the need to add fluxRequired entries in fvSchemes dictionary.

Will add calls to setFluxRequired to the rest of the solvers.
2015-07-15 15:04:51 +01:00
Henry Weller
59f17355cf rotorDiskSource: Debugged the duplicated interpolation functions
Needs rewriting to avoid unnecessary code duplication, preferably using
standard OpenFOAM interpolation functionality.
2015-07-03 12:41:25 +01:00
Henry Weller
8c8a3a162f tutorials/incompressible/simpleFoam/rotorDisk: Tutorial for the rotorDiskSource functionObject
Provided by Richard Jones
2015-07-01 12:37:21 +01:00
Henry Weller
256be2641f Renamed pressureGradientExplicitSource to meanVelocityForce
as it is the applied the force necessary to maintain the specified mean velocity
2015-06-30 19:13:16 +01:00
Henry Weller
0e7de1b8df tutorials/incompressible/simpleFoam/pitzDaily: Change to use SIMPLEC
With the SIMPLE "consistent" option and optimized relaxation factors
this tutorial now converges in 210 iterations, previously with SIMPLE it
took 950.  Despite the increase in cost per time-step due to the
increase in relaxation factors and number of solver iterations the
speed-up is 3.5x.
2015-06-23 20:33:48 +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
ec6ad11cbd tutorials/incompressible/simpleFoam/pitzDaily/0/omega: Correct value to be consistent with epsilon
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1720
2015-05-29 21:26:49 +01:00
Henry
38177526ff simpleFoam/SRFSimpleFoam: Added support for SIMPLEC
SIMPLEC (SIMPLE-consistent) is selected by setting "consistent" option true/yes:

SIMPLE
{
    nNonOrthogonalCorrectors 0;
    consistent yes;
}

which relaxes the pressure in a "consistent" manner and additional
relaxation of the pressure is not generally necessary.  In addition
convergence of the p-U system is better and reliable with less
aggressive relaxation of the momentum equation, e.g. for the motorbike
tutorial:

relaxationFactors
{
    equations
    {
        U               0.9;
        k               0.7;
        omega           0.7;
    }
}

The cost per iteration is marginally higher but the convergence rate is
better so the number of iterations can be reduced.

The SIMPLEC algorithm also provides benefit for cases with large
body-forces, e.g. SRF, see tutorials/incompressible/SRFSimpleFoam/mixer
and feature request http://www.openfoam.org/mantisbt/view.php?id=1714
2015-05-29 11:30:40 +01:00
Chris Greenshields
a28ac315ff windAroundBuildings: example case of wind flow around buildings 2015-05-19 17:12:33 +01:00
Henry
75282f9b11 Minor cleanup 2015-05-03 18:11:53 +01:00
Henry
dc5ed4cc1b MRFZone: Add regex and group support to the specification of nonRotatingPatches 2015-04-26 16:38:07 +01:00
Henry
5b1edc73b1 SRFModel: Changes origin to be user-input rather than hard-coded to (0 0 0)
Updated tutorials
2015-04-26 11:28:14 +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
c28036665d potentialFoam: No longer executes functionObjects by default
Use the new -withFunctionObjects command-line option to execute functionObjects
2015-04-25 21:56:14 +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
e68c5f666b Scripts: Add {} following -I option to xargs
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1573
2015-03-15 22:14:44 +00:00
Henry
67e8bd8bf9 shallowWaterFoam: Read hU rather than U to support complex e.g. time-varying BCs
Disadvantage is that the BC values have to be specified in terms of hU
rather than U.  The alternative would be to add complex code to map h
and U BCs into the equivalent for hU.
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1566
2015-03-13 22:14:08 +00:00
Henry
bbc223d28d Replace xargs -i with xargs -I as the -i option is deprecated 2015-03-13 17:56:52 +00:00
Henry
a124bbaa0c TurbulenceModels: Update non-linear models to use the new innerSqr function 2015-02-28 16:11:24 +00:00
Henry
c350b22cd5 Turbulence models: minor clean-up 2015-02-27 19:23:39 +00:00
Henry
d05b8e6dd2 ShihQuadraticKE: Rewritten and tested on the boundaryWallFunctions and pitzDaily cases 2015-02-27 18:13:30 +00:00
Henry
f6e868e1f7 tutorials/compressible/sonicDyMFoam/movingCone: sonic version of the pimpleDyMFoam/movingCone tutorial 2015-02-22 16:53:33 +00:00
Henry
5ecfb06398 tutorials: remove unnecessary under-relax fields entry 2015-02-22 16:52:21 +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
8628ef2fea Corrected capitalization of Doxygen documentation comments 2015-02-14 13:10:15 +00:00
Henry
eb266e2add turbulenceModels/LES/dynamicKEqn/dynamicKEqn: Added dynamic version of the one-equation SGS model 2015-02-14 13:08:08 +00:00