1. 31 Oct, 2019 1 commit
  2. 06 Feb, 2019 1 commit
  3. 13 Jun, 2016 1 commit
    • mattijs's avatar
      BUG: cyclicACMI: partial reverted updateCoeffs structure · 136c0000
      mattijs authored
      - cyclicACMIFvPatchField::updateCoeffs() now again redirects to
      fvPatchField::updateCoeffs(const scalarField& weights);
      - which redirects to fvPatchField::updateCoeffs();
      - except on wall functions where the weights are used to switch off
        turbulence generation
      - renamed the updateCoeffs on the fixedFluxPressure bc to updateSnGrad.
  4. 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.
  5. 25 Apr, 2016 1 commit
    • Henry Weller's avatar
      Completed boundaryField() -> boundaryFieldRef() · 22f4ad32
      Henry Weller authored
      Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1938
      Because C++ does not support overloading based on the return-type there
      is a problem defining both const and non-const member functions which
      are resolved based on the const-ness of the object for which they are
      called rather than the intent of the programmer declared via the
      const-ness of the returned type.  The issue for the "boundaryField()"
      member function is that the non-const version increments the
      event-counter and checks the state of the stored old-time fields in case
      the returned value is altered whereas the const version has no
      side-effects and simply returns the reference.  If the the non-const
      function is called within the patch-loop the event-counter may overflow.
      To resolve this it in necessary to avoid calling the non-const form of
      "boundaryField()" if the results is not altered and cache the reference
      outside the patch-loop when mutation of the patch fields is needed.
      The most straight forward way of resolving this problem is to name the
      const and non-const forms of the member functions differently e.g. the
      non-const form could be named:
      Given that in C++ a reference is non-const unless specified as const:
      "T&" vs "const T&" the logical convention would be
      and given that the const form which is more commonly used is it could
      simply be named "boundaryField()" then the logical convention is
          GeometricBoundaryField& boundaryFieldRef();
          inline const GeometricBoundaryField& boundaryField() const;
      This is also consistent with the new "tmp" class for which non-const
      access to the stored object is obtained using the ".ref()" member function.
      This new convention for non-const access to the components of
      GeometricField will be applied to "dimensionedInternalField()" and "internalField()" in the
      future, i.e. "dimensionedInternalFieldRef()" and "internalFieldRef()".
  6. 15 Feb, 2016 1 commit
  7. 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.