1. 28 Oct, 2017 1 commit
  2. 28 Sep, 2017 1 commit
  3. 22 Sep, 2017 38 commits
    • Will Bainbridge's avatar
      lagrangian: Optimised reduced-dimension constraints · f1780abe
      Will Bainbridge authored and Andrew Heather's avatar Andrew Heather committed
      The 4.x tracking enforces reduced dimensionality on the parcels by
      moving them to the centre of the mesh at the start of each track,
      without considering the topology. This can leave the parcel outside it's
      associated tetrahedron.
      
      The barycentric algorithm isn't tolerant to incorrect topology, so
      instead of changing position, it was written to track to the mesh
      centre. This worked, but effectively doubled the number of tracking
      calls. This additional cost has now been removed by absorbing the
      constraint displacement into the existing motion track, so that the same
      number of tracking steps are performed as before.
      
      Partially resolves bug report https://bugs.openfoam.org/view.php?id=2688
      f1780abe
    • Andrew Heather's avatar
      ENH: Reinstated the wallBoundedStreamline function object · c7edc26d
      Andrew Heather authored
      Note: performs its own tracking and does not rely on the base
      particle::trackXXX functions, and uses a local particle position.
      
      Look to update to barycentric tracking in the future.
      c7edc26d
    • Andrew Heather's avatar
      ENH: Lagrangian - provided backwards compatibility for cases using the · 65a9d494
      Andrew Heather authored
      old "positions" file form
      
      The change to barycentric-based tracking changed the contents of the
      cloud "positions" file to a new format comprising the barycentric
      co-ordinates and other cell position-based info.  This broke
      backwards compatibility, providing no option to restart old cases
      (v1706 and earlier), and caused difficulties for dependent code, e.g.
      for post-processing utilities that could only infer the contents only
      after reading.
      
      The barycentric position info is now written to a file called
      "coordinates" with provision to restart old cases for which only the
      "positions" file is available. Related utilities, e.g. for parallel
      running and data conversion have been updated to be able to support both
      file types.
      
      To write the "positions" file by default, use set the following option
      in the InfoSwitches section of the controlDict:
      
          writeLagrangianPositions 1;
      65a9d494
    • Will Bainbridge's avatar
      ThermoSurfaceFilm: Corrected the splash kinetic energy · 8c379e78
      Will Bainbridge authored and Andrew Heather's avatar Andrew Heather committed
      The splash kinetic energy has been changed to depend upon the velocity
      of the parcel normal to the wall, rather than the absolute velocity, in
      accordance with the original reference.
      
      This patch was contributed by Stefan Hildenbrand at Pfinder
      Resolves bug report https://bugs.openfoam.org/view.php?id=2682
      8c379e78
    • Will Bainbridge's avatar
      ThermoParcel, ReactingParcel: Removed continuous phase data · 4b64b9a0
      Will Bainbridge authored and Andrew Heather's avatar Andrew Heather committed
      4b64b9a0
    • Andrew Heather's avatar
      INT: clean-up · a6044104
      Andrew Heather authored
      a6044104
    • Will Bainbridge's avatar
      KinematicParcel: Removed continuous phase data · 8f105f9b
      Will Bainbridge authored and Andrew Heather's avatar Andrew Heather committed
      Interpolated continuous phase data is only needed during a track and
      therefore shouldn't be stored on the parcel. The continuous velocity,
      density and viscosity have been moved from the kinematic parcel to the
      kinematic parcel tracking data. This reduces the memory usage of the
      kinematic layer by about one third. The thermo and reacting layers still
      require the same treatment.
      8f105f9b
    • Will Bainbridge's avatar
      lagrangian: Removed unused wall impact distance methods · 8aec422b
      Will Bainbridge authored and Andrew Heather's avatar Andrew Heather committed
      8aec422b
    • Will Bainbridge's avatar
      lagrangian: Removed duplicate hit-processor handling · fa31a76a
      Will Bainbridge authored and Andrew Heather's avatar Andrew Heather committed
      fa31a76a
    • Will Bainbridge's avatar
      lagrangian: Removed unnecessary patch argument from hit methods · 6a6f4d76
      Will Bainbridge authored and Andrew Heather's avatar Andrew Heather committed
      The patch can be determined from the particle when it is needed. Most of
      the time it is not.
      6a6f4d76
    • Andrew Heather's avatar
      INT: Re-instated escpaed mass · 3f2ebd52
      Andrew Heather authored
      3f2ebd52
    • Will Bainbridge's avatar
      lagrangian: Removed duplicate data from method arguments · dd30e552
      Will Bainbridge authored and Andrew Heather's avatar Andrew Heather committed
      A lot of methods were taking argument data which could be referenced or
      generated from the parcel class at little or no additional cost. This
      was confusing and generated the possibility of inconsistent data states.
      dd30e552
    • Will Bainbridge's avatar
      lagrangian: Simplification of parallel transfer · e35f87d8
      Will Bainbridge authored and Andrew Heather's avatar Andrew Heather committed
      e35f87d8
    • Andrew Heather's avatar
      9829021a
    • Will Bainbridge's avatar
      lagrangian: Un-templated the tracking data · 76e2c497
      Will Bainbridge authored and Andrew Heather's avatar Andrew Heather committed
      Tracking data classes are no longer templated on the derived cloud type.
      The advantage of this is that they can now be passed to sub models. This
      should allow continuous phase data to be removed from the parcel
      classes. The disadvantage is that every function which once took a
      templated TrackData argument now needs an additional TrackCloudType
      argument in order to perform the necessary down-casting.
      76e2c497
    • Will Bainbridge's avatar
      PairCollision: Removed unnecessary operations · 17da91a3
      Will Bainbridge authored and Andrew Heather's avatar Andrew Heather committed
      Resolves bug report https://bugs.openfoam.org/view.php?id=2680
      17da91a3
    • Henry Weller's avatar
      Merged reactingParcelFilmFoam into reactingParcelFoam · bc82aff0
      Henry Weller authored and Andrew Heather's avatar Andrew Heather committed
      The combined solver includes the most advanced and general functionality from
      each solver including:
      
          Continuous phase
          Lagrangian multiphase parcels
          Optional film
          Continuous and Lagrangian phase reactions
          Radiation
          Strong buoyancy force support by solving for p_rgh
      
      The reactingParcelFoam and reactingParcelFilmFoam tutorials have been combined
      and updated.
      bc82aff0
    • Henry Weller's avatar
      Rationalize the "pos" function · ae277fd1
      Henry Weller authored and Andrew Heather's avatar Andrew Heather committed
      "pos" now returns 1 if the argument is greater than 0, otherwise it returns 0.
      This is consistent with the common mathematical definition of the "pos" function:
      
      https://en.wikipedia.org/wiki/Sign_(mathematics)
      
      However the previous implementation in which 1 was also returned for a 0
      argument is useful in many situations so the "pos0" has been added which returns
      1 if the argument is greater or equal to 0.  Additionally the "neg0" has been
      added which returns 1 if if the argument is less than or equal to 0.
      ae277fd1
    • Andrew Heather's avatar
    • Andrew Heather's avatar
      INT: Integration of Mattijs' collocated parallel IO additions · 85f12ff5
      Andrew Heather authored
      Original commit message:
      ------------------------
      
      Parallel IO: New collated file format
      
      When an OpenFOAM simulation runs in parallel, the data for decomposed fields and
      mesh(es) has historically been stored in multiple files within separate
      directories for each processor.  Processor directories are named 'processorN',
      where N is the processor number.
      
      This commit introduces an alternative "collated" file format where the data for
      each decomposed field (and mesh) is collated into a single file, which is
      written and read on the master processor.  The files are stored in a single
      directory named 'processors'.
      
      The new format produces significantly fewer files - one per field, instead of N
      per field.  For large parallel cases, this avoids the restriction on the number
      of open files imposed by the operating system limits.
      
      The file writing can be threaded allowing the simulation to continue running
      while the data is being written to file.  NFS (Network File System) is not
      needed when using the the collated format and additionally, there is an option
      to run without NFS with the original uncollated approach, known as
      "masterUncollated".
      
      The controls for the file handling are in the OptimisationSwitches of
      etc/controlDict:
      
      OptimisationSwitches
      {
          ...
      
          //- Parallel IO file handler
          //  uncollated (default), collated or masterUncollated
          fileHandler uncollated;
      
          //- collated: thread buffer size for queued file writes.
          //  If set to 0 or not sufficient for the file size threading is not used.
          //  Default: 2e9
          maxThreadFileBufferSize 2e9;
      
          //- masterUncollated: non-blocking buffer size.
          //  If the file exceeds this buffer size scheduled transfer is used.
          //  Default: 2e9
          maxMasterFileBufferSize 2e9;
      }
      
      When using the collated file handling, memory is allocated for the data in the
      thread.  maxThreadFileBufferSize sets the maximum size of memory in bytes that
      is allocated.  If the data exceeds this size, the write does not use threading.
      
      When using the masterUncollated file handling, non-blocking MPI communication
      requires a sufficiently large memory buffer on the master node.
      maxMasterFileBufferSize sets the maximum size in bytes of the buffer.  If the
      data exceeds this size, the system uses scheduled communication.
      
      The installation defaults for the fileHandler choice, maxThreadFileBufferSize
      and maxMasterFileBufferSize (set in etc/controlDict) can be over-ridden within
      the case controlDict file, like other parameters.  Additionally the fileHandler
      can be set by:
      - the "-fileHandler" command line argument;
      - a FOAM_FILEHANDLER environment variable.
      
      A foamFormatConvert utility allows users to convert files between the collated
      and uncollated formats, e.g.
          mpirun -np 2 foamFormatConvert -parallel -fileHandler uncollated
      
      An example case demonstrating the file handling methods is provided in:
      $FOAM_TUTORIALS/IO/fileHandling
      
      The work was undertaken by Mattijs Janssens, in collaboration with Henry Weller.
      85f12ff5
    • Andrew Heather's avatar
      b486e347
    • Henry Weller's avatar
      cloudSolution: Check consistency between the transient option · e811fd25
      Henry Weller authored and Andrew Heather's avatar Andrew Heather committed
      and the continuous-phase simulation type
      
      For LTS and steady-state simulations the transient option does not need to be
      provided as only steady-state tracking is appropriate.  For transient running
      the Lagrangian tracking may be steady or transient.
      e811fd25
    • Will Bainbridge's avatar
      KinematicParcel: Apply in-cell updates before hitting the face · 7280f0ad
      Will Bainbridge authored and Andrew Heather's avatar Andrew Heather committed
      The evolution of a KinematicParcel happens in three stages; (1) tracking
      across the cell, (2) interaction with the face or patch that has been
      hit, and (3) clculation and and update of parcel and cell properties.
      The KinematicParcel used to evolve in this order, as steps 1 and 2 were
      part of the same lower level method. This meant that the update stage
      was done after interacting with the face, meaning the parcel was not in
      the cell that had just been tracked through, or, by means of a patch
      interaction, had been modified such that it was no longer representative
      of the track through the cell.
      
      With the separation of stages 1 and 2 in the base class, it is now
      possible to do the update stage before interacting with the face (i.e.,
      proceeding in the order 1, 3, 2). This makes the state consistent for
      the updates, and avoids the issues described.
      
      Patch contributed by Timo Niemi, VTT.
      This resolves bug report https://bugs.openfoam.org/view.php?id=2282
      7280f0ad
    • Will Bainbridge's avatar
      lagrangian: Made ACMI interactions insensitive to cell-face order · d2748836
      Will Bainbridge authored and Andrew Heather's avatar Andrew Heather committed
      d2748836
    • Will Bainbridge's avatar
      lagrangian: Removed debugging message from particle::trackToFace · b4ad1dd8
      Will Bainbridge authored and Andrew Heather's avatar Andrew Heather committed
      b4ad1dd8
    • Will Bainbridge's avatar
      Lagrangian: Enabled tracking through ACMI patches and minor code improvements · 930e02a0
      Will Bainbridge authored and Andrew Heather's avatar Andrew Heather committed
      Particle collisions with ACMI patches are now handled. The hit detects
      whether the location is within the overlap or the coupled region and
      recurses, calling the hit routine appropriate for the region.
      
      The low level tracking methods are now more consistently named. There is
      now a distinction between tracking to a face and hitting it. Function
      object side effects have been moved out of the base layer and into the
      parcels on which they are meaningful.
      930e02a0
    • Will Bainbridge's avatar
      ThermoParcel: Improved numerical stability of heat transfer term · 028bc0f0
      Will Bainbridge authored and Andrew Heather's avatar Andrew Heather committed
      Patch contributed by Timo Niemi, VTT.
      Resolves bug-report https://bugs.openfoam.org/view.php?id=2655
      028bc0f0
    • Will Bainbridge's avatar
      lagrangian: Always set switchProcessor flag · dc31f659
      Will Bainbridge authored and Andrew Heather's avatar Andrew Heather committed
      The TrackData::switchProcessor flag was not being set for some of the
      tracking steps made by the more complicated parcels. In the case that a
      parcel starts the step already on a processor boundary, this sometimes
      lead to the particle being transferred back and forth indefinitely. The
      flag is now explicitly set in all cases.
      dc31f659
    • Will Bainbridge's avatar
    • Will Bainbridge's avatar
      lagrangian: Fixed infinite loops · 8da213f5
      Will Bainbridge authored and Andrew Heather's avatar Andrew Heather committed
      Tracking through an inverted region of the mesh happens in a reversed
      direction relative to a non-inverted region. Usually, this allows the
      tracking to propagate normally, regardless of the sign of the space.
      However, in rare cases, it is possible for a straight trajectory to form
      a closed loop through both positive and negative regions. This causes
      the tracking to loop indefinitely.
      
      To fix this, the displacement through inverted regions has been
      artifically increased by a small amount (1% at the moment). This has the
      effect that the change in track fraction over the negative part of the
      loop no longer exactly cancels the change over the positive part, and
      the track therefore terminates.
      8da213f5
    • Will Bainbridge's avatar
      lagrangian: Corrected patch data · 4bc08a0a
      Will Bainbridge authored and Andrew Heather's avatar Andrew Heather committed
      The KinematicCloud::patchData method has been made consistent on moving
      meshes and/or when the time-step is being sub-cycled.
      
      It has also been altered to calculate the normal component of a moving
      patch's velocity directly from the point motions. This prevents an
      infinite loop occuring due to inconsistency between the velocity used to
      calculate a rebound and that used when tracking.
      
      Some minor style improvements to the particle class have also been made.
      4bc08a0a
    • Will Bainbridge's avatar
      ParticleCollector: Prevented missing and duplicate collections · 588c5791
      Will Bainbridge authored and Andrew Heather's avatar Andrew Heather committed
      The particle collector was collecting some particles twice due to a
      tolerance extending the tracked path. This has been removed. The new
      tracking algorithm does not generate the same sorts of spurious
      tolerance-scale motions that the old one did, so this extension of the
      tracking path is unnecessary.
      
      Some particles were also not being collected at all as they were hitting
      a diagonal of the collection polygon and registering as not having hit
      either of the adjacent triangles. The hit criteria has been rewritten. A
      hit now occurs when the normals of the triangles created by joining the
      intersection point with the polygon edges are all in the same direction
      as the overall polygon normal. This calculation is not affected by the
      polygon's diagonals.
      
      The issue was raised by, and resolved with support from, Karl Meredith
      at FM Global.
      
      This resolves bug-report https://bugs.openfoam.org/view.php?id=2595
      588c5791
    • Will Bainbridge's avatar
      interpolation: Optimise by using particle local coordinates · eb09cdd8
      Will Bainbridge authored and Andrew Heather's avatar Andrew Heather committed
      This change changes the point-tetIndices-face interpolation function
      method to take barycentric-tetIndices-face arguments instead. This
      function is, at present, only used for interpolating Eulerian data to
      Lagrangian particles.
      
      This change prevents an inefficiency in cellPointInterpolation whereby
      the position of the particle is calculated from it's barycentric
      coordinates, before immediately being converted back to barycentric
      coordinates to perform the interpolation.
      eb09cdd8
    • Will Bainbridge's avatar
      MPPIC: Optimised the averaging methods · 39376dfa
      Will Bainbridge authored and Andrew Heather's avatar Andrew Heather committed
      The averaging methods now take the particle barycentric coordinates as
      inputs rather than global positions. This change significantly optimises
      Dual averaging, which is the most commonly used method. The run time of
      the lagrangian/MPPICFoam/Goldschmidt tutorial has been reduced by a
      factor of about two.
      39376dfa
    • Will Bainbridge's avatar
      tetIndices: Removed duplicate logic · 7ada836a
      Will Bainbridge authored and Andrew Heather's avatar Andrew Heather committed
      The logic for generating tetrahedra from a face base point and an offset
      was duplicated in a few places. It is now confined to the tetIndices
      class.
      7ada836a
    • Henry Weller's avatar
      lagrangian::InjectionModels: Corrected documentation · 4ab6dda3
      Henry Weller authored and Andrew Heather's avatar Andrew Heather committed
      4ab6dda3
    • Henry Weller's avatar
    • Will Bainbridge's avatar
      primitiveShapes: Generalised tetrahedron and triangle cutting. Cuts are · 0e2bc0be
      Will Bainbridge authored and Andrew Heather's avatar Andrew Heather committed
      now possible with level-sets as well as planes. Removed tetPoints class
      as this wasn't really used anywhere except for the old tet-cutting
      routines. Restored tetPointRef.H to be consistent with other primitive
      shapes. Re-wrote tet-overlap mapping in terms of the new cutting.
      0e2bc0be