1. 30 Apr, 2016 2 commits
    • Henry Weller's avatar
      Updated headers · 81f31acb
      Henry Weller authored
    • Henry Weller's avatar
      GeometricField: Renamed internalField() -> primitiveField() and... · 3c053c2f
      Henry Weller authored
      GeometricField: Renamed internalField() -> primitiveField() and dimensionedInternalField() -> internalField()
      These new names are more consistent and logical because:
          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
          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.
  2. 28 Apr, 2016 1 commit
    • Henry Weller's avatar
      GeometricField::GeometricBoundaryField -> GeometricField::Boundary · ea5401c7
      Henry Weller authored
      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 4a57b9be
      This is a very simple text substitution change which can be applied to
      any code which compiles with the OpenFOAM-dev libraries.
  3. 27 Apr, 2016 1 commit
    • Henry Weller's avatar
      GeometricField: Rationalized and simplified access to the dimensioned internal field · 4a57b9be
      Henry Weller authored
      Given that the type of the dimensioned internal field is encapsulated in
      the GeometricField class the name need not include "Field"; the type
      name is "Internal" so
      volScalarField::DimensionedInternalField -> volScalarField::Internal
      In addition to the ".dimensionedInternalField()" access function the
      simpler "()" de-reference operator is also provided to greatly simplify
      FV equation source term expressions which need not evaluate boundary
      conditions.  To demonstrate this kEpsilon.C has been updated to use
      dimensioned internal field expressions in the k and epsilon equation
      source terms.
  4. 26 Apr, 2016 1 commit
  5. 25 Apr, 2016 2 commits
  6. 23 Apr, 2016 3 commits
    • Henry Weller's avatar
      GeometricField: New non-const access function boundaryFieldRef() · 45f73bf6
      Henry Weller authored
      There is a need to specify const or non-const access to a non-const
      object which is not currently possible with the "boundaryField()" access
      function the const-ness of the return of which is defined by the
      const-ness of the object for which it is called.  For consistency with
      the latest "tmp" storage class in which non-const access is obtained
      with the "ref()" function it is proposed to replace the non-const form
      of "boundaryField()" with "boundaryFieldRef()".
      Thanks to Mattijs Janssens for starting the process of migration to
      "boundaryFieldRef()" and providing a patch for the OpenFOAM and
      finiteVolume libraries.
    • Henry Weller's avatar
      plenumPressureFvPatchScalarField: New plenum pressure boundary condition · 88561eea
      Henry Weller authored
      This condition creates a zero-dimensional model of an enclosed volume of
      gas upstream of the inlet. The pressure that the boundary condition
      exerts on the inlet boundary is dependent on the thermodynamic state of
      the upstream volume.  The upstream plenum density and temperature are
      time-stepped along with the rest of the simulation, and momentum is
      neglected. The plenum is supplied with a user specified mass flow and
      The result is a boundary condition which blends between a pressure inlet
      condition condition and a fixed mass flow. The smaller the plenum
      volume, the quicker the pressure responds to a deviation from the supply
      mass flow, and the closer the model approximates a fixed mass flow. As
      the plenum size increases, the model becomes more similar to a specified
      The expansion from the plenum to the inlet boundary is controlled by an
      area ratio and a discharge coefficient. The area ratio can be used to
      represent further acceleration between a sub-grid blockage such as fins.
      The discharge coefficient represents a fractional deviation from an
      ideal expansion process.
      This condition is useful for simulating unsteady internal flow problems
      for which both a mass flow boundary is unrealistic, and a pressure
      boundary is susceptible to flow reversal. It was developed for use in
      simulating confined combustion.
          helmholtz resonance tutorial case for plenum pressure boundary
      This development was contributed by Will Bainbridge
    • Henry Weller's avatar
      fireFoam: Added optional hydrostatic initialization of the pressure and density · 673e0d17
      Henry Weller authored
      Also added the new prghTotalHydrostaticPressure p_rgh BC which uses the
      hydrostatic pressure field as the reference state for the far-field
      which provides much more accurate entrainment is large open domains
      typical of many fire simulations.
      The hydrostatic field solution is controlled by the optional entries in
      the fvSolution.PIMPLE dictionary, e.g.
          hydrostaticInitialization yes;
          nHydrostaticCorrectors 5;
      and the solver must also be specified for the hydrostatic p_rgh field
      ph_rgh e.g.
      Suitable boundary conditions for ph_rgh cannot always be derived from
      those for p_rgh and so the ph_rgh is read to provide them.
      To avoid accuracy issues with IO, restart and post-processing the p_rgh
      and ph_rgh the option to specify a suitable reference pressure is
      provided via the optional pRef file in the constant directory, e.g.
          dimensions      [1 -1 -2 0 0 0 0];
          value           101325;
      which is used in the relationship between p_rgh and p:
          p = p_rgh + rho*gh + pRef;
      Note that if pRef is specified all pressure BC specifications in the
      p_rgh and ph_rgh files are relative to the reference to avoid round-off
      For examples of suitable BCs for p_rgh and ph_rgh for a range of
      fireFoam cases please study the tutorials in
      tutorials/combustion/fireFoam/les which have all been updated.
      Henry G. Weller
      CFD Direct Ltd.
  7. 16 Apr, 2016 1 commit
  8. 03 Apr, 2016 1 commit
    • Henry Weller's avatar
      UList: Rationalize assignment (shallow-copy vs deep-copy) · 6e573ad7
      Henry Weller authored
          //- Disallow default shallow-copy assignment
          //  Assignment of UList<T> may need to be either shallow (copy pointer)
          //  or deep (copy elements) depending on context or the particular type
          //  of list derived from UList and it is confusing and prone to error
          //  for the default assignment to be either.  The solution is to
          //  disallow default assignment and provide separate 'shallowCopy' and
          //  'deepCopy' member functions.
          void operator=(const UList<T>&) = delete;
          //- Copy the pointer held by the given UList.
          inline void shallowCopy(const UList<T>&);
          //- Copy elements of the given UList.
          void deepCopy(const UList<T>&);
  9. 22 Mar, 2016 3 commits
  10. 14 Mar, 2016 1 commit
  11. 29 Feb, 2016 2 commits
  12. 24 Feb, 2016 2 commits
  13. 20 Feb, 2016 1 commit
    • Henry Weller's avatar
      Boundary conditions: Added extrapolatedCalculatedFvPatchField · 99a10ece
      Henry Weller authored
      To be used instead of zeroGradientFvPatchField for temporary fields for
      which zero-gradient extrapolation is use to evaluate the boundary field
      but avoiding fields derived from temporary field using field algebra
      inheriting the zeroGradient boundary condition by the reuse of the
      temporary field storage.
      zeroGradientFvPatchField should not be used as the default patch field
      for any temporary fields and should be avoided for non-temporary fields
      except where it is clearly appropriate;
      extrapolatedCalculatedFvPatchField and calculatedFvPatchField are
      generally more suitable defaults depending on the manner in which the
      boundary values are specified or evaluated.
      The entire OpenFOAM-dev code-base has been updated following the above
      Henry G. Weller
      CFD Direct
  14. 14 Feb, 2016 1 commit
  15. 13 Feb, 2016 1 commit
    • Henry Weller's avatar
      Solvers: Added support for extrapolated pressure boundary conditions · fc2ce737
      Henry Weller authored
      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
      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
              type            fixedFluxExtrapolatedPressure;
              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.
  16. 12 Feb, 2016 1 commit
  17. 10 Feb, 2016 5 commits
  18. 09 Feb, 2016 7 commits
  19. 08 Feb, 2016 1 commit
    • Henry Weller's avatar
      Rename DataEntry -> Function1 · 968c888f
      Henry Weller authored
      Function1 is an abstract base-class of run-time selectable unary
      functions which may be composed of other Function1's allowing the user
      to specify complex functions of a single scalar variable, e.g. time.
      The implementations need not be a simple or continuous functions;
      interpolated tables and polynomials are also supported.  In fact form of
      mapping between a single scalar input and a single primitive type output
      is supportable.
      The primary application of Function1 is in time-varying boundary
      conditions, it also used for other functions of time, e.g. injected mass
      is spray simulations but is not limited to functions of time.
  20. 07 Feb, 2016 3 commits