Skip to content
Snippets Groups Projects
  1. May 29, 2018
  2. May 28, 2018
  3. Apr 24, 2018
    • Mark OLESEN's avatar
      ENH: improve handling of ThirdParty packages · b4d38ab4
      Mark OLESEN authored
      - generalize some of the library extensions (.so vs .dylib).
        Provide as wmake 'sysFunctions'
      
      - added note about unsupported/incomplete system support
      
      - centralize detection of ThirdParty packages into wmake/ subdirectory
        by providing a series of scripts in the spirit of GNU autoconfig.
        For example,
      
            have_boost, have_readline, have_scotch, ...
      
        Each of the `have_<package>` scripts will generally provide the
        following type of functions:
      
            have_<package>          # detection
            no_<package>            # reset
            echo_<package>          # echoing
      
        and the following type of variables:
      
            HAVE_<package>          # unset or 'true'
            <package>_ARCH_PATH     # root for <package>
            <package>_INC_DIR       # include directory for <package>
            <package>_LIB_DIR       # library directory for <package>
      
        This simplifies the calling scripts:
      
            if have_metis
            then
                wmake metisDecomp
            fi
      
        As well as reducing clutter in the corresponding Make/options:
      
            EXE_INC = \
                -I$(METIS_INC_DIR) \
                -I../decompositionMethods/lnInclude
      
            LIB_LIBS = \
                -L$(METIS_LIB_DIR) -lmetis
      
        Any additional modifications (platform-specific or for an external build
        system) can now be made centrally.
      b4d38ab4
  4. Mar 28, 2018
  5. Mar 16, 2018
    • Mark OLESEN's avatar
      STYLE: more consistent use of dimensioned Zero · 2f86cdc7
      Mark OLESEN authored
      - when constructing dimensioned fields that are to be zero-initialized,
        it is preferrable to use a form such as
      
            dimensionedScalar(dims, Zero)
            dimensionedVector(dims, Zero)
      
        rather than
      
            dimensionedScalar("0", dims, 0)
            dimensionedVector("zero", dims, vector::zero)
      
        This reduces clutter and also avoids any suggestion that the name of
        the dimensioned quantity has any influence on the field's name.
      
        An even shorter version is possible. Eg,
      
            dimensionedScalar(dims)
      
        but reduces the clarity of meaning.
      
      - NB: UniformDimensionedField is an exception to these style changes
        since it does use the name of the dimensioned type (instead of the
        regIOobject).
      2f86cdc7
  6. Feb 22, 2018
  7. Feb 14, 2018
  8. Feb 08, 2018
    • Mark OLESEN's avatar
      ENH: cleanup List constructors (issue #725) · e42c2281
      Mark OLESEN authored
      - add copy construct from UList
      
      - remove copy construct from dissimilar types.
      
        This templated constructor was too generous in what it accepted.
        For the special cases where a copy constructor is required with
        a change in the data type, now use the createList factory method,
        which accepts a unary operator. Eg,
      
            auto scalars = scalarList::createList
            (
                labels,
                [](const label& val){ return 1.5*val; }
            );
      e42c2281
  9. Jan 08, 2018
    • Mark OLESEN's avatar
      ENH: simplify method names for reading argList options and arguments · 345a2a42
      Mark OLESEN authored
      - use succincter method names that more closely resemble dictionary
        and HashTable method names. This improves method name consistency
        between classes and also requires less typing effort:
      
          args.found(optName)        vs.  args.optionFound(optName)
          args.readIfPresent(..)     vs.  args.optionReadIfPresent(..)
          ...
          args.opt<scalar>(optName)  vs.  args.optionRead<scalar>(optName)
          args.read<scalar>(index)   vs.  args.argRead<scalar>(index)
      
      - the older method names forms have been retained for code compatibility,
        but are now deprecated
      345a2a42
  10. Dec 08, 2017
    • Mark OLESEN's avatar
      ENH: add foamListRegions utility · 03b8275a
      Mark OLESEN authored
      - list all regions from constant/regionProperties:
           * foamListRegions
      
      - list specific region type from constant/regionProperties:
           * foamListRegions fluid
           * foamListRegions solid
      03b8275a
  11. Nov 13, 2017
  12. Nov 26, 2017
  13. Nov 22, 2017
  14. Sep 22, 2017
  15. Oct 24, 2017
  16. Jul 22, 2017
  17. Jul 20, 2017
  18. Jul 19, 2017
  19. Sep 13, 2017
    • Andrew Heather's avatar
      ENH: Lagrangian - provided backwards compatibility for cases using the · 2defba00
      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;
      2defba00
  20. Sep 08, 2017
  21. Jul 13, 2017
  22. Jul 03, 2017
  23. May 19, 2017
  24. Sep 07, 2017
  25. Sep 06, 2017
  26. Jul 07, 2017
    • Andrew Heather's avatar
      INT: Integration of Mattijs' collocated parallel IO additions · d8d6030a
      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.
      d8d6030a
  27. Jun 10, 2017
    • Henry Weller's avatar
      Replace foamList utility with -list.* options · 02e33f49
      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-39c46019e44f
      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.
      02e33f49
  28. May 16, 2017
    • Mark OLESEN's avatar
      ENH: cleanup wordRe interfaces etc. · a8d2ebf2
      Mark OLESEN authored
      - ensure that the string-related classes have consistently similar
        matching methods. Use operator()(const std::string) as an entry
        point for the match() method, which makes it easier to use for
        filters and predicates. In some cases this will also permit using
        a HashSet as a match predicate.
      
      regExp
      ====
      - the set method now returns a bool to signal that the requested
        pattern was compiled.
      
      wordRe
      ====
      - have separate constructors with the compilation option (was previously
        a default parameter). This leaves the single parameter constructor
        explicit, but the two parameter version is now non-explicit, which
        makes it easier to use when building lists.
      
      - renamed compile-option from REGEX (to REGEXP) for consistency with
        with the <regex.h>, <regex> header names etc.
      
      wordRes
      ====
      - renamed from wordReListMatcher -> wordRes. For reduced typing and
        since it behaves as an entity only slightly related to its underlying
        list nature.
      
      - Provide old name as typedef and include for code transition.
      
      - pass through some list methods into wordRes
      
      hashedWordList
      ====
      - hashedWordList[const word& name] now returns a -1 if the name is is
        not found in the list of indices. That has been a pending change
        ever since hashedWordList was generalized out of speciesTable
        (Oct-2010).
      
      - add operator()(const word& name) for easy use as a predicate
      
      STYLE: adjust parameter names in stringListOps
      
      - reflect if the parameter is being used as a primary matcher, or the
        matcher will be derived from the parameter.
        For example,
            (const char* re), which first creates a regExp
            versus (const regExp& matcher) which is used directly.
      a8d2ebf2
  29. Jun 08, 2017
  30. May 18, 2017
  31. Apr 21, 2017
  32. Apr 19, 2017
  33. Apr 03, 2017
    • Mark Olesen's avatar
      ENH: default jobControl now under the '~/.OpenFOAM/jobControl' directory · af49eaf6
      Mark Olesen authored
      - this implies that jobControl is a user-resource for OpenFOAM.
        It was previously located under $WM_PROJECT_INST_DIR/jobControl,
        but few users will have write access there.
      
      - an unset FOAM_JOB_DIR variable is treated as "~/.OpenFOAM/jobControl",
        which can partially reduce environment clutter.
      
      - provide argList::noJobInfo() to conveniently suppress job-info on an
        individual basis for short-running utilities (eg, foamListTimes) to
        avoid unneeded clutter.
      af49eaf6
  34. Mar 21, 2017
  35. Feb 23, 2017
  36. Feb 18, 2017
    • Henry Weller's avatar
      thermophysicalProperties: New base-class for liquidProperties and in the future gasProperties · d2be6454
      Henry Weller authored
      Description
          Base-class for thermophysical properties of solids, liquids and gases
          providing an interface compatible with the templated thermodynamics
          packages.
      
      liquidProperties, solidProperties and thermophysicalFunction libraries have been
      combined with the new thermophysicalProperties class into a single
      thermophysicalProperties library to simplify compilation and linkage of models,
      libraries and applications dependent on these classes.
      d2be6454
  37. Feb 17, 2017
    • Henry Weller's avatar
      thermophysicalModels: Changed specie thermodynamics from mole to mass basis · c52e4b58
      Henry Weller authored
      The fundamental properties provided by the specie class hierarchy were
      mole-based, i.e. provide the properties per mole whereas the fundamental
      properties provided by the liquidProperties and solidProperties classes are
      mass-based, i.e. per unit mass.  This inconsistency made it impossible to
      instantiate the thermodynamics packages (rhoThermo, psiThermo) used by the FV
      transport solvers on liquidProperties.  In order to combine VoF with film and/or
      Lagrangian models it is essential that the physical propertied of the three
      representations of the liquid are consistent which means that it is necessary to
      instantiate the thermodynamics packages on liquidProperties.  This requires
      either liquidProperties to be rewritten mole-based or the specie classes to be
      rewritten mass-based.  Given that most of OpenFOAM solvers operate
      mass-based (solve for mass-fractions and provide mass-fractions to sub-models it
      is more consistent and efficient if the low-level thermodynamics is also
      mass-based.
      
      This commit includes all of the changes necessary for all of the thermodynamics
      in OpenFOAM to operate mass-based and supports the instantiation of
      thermodynamics packages on liquidProperties.
      
      Note that most users, developers and contributors to OpenFOAM will not notice
      any difference in the operation of the code except that the confusing
      
          nMoles     1;
      
      entries in the thermophysicalProperties files are no longer needed or used and
      have been removed in this commet.  The only substantial change to the internals
      is that species thermodynamics are now "mixed" with mass rather than mole
      fractions.  This is more convenient except for defining reaction equilibrium
      thermodynamics for which the molar rather than mass composition is usually know.
      The consequence of this can be seen in the adiabaticFlameT, equilibriumCO and
      equilibriumFlameT utilities in which the species thermodynamics are
      pre-multiplied by their molecular mass to effectively convert them to mole-basis
      to simplify the definition of the reaction equilibrium thermodynamics, e.g. in
      equilibriumCO
      
          // Reactants (mole-based)
          thermo FUEL(thermoData.subDict(fuelName)); FUEL *= FUEL.W();
      
          // Oxidant (mole-based)
          thermo O2(thermoData.subDict("O2")); O2 *= O2.W();
          thermo N2(thermoData.subDict("N2")); N2 *= N2.W();
      
          // Intermediates (mole-based)
          thermo H2(thermoData.subDict("H2")); H2 *= H2.W();
      
          // Products (mole-based)
          thermo CO2(thermoData.subDict("CO2")); CO2 *= CO2.W();
          thermo H2O(thermoData.subDict("H2O")); H2O *= H2O.W();
          thermo CO(thermoData.subDict("CO")); CO *= CO.W();
      
          // Product dissociation reactions
      
          thermo CO2BreakUp
          (
              CO2 == CO + 0.5*O2
          );
      
          thermo H2OBreakUp
          (
              H2O == H2 + 0.5*O2
          );
      
      Please report any problems with this substantial but necessary rewrite of the
      thermodynamic at https://bugs.openfoam.org
      
      Henry G. Weller
      CFD Direct Ltd.
      c52e4b58
  38. Jan 26, 2017