Skip to content
Snippets Groups Projects
  1. Oct 11, 2017
  2. Oct 09, 2017
  3. Sep 28, 2017
  4. Sep 26, 2017
  5. Sep 22, 2017
    • Mark OLESEN's avatar
      STYLE: minor cleanup after merge · 4996ac85
      Mark OLESEN authored
      4996ac85
    • Mark OLESEN's avatar
      ENH: improve input stringency for argList options · 13f04876
      Mark OLESEN authored
      Previously:
      
        - bad command-line input such as -label 1234xyz would parse as a
          label (with value 1234) and the trailing junk would be silently
          ignored. This may or may not be appropriate. If the trailing junk
          looked like this '100E' or '1000E-' (ie, forgot to type the
          exponent), the incorrectly parsed values can be quite bad:
      
              label  = 32684
              scalar = 6.93556e-310
      
      Now:
      
        - use the updated readLabel/readScalar routines that trigger a
          FatalIOError on bad input:
      
              --> FOAM FATAL IO ERROR:
              Trailing content found parsing '1234xyz'
      
              --> FOAM FATAL IO ERROR:
              Trailing content found parsing '100E'
      
         This traps erroneous command-line input immediately.
      13f04876
    • Mark OLESEN's avatar
      ENH: improve consistency in parsing primitives from strings (issue #590) · 41f59b07
      Mark OLESEN authored
      - Any trailing whitespace when parsing from strings or character buffers
        is ignored rather than being treated as an error. This is consistent
        with behaviour when reading from an Istream and with leading whitespace
        being ignored in the underlying atof/atod, strtof/strtod... functions.
      
      - Allow parsing directly from a std::string instead of just from a 'char*'.
        This reflects the C++11 addition of std::stod to complement the C
        functions strtod. This also makes it easier to parse string directly
        without using an IStringStream.
      
      - Two-parameter parsing methods return success/failure.
        Eg,
      
            if (readInt32(str, &int32Val)) ...
      
      - One-parameter parsing methods return the value on success or
        emit a FatalIOError.
        Eg,
      
            const char* buf;
            int32Val = readInt32(buf, &);
      
      - Improved consistency when parsing unsigned ints.
        Use strtoimax and strtoumax throughout.
      
      - Rename readDoubleScalar -> readDouble, readFloatScalar -> readFloat.
        Using the primitive name directly instead of the Foam typedef for
        better consistency with readInt32 etc.
      
      - Clean/improve parseNasScalar.
        Handle normal numbers directly, reduce some operations.
      41f59b07
    • 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
    • Henry Weller's avatar
      limitTemperature: added support for multiphase solvers · 6fd823e7
      Henry Weller authored and Andrew Heather's avatar Andrew Heather committed
      Based on patch contributed by Juho Peltola, VTT
      
      Resolves feature request https://bugs.openfoam.org/view.php?id=2572
      6fd823e7
    • 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
    • Henry Weller's avatar
    • 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
      reactingParcelFilmFoam: Added LTS support · 8d72f581
      Henry Weller authored and Andrew Heather's avatar Andrew Heather committed
      8d72f581
    • Henry Weller's avatar
    • Henry Weller's avatar
    • Henry Weller's avatar
      reactingMultiphaseEulerFoam: Limited phase-fractions · 82ed8758
      Henry Weller authored and Andrew Heather's avatar Andrew Heather committed
      for consistency with reactingTwoPhaseEulerFoam and to ensure correct operation
      of models requiring formal boundedness of phase-fractions.
      
      Resolves bug-report https://bugs.openfoam.org/view.php?id=2589
      82ed8758
    • Andrew Heather's avatar
      INT: updated overInterDyMFoam and MPPICInterFoam following changes to... · e67525ce
      Andrew Heather authored
      INT: updated overInterDyMFoam and MPPICInterFoam following changes to multiphase solvers.  Needs further testing
      e67525ce
    • Henry Weller's avatar
      compressibleInterFoam: Improved mass conservation · 6ad88f15
      Henry Weller authored and Andrew Heather's avatar Andrew Heather committed
      using the continuity error correction formulation developed for
      twoPhaseEulerFoam and reactingEulerFoam.
      6ad88f15
    • 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
    • mattijs's avatar
      refineMesh: Correct parallel operation · 3a7ba17a
      mattijs authored and Andrew Heather's avatar Andrew Heather committed
      Patch contributed by Mattijs Janssens
      Resolves bug-report https://bugs.openfoam.org/view.php?id=2621
      3a7ba17a
    • Henry Weller's avatar
      fileOperation: Corrected processor counting for moving mesh cases · 18874f00
      Henry Weller authored and Andrew Heather's avatar Andrew Heather committed
      18874f00
    • Andrew Heather's avatar
      INT: Removed deprecated utility · d41108b2
      Andrew Heather authored
      d41108b2
    • 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
    • Will Bainbridge's avatar
      reactingEulerFoam: Bug fix to reactionsource terms · 02c68fc2
      Will Bainbridge authored and Andrew Heather's avatar Andrew Heather committed
      Fixed reaction source terms in the energy and species fraction equations
      by multiplying by the phase fraction.
      
      Resolves bug report https://bugs.openfoam.org/view.php?id=2591
      02c68fc2
    • Henry Weller's avatar
      reactingEulerFoam::IsothermalPhaseModel: Added support for isothermal compressible flow · ca06a453
      Henry Weller authored and Andrew Heather's avatar Andrew Heather committed
      Based on patch contributed by Ronald Oertel, HZDR
      Resolves bug-report https://bugs.openfoam.org/view.php?id=2583
      ca06a453
    • Henry Weller's avatar
      Replace foamList utility with -list.* options · 1ed938ab
      Henry Weller authored and Andrew Heather's avatar Andrew Heather committed
      Provides better context for the available boundary conditions, fvOptions,
      functionObjects etc. and thus returns only those available to and compatible
      with the particular application.
      
      e.g.
      
      pimpleFoam -help
      
      Usage: pimpleFoam [OPTIONS]
      options:
        -case <dir>       specify alternate case directory, default is the cwd
        -listFunctionObjects
                          List functionObjects
        -listFvOptions    List fvOptions
        -listRegisteredSwitches
                          List switches registered for run-time modification
        -listScalarBCs    List scalar field boundary conditions (fvPatchField<scalar>)
        -listSwitches     List switches declared in libraries but not set in
                          etc/controlDict
        -listTurbulenceModels
                          List turbulenceModels
        -listUnsetSwitches
                          List switches declared in libraries but not set in
                          etc/controlDict
        -listVectorBCs    List vector field boundary conditions (fvPatchField<vector>)
        -noFunctionObjects
                          do not execute functionObjects
        -parallel         run in parallel
        -postProcess      Execute functionObjects only
        -roots <(dir1 .. dirN)>
                          slave root directories for distributed running
        -srcDoc           display source code in browser
        -doc              display application documentation in browser
        -help             print the usage
      
      pimpleFoam listTurbulenceModels
      
      pimpleFoam -listTurbulenceModels
      /*---------------------------------------------------------------------------*\
      | =========                 |                                                 |
      | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
      |  \\    /   O peration     | Version:  dev                                   |
      |   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
      |    \\/     M anipulation  |                                                 |
      \*---------------------------------------------------------------------------*/
      Build  : dev-39c46019
      Exec   : pimpleFoam -listTurbulenceModels
      Date   : Jun 10 2017
      Time   : 21:37:49
      Host   : "dm"
      PID    : 675
      Case   : /home/dm2/henry/OpenFOAM/OpenFOAM-dev
      nProcs : 1
      sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
      SetNaN : Initialising allocated memory to NaN (FOAM_SETNAN).
      fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
      allowSystemOperations : Allowing user-supplied system call operations
      
      // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
      Turbulence models
      3
      (
      LES
      RAS
      laminar
      )
      
      RAS models
      18
      (
      LRR
      LamBremhorstKE
      LaunderSharmaKE
      LienCubicKE
      LienLeschziner
      RNGkEpsilon
      SSG
      ShihQuadraticKE
      SpalartAllmaras
      kEpsilon
      kOmega
      kOmegaSST
      kOmegaSSTLM
      kOmegaSSTSAS
      kkLOmega
      qZeta
      realizableKE
      v2f
      )
      
      LES models
      10
      (
      DeardorffDiffStress
      Smagorinsky
      SpalartAllmarasDDES
      SpalartAllmarasDES
      SpalartAllmarasIDDES
      WALE
      dynamicKEqn
      dynamicLagrangian
      kEqn
      kOmegaSSTDES
      )
      
      Further work will be needed to support the -listTurbulenceModels option in
      multiphase solvers.
      1ed938ab
    • Henry Weller's avatar
      saturationModels::function1: New Function1 Tsat model · 509450e4
      Henry Weller authored and Andrew Heather's avatar Andrew Heather committed
      based on code contributed by Juho Peltola, VTT.
      
      Resolves contribution request https://bugs.openfoam.org/view.php?id=2573
      509450e4
    • Chris Greenshields's avatar
      surfaceFind: output region/zone number of found face · 28d4576a
      Chris Greenshields authored and Andrew Heather's avatar Andrew Heather committed
      28d4576a
    • Will Bainbridge's avatar
      Euler-Euler: turbulentDispersionModels: Burns: Minor re-formulation to · 5a02aa3e
      Will Bainbridge authored and Andrew Heather's avatar Andrew Heather committed
      improve stability.
      
      Resolves bug report <https://bugs.openfoam.org/view.php?id=2544>
      5a02aa3e
    • Henry Weller's avatar
      BUG: reactingEulerFoam: Corrected definition of Reynolds number in Beetstra and Tenneti drag laws · 4911c165
      Henry Weller authored and Andrew Heather's avatar Andrew Heather committed
      Patch contributed by Alberto Passalacqua, Iowa State University
      4911c165
    • Henry Weller's avatar
      VoF solvers: New interfaceCompressionFvPatchScalarField BC and additional shear compression · 8ad88603
      Henry Weller authored and Andrew Heather's avatar Andrew Heather committed
      Provides the additional compression necessary to ensure interface integrity
      adjacent to a boundary at a low angle of incidence to the interface.  This is
      particularly important when simulating planing hulls.
      8ad88603
    • Andrew Heather's avatar
    • Will Bainbridge's avatar
      tetrahedron: triangle: Improved barycentric handling on tets and tris · 34d43585
      Will Bainbridge authored and Andrew Heather's avatar Andrew Heather committed
      Updated the tetrahedron and triangle classes to use the barycentric
      primitives. Removed duplicate code for generating random positions in
      tets and tris, and fixed bug in tri random position.
      34d43585