Commit Graph

21860 Commits

Author SHA1 Message Date
Mark Olesen
cacbcd98d9 SUBMODULE: minor catalyst and cfmesh updates 2018-12-04 01:40:54 +01:00
Mark Olesen
5252c70b46 STYLE: add OpenFOAM/include directory in CMakeLists
- eg for foamVersion.H
2018-12-04 01:38:46 +01:00
Andrew Heather
f3488c1220 ENH: writeFile - add option to (not)use user time. Fixes #1078 2018-12-03 16:58:40 +00:00
Andrew Heather
a8ff5b10e8 COMP: Resolved compiler warnings 2018-12-03 16:46:24 +00:00
Andrew Heather
798ede77ec ENH: Extended atmospheric BCs to use PatchFunction1s 2018-12-03 15:34:22 +00:00
Andrew Heather
8dc295bf01 ADMIN: Updated COPYING file 2018-12-03 15:33:45 +00:00
Andrew Heather
31a439dc99 ENH: freestream BC: allow inlet value to be specified by another patch
The freestreamFvPatchField previously employed a fixed value when supplying
the inlet values.  This commit extends the BC so that users can use another
patch to supply the values via the new freestreamBC entry, e.g. to set the
velocity to an atmospheric boundary layer profile:

    inlet
    {
        type            freestream;
        freestreamBC
        {
            type            atmBoundaryLayerInletVelocity;
            flowDir         (1 0 0);
            zDir            (0 0 1);
            Uref            20;
            Zref            20;
            z0              uniform 0.1;
            zGround         uniform 935;
        }
    }

The earlier specification is also maintained for backwards compatibility, e.g.

    inlet
    {
        type            freestream;
        freestreamValue uniform (300 0 0);
    }
2018-12-03 15:27:42 +00:00
Mark Olesen
b8c257d6ad CONFIG: adjustments to environment
- provide default WM_DIR if not already set, to improve robustness if a
  reduced environment is used

- add etc/ to WM_PROJECT_SITE search. This makes the site directory
  structure consistent with the OpenFOAM structure.
  Eg,

      WM_PROJECT_SITE/etc/..
      WM_PROJECT_SITE/bin/..
      WM_PROJECT_SITE/platforms/..

- Don't set/export WM_OSTYPE.  The default is POSIX and is properly
  defaulted throughout, including in CMakeLists-OpenFOAM.txt (also for
  Catalyst)
2018-12-03 09:50:48 +01:00
mattijs
e917586574 ENH: triSurfaceMesh: improved error message. 2018-12-03 10:33:00 +00:00
mattijs
003e7ca06c ENH: leakpath: change format to ensight. 2018-11-29 09:19:40 +00:00
Mark Olesen
550e47629b ENH: configurable output temperature for externalCoupled mixed T BC (#1072)
- Uses the user-specified value for outputTemperature:

  {
      type  externalCoupledTemperature;
      outputTemperture  fluid;  // or wall;
  }

  Otherwises uses 'wall' as a default (for compatibility) and emits a
  warning.

  The T.out header now reflects the type of output. Eg,

     # Values: area Tfluid qDot htc
2018-12-02 17:35:48 +01:00
Mark Olesen
1116ba803a TUT: use defaultPatch for naming instead of explicit Default_Boundary_Region
- tutorials based on squareBend used Default_Boundary_Region explicitly
  defined since they predated the defaultPatch renaming (2008).
  The name 'Default_Boundary_Region' was for convenience as the default
  name when converting to PROSTAR or CCM formation, but can now be
  changed to something more generic.

- define wall boundary conditions for squareBend using a general regex
  to allow future splitting of wall types by name.
2018-12-02 11:14:04 +01:00
Mark Olesen
c5beee63f3 ENH: add isTrue function to RunFunctions
- check if the first argument corresponds to an OpenFOAM value for
  'true' (as per Switch).
  True == 't', 'y', 'true', 'yes', 'on'. Everything else is not true.

- when the first argument is '-dict', it initializes the value
  with a query via foamDictionary.
  Eg,
       isTrue -dict mydict -entry parallel

   ==> value=$(foamDictionary mydict -entry parallel -value)
       isTrue $value

   a missing entry is silently treated as false.

ENH: add getNumberOfPatchFaces function in RunFunctions

- simple extraction of nFaces from boundary file for given patch/region
2018-11-30 19:29:49 +01:00
Mark Olesen
f2e88645c2 STYLE: documentation typo 2018-12-02 13:39:12 +01:00
Mark Olesen
01a219119d STYLE: add some shell quoting in settings files 2018-11-29 23:30:11 +01:00
Mark Olesen
d587e2f03f ENH: append date to build info
- append the commit hash value with the commit date when creating
  the build string information and drop the version prefix.

  This provides an immediate overview of when the code was last
  changed. The prefixed version information can be dropped from
  the build string, since it is readily available in other forms.
2018-11-29 23:03:57 +01:00
Mark Olesen
4b7e11fc8b COMP: adjust headers for more detailed build info in the future (issue #1010)
- this splits a larger changeset for a gradual implementation
2018-11-29 21:01:01 +01:00
Mark Olesen
9e094f1f07 ENH: relocate WM_PROJECT_SITE default (issue #1050)
- was PREFIX/site, now PROJECT/site

  This avoids several issues when installing OpenFOAM in clusters
  without an intermediate OpenFOAM-specific installation prefix.

  The 'site' directory may have a reserved meaning in these situations
  and it is undesirable to 'leak' upwards into the parent directory to
  look for configuration files.

  Placing the default within the project directory avoids this.
  Alternative locations can be given via the WM_PROJECT_SITE variable.
2018-11-29 18:04:44 +01:00
Mark Olesen
be46f96862 STYLE: adjust wording, file-layout
- comments in bashrc, cshrc.
- about controlDict names for allowSystemOperations
2018-11-29 16:53:02 +01:00
Mark Olesen
3f7ea92efa SUBMODULE: catalyst with so versioning 2018-11-29 12:48:50 +01:00
Mark Olesen
d45d7ca8c3 STYLE: adjust looping parameter for _foamEval 2018-11-29 12:45:45 +01:00
Mark Olesen
628b2445fc ENH: improve setup for paraview
- removed reliance on ParaView_INCLUDE_DIR variable for conveying the
  major.minor version information when compiling. This can be somewhat
  fragile and also adds variable that is an unnecessary when running
  (only used when compiling).

  Instead use `have_pvplugin_support` function in paraviewFunctions
  wmake script to determine the maj.min from the PV_PLUGIN_PATH
  since we have already defined the output path there with paraview
  maj.min numbering.

  Can now build with paraview from the operating system,
  provided that it has develop headers available.

      ParaView_VERSION=system

  In the etc/config.sh/paraview setup, the maj.min is taken from
  the corresponding `paraview --version` output and used when
  defining the PV_PLUGIN_PATH.

  During the build, the include path taken from `paraview-config`
  for a system installation, from the guess installation root
  of the paraview binary, or ParaView_DIR otherwise.

NB: using a system ParaView for building runTimePostProcessing is unsupported.

- these types of builds appear to have various library resolution issues
  (eg, libexpat not being loaded). Additionally, the build logic does
  not yet cover this type of use case.
2018-11-29 01:48:00 +01:00
Mark Olesen
e4b8fedeb1 ENH: do not foamCleanPath on system directories (issue #1102)
- skip /, /bin, /usr/bin ... as potential filters.
2018-11-28 19:19:10 +01:00
Mark Olesen
f69f9f7ff6 TUT: adjustments in multiRegionHeater tutorials
- missing 'g' file, improve file consistency (fields, dictionaries)
2018-11-28 15:02:41 +01:00
Mark Olesen
dd0487ac2a STYLE: typo in comments 2018-11-28 12:35:34 +01:00
Mark Olesen
41a03f3790 ENH: add regular expressions for reconstructPar, mapFieldsPar -fields option
- improved flexibility

- reconstruction of Lagrangian positions/fields now handled as a class
  for better modularity
2018-11-28 08:36:17 +01:00
Mark Olesen
b81420e524 ENH: additional variants of IOobjectList findObject()
- cfindObject() for const pointer access.

- getObject() for mutable non-const pointer access, similar to the
     objectRegistry::getObjectPtr()

- cfindObject(), findObject(), getObject() with template type access
  to also check the headerClassName.

  For example,

      cfindObject("U")  ->  good
      cfindObject<volVectorField>("U") -> good
      cfindObject<volScalarField>("U") -> nullptr

  This allows inversion of looping logic.

    1) Obtain the names for a particular Type

       for (const word& objName : objs.sortedNames<Type>())
       {
           const IOobject* io = objs[objName];
           ...
       }

    2) Use previously obtained names and apply to a particular Type

       for (const word& objName : someListOfNames)
       {
           const IOobject* io = objs.cfindObject<Type>(objName);
           if (io)
           {
               ...
           }
       }
2018-11-28 11:28:38 +01:00
Mark Olesen
7477459186 STYLE: const-correctness on IOobject* access
- foamToEnsight, foamToEnsightParts, profiling
2018-11-28 08:00:53 +01:00
Mark Olesen
29e1d9e982 Merge remote-tracking branch 'origin/develop' into develop 2018-11-27 16:59:08 +01:00
Mark Olesen
9065346a05 ENH: additional handling of questionable bad FOAM_EXT_LIBBIN values
- if FOAM_EXT_LIBBIN is unset and some scripts set this to /usr/lib*
  as a fallback (eg, to avoid an undefined value) this will cause a
  system library to be found before appropriate *_ARCH_PATH entry.

  This was noticed during a scotch compilation without third-party:
  resulting in the system library (/usr/lib64/libscotch.so) to be found
  instead of the SCOTCH_ARCH_PATH location
  (/usr/lib64/mpi/gcc/openmpi/lib64/).

  Simply changing the search order doesn't work for use, since we wish
  to retain a preference for any dynamic libraries discovered in a
  real FOAM_EXT_LIBBIN.

  Circumvent these issues by only taking libraries from
  FOAM_EXT_LIBBIN if it also points to a location within ThirdParty.
2018-11-27 12:23:11 +01:00
Mark Olesen
38d3a36c2d TUT: update use of foamToVTK 2018-11-27 11:26:24 +01:00
Mark Olesen
17b03ba1ea Merge remote-tracking branch 'origin/develop' into develop 2018-11-27 12:58:14 +01:00
Andrew Heather
8f858af6c8 ENH: chtMultiRegionFoam - updated construction of g field 2018-11-27 11:47:16 +00:00
Andrew Heather
32c174f349 TUT: Moved g files - see 9abe97bb7b 2018-11-27 11:46:49 +00:00
Andrew Heather
6bb7cd9e16 TUT: Added files missed during commit cab7820fb3 2018-11-27 11:41:34 +00:00
Mark Olesen
ad88c551f9 Merge remote-tracking branch 'vtk/feature-vtm' into develop 2018-11-27 11:23:37 +01:00
Mark Olesen
b5d4d59ff1 TUT: add Alltest for IO/dictionary
- runs in non-verbose mode to avoid spurious detection of FatalError
2018-11-27 11:11:47 +01:00
Mark Olesen
61c1aa161c CONFIG: remove unused FOAM_EXT_LIBBIN references 2018-11-27 08:45:07 +01:00
Mark Olesen
46e2e71f28 STYLE: update dictionary documentation for topoSources (#1060) 2018-11-27 08:32:27 +01:00
Mark Olesen
0dc206be02 ENH: add unique source keyword for shapeToCell (#1060)
- using 'shape', to avoid potential name clash with 'type' (action
  type) when used without an optional sourceInfo sub-dictionary
2018-11-27 07:48:03 +01:00
Andrew Heather
0498d4e743 COMP: fix for clang compiler bug (?) 2018-11-26 14:17:24 +00:00
Mark Olesen
820b63e0b2 CONFIG: bump API version number to 1811 to register recent changes 2018-11-26 15:14:01 +01:00
Mark Olesen
1905039d7b ENH: add non-const field access without triggering update counter (#1081)
- can now things like ref(), boundaryFieldRef(), primitiveFieldRef()
  with an optional argument that avoids triggering any update events

  Instead of

      Field<Type>& iF = const_cast<Field<Type>&>(fld.primitiveField());

  can now write

      Field<Type>& iF = fld.primitiveFieldRef(false);

  or simply

      auto& iF = fld.primitiveFieldRef(false);
2018-11-26 12:35:01 +01:00
Mark Olesen
d62b5251d6 ENH: improved argList output of compatibility options 2018-11-25 15:02:42 +01:00
Mark Olesen
f78aa8e342 ENH: added Ostream fill() methods and corresponding IOmanip setfill()
- useful when generating formatted output such as tables.
2018-11-25 14:17:55 +01:00
Mark Olesen
d8a55e46b6 ENH: align foamToEnsightParts internals with foamToEnsight
- add -region option and -fields filtering
2018-11-25 12:12:19 +01:00
Mark Olesen
b5432011fa ENH: improve option naming consistency in
- foamToVTK, foamToEnsight, foamToEnsightParts
2018-11-25 10:47:00 +01:00
Mark Olesen
a139543e9c ENH: add boundaryToCell, patchToCell topoSetCellSources (#1060)
- can be used, for example, to visualize all wall cells - for quality
  or other purposes - without requiring an intermediate faceSet for
  the selection. Request arising from pending merge !213.
2018-11-24 13:52:43 +01:00
Mark Olesen
ff18ab58c2 ENH: add 'use' action for parcel selection
- shortcut for "clear" + "add".

  At the end of the operation, only parcels matching that particular
  selection source will be used.
2018-11-24 13:34:02 +01:00
Mark Olesen
58dae2de43 ENH: improvements for dataCloud function object (issue #1044)
- now supports a parcel selection mechanism like vtkCloud,
  giving the ability to select a subset of parcels.
  For example, a given stride, or removal of parcels with a small
  diameter.

  Eg,
      dataCloud output Time: 3.2
      Applying parcel filtering to 994 parcels
      - add stride 4
      - subtract field U : (less 0.2)
      After filtering using 214/994 parcels

- add output precision control for dataCloud
2018-11-24 13:14:57 +01:00