Skip to content
Snippets Groups Projects
  1. Jun 20, 2017
    • Andrew Heather's avatar
      INT: Integration of isoAdvector and supporting material · a6ef8b90
      Andrew Heather authored
      Community contribution from Johan Roenby, DHI
      
      IsoAdvector is a geometric Volume-of-Fluid method for advection of a
      sharp interface between two incompressible fluids. It works on both
      structured and unstructured meshes with no requirements on cell shapes.
      IsoAdvector is as an alternative choice for the interface compression
      treatment with the MULES limiter implemented in the interFoam family
      of solvers.
      
      The isoAdvector concept and code was developed at DHI and was funded
      by a Sapere Aude postdoc grant to Johan Roenby from The Danish Council
      for Independent Research | Technology and Production Sciences (Grant-ID:
      DFF - 1337-00118B - FTP).
      Co-funding is also provided by the GTS grant to DHI from the Danish
      Agency for Science, Technology and Innovation.
      
      The ideas behind and performance of the isoAdvector scheme is
      documented in:
      
          Roenby J, Bredmose H, Jasak H. 2016 A computational method for sharp
          interface  advection. R. Soc. open sci. 3: 160405.
          [http://dx.doi.org/10.1098/rsos.160405](http://dx.doi.org/10.1098/rsos.160405)
      
      Videos showing isoAdvector's performance with a number of standard
      test cases can be found in this youtube channel:
      
          https://www.youtube.com/channel/UCt6Idpv4C8TTgz1iUX0prAA
      
      Project contributors:
      
      * Johan Roenby <jro@dhigroup.com> (Inventor and main developer)
      * Hrvoje Jasak <hrvoje.jasak@fsb.hr> (Consistent treatment of
        boundary faces including processor boundaries, parallelisation,
        code clean up
      * Henrik Bredmose <hbre@dtu.dk> (Assisted in the conceptual
        development)
      * Vuko Vukcevic <vuko.vukcevic@fsb.hr> (Code review, profiling,
        porting to foam-extend, bug fixing, testing)
      * Tomislav Maric <tomislav@sourceflux.de> (Source file
        rearrangement)
      * Andy Heather <a.heather@opencfd.co.uk> (Integration into OpenFOAM
        for v1706 release)
      
      See the integration repository below to see the full set of changes
      implemented for release into OpenFOAM v1706
      
          https://develop.openfoam.com/Community/Integration-isoAdvector
      a6ef8b90
  2. Feb 24, 2017
    • Henry Weller's avatar
      rhoSimpleFoam: added support for compressible liquid flows · a1c8cde3
      Henry Weller authored
      rhoSimpleFoam now instantiates the lower-level fluidThermo which instantiates
      either a psiThermo or rhoThermo according to the 'type' specification in
      thermophysicalProperties, e.g.
      
      thermoType
      {
          type            hePsiThermo;
          mixture         pureMixture;
          transport       sutherland;
          thermo          janaf;
          equationOfState perfectGas;
          specie          specie;
          energy          sensibleInternalEnergy;
      }
      
      instantiates a psiThermo for a perfect gas with JANAF thermodynamics, whereas
      
      thermoType
      {
          type            heRhoThermo;
          mixture         pureMixture;
          properties      liquid;
          energy          sensibleInternalEnergy;
      }
      
      mixture
      {
          H2O;
      }
      
      instantiates a rhoThermo for water, see new tutorial
      compressible/rhoSimpleFoam/squareBendLiq.
      
      In order to support complex equations of state the pressure can no longer be
      unlimited and rhoSimpleFoam now limits the pressure rather than the density to
      handle start-up more robustly.
      
      For backward compatibility 'rhoMin' and 'rhoMax' can still be used in the SIMPLE
      sub-dictionary of fvSolution which are converted into 'pMax' and 'pMin' but it
      is better to set either 'pMax' and 'pMin' directly or use the more convenient
      'pMinFactor' and 'pMinFactor' from which 'pMax' and 'pMin' are calculated using
      the fixed boundary pressure or reference pressure e.g.
      
      SIMPLE
      {
          nNonOrthogonalCorrectors 0;
      
          pMinFactor      0.1;
          pMaxFactor      1.5;
      
          transonic       yes;
          consistent      yes;
      
          residualControl
          {
              p               1e-3;
              U               1e-4;
              e               1e-3;
              "(k|epsilon|omega)" 1e-3;
          }
      }
      a1c8cde3
  3. Feb 07, 2017
    • Henry Weller's avatar
      porosityModels::solidification: New porosity model to simulate solidification · 97462476
      Henry Weller authored
      Description
          Simple solidification porosity model
      
          This is a simple approximation to solidification where the solid phase
          is represented as a porous blockage with the drag-coefficient evaluated from
      
              \f[
                  S = - \rho D(T) U
              \f]
      
          where
          \vartable
              D(T) | User-defined drag-coefficient as function of temperature
          \endvartable
      
          Note that the latent heat of solidification is not included and the
          temperature is unchanged by the modelled change of phase.
      
          Example of the solidification model specification:
          \verbatim
              type            solidification;
      
              solidificationCoeffs
              {
                  // Solidify between 330K and 330.5K
                  D table
                  (
                      (330.0     10000) // Solid below 330K
                      (330.5     0)     // Liquid above 330.5K
                  );
      
                  // Solidification porosity is isotropic
                  // use the global coordinate system
                  coordinateSystem
                  {
                      type    cartesian;
                      origin  (0 0 0);
                      coordinateRotation
                      {
                          type    axesRotation;
                          e1      (1 0 0);
                          e2      (0 1 0);
                      }
                  }
              }
          \endverbatim
      97462476
  4. Jan 17, 2017
    • Henry Weller's avatar
      Multi-phase solvers: Improved handling of inflow/outflow BCs in MULES · 1c2093c8
      Henry Weller authored
      Avoids slight phase-fraction unboundedness at entertainment BCs and improved
      robustness.
      
      Additionally the phase-fractions in the multi-phase (rather than two-phase)
      solvers are adjusted to avoid the slow growth of inconsistency ("drift") caused
      by solving for all of the phase-fractions rather than deriving one from the
      others.
      1c2093c8
  5. Aug 11, 2016
  6. Jul 01, 2016
  7. Jun 28, 2016
  8. May 16, 2016
  9. May 15, 2016
    • Henry Weller's avatar
      Patches contributed by Mattijs Janssens: · ce0cd351
      Henry Weller authored
      splitMeshRegions: handle flipping of faces for surface fields
      
      subsetMesh: subset dimensionedFields
      
      decomposePar: use run-time selection of decomposition constraints. Used to
          keep cells on particular processors. See the decomposeParDict in
      
      $FOAM_UTILITIES/parallel/decomposePar:
        - preserveBaffles: keep baffle faces on same processor
        - preserveFaceZones: keep faceZones owner and neighbour on same processor
        - preservePatches: keep owner and neighbour on same processor. Note: not
          suitable for cyclicAMI since these are not coupled on the patch level
        - singleProcessorFaceSets: keep complete faceSet on a single processor
        - refinementHistory: keep cells originating from a single cell on the
          same processor.
      
      decomposePar: clean up decomposition of refinement data from snappyHexMesh
      
      reconstructPar: reconstruct refinement data (refineHexMesh, snappyHexMesh)
      
      reconstructParMesh: reconstruct refinement data (refineHexMesh, snappyHexMesh)
      
      redistributePar:
        - corrected mapping surfaceFields
        - adding processor patches in order consistent with decomposePar
      
      argList: check that slaves are running same version as master
      
      fvMeshSubset: move to dynamicMesh library
      
      fvMeshDistribute:
        - support for mapping dimensionedFields
        - corrected mapping of surfaceFields
      
      parallel routines: allow parallel running on single processor
      
      Field: support for
        - distributed mapping
        - mapping with flipping
      
      mapDistribute: support for flipping
      
      AMIInterpolation: avoid constructing localPoints
      ce0cd351
  10. Apr 23, 2016
    • 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
      temperature.
      
      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
      pressure.
      
      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.
      
      tutorials/compressible/rhoPimpleFoam/laminar/helmholtzResonance:
          helmholtz resonance tutorial case for plenum pressure boundary
      
      This development was contributed by Will Bainbridge
      88561eea
    • 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.
      
          ph_rgh
          {
              $p_rgh;
          }
      
      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
      errors.
      
      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.
      673e0d17
  11. Apr 06, 2016
  12. Mar 07, 2016
    • Henry Weller's avatar
      SRFWallVelocityFvPatchVectorField: New BC for walls rotating in the SRF · ea159347
      Henry Weller authored
          Wall-velocity condition to be used in conjunction with the single rotating
          frame (SRF) model (see: FOAM::SRFModel)
      
          The condition applies the appropriate rotation transformation in time and
          space to determine the local SRF velocity of the wall.
      
              \f[
                  U_p = - U_{p,srf}
              \f]
      
          where
          \vartable
              U_p     = patch velocity [m/s]
              U_{p,srf} = SRF velocity
          \endvartable
      
          The normal component of \f$ U_p \f$ is removed to ensure 0 wall-flux even
          if the wall patch faces are irregular.
      
          \heading Patch usage
      
          Example of the boundary condition specification:
          \verbatim
          myPatch
          {
              type            SRFWallVelocity;
              value           uniform (0 0 0);    // Initial value
          }
          \endverbatim
      ea159347
  13. Feb 20, 2016
    • 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
      recommendations.
      
      Henry G. Weller
      CFD Direct
      99a10ece
  14. Feb 13, 2016
    • 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
      "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.
      fc2ce737
  15. Feb 09, 2016
    • Henry Weller's avatar
      noSlip: New wall boundary condition for velocity · 92333618
      Henry Weller authored
      noSlip is equivalent to fixedValue with a value of (0 0 0) but is
      simpler to specify e.g.
      
           upperWall
           {
               type            noSlip;
           }
      92333618
    • Henry Weller's avatar
      oscillatingFixedValue BC replaced by uniformFixedValue with the new Function1Types::Sine · 49f1c7e2
      Henry Weller authored
      For example the sinusoidal motion of the floating object in the
      potentialFreeSurfaceFoam/oscillatingBox tutorial is now specified thus
      
          floatingObject
          {
              type            fixedNormalInletOutletVelocity;
      
              fixTangentialInflow false;
      
              normalVelocity
              {
                  type            uniformFixedValue;
                  uniformValue    sine;
                  uniformValueCoeffs
                  {
                      frequency 1;
                      amplitude table
                      (
                          (   0     0)
                          (  10 0.025)
                          (1000 0.025)
                      );
                      scale     (0 1 0);
                      level     (0 0 0);
                  }
              }
      
              value           uniform (0 0 0);
          }
      
      rather than using
      
          floatingObject
          {
              type            fixedNormalInletOutletVelocity;
      
              fixTangentialInflow false;
      
              normalVelocity
              {
                  type            oscillatingFixedValue;
                  refValue        uniform (0 1 0);
                  offset          (0 -1 0);
                  amplitude       table
                  (
                      (   0     0)
                      (  10 0.025)
                      (1000 0.025)
                  );
                  frequency       constant 1;
              }
      
              value           uniform (0 0 0);
          }
      49f1c7e2
  16. Dec 02, 2015
    • Henry Weller's avatar
      fvOptions: Reorganized and updated to simplify use in sub-models and maintenance · 736621b9
      Henry Weller authored
      fvOptions are transferred to the database on construction using
      fv::options::New which returns a reference.  The same function can be
      use for construction and lookup so that fvOptions are now entirely
      demand-driven.
      
      The abstract base-classes for fvOptions now reside in the finiteVolume
      library simplifying compilation and linkage.  The concrete
      implementations of fvOptions are still in the single monolithic
      fvOptions library but in the future this will be separated into smaller
      libraries based on application area which may be linked at run-time in
      the same manner as functionObjects.
      736621b9
  17. Nov 25, 2015
    • Andrew Heather's avatar
      ENH: Multiple updates to function objects · 6838df9c
      Andrew Heather authored
      Updated objects
      - corrected Peclet number for compressible cases
      - propagated log flag and resultName across objects
      
      New function objects
      - new fluxSummary:
        - calculates positive, negative, absolute and net flux across face
          zones
      - new runTimeControl
        - abort the calculation when a user-defined metric is achieved.
          Available options include:
          - average value remains unchanged wrt a given threshold
          - equation initial residual exceeds a threshold - useful to abort
            diverging cases
          - equation max iterations exceeds a threshold - useful to abort
            diverging cases
          - min/max of a function object value
          - min time step exceeds a threshold - useful to abort diverging
            cases
      - new valueAverage:
        - average singular values from other function objects, e.g. Cd, Cl and
          Cm from the forceCoeffs function object
      6838df9c
  18. Nov 24, 2015
    • Henry Weller's avatar
      fvPatchFields/derived/fixedProfile: New BC which applies the specified 1D profile · 7321a5ee
      Henry Weller authored
      This is useful when applying an experimentally obtained profile as an
      inlet condition:
      
          Example of the boundary condition specification:
          \verbatim
          myPatch
          {
              type            fixedProfile;
              profile    csvFile;
      
              profileCoeffs
              {
                  nHeaderLine         0;          // Number of header lines
                  refColumn           0;          // Reference column index
                  componentColumns    (1 2 3);    // Component column indices
                  separator           ",";        // Optional (defaults to ",")
                  mergeSeparators     no;         // Merge multiple separators
                  fileName            "Uprofile.csv";  // name of csv data file
                  outOfBounds         clamp;      // Optional out-of-bounds handling
                  interpolationScheme linear;     // Optional interpolation scheme
              }
              direction        (0 1 0);
              origin           0;
          }
          \endverbatim
      
      or a simple polynomial profile:
      
          Example setting a parabolic inlet profile for the PitzDaily case:
          \verbatim
          inlet
          {
              type            fixedProfile;
      
              profile         polynomial
              (
                  ((1 0 0)        (0 0 0))
                  ((-6200 0 0)    (2 0 0))
              );
              direction       (0 1 0);
              origin          0.0127;
          }
          \endverbatim
      
      Based on code provided by Hassan Kassem:
      http://www.openfoam.org/mantisbt/view.php?id=1922
      7321a5ee
  19. Nov 23, 2015
  20. Nov 17, 2015
    • mattijs's avatar
      ENH: parallel: overhaul of parallel mapping · 916dcb86
      mattijs authored
      - redistributePar to have almost (complete) functionality of decomposePar+reconstructPar
      - low-level distributed Field mapping
      - support for mapping surfaceFields (including flipping faces)
      - support for decomposing/reconstructing refinement data
      916dcb86
    • mattijs's avatar
      ENH: parallel: overhaul of parallel mapping · 436902f5
      mattijs authored
      - redistributePar to have almost (complete) functionality of decomposePar+reconstructPar
      - low-level distributed Field mapping
      - support for mapping surfaceFields (including flipping faces)
      - support for decomposing/reconstructing refinement data
      436902f5
  21. Oct 14, 2015
  22. Jul 14, 2015
    • Henry Weller's avatar
      cellCoBlended: New surfaceInterpolation scheme based on CoBlended using the... · da8db9ff
      Henry Weller authored
      cellCoBlended: New surfaceInterpolation scheme based on CoBlended using the cell-based Courant number
      
          This scheme is equivalent to the CoBlended scheme except that the Courant
          number is evaluated for cells using the same approach as use in the
          finite-volume solvers and then interpolated to the faces rather than being
          estimated directly at the faces based on the flux.  This is a more
          consistent method for evaluating the Courant number but suffers from the
          need to interpolate which introduces a degree of freedom.  However, the
          interpolation scheme for "Co" is run-time selected and may be specified in
          "interpolationSchemes" and "localMax" might be most appropriate.
      
          Example of the cellCoBlended scheme specification using LUST for Courant
          numbers less than 1 and linearUpwind for Courant numbers greater than 10:
          \verbatim
          divSchemes
          {
              .
              .
              div(phi,U)  Gauss cellCoBlended 1 LUST grad(U) 10 linearUpwind grad(U);
              .
              .
          }
      
          interpolationSchemes
          {
              .
              .
              interpolate(Co) localMax;
              .
              .
          }
          \endverbatim
      da8db9ff
  23. Jun 28, 2015
  24. Feb 11, 2015
  25. Feb 10, 2015
  26. Jan 09, 2015
  27. Jan 08, 2015
  28. Jan 06, 2015
  29. Mar 20, 2014
  30. Dec 12, 2013
  31. Dec 06, 2013
  32. Nov 29, 2013
  33. Nov 25, 2013