1. 11 Dec, 2019 1 commit
  2. 10 Dec, 2019 11 commits
    • Mark Olesen's avatar
      0c5ff2ef
    • Mark Olesen's avatar
      Merge branch 'feature-particle-patch-postpro-filtering' into 'develop' · 71bc3510
      Mark Olesen authored
      Feature particle patch postpro filtering
      
      ### Summary
      
      Adds options to write particle-patch interactions to file, and to select particle fields to post-process for the `patchPostProcessing` cloud function object
      
      
      ### Resolved bugs (If applicable)
      
      none
      
      
      ### Details of new models (If applicable)
      
      Cloud patch interaction models:
      Optionally write patch interaction statistics, e.g. number and mass of particles that stick, escape etc. to file using the optional `writeToFile` entry, e.g.
      
      ```
          localInteractionCoeffs
          {
              patches
              (
                  "(walls|cyc.*)"
                  {
                      type        rebound;
                  }
      
                  "inlet|outlet"
                  {
                      type escape;
                  }
              );
      
              // New optional entry
              writeToFile     yes;
          }
      ```
      
      Cloud function objects:
      New `fields` optional entry can be used to select which particle fields to post-process; if empty or the entry is not given all fields are written (to provide backwards compatibility)
      
      ```
          patchPostProcessing1
          {
              type            patchPostProcessing;
      
              // Optional new entry
              fields          (position "U.*" d T nParticle);
      
              maxStoredParcels 20;
              patches
              (
                  cycLeft_half0
                  cycLeft_half1
              );
          }
      ```
      
      See the `$FOAM_TUTORIALS/lagrangian/reactingParcelFilm/filter` tutorial for an example
      
      
      ### Risks
      
      Low risk
      
      See merge request !301
      71bc3510
    • Andrew Heather's avatar
      Merge branch 'feature-expressions' into 'develop' · 1b17784a
      Andrew Heather authored
      Feature expressions
      
      ### Summary
      
      This branch represents an implementation of what is considered to be the most useful aspects of swak4Foam ([Swiss-Army-Knife for FOAM](https://openfoamwiki.net/index.php/Contrib/swak4Foam)) from Bernhard Gschaider, namely the ability to use text-based expressions instead of coding in C++ for the following cases:
      - expression-based boundary conditions (also known as _groovy_ boundary conditions)
      - expression-based setFields (also known as _funky_ set fields)
      
      The idea of what we currently term *expressions* was pioneered by
      (Bernhard Gschaider) and is now firmly established in `swak4Foam`.
      Among other things, expressions attempt to bridge the gap between
      using standard, predefined boundary conditions and writing dedicated,
      special-purpose ones. Although part of this gap is now covered within
      OpenFOAM by using dynamically compiled user coding (eg, coded boundary
      conditions), there remains substantial areas where it can be
      significantly more convenient to have a series of predefined functions
      and expression sytax with some access to base OpenFOAM field
      functionality that enables rapid deployment of boundary conditions, or
      custom-defined `setFields` without writing code.
      A significant portion of `swak4Foam` expressions has been adapted for
      direct integration into OpenFOAM. During the integration and rewrite,
      we have tried to pare things down to a smaller subset with the aim of
      covering 90% or more of the common cases. The remaining cases are left
      to be reassessed for extending the *expressions* functionality in the
      future, but they also may be better served with other approaches (eg,
      with coded conditions) that were not available when `swak4Foam` was
      originally conceived.
      
      To the greatest extent possible, the integrated *expressions* have
      been designed to avoid name clashes with `swak` so it should remain
      possible to use the most recent versions of `swak` without problem.
      
      
      ### Risks
      
      - New functionality, so low chance of regression.
      - The scope of the functionality will be revised in the future
      
      ### Naming (for `swak4Foam` users)
      
      The following are the *expressions* correspondences to `swak`:
      
      - The `exprFixedValue` and `exprGradient` boundary conditions are
        roughly equivalent to the _groovy_ boundary conditions.
      
      - The utilities `setExprFields` and `setExprBoundaryFields` are
        roughly equivalent to the _funky_ utilities of similar name.
      
      The naming of the boundary conditions and utilities not only reflects
      the slightly different input requirements, but simultaneously seeks to
      avoid any potential name-clash with `swak4Foam` in a mixed
      environment.
      
      The names for the boundary condition dictionary entries tend be
      shorter and slightly different (eg, `valueExpr` vs `valueExpression`)
      to serve as a small reminder that the *expressions* syntax is slightly
      different than the *groovy* equivalents. It also allows the user to
      fashion dictionary entries that are sufficient for **both** boundary
      condition variants and quickly toggle between them simply by changing
      the boundary condition `type`.
      
      See merge request !300
      1b17784a
    • Mark Olesen's avatar
    • Mark Olesen's avatar
      ENH: setExprFields and setExprBoundaryFields · 2923daab
      Mark Olesen authored
      - these are the expressions equivalent of funkySetFields and
        funkySetBoundaryFields
      2923daab
    • Mark Olesen's avatar
      ENH: boundary conditions with expressions · 749f4b5d
      Mark Olesen authored
      749f4b5d
    • Mark Olesen's avatar
      20589430
    • Mark Olesen's avatar
      82a1e325
    • Mark Olesen's avatar
      ENH: base fvMesh driver for expressions · 019fe7de
      Mark Olesen authored
      019fe7de
    • Mark Olesen's avatar
      ENH: more flexible naming for ensightPartCells, ensightPartFaces · 7e275838
      Mark Olesen authored
      - make ensightParts parallel-aware when handling zones and patches
      
      STYLE: use of serial/parallel more evident in write templates
      7e275838
    • Mark Olesen's avatar
      STYLE: avoid potential deadlock when resizing from zero-sized list · 98b79fad
      Mark Olesen authored
      - not yet triggered by any code, but avoid anyhow
      98b79fad
  3. 09 Dec, 2019 7 commits
  4. 06 Dec, 2019 11 commits
  5. 03 Dec, 2019 1 commit
  6. 09 Dec, 2019 1 commit
  7. 06 Dec, 2019 2 commits
    • Mark Olesen's avatar
      ENH: improve exprResult handling · 17869747
      Mark Olesen authored
      - some support for "uniform" bool fields. Calculating an averaged
        value for a boolField does not work very well, but we simply define
        that the field average is 'true' when more than 1/2 of its values
        are true. Not exactly true, but allows templated definitions to work
        smoothly.
      
      - additional output method writeValue().
        This outputs the single (uniform) value or the first value of the
        field.
      17869747
    • Mark Olesen's avatar
      ENH: add ITstream append and seek methods. · 9fd696e1
      Mark Olesen authored
      - ITstream append() would previously have used the append from the
        underlying tokenList, which leaves the tokenIndex untouched and
        renders the freshly appended tokens effectively invisible if
        interspersed with primitiveEntry::read() that itself uses tokenIndex
        when building the list.
      
        The new append() method makes this hidden ITstream bi-directionality
        easier to manage. For efficiency, we only append lists
        (not individual tokens) and support a 'lazy' resizing that allows
        the final resizing to occur later when all tokens have been appended.
      
      - The new ITstream seek() method provides a conveniently means to move
        to the end of the list or reposition to the middle.
        Using rewind() and using seek(0) are identical.
      
      ENH: added OTstream to output directly to a list of tokens
      
      ---
      
      BUG: List::newElem resized incorrectly
      
      - had a simple doubling of the List size without checking that this
        would indeed be sufficient for the requested index.
      
        Bug was ...
      9fd696e1
  8. 07 Dec, 2019 2 commits
  9. 09 Dec, 2019 1 commit
    • mattijs's avatar
      ENH: snappyHexMesh: proximity check · b7c54bc0
      mattijs authored
      This adds automatic deletion of cells inside small gaps. This is
      generally used to avoid having excessive numbers of cells in irrelevant
      areas of a geometry. It is nearly the opposite of automatic gap refinement
       - that refines cells to resolve the gap; this functionality removes cells
      to not mesh the gap.
      
      The proximity handling will remove those cells which are inside 'thin' gaps
      where 'thin' is defined as a distance of 2*'blockLevel'
      It will
      - detect surfaces which have the new 'blockLevel' specification
      - convert this to a minimum gap distance
      - detect cells which are inside this gap
      - remove these cells and add exposed faces to the nearest 'real' patch
      b7c54bc0
  10. 06 Dec, 2019 2 commits
  11. 03 Dec, 2019 1 commit