Commit Graph

3822 Commits

Author SHA1 Message Date
Mark Olesen
8081fc7234 ENH: refactor cell selections into cellBitSet
- ensightWrite, vtkWrite, fv::cellSetOption

ENH: additional topoSet "ignore" action

- this no-op can be used to skip an action step, instead of removing
  the entire entry
2022-05-31 13:04:43 +02:00
Mark Olesen
520001bafb TUT: use "sources" for SemiImplicit in a few places
TUT: removed xxxCoeffs clutter for atmospheric sources

GIT: renamed liquidFilmStepWithSprinklers
2022-05-31 13:04:43 +02:00
Mark Olesen
d2e10bca40 ENH: support exprField specification for SemiImplicitSource
- this allows more flexibility when defining the location or intensity
  of sources.

  For example,

  {
      type            scalarSemiImplicitSource;
      volumeMode      specific;
      selectionMode   all;

      sources
      {
          tracer0
          {
              explicit
              {
                  type       exprField;

                  functions<scalar>
                  {
                      square
                      {
                          type square;
                          scale 0.0025;
                          level 0.0025;
                          frequency 10;
                      }
                  }

                  expression
                  #{
                      (hypot(pos().x() + 0.025, pos().y()) < 0.01)
                    ? fn:square(time())
                    : 0
                  #};
              }
          }
      }
  }

ENH: SemiImplicitSource: handle "sources" with explicit/implicit entries

- essentially the same as injectionRateSuSp with Su/Sp,
  but potentially clearer in purpose.

ENH: add Function1 good() method to define if function can be evaluated

- for example, provides a programmatic means of avoiding the 'none'
  function
2022-05-31 13:04:39 +02:00
Mark Olesen
937b4898ae ENH: geometric selection mode for cellSetOption
- similar to the geometric decomposition constraint,
  allows a compositing selection of cells based on topoSet sources
  which also include various searchableSurface mechanisms.

  This makes for potentially easier placement of sources without
  resorting to defining a cellSet.

ENH: support zone group selection for fv::cellSetOption and fa::faceSetOption
2022-05-27 15:40:39 +02:00
Mark Olesen
500c7047b2 TUT: remove superfluous 'sourceInfo' (topo sets)
- update annotated dicts, remove tabs

- use point1/point2 for cylinder sources
2022-05-27 14:10:31 +02:00
Kutalmis Bercin
d8f0858a0b TUT: cavity: add an example for the norm function object 2022-05-27 12:51:51 +01:00
sergio
e022e522ba ENH: Adding external heat to greyDiffusive BC and new ParticleDose FO
DOC: greyDiffusiveRadiationMixed: improve header documentation
2022-05-27 09:15:07 +00:00
Andrew Heather
5cb0dc9d8a ENH: Added new particleZoneInfo cloud function object.
Reports cloud information for particles passing through a specified cell
zone.

Example usage:

    cloudFunctions
    {
        particleZoneInfo1
        {
            type            particleZoneInfo;
            cellZone        leftFluid;

            // Optional entries
            //writer          vtk;
        }
    }

Results are written to file:
- \<case\>/postProcessing/lagrangian/\<cloudName\>/\<functionName\>/\<time\>

    \# cellZone        : leftFluid
    \# time            : 1.0000000000e+00
    \#
    \# origID    origProc    (x y z)    time0    age    d0    d    mass0    mass

Where
- origID : particle ID
- origProc : processor ID
- (x y z) : Cartesian co-ordinates
- time0 : time particle enters the cellZone
- age : time spent in the cellZone
- d0 : diameter on entry to the cellZone
- d : current diameter
- mass0 : mass on entry to the cellZone
- mass : current mass

If the optional \c writer entry is supplied, cloud data is written in the
specified format.

During the run, output statistics are reported after the cloud solution,
e.g.:

    particleZoneInfo:
        Cell zone                       = leftFluid
        Contributions                   = 257

Here, 'Contributions' refers to the number of incremental particle-move
contributions recorded during this time step. At write times, the output
is extended, e.g.:

    particleZoneInfo:
        Cell zone                       = leftFluid
        Contributions                   = 822
        Number of particles             = 199
        Written data to "postProcessing/lagrangian/reactingCloud1/

TUT: filter: add an example for the particleZoneInfo function object
2022-05-25 23:17:57 +00:00
Andrew Heather
8d90b16518 ENH: multiFieldValue - extended to operate on general function objects
- Previously, the multiFieldValue function object was limited to operate on
  lists of fieldValue function objects.
- Any function objects that generate results can now be used, e.g.

pressureAverage
{
    type    multiFieldValue;
    libs    (fieldFunctionObjects);

    operation   average;

    functions
    {
        inlet
        {
            type            surfaceFieldValue;
            operation       areaAverage;
            regionType      patch;
            name            inlet;
            fields          (p);

            writeFields     no;
            writeToFile     no;
            log             no;
            resultFields    (areaAverage(inlet,p));
        }
        outlet
        {
            type            surfaceFieldValue;
            operation       areaAverage;
            regionType      patch;
            name            outlet;
            fields          (p);

            writeFields     no;
            writeToFile     no;
            log             no;
        }
        average
        {
            type            valueAverage;
            functionObject  testSample1;
            fields          (average(p));

            writeToFile     no;
            log             no;
        }
    }
}

TUT: cavity: add an example for the multiFieldValue function object
2022-05-25 23:17:57 +00:00
mattijs
34ef9ae342 ENH: controlDict: include missing library.
With libs it can run with disallowGeneric
2022-05-25 15:31:39 +01:00
mattijs
d58b811030 ENH: TUT: misspelled patch name
(happened to fall back to the 'empty' boundary condition)
2022-05-25 13:12:38 +00:00
mattijs
69db18138d TUT: Cs: use PBiCGStab for tight tolerance 2022-05-25 13:12:38 +00:00
Andrew Heather
4f4d333539 TUT: liquidFilmFoam - corrected cylinder h boundary condition 2022-05-23 09:42:42 +01:00
Mark Olesen
525f77f8bb TUT: add constraint types for finiteArea tutorials
STYLE: accept '-proc' as shortcut in restore0Dir function
2022-05-10 21:16:09 +02:00
mattijs
8ee4efc64b ENH: checkMesh: weights on AMI patches. 2022-05-09 13:46:05 +01:00
Kutalmis Bercin
0a6e368289 TUT: airRecirculationRoom: update the tutorial 2022-04-29 19:59:41 +00:00
Ian Cowan
c323cbd35b TUT: verticalChannel: add limitTemperature to avoid negative temperatures (fixes #2391)
TUT: propeller: remove duplicate log entry (fixes #1967)

TUT: verticalChannelLTS: update input to avoid runtime errors (fixes #2426)

TUT: Keyword updates
2022-04-29 19:55:44 +00:00
Mark Olesen
a4ef891594 COMP: missing linkage, unneeded linkage
- dynamicMesh, finiteVolume, regionFaModels, thermophysicalProperties
2022-04-29 13:26:36 +02:00
sergio
8b50f8db25 BUG: Correct treatment of contactAngleForce near boundaries 2022-04-14 11:09:11 -07:00
mattijs
6dac06dd38 ENH: solidFoam: allow time-step control. Fixes #2415. 2022-04-07 13:57:21 +01:00
Andrew Heather
7ad164d535 TUT: Keyword updates 2022-03-24 14:07:16 +00:00
mattijs
aa9e870f28 STYLE: cpuCabinet: remove excess entries 2022-03-23 17:37:03 +00:00
mattijs
9c7d265e4b ENH: distributedTriSurfaceMesh: work with flipped shells. Fixes #2405
Two problems:
- flipping inside snappyHexMesh is not done in a parallel
consistent way. So e.g. the octree-cached inside/outside information
has already been calculated. For now flipping of
distributedTriSurfaceMesh is disabled.
- octree-cached inside/outside information was using already
cached information and would only work for outwards pointing
volumes
2022-03-17 15:57:03 +00:00
Mark Olesen
fd2544b27e Merge remote-tracking branch 'origin/master' into develop 2022-03-13 22:37:22 +01:00
Mark Olesen
ed73bcbc33 TUT: update keywords, fix spurious annotated dictionary item (#2401) 2022-03-13 22:34:57 +01:00
Mark Olesen
8a7221cf50 TUT: update tutorials to use dictionary-style sets
- can now specify sampled sets as dictionary entries instead of a list
  entry.
    can now use:  sets { ... }
    instead of:   sets ( ... );

  This is similar to sampled surfaces and makes it easier to
  manage with dictionary manipulation tools.

TUT: update to use writeTime instead of outputTime
2022-03-10 19:45:20 +01:00
mattijs
8a9ae839ce ENH: snappyHexMesh: leak closure testcase 2022-03-10 15:50:46 +00:00
mattijs
5e2d8d6ed2 ENH: snappyHexMesh: multi-stage layer addition, automatic hole closure
Automatic hole closure:
- introduces 'holeToFace' topoSet source
- used when detecting a 'leak-path'
- creates additional baffles to close the leak

Multi-stage layer addition:
- Can add layers in multiple passes

See issues: #2403, #2404
2022-03-10 14:20:07 +00:00
mattijs
fcd5373a7f ENH: interFoam: added mesh motion. Fixes #2395. 2022-03-07 15:24:34 +00:00
Mark Olesen
e11fde900c ENH: direct support for broadcast of bitSet
- the internal data are contiguous so can broadcast size and internals
  directly without an intermediate stream.

ENH: split out broadcast time for profilingPstream information

STYLE: minor Pstream cleanup

- UPstream::commsType_ from protected to private, since it already has
  inlined noexcept getters/setters that should be used.

- don't pass unused/unneed tag into low-level MPI reduction templates.
  Document where tags are not needed

- had Pstream::broadcast instead of UPstream::broadcast in internals
2022-03-04 17:49:23 +00:00
Mark Olesen
2b54d86152 ENH: improve processor topology handling in zoneDistribute (#2371)
- now largely encapsulated using PstreamBuffers methods,
  which makes it simpler to centralize and maintain

- avoid building intermediate structures when sending data,
  remove unused methods/data

TUT: parallel version of depthCharge2D

STYLE: minor update in ProcessorTopology
2022-03-04 17:49:23 +00:00
mattijs
3c2db201b7 BUG: createPatch: make tutorial run parallel. See #2386 2022-03-02 14:49:50 +00:00
mattijs
a74b9ca763 ENH: createPatch: handle multiple regions. Fixes #2386
Also #1361.
2022-03-02 13:14:30 +00:00
Mark Olesen
1a55829ef9 ENH: add fieldLevel handling for surface writers (#2382)
- this can be used to apply a uniform field level to remove from
  a sampled field. For example,

      fieldLevel
      {
          "p.*"   1e5;        // Absolute -> gauge [Pa]
          T       273.15;     // [K] -> [C]
          U       #eval{ 10/sqrt(3) };  // Uniform mag(U)=10
      }

  After the fieldLevel has been removed, any fieldScale is applied.
  For example

      fieldScale
      {
          "p.*"   0.01;       // [Pa] -> [mbar]
      }

  The fieldLevel for vector and tensor fields may still need some
  further refinement.
2022-02-28 19:08:39 +01:00
Mark Olesen
cc65f5f0f0 TUT: coded functionObject called on execute instead of write
- generated too much output that also missed topology changes,
  which prevents proper post-processing
2022-02-18 10:41:17 +01:00
Mark Olesen
df18b8bb3c DEFEATURE: remove alpha-field support (partly broken) from gltf output
- when used with *any* alphaField and normalised (the usual case)
  would largely give a 0-1 corresponding to the min/max of the first
  component, but could also yield negative values.

- if the alpha field corresponds identically to colour field, it is
  readily possible to combine as into RGBA sequences. However, if the
  fields are different it potentially means referencing an opacity
  field that has not yet been sampled.  This impedes using the format
  for a streaming sampler without additional overhead and/or rewriting
  the alpha channel later.
2022-02-10 19:28:51 +01:00
Mark Olesen
0511aebd86 ENH: add probes sampleOnExecute option (#2358)
- supports sampling/probing of values to obtain min/max/average/size
  at execution intervals without writing any output or generating
  output directories.

- 'verbose' option for additional output
2022-02-10 19:28:51 +01:00
mattijs
13b6898661 ENH: tutorials: added dummy fv* files
(createPatch now operates on fvMesh)
2022-02-10 13:45:21 +00:00
Mark Olesen
b874dc74b0 DEFEATURE: remove support for jplot (defunct) 2022-01-20 17:13:28 +01:00
Andrew Heather
f5eace394b DOC: Corrected online doxygen links. Fixes #2326 2022-01-14 14:33:45 +00:00
sergio
7825d24de1 TUT: Adjusting settings for hPoly thermo for phase change 2022-01-11 14:14:09 +00:00
Kutalmis Bercin
48562b8649 BUG: KinematicReynoldsNumber: enable cloud function object (fixes #2317)
TUT: hopperEmptying: add an example for KinematicReynoldsNumber
DOC: ThermoReynoldsNumber/KinematicReynoldsNumber: correct the usage examples
2022-01-11 11:24:24 +01:00
Andrew Heather
a2014242cf RELEASE: Updated headers for v2112 2021-12-20 14:18:01 +00:00
sergio
af864cdcd1 ENH: Adding option mesh flux correction to solidFoam 2021-12-16 11:59:36 -08:00
Andrew Heather
f64e2864f7 TUT: Lagrangian - added example showing moving injector 2021-12-15 10:46:34 +00:00
Andrew Heather
0260643c67 ENH: PatchInjectionModel - added new parcel initial velocity options
The parcel initial velocity can now be set using the new `velocityType`
entry, taking one of the following options:

- fixedValue   : (default) same as earlier versions, requires U0
- patchValue   : velocity set to seed patch face value
- zeroGradient : velocity set to seed patch face adjacent cell value

Example usage:

        model1
        {
            type            patchInjection;
            massTotal       1;
            SOI             0;
            parcelBasisType mass;
            patch           cylinder;
            duration        10;
            parcelsPerSecond 100;
            velocityType    patchValue;
            //velocityType    zeroGradient;
            //U0              (-10 0 0);
            flowRateProfile constant 1;
            sizeDistribution
            {
                type        normal;
                normalDistribution
                {
                    expectation 1e-3;
                    variance 1e-4;
                    minValue 1e-5;
                    maxValue 2e-3;
                }
            }
        }

See the new $FOAM_TUTORIALS/lagrangian/kinematicParcelFoam/spinningDisk tutorial
2021-12-15 10:46:34 +00:00
Kutalmis Bercin
208aee14af TUT: liquidFilmStepWithSprinkles: add shearStress entry 2021-12-15 10:17:04 +00:00
Kutalmis Bercin
c47eb2fe80 TUT: replace turbulentTemperatureCoupledBaffleMixed boundary condition
The turbulentTemperatureCoupledBaffleMixed boundary condition
has been superseded by the turbulentTemperatureRadCoupledMixed condition

TUT: injectorPipe: remove an unused entry

TUT: waveMakerFlap: remove uncompressed entry
2021-12-15 10:17:04 +00:00
Kutalmis Bercin
beea7ba62f TUT: nonOrthogonalChannel/skewnessCavity: migrate under verificationAndValidation
TUT: nonOrthogonalChannel: refactor productionRate computation (fixes #2285)
2021-12-15 10:17:04 +00:00
Kutalmis Bercin
4c2728a45c ENH: rigidBodyMotion: new Function1-type accelerationRelaxation
TUT: floatingObject: add Function1-type accelerationRelaxation example
2021-12-15 10:17:04 +00:00
Kutalmis Bercin
18bc876c93 ENH: rhoCentralFoam: add dynamic-mesh motion capabilities
ENH: discard rhoCentralDyMFoam by merging it with rhoCentralFoam
2021-12-15 10:15:37 +00:00
Andrew Heather
fd257cb011 TUT: propeller - added example use of propellerInfo function object 2021-12-14 16:45:03 +00:00
Johan Roenby
5fa2bc030d TUT: discInConstantPorousFlow/porousDamBreak: new tutorials for interIsoFoam
TUT: create verificationAndValidation/multiphase
     directory and migrate StefanProblem into this
2021-12-13 17:09:10 +00:00
Johan Roenby
b7af3ff891 TUT: interIsoFoam: remove redundant entries 2021-12-13 17:09:10 +00:00
Tobias Holzmann
97081969b4 INT: comfortHotRoom: new tutorial for age and comfort function objects 2021-12-13 17:04:53 +00:00
mattijs
644bd11a93 BUG: GAMG: manual processorAgglomerator incorrect input. See #2281. 2021-12-13 14:24:53 +00:00
mattijs
7da2a5e096 ENH: redistributePar: reconstruct mode in collated. Fixes #2194 2021-12-10 15:24:04 +00:00
Mark Olesen
8d4ad0438d ENH: add exprField function object
- provides a simple means of defining/modifying fields. For example,

  ```
  <name1>
  {
      type    exprField;
      libs    (fieldFunctionObjects);
      field   pTotal;

      expression  "p + 0.5*(rho*magSqr(U))";
      dimensions  [ Pa ];
  }
  ```
  It is is also possible to modify an existing field.
  For example, to modify the previous one.
  ```
  <name2>
  {
      type    exprField;
      libs    (fieldFunctionObjects);
      field   pTotal;
      action  modify;

      // Static pressure only in these regions
      fieldMask
      #{
          (mag(pos()) < 0.05) && (pos().y() > 0)
       || cellZone(inlet)
      #};
      expression  "p";
  }
  ```

  To use as a simple post-process calculator, simply avoid storing the
  result and only generate on write:
  ```
  <name2>
  {
      store            false;
      executionControl none;
      writeControl     writeTime;
      ...
  }
  ```
2021-12-10 14:46:21 +00:00
Mark Olesen
a6cbfcb9ba STYLE: qualify expression debug flags
- for debug/tracing handle the following keywords:

   * debug.driver   (was "debugBaseDriver")
   * debug.scanner  (was "debugScanner")
   * debug.parser   (was "debugParser")
2021-12-10 14:46:21 +00:00
Mark Olesen
510ffb3322 ENH: code reduction, improvements for expressions
- literal lookups only for expression strings

- code reduction for setExprFields.

- changed keyword "condition" to "fieldMask" (option -field-mask).
  This is a better description of its purpose and avoids possible
  naming ambiguities with functionObject triggers (for example)
  if we apply similar syntax elsewhere.

BUG: erroneous check in volumeExpr::parseDriver::isResultType()

- not triggered since this method is not used anywhere
  (may remove in future version)
2021-12-10 14:46:21 +00:00
Andrew Heather
39f6618d3a TUT: counterFlowFlame2D - corrected CH4 fraction. Fixes #2292 2021-12-10 14:34:05 +00:00
mattijs
ee955b19e5 STYLE: snappyHexMeshDict: remove excess entries 2021-12-09 17:09:34 +00:00
Kutalmis Bercin
1fca0d8d23 TUT: icoReactingMultiphaseInterFoam: new tutorial oxideFormation
Co-authored-by: sergio <s.ferraris@opencfd.co.uk>
2021-12-09 17:04:10 +00:00
Kutalmis Bercin
142fc55f44 TUT: icoReactingMultiphaseInterFoam: correct the directory name 2021-12-09 17:04:10 +00:00
sergio
b69ceb54a7 ENH: Adding shear stress to the film from the wall function
TUT: inclinedPlaneFilm/pitzDailyWithSprinklers: add shearStress model
2021-12-09 17:01:46 +00:00
mattijs
9024441566 ENH: iglooWithFridges: demonstrate threaded, collated handling. See #2194. 2021-12-09 16:33:26 +00:00
Mark Olesen
c3c23c3cb2 ENH: allow top-level definition of function object name scoping
- this refines commit c233961d45, which added prefix scoping.

  Default is now off (v2106 behaviour).

  The 'useNamePrefix' keyword can be specified on a per function basis
  or at the top-level of "functions".

  ```
      functions
      {
          errors          warn;
          useNamePrefix   true;

          func1
          {
              type  ...;
              useNamePrefix   false;
          }

          func2
          {
              type  ...;
              // Uses current default for useNamePrefix
          }
      }
  ```
2021-12-09 15:42:51 +01:00
Vaggelis Papoutsis
f6dfa76f6d TUT: updated the motorbike tutorial
to also compute smoothed sensitivity maps
2021-12-09 09:18:02 +00:00
Kutalmis Bercin
ada3d1c77e TUT: nonOrthogonalChannel: new non-orthogonality test case 2021-12-08 12:07:26 +00:00
Kutalmis Bercin
cac0bf856b TUT: skewnessCavity: new skewness test case 2021-12-08 11:05:06 +00:00
Andrew Heather
41b30af01a TUT: pisoFoam/RAS/cavity - updated FOreference 2021-12-08 10:00:46 +00:00
Andrew Heather
34b4770949 TUT: Added glTF export example for field and track data 2021-12-06 12:26:49 +01:00
Mark Olesen
9a5125111e ENH: add coded Function1 (#2282)
- update coded templates with qualified names

GIT: add in missing PatchFunction1 constant() method

- was missed in a previous commit
2021-12-03 20:56:10 +01:00
Mark Olesen
e6f4ae927a LINT: script not marked as bash-specific
CONFIG: cleanup additional build-related env variables
2021-12-03 15:32:37 +01:00
Mark Olesen
f7c7fa94a3 ENH: add Function1 constant() member
- marks if the value is considered to be independent of 'x'.
  Propagate into PatchFunction1 instead ad hoc checks there.

- adjust method name in PatchFunction1 to 'whichDb()' to reflect
  final changes in Function1 method names.

ENH: add a Function1 'none' placeholder function

- This is principally useful for interfaces that expect a Function1
  but where it is not necessarily used by a particular submodel.

TUT: update Function1 creation to use objectRegistry
2021-12-03 15:32:37 +01:00
mattijs
6abbcb3eac BUG: GAMG: processorAgglomerator crashes. Fixes #2281.
Problem was extending the storage, copying the
original contents.
2021-11-29 14:44:24 +00:00
Andrew Heather
889bc171d9 TUT: Added example showing use of functionObject result lookup from a Function1 2021-11-26 11:22:36 +00:00
Mark Olesen
1804d3fed5 ENH: additional #word and #message dictionary directives (#2276)
- use `#word` to concatenate, expand content with the resulting string
  being treated as a word token. Can be used in dictionary or
  primitive context.

  In dictionary context, it fills the gap for constructing dictionary
  names on-the-fly. For example,

  ```
  #word "some_prefix_solverInfo_${application}"
  {
      type    solverInfo;
      libs    (utilityFunctionObjects);
      ...
  }
  ```

  The '#word' directive will automatically squeeze out non-word
  characters. In the block content form, it will also strip out
  comments. This means that this type of content should also work:

  ```
  #word {
     some_prefix_solverInfo
     /* Appended with application name (if defined) */
     ${application:+_}  // Use '_' separator
     ${application}     // The application
  }
  {
      type    solverInfo;
      libs    (utilityFunctionObjects);
      ...
  }
  ```
  This is admittedly quite ugly, but illustrates its capabilities.

- use `#message` to report expanded string content to stderr.
  For example,

  ```
  T
  {
     solver          PBiCG;
     preconditioner  DILU;
     tolerance       1e-10;
     relTol          0;
     #message "using solver: $solver"
  }
  ```
  Only reports on the master node.
2021-11-25 17:05:37 +01:00
Kutalmis Bercin
27f4cee78d TUT: interFoam: new tutorial for electrostatic deposition 2021-11-24 18:05:58 +00:00
sergio
d710bb6595 TUT: Rename tutorial 2021-11-22 09:44:46 -08:00
Mark Olesen
28800dcbbc LINT: fix permissions 2021-11-15 21:22:36 +01:00
mattijs
53e8f2a807 ENH: fvSolution: allow Function1 for all scalars
TUT: demonstrate some ramping

- compressible/rhoPimpleFoam/RAS/angledDuct
2021-11-10 17:28:52 +01:00
Kutalmis Bercin
f05dc09692 TUT: atmFlatTerrain: add an example for kL RANS model
BUG: atmFlatTerrain: fix input settings in the plot script
2021-11-08 18:56:59 +00:00
Mark Olesen
c9333a5ac8 ENH: improve flexibility of error, messageStream output
- provide a plain stream() method on messageStream to reduce reliance
  on casting operators and slightly opaque operator()() calls etc

- support alternative stream for messageStream serial output.
  This can be used to support local redirection of output.
  For example,

     refPtr<OFstream> logging;   // or autoPtr, unique_ptr etc

     // Later...
     Info.stream(logging.get())
        << "Detailed output ..." << endl;

  This will use the stdout semantics in the normal case, or allow
  redirection to an output file if a target output stream is defined,
  but still effectively use /dev/null on non-master processes.

  This is mostly the same as this ternary

      (logging ? *logging : Info())

  except that the ternary could be incorrect on sub-processes,
  requires more typing etc.

ENH: use case-relative names of dictionary, IOstream for FatalIOError

- normally yields more easily understandable information
2021-11-03 11:46:13 +01:00
Mark Olesen
b364a9e72c ENH: argList improvements
- argList::envExecutable() static method.
  This is identical to getEnv("FOAM_EXECUTABLE"), where the name of
  the executable has typically been set from the argList construction.

  Provides a singleton access to this value from locations that
  do not have knowledge of the originating command args (argList).
  This is a similar rationale as for the argList::envGlobalPath() static.

- additional argList::envRelativePath() static method.

- make -dry-run handling more central and easier to use by adding into
  argList itself.

STYLE: drop handling of -srcDoc (v1706 option)

- replaced with -doc-source for 1712 and never used much anyhow
2021-11-03 11:38:21 +01:00
Mark Olesen
851be8ea33 ENH: use consistent naming when toggling exception throwing on/off 2021-11-02 21:14:41 +01:00
Mattijs Janssens
227b3976ba BUG: collated: threaded writing accesses out-of-scope. Fixes #2257. 2021-11-02 14:26:30 +00:00
Mark Olesen
52be5d0428 TUT: use mergeType points for wedge geometries (#2241) 2021-10-21 15:31:11 +02:00
Mark Olesen
3e026783ab TUT: update keywords, create finiteArea in parallel 2021-10-18 15:30:51 +02:00
Mark Olesen
fcd7423fa8 CONFIG: add date and paths information for tutorial Allrun script
STYLE: replace short-circuit Allrun script with Alltest
2021-09-22 17:42:21 +02:00
mattijs
851cf11c0a BUG: iglooWithFridges: consistent collated handling. Fixes #2194. 2021-09-01 15:49:30 +01:00
sergio
b826e23d2f TUT: Rename tutorial scripts to Allrun 2021-08-06 11:15:31 -07:00
Bas Nieuwboer
c64c312bae TUT: hopper: parameterise blockMeshDict content (#2134) 2021-08-04 09:23:20 +00:00
Matej Forman
d9b200af28 TUT: rotatingFanInRoom: perturb locationInMesh (fixes #2162) 2021-08-04 09:15:19 +00:00
Sergio Ferraris
53af23b9fb Implicit treatment of coupled boundary conditions 2021-08-03 20:08:49 +00:00
Mark Olesen
9d26b25c46 TUT: multi-world tutorial setup with circular connectivity 2021-07-28 16:21:14 +02:00
Mark Olesen
a530b505ed TUT: replace m4 versions of angledDuct blockMeshDict with native forms
- dictionary parameters to change the bend angle

- blockMesh transform parameters to allow different orientations
2021-07-28 13:14:44 +02:00
Mark Olesen
29acee5a50 TUT: use new blockMesh support (faces, transforms) 2021-07-28 13:14:44 +02:00
Mark Olesen
e2be2289a1 ENH: finer granularity for CleanFunctions
- separate handling of auxiliary files vs time directories

- restore0Dir: avoid removing 0/ if 0.orig/ does not exist
2021-07-28 10:02:27 +02:00
Mark Olesen
847b61d1f9 GIT: fix some merge and edit rubbish 2021-07-28 10:02:27 +02:00
sergio
1f3c35841f ENH: Updating tutorials for finite area 2021-07-16 16:38:06 +00:00
sergio
7d8dba564c TUT: heatTransfer: new tutorial for thermalShellModel 2021-07-16 16:38:06 +00:00
sergio
5b21050a0b TUT: incompressible/lagrangian: new tutorials for surfaceFilmModel 2021-07-16 16:38:06 +00:00
sergio
a9aa6cb0db ENH: kinematicParcelFoam: new solver and tutorial
The original thermoSurfaceFilm sub-models were divided between kinematicSurfaceFilm and thermoSurfaceFilm in order to use the surfaceFilm model in a kinematicCloud.

The film interaction models are now in a kinematicSurface class which can be used in a kinematic cloud adding constant thermal properties (p and T) for some sub-models, e.g. drySplashInteraction/wetSplashInteraction.

pRef and Tref were added to the kinematicSurfaceFilm as entry to the regionFilm when used with a kinematic cloud.

In the finite area surface film model Tref, pRef are stored in filmSubModelBase.

TUT: kinematicParcelFoam: new tutorial pitzDailySprinkles
2021-07-16 16:38:06 +00:00
Mark Olesen
aca366d293 TUT: replace remaining templated thermoType
TUT: some simplification for multiWorld test

STYLE: remove some editor junk
2021-07-15 16:47:22 +02:00
Andrew Heather
e3796745ed CONFIG: Updated headers to v2106
Minor clean-up
2021-06-28 09:14:42 +01:00
sergio
6101272133 ENH: Adding subMesh option to momentumError and div FOs
1) Adding subMesh capabilities to momentumError and div FOs.
	- A subMesh is created from cellZones.
	- The operators (div, etc) are only calculated in the subMesh.

2) Optionally, halo cells can be added to the cellZones.

3) New helper class to handle the subMesh creation and field mapping.
2021-06-23 08:11:12 +00:00
Kutalmis Bercin
6eae29aa1d TUT: reduce the number of postProcessing files 2021-06-22 22:41:41 +00:00
Kutalmis Bercin
57304aeaf6 TUT: multiphase: replace boatAndPropeller with rigidBodyHull 2021-06-22 22:41:41 +00:00
sergio
7d42501107 ENH: Adjusting reactingEuler settings in tutorials 2021-06-22 14:23:54 -07:00
Mark Olesen
e2148b587e CONFIG: inline _foamEval within <etc/config.sh/setup>
- previously a function (unlike the csh version) but since bashrc and
  setup have been split -> replace with inline definition

STYLE: formatting/wording for openfoam starters

TUT: simplify controlDict modification, add default substitution

ENH: accept '/' for end-of-options terminator (etc/openfoam)

- makes the application or service more apparent.
  * eg.  /usr/bin/openfoam / blockMesh
  * vs.  /usr/bin/openfoam -- blockMesh

  Accept lone '-' as the end-of-options terminator, as per bash

- Adjust handling of openfoam '-c' option to flag that a command-string
  will appear, but continue with option parsing.
  Consistent with bash definition.
2021-06-18 17:14:22 +02:00
Mark Olesen
096b9dc52e TUT: add parallel version for various squareBend cases
- adjust commented-out evaluation to avoid warnings.

  With code like this
  ```
  #if 0
  nxin    #eval{ round($nxin / 5) };
  #endif
  ```

  The handling of the "#if 0 / #endif" clause uses the plain ISstream
  parser to tokenize. This means that the "round(" is parsed as a word
  with a mismatched closing ')', whereas the "#eval" parser will slurp
  everything in until the closing brace and send it off as a string
  to the expression parser.
2021-06-18 17:14:22 +02:00
Getnet Agegnehu
a3d90ae9b9 TUT: example of patch expressions (#2114) 2021-06-18 17:14:21 +02:00
Sergio Ferraris
775194bea1 TUT: new multiphase tutorial: damBreakPermeable 2021-06-17 18:21:25 +01:00
mattijs
9823ddd480 STYLE: createBafflesDict: not used. Built-in into blockMesh 2021-06-17 16:08:36 +01:00
mattijs
0110e69018 BUG: tutorial: missing writing of phi. Fixes #2124 2021-06-17 11:48:46 +01:00
mattijs
1f84dcbac6 ENH: blockMesh: avoid 'empty' for initial mesh. Fixes #2125. 2021-06-17 10:18:39 +01:00
Andrew Heather
af86d19ea5 ENH: Added new multiRegion function object
Wrapper that clones the supplied object for each region.

Simplifies the setup of identical post-processing requirements for
multi-region cases.
Applies the supplied function to all regions by default.

Example of function object specification:

    multiRegion
    {
        type    multiRegion;
        libs    (utilityFunctionObjects);
        ...

        function
        {
            // Actual object specification
            type    fieldMinMax;
            libs    (fieldFunctionObjects);
            fields  (<field1> .. <fieldN>);
        }

        // Optional entries
        regions     (region1 region2);
    }

    Where the entries comprise:
        Property   | Description                    | Reqd | Default
        type       | Type name: multiRegion         | yes |
        function   | Function object sub-dictionary | yes |
        regions    | List of region names           | no  | all
2021-06-16 13:44:50 +02:00
Andrew Heather
ea12bfdb0f ENH: new multiFieldValue function object
Computes a selected operation between multiple \c fieldValue function
    objects.

    The operation is applied to all results of each \c fieldValue object.

Note
    Each object must generate the same number and type of results.

Usage
    Minimal example by using \c system/controlDict.functions:

    multiFieldValue1
    {
        // Mandatory entries (unmodifiable)
        type            multiFieldValue;
        libs            (fieldFunctionObjects);

        // Mandatory entries (runtime modifiable)
        operation       subtract;

        // List of fieldValue function objects as dictionaries
        functions
        {
            region1
            {
                ...
            }
            region2
            {
                ...
            }

            ...

            regionN
            {
                ...
            }
        }

        // Optional (inherited) entries
        ...
    }

    where the entries mean:

      Property     | Description                         | Type | Req'd | Dflt
      type         | Type name: multiFieldValue          | word |  yes  | -
      libs         | Library name: fieldFunctionObjects  | word |  yes  | -
      operation    | Operation type to apply to values   | word |  yes  | -
      functions    | List of fieldValue function objects | dict |  yes  | -
    \endtable

    Options for the \c operation entry:

       add           | add
       subtract      | subtract
       min           | minimum
       max           | maximum
       average       | average

Deprecated fieldValueDelta

- The fieldValueDelta function object was originally written to compute the
difference between two fieldValue-type function objects. The multiFieldValue
object name better describes its purpose whilst being able to operate on an
arbitrary number of fieldValue-type objects.
2021-06-16 11:19:44 +02:00
Mark Olesen
b6e8768034 CONFIG: update compiler versions
TUT: add missing restore0Dir (finiteArea)

STYLE: doc spelling
2021-06-14 19:20:15 +02:00
Mark Olesen
2797a8be25 TUT: missing run-limit on tutorials/Alltest 2021-06-11 11:18:01 +02:00
Mark Olesen
239a7884a6 ENH: more flexible finiteArea patch selection (#2084)
- support wordRes for selecting patch names

- ownerPolyPatch specification is now optional, which simplifies input
  and also supports a faMesh spanning different patches but with a
  single boundary condition.

  Alternatively, can specify more granularity if required.

  ```
  polyMeshPatches  ( "top.*" );

  boundary
  {
      inlet1
      {
          type patch;
          ownerPolyPatch top1;    // <- specific to this portion
          neighbourPolyPatch inlet;
      }
      inlet2
      {
          type patch;
          ownerPolyPatch top2;    // <- specific to this portion
          neighbourPolyPatch inlet;
      }
      outlet
      {
          type patch;
          neighbourPolyPatch outflow;
      }
      bound
      {
          type symmetry;
          neighbourPolyPatch bound;
      }
  }
  ```
2021-06-10 09:25:00 +02:00
Mark Olesen
853010309d ENH: replace tutorials/AutoTest with bin/foamTestTutorial
- additional -serial/-parallel option:
  prefer Allrun-serial or Allrun-parallel if available

- optional -output=DIR to preserve output

ENH: report missing tutorials/ directory in RunFunctions
2021-06-10 08:38:20 +02:00
Kutalmis Bercin
b4724c37ad DOC: solverInfo FO: improve header-file documentation
- TUT: solverInfo FO: add an example to pisoFoam/cavity
2021-06-09 14:28:18 +00:00
Kutalmis Bercin
de9657dd20 TUT: finiteArea: clean up tutorials 2021-06-09 13:41:45 +00:00
Kutalmis Bercin
f5fe37114f TUT: turbulentDFSEMInlet: update DFSEM tutorials (fixes #2097) 2021-06-09 13:40:51 +00:00
Kutalmis Bercin
3384d37a9a TUT: basic, IO, preProcessing, VV: clean up tutorials
- TUT: mesh: add missing SnakeRiverCanyon files
- TUT: mesh: add missing cp source in a foamyHexMesh tutorial
2021-06-09 11:16:08 +01:00
Kutalmis Bercin
7788a1a01a TUT: sprayFoam: add examples for the new cloud function objects
- ReynoldsNumber (thermo)
- NusseltNumber
- HeatTransferCoeff
2021-06-08 20:34:28 +00:00
HenningScheufler
9dada5f3f2 ENH: geoVoF module has the capability to run AMR with load balancing
code style and quality improvements
renamed recon::centre to interfaceCentre.{groupName}
ranmed recon::normal to interfaceNormal.{groupName}
centre and normal field are not written by default
2021-06-08 20:25:53 +00:00
Kutalmis Bercin
ab5c7765c4 TUT: combustion: clean up tutorials 2021-06-08 20:17:19 +00:00
Kutalmis Bercin
e81cf778a1 TUT: incompressible: clean up tutorials 2021-06-08 20:15:47 +00:00
Kutalmis Bercin
91c1e8efe2 TUT: multiphase: clean up tutorials 2021-06-08 20:14:09 +00:00
Kutalmis Bercin
3a858ac682 TUT: mesh: clean up tutorials 2021-06-08 20:14:09 +00:00
Mark Olesen
e2c8b0b13f TUT: avoid xterm in mpi schema (multiWorld) 2021-06-07 17:24:54 +02:00
Mark Olesen
c2692e7c99 TUT: example of user access for Function1 2021-06-07 15:21:02 +02:00
Mark Olesen
b0891824fa ENH: improve codeTemplates
- meshTools include/library for many (most) coded items

- add PatchFunction1 include for coded BCs to provide ready access
  to Function1 and PatchFunction1
2021-06-07 09:48:21 +02:00
Mark Olesen
3e87a46498 ENH: multi-region support for foamToEnsight (#2080)
- additional finite-area support too.
2021-05-30 21:02:59 +02:00
Mark Olesen
830a217353 TUT: use system/ location instead of constant/faMesh/ for faMeshDefinition
- adjust surfactantFoam/planeTransport tutorial to have partial
  coverage of the plate by the finiteArea mesh.

  Depending on the decomposition, the outflow boundary may coincide
  with a processor patch (good for testing purposes).

- additional Allrun-parallel versions for targetted future behaviour
2021-05-27 21:04:55 +02:00
Kutalmis Bercin
7ce111809e TUT: compressible: clean up tutorials 2021-05-27 08:59:28 +00:00
Kutalmis Bercin
42bbd05992 TUT: SpalartAllmaras: add showcase for k/epsilon/omega estimation funcs
TUT: airfoil2D: clean up the tutorial case
2021-05-27 09:04:53 +01:00
Mattijs Janssens
4a87e2d0b4 INT: splineEdge: allowing usage in extrudeMesh. See #1983. 2021-05-26 12:22:24 +00:00
Kutalmis Bercin
f62a599eef TUT: heatTransfer: clean up tutorials 2021-05-26 11:35:49 +00:00
Mattijs Janssens
f44dbbc200 ENH: Support AMI for multi-world operation. Fixes #2099
Multi-world operation now supports AMI:

    // What to sample:
    sampleMode      nearestPatchFaceAMI;
2021-05-26 08:27:30 +00:00
Mark Olesen
ec81436cce TUT: generalize (parameterize) blockMeshDict for half-cylinder geometries
- profit from some of the recent modifications to parser expansion

TUT: adjust some #eval statements for less clutter
2021-05-19 17:33:25 +02:00
Mark Olesen
2dbabb242b ENH: namedDictionary for managing keyword/dictionary combinations
- reworked from the openfoam.org wordAndDictionary version.

Allows, for example, named entries in topoSet.
2021-05-19 17:13:24 +02:00
Mark Olesen
492d5cb645 ENH: support 'transform' specification for geometric decomposition
- can be used for block-like meshes that are not aligned with the global
  coordinate directions. Alternatively, for general testing purposes.

  Example,

    method  simple;
    coeffs
    {
        n       ( 2 2 2 );
        transform
        {
            origin  (-0.15 0.15 0);
            e1      (1 1 0);
            e3      (0 0 1);
        }
    }
2021-05-10 14:34:43 +02:00
Mark Olesen
56db12fca1 TUT: remove old metisCoeffs entries 2021-05-06 21:43:10 +02:00
Mark Olesen
399c21d76c ENH: adjustments for Function1/PatchFunction1
- additional debug information

- improve support for dictionary specification of constant, polynomial
  and table entries. These previously only worked properly for
  primitiveEntry, which causes confusion.

- extend table Function1 to include TableFile functionality.
  Simplifies switching and modifying content.
2021-04-26 17:09:39 +02:00
Kutalmis Bercin
2c74298891 TUT: DMD: update cylinder2D with new DMD functionalities 2021-04-26 09:20:25 +00:00
Kutalmis Bercin
881eeb0214 TUT: atmFlatTerrain: fix atmAmbientTurbSource value (#2031) 2021-04-26 09:20:25 +00:00
sergio
8878050ff9 BUG: Checking sum of multiComponent mixture species
Checking for the sum of species mass fraction in multiComponentMixture.
It can't be zero at the internal field or patches. A fatal error is thrown.

A warning was added if the mixture sum is different from one. In a
re-start the mass fraction can be slightly unbounded and new
normalization is required.
2021-04-22 11:22:58 -07:00
Mark Olesen
96a1b86fb9 ENH: consistency improvements for keyType and wordRe
- simplify compile/uncompile, reading, assignment

- implicit construct wordRe from keyType (was explicit) to simplify
  future API changes.

- make Foam::isspace consistent with std::isspace (C-locale)
  by including vertical tab and form feed

ENH: improve #ifeq float/label comparisons
2021-04-19 16:33:42 +00:00
mattijs
a9f8bc079f ENH: snappyHexMesh: block walk through other surfaces. 2021-04-19 09:22:28 +00:00
Andrew Heather
93befa4f63 ENH: surfaceNoise - added option to specify area-weighted|ensemble average 2021-04-01 13:04:01 +01:00
Kutalmis Bercin
16762e6d49 TUT: DNS, electromagnetics, financial, stressAnalysis: clean up tutorials 2021-03-31 10:14:42 +00:00
Kutalmis Bercin
82a24a39b0 ENH: solarLoad: enable time-dependent direct/diffuse irradiance
ENH: solarLoad, fvDOM: enable time-dependent spectralDistribution
DOC: solarLoad, fvDOM, solarCalculator: improve header documentation
TUT: solarLoadModel, solarDirectionModel: use new shorter entries
2021-03-31 10:13:08 +00:00
Kutalmis Bercin
2fa8e5fdf3 TUT: discreteMethods: cleanup tutorials 2021-03-24 13:16:45 +00:00
sergio
ad35fea763 ENH: new solvers: overCompressibleInterDyMFoam and overInterPhaseChangeDyMFoam
- overCompressibleInterDyMFoam: Overset solver for two compressible,
non-isothermal, immiscible fluids using a VOF (i.e. volume of fluid)
phase-fraction based interface capturing approach.
- overInterPhaseChangeDyMFoam: Overset solver for two incompressible,
isothermal, immiscible fluids with phase-change (e.g. cavitation) using
VoF (i.e. volume of fluid) phase-fraction based interface capturing approach.
- adds new tutorials:
  - multiphase/overCompressibleInterDyMFoam/compressibleTwoSimpleRotors
  - multiphase/overInterPhaseChangeDyMFoam/twoSimpleRotors

Signed-off-by: Kutalmis Bercin <kutalmis.bercin@esi-group.com>
2021-03-24 12:35:31 +00:00
mattijs
1c0714f9b8 STYLE: snappyHexMeshDict: indentation 2021-03-22 14:52:17 +00:00
sergio
2f4d864c85 ENH: Adding dynamic mesh functionality to icoReactingMultiphaseInterFoam 2021-03-18 11:47:18 -07:00
sergio
5c4d714b45 ENH: Update icoReactingMultiPhaseInterFoam tutorials 2021-03-18 11:47:17 -07:00
Mark Olesen
1ca99a2c94 ENH: improve dimensions handling for setExpr* utilities (#2014)
- new '-ascii' option to write in ASCII format instead of the
  controlDict setting. This can be useful when generating fields that
  should be parsed with other tools, or for visual inspection.

- correct mismatch of option names and lookups
2021-03-18 11:53:42 +01:00
Mark Olesen
cd1350a87f ENH: support preloading fields for setExpr* utilities (#2014)
- can use either command-line option "-load-fields" or dictionary
  entry "readFields" to specify field names to be preloaded.

  Essentially the same functionality as with a readFields function
  object but with a lot less typing.

- tutorial examples provided by Ryan Danks <ryan.danks@rwdi.com>
  illustrate using setExpr* utilities to calculate a quantity
  as a post-processing step.
2021-03-17 21:42:37 +01:00
sergio
ec609b90b8 STY: Clearing up code and updating tutrial 2021-03-17 09:07:26 +00:00
sergio
da1e6ea8d0 ENH: Improvement to overset that allows multiple motion solvers
to operate with overset

1) Adding zoneMotion to rigidBodyMotion
2) Introducing PID to prescribedRotation restraint
3) Making drivenLinearMotion read total displacement
4) When drivenLinearMotion is used sixDof and rigid-body solvers
   write total displacement
2021-03-17 09:07:26 +00:00
Mark Olesen
d15a396a6a TUT: add value entry for some uniformFixedValue bcs (#2014)
- generally OK to miss for easily evaluated functions, but highly
  misleading with expressions (where the evaluate may be invalid
  during construction).
2021-03-15 19:02:00 +01:00
mattijs
db343351f7 BUG: redistributePar: single-step. See #1211
- override casename, procesorCase flags to guarantee reconstructed
case to be written to the undecomposed directory
- alternative is to construct a Zero mesh on the undecomposed
runTime and add all other bits to that but that has not been
pursued
2021-03-15 08:31:10 +00:00
Kutalmis Bercin
86c1ecdf32 TUT: lagrangian: clean up tutorials 2021-03-12 11:40:02 +00:00
Mark Olesen
ce45a12918 TUT: improve parameterization of squareBend geometry
- orient blocks in global x/y/z.
  Provisioning for coarser/smaller geometries.
2021-03-08 17:31:18 +01:00
Mark Olesen
175d35de22 TUT: minor adjustments 2021-03-05 12:51:39 +01:00
Mark Olesen
1bb7afc7fe ENH: raw format with optional output for face area normals (#2003)
- the raw surface writer simply outputs x/y/z and field values.
  This additional flag allows recovery of some geometric information.

- optional user-specified output precision

Example,
```
formatOptions
{
    raw
    {
        normal      yes;
        precision   10;
    }
}
```
2021-02-17 13:36:16 +01:00
Mark Olesen
5f805b0592 TUT: add decomposeParDict for cavity
- useful for trivial tests
2021-01-15 15:06:06 +01:00
Andrew Heather
79e353b84e RELEASE: Updated version to v2012 2020-12-23 10:01:39 +01:00
Mark Olesen
c536c0fee5 TUT: use scale instead of convertToMeters 2020-12-23 09:21:14 +01:00
Andrew Heather
bdcc02cf64 TUT: added missing call to tutorial case 2020-12-22 12:15:06 +00:00
Mark Olesen
7bdb509494 TUT: adjust tutorials for test loop 2020-12-22 12:27:21 +01:00
Andrew Heather
48f8811896 ENH: Added new filmFlux function object
Calculates the mass flux for surface film models.

Example usage:

    filmFlux
    {
        type            filmFlux;
        writeControl    writeTime;
        result          myPhi; // optional
    }
2020-12-21 18:06:57 +00:00
Mark Olesen
bf3e9b442d TUT: additional sampling planes, iso-surfaces 2020-12-21 18:31:23 +01:00
sergio
73207dfcd7 BUG: Fixing cloud constructor for MPPICInterFoam 2020-12-20 19:24:12 -08:00
Mark Olesen
e9dcc59c4d STYLE: trim trailing space 2020-12-18 09:24:01 +01:00
Sergio Ferraris
06a0bf1868 TUT: Adding new MPPICDyMFoam and uncoupledKinematicParcelDyMFoam tutorials
STY: Style and header-content changes
2020-12-17 21:17:03 +00:00
Mark Olesen
7f17a71f9c ENH: make PDRsetField ground, outer patch names configurable
- previously hard-coded, now adjustable within PDRsetFieldsDict

    // Change some predefined patch names
    patchNames
    {
        ground      ground;
        outer       outer;
    }

ENH: additions to PDRutils, improve comments

- expose enumerated expansion names and gridControl (PDRblock).
  Not commonly needed, but useful to have access when defining
  other grid generators

TUT: update PDRsetFieldsDict and tutorials to use "ground"

- remove tutorial references to unused types and legacy obstacles

- use "ground" for the boundary conditions instead of "seaGround".
  Consistent with PDRblockMesh
2020-12-17 01:23:31 +01:00
Kutalmis Bercin
12efbd8965 TUT: airRecirculationRoom: add new reactingParcelFoam tutorial 2020-12-16 18:28:18 +00:00
Sergio Ferraris
3db12bbdef ENH: adding non-uniform rho to incompressible two-phase turbulent models
1) PhaseIncompressibleTurbulenceModel class was changed to use
   uniform alpha and non-uniform rho templates. This fits the need
   of incompressible two phase turbulence models.

2) A new type DPMIncompressibleTurbulenceModel was created for
   non-uniform alpha and uniform rho. It is  used in single phase flows
   in DPM solvers where alpha represents the volumen occupancy.

3) A new type incompressibleRhoTurbulenceModel  was created where
   non-uniform rho is allowed.

4) A new base templated turbulent class for two-phase VOF named
   VoFphaseTurbulentTransportModel was implemented which is created
   templating on PhaseIncompressibleTurbulenceModel and
   incompressibleRhoTurbulenceModel

5) In order to make the chnage to rho based VOF turbulence a help
   class was added incompressibleInterPhaseTransportModel templated
   on the mixing.
2020-12-16 17:57:45 +00:00
Kutalmis Bercin
0d21f248a9 BUG: volFieldValue FO: parallel/empty output (#1853 #1849)
TUT: volFieldValue FO: adds usage example
TUT: multiply FO: adds usage example
2020-12-16 17:09:06 +00:00
Kutalmis Bercin
e82956a9dc TUT: counterFlowFlame2D: add BilgerMixtureFraction FO 2020-12-15 08:55:13 +00:00
Mark Olesen
4fdeb3be83 COMP: remove 64-bit label ambiguity
COMP: fix SP/DP inconsistency in fvGeometryScheme

STYLE: rename polyMesh::updateGeom to polyMesh::updateGeomPoints

- avoids compiler complaints and potential masking of
  primitiveMesh::updateGeom / fvMesh::updateGeom

- mark argument as movable, since that is what is happening inside.

GIT: remove merge cruft

TUT: better clean on MPPICInterFoam
2020-12-11 21:37:54 +01:00
Mark Olesen
cf3d983b80 ENH: add treatment for PDRblockMesh outer region expansions (#1906)
// Treatment of the outer region
   outer
   {
       type        sphere;
       onGround    true;
       expansion   relative;

       ratios      1.1;

       size        3;
       nCells      10;
   }
2020-12-11 20:24:25 +00:00
Vaggelis Papoutsis
f7e4b374d9 TUT: added a tutorial showcasing the transformBox option
for the definition of the morphing box in volumetric B-Splines.
2020-12-11 17:22:44 +00:00
Vaggelis Papoutsis
d0b59a4529 TUT: updated the da entries for the multi-point, turbulent optimisations 2020-12-11 17:22:44 +00:00
Kutalmis Bercin
bcae4b7a4f TUT: Alltest: minor corrections (#1956) 2020-12-11 14:33:04 +00:00
Mattijs Janssens
31ecf0d732 ENH: cyclicACMI: optional scaling with PatchFunction1.
Added 'scale' parameter to cyclicACMI. Scales the amount of 'coupledness' (= mask). Allows opening/closing without mesh motion.
2020-12-11 10:35:06 +00:00
Mattijs Janssens
46dbfabd9d ENH: primitiveMesh: make geometry calculation runtime selectable
This adds a 'geometry' scheme section to the system/fvSchemes:

geometry
{
    type            highAspectRatio;
}

These 'fvGeometryMethod's are used to calculate
- deltaCoeffs
- nonOrthoCoeffs
etc and can even modify the basic face/cellCentres calculation.
2020-12-11 10:31:34 +00:00
Andrew Heather
9d765adaf4 ENH: Lagrangian - added new PatchInteractionFields cloud function object
Creates volume fields whose boundaries are used to store patch interaction
statistics.

Current field output per patch face:
- \<cloud\>\<model\>:count - cumulative particle hits
- \<cloud\>\<model\>:mass - cumuluative mass of hitting particles

Fields can be reset according to:
- none: fields are not reset
- timeStep: reset at each time step
- writeTime: reset at each write time

Usage

    patchInteractionFields1
    {
        type            patchInteractionFields;
        resetMode       writeTime;
    }
2020-12-10 17:25:40 +00:00
sergio
54ebe724ea ENH: Derivative of B in thermo.H (dKcdTbyKc) calculated from S and G instead of dGdT
Member function dKcdTbyKc in thermo.H is calculated from S and G at Pstd.
Thus dGdT was removed from the thermos.

- Add optional hRef, eRef and Tref as optional.

- Use new thermo to multiphase solver icoReactingMuliPhaseFoam

- Remove hRefConst and eRefConst thermos.

TUT: Updated tutorials
2020-12-10 13:40:13 +00:00
sergio
0dd91a9dc4 ENH: Adding tabulated transport and thermo.
TUT: multiphase/icoReactingMultiPhaseInterFoam/inertMultiphaseMultiComponent
2020-12-10 13:40:12 +00:00
sergio
97448c655d ENH: Using icoTabulated EoS and non-Newtonian laminar model 2020-12-10 13:40:12 +00:00
sergio
c3c4f30a55 ENH: adding generalizedNewtonian to laminar turbulence model
The generalizedNewtonian viscocity models were ported from
the org version and added to the laminar turbulence framework.

This allows use in compressible and incompressible solvers
through the turbulence dictionary under the laminar sub-dictionary.

The thermal laminar viscosity is taken from the thermo for solvers
that use thermo library or from the transportProperties dictionary
for incompressible solvers.

At the moment the option to include viscocity models through the
transportDict is still available.

The icoTabulated equation of state was ported from the org version.

STYLE: use 'model' instead of 'laminarModel' in tutorials
2020-12-10 13:40:12 +00:00
sergio
bc430ccdef ENH: New vibro-acoustic model suite
- New solver: `acousticFoam`
  - New base finite-area region class: `regionFaModel`
  - New base shell model classes:
    - `vibrationShellModel`
    - `thermalShellModel`
  - New shell models:
    - A vibration-shell model: `KirchhoffShell`
    - A thermal-shell model: `thermalShell`
  - New finite-area/finite-volume boundary conditions:
    - `clampedPlate`
    - `timeVaryingFixedValue`
    - `acousticWaveTransmissive`
  - New base classes for `fvOption` of finite-area methods: `faOption`
  - New `faOption`s:
    - `contactHeatFluxSource`
    - `externalFileSource`
    - `externalHeatFluxSource`
    - `jouleHeatingSource`
  - New tutorial: `compressible/acousticFoam/obliqueAirJet`

Signed-off-by: Kutalmis Bercin <kutalmis.bercin@esi-group.com>
2020-12-10 13:36:12 +00:00
sergio
348c2a87ad ENH: Adding dynamic mesh to solidFoam and tutorial 2020-12-09 15:17:45 +00:00
mattijs
df777ce3c6 ENH: waterCooler: new tutorial. 2020-12-09 15:17:45 +00:00
Mark Olesen
8ad61f8e9d ENH: optional innerRadius for searchable disk
- can be used directly, or in special cases like a searchable plane
  with a gap of things in the centre that are not to be sampled.
2020-12-08 15:32:50 +01:00
Mark Olesen
61dd6aa701 ENH: code consistency in sampling
TUT: dictionary form of surfaces instead of list
2020-12-08 13:18:38 +01:00
Kutalmis Bercin
1bc2ffad99 BUG: atm wall functions: fix double "value" entry issue (#1900)
STYLE: atm wall functions: use auto and bool types wherever possible
  TUT: atmosphericModels: changes for style consistency
2020-12-08 09:33:44 +00:00
Andrew Heather
74ada2aa7f TUT: New recycleParticles tutorial case
Shows an example of the new recyclePatchInteraction model
- particles that escape from the outlet are recycled back into the
  domain via the second inlet

Signed-off-by: Kutalmis Bercin <kutalmis.bercin@esi-group.com>
2020-12-04 13:40:28 +00:00
Mark Olesen
ab692caf7c ENH: support multiple weights on some field function objects (#1930)
- weight fields are combined by multiplication

  - volFieldValue:
    * 0-N scalar fields

  - surfaceFieldValue:
    * 0-N scalar fields
    * 0-1 vector fields

  In some cases this can be used to avoid creating additional
  fields.

      weightFields  (rho U);
  vs.
      derivedFields (rhoU);
      weightField   rhoU;
2020-11-30 13:59:10 +01:00
Mark Olesen
f8d08a805b ENH: additional handling for out-of-range sampling (#1891)
- when sampling onto a meshed surface, the sampling surface may be
  outside of the mesh region, or simply too far away to be considered
  reasonable.

  Can now specify a max search distance and default values for samples
  that are too distant.
  If a default value is not specified, uses Type(Zero).

  Eg,

      maxDistance     0.005;
      defaultValue
      {
          "p.*"   1e5;
          T       273.15;
          U       (-100 -100 -100);
      }
2020-11-30 13:59:10 +01:00
Mark Olesen
a947e9ddcf ENH: new sampled faceZones (#1874) 2020-11-30 13:59:10 +01:00
Mark Olesen
6cf8151817 ENH: support surfaceFieldValue on multiple faceZones or patches (#1874)
- additional "names" entry to specify a word/regex list of selections
  For example,
  {
      type    patch;
      name    inlets;
      names   ("inlet_[0-9].*" inlet);
  }

- if "names" exists AND contains a literal (non-regex) that can be used
  as a suitable value for "name", the "name" entry becomes optional.
  For example,
  {
      type    patch;
      names   ("inlet_[0-9].*" inlet);

      // inferred name = inlet
  }

- reduce some overhead in surfaceFieldValue

TUT: surfaceFieldValue on patches : reactingParcelFoam/verticalChannel
2020-11-30 13:59:10 +01:00
Mark Olesen
fb7afd5f96 TUT: fix missing line ending and wrong blockMeshDict vertex location 2020-11-26 02:15:20 +01:00
Mark Olesen
8d2d894ae0 ENH: support frequency or period for Sine/Square Function1 (#1917)
- For slow oscillations it can be more intuitive to specify the
  period.

ENH: separate mark/space for Square

- makes it easier to tailor the desired intervals.

BUG: incorrect square wave fraction with negative phase shifts

ENH: additional cosine Function1

STYLE: avoid code duplication by inheriting Cosine/Square from Sine.
2020-11-19 16:57:45 +01:00
Kutalmis Bercin
2a64d98d02 ENH: PatchParticleHistogram: add a new cloud FO
Computes a histogram for the distribution of particle diameters
  and corresponding number of particles hitting on a given list of patches.

  A minimal example by using `constant/reactingCloud1Properties.cloudFunctions`:

  ```
  patchParticleHistogram1
  {
      // Mandatory entries (unmodifiable)
      type             patchParticleHistogram;
      patches          (<patch1> <patch2> ... <patchN>);
      nBins            10;
      min              0.1;
      max              10.0;
      maxStoredParcels 20;
  }
  ```
2020-11-13 09:22:46 +00:00
Kutalmis Bercin
83b432c9d2 TUT: cavity: add Allrun-parallel
The change helps to carry out and monitor
  parallelisation tests for FOs and topoSets.
2020-11-13 09:18:43 +00:00
Kutalmis Bercin
da65e02707 INT: planeToFaceZone: integrate a new topoSet from OpenFOAM.org 2020-11-13 09:18:43 +00:00
Mark Olesen
043419f30a TUT: add examples of general spheroid (#1901)
- for blockMesh meshing and as snappyHexMesh geometry
  (adjust the igloo aspect ratio)
2020-10-28 16:04:12 +01:00
Mark Olesen
4258f8059f ENH: adjustments to searchable surfaces
- code reduction, documentation, code stubs for spheroid (#1901)

- make searchableSurfaceCollection available as 'collection'
  for consistency with other objects
2020-10-28 16:04:12 +01:00
Mark Olesen
9eb73a92e2 TUT: fix use of "constant/triSurface" etc (#1887)
- use bracketed syntax (eg, "<constant>/triSurface") instead for
  implicit case resolution.
2020-10-28 16:04:12 +01:00
Mark Olesen
51b2490258 ENH: additional options for transformPoints and surfaceRefineRedGreen
- add -recentre option to shift points according to the bounding box
  centre before performing other operations

- add -auto-origin to use the bounding box centre as the origin for
  rotations. Has lower priority than the -origin option.

- surfaceTransformPoints now has distinct -read-scale, -write-scale
  options (as per surfaceMeshConvert). Silently accepts -scale as
  equivalent to -write-scale, for backwards compatibility and
  similarity with transformPoints

- add -steps option for surfaceRefineRedGreen for successive
  refinement
2020-10-22 14:59:12 +02:00
Mark Olesen
4f84aa5362 STYLE: adjustments for code integration
- adjust contributor names to include windows port

BUG: bash script marked as sh (fixes #1890)
2020-10-22 14:52:56 +02:00
Ivor Clifford
d8525f1746 INT: polyline: new extrusion model
Allows specification of extrusion path using blockMesh 'edges' syntax.
See tutorials/mesh/extrudeMesh/polyline

Contribution by Ivor Clifford/Paul Scherrer Institut
2020-10-22 10:13:15 +01:00
Mark Olesen
121c69ef2e TUT: use new 'arc' specification in several tutorials
- in most cases this eliminates manually calculation of circumferential
  points.

TUT: improve parameterization of sphere blockMeshDict

- allow separate parameterization of radius, ratio of inner to outer,
  and the number of divisions in x/y/z and radial directions
2020-10-05 15:45:39 +02:00
Mark Olesen
f8a8728f8f TUT: update movingCone blockMesh to merge points (#1862)
- wedge geometry, so topology merge results in zero-sized faces.
2020-09-28 11:08:32 +02:00
Mark Olesen
aca4f077ac ENH: fanPressure - use fanCurve entry if present
- only use implicit legacy handling if the "fanCurve" entry is missing
  and the "file" entry is present.
2020-09-28 11:08:32 +02:00
Mark Olesen
12b68e1151 ENH: replace finiteArea timeVaryingUniformFixedValue with Function1 version
- timeVaryingUniformFixedValue -> uniformFixedValue

- allows a variety of functions (eg, coded, expressions, tables, ...)

- more similarity to finiteVolume patch type

STYLE: remove unused timeVarying... from etc/controlDict
2020-09-28 11:08:30 +02:00
sergio
274bb0740e STY: Headers and code style 2020-09-22 16:35:53 +01:00
sergio
11d17fec5f ENH: Adding evaporation-condensation lagragian model for solution
1) Adding LiquidEvapFuchsKnudsen model for lagrangian evaporation.
   This models is based on a diffusion type of evaporation/
   condensation on particles composed of solution (liquid + solid).

2) Adding modes of calculating the particle rho and volume change.
   The new keyword in constantProperties is 'volumeUpdateMethod'
   which three options:
        a) constantRho
        b) constantVolume
        c) updateRhoAndVol

   The old keyword 'constantVolume' true/face is still valid

3) The entry rho0 is now optional for multicomponent parcels.
   If defined , it is used, but if it is not the actual mixture
   provided is used to calculate rho0 of the particle.
   T0 is still used as initial T and Cp0 is over-written in the
   multicomponent cloud but still required.

4) Adding tutorial for evaporation/condensation model
2020-09-22 16:35:53 +01:00
Mark Olesen
1c71c7cb23 Merge remote-tracking branch 'origin/master' into develop 2020-09-03 12:04:45 +02:00
Mark Olesen
fa364eda12 BUG: inconsistency between constructor and output (fixes #1816)
- slipped in with changes to csvTableReader (commit 59ed3ba18d) so
  only affects the 2006 version.

- adjust constructor to expect "componentColumns", but also accept
  "valueColumns" as 1912 and earlier-compatibility. This not only
  fixes the reported bug, but also ensure proper compatibility with
  older files.

ENH: use "refColumn" instead of "timeColumn" for csvTableReader

- consistent with the CSV Function1.
  Support 'timeColumn' as 1912 and earlier-compatibility.

TUT: remove unused table-reader entry
2020-08-31 15:17:32 +02:00
Mark Olesen
44052de594 TUT: skip some tutorials when dynamicCode is not available
- silence failed restoration of controlDict from controlDict.orig
  (idempotent?)
2020-08-06 19:34:20 +02:00
Mark Olesen
7051abc371 TUT: fix run/clean scripts syntax 2020-08-04 15:12:40 +02:00
Andrew Heather
dc6c3c8add TUT: Correction for Alltest 2020-07-20 10:19:54 +01:00
Andrew Heather
538d749220 REL: Updated headers to version v2006 2020-06-29 17:27:54 +01:00
Andrew Heather
b325cb86c0 TUT: added mixerVesselAMI2DRefined to show example of AMI with topology change 2020-06-29 11:07:09 +01:00
OpenFOAM bot
df7044845e GIT: remove whitespace, backslash escape angle brackets in comments
- fix older '> >' template parameters as '>>'
2020-06-26 12:28:49 +02:00
sergio
1bd5d03ea6 TUT: Adjusting settings for tutorials climbingRod and mixerVessel2D 2020-06-25 11:07:53 -07:00
Mark Olesen
5b6969fce3 TUT: fluxSummary surfaces as list (inadvertently changed in 5982a1aa) 2020-06-22 08:44:46 +02:00
Mark Olesen
7065593b3f BUG: regression in fluxSummary cellZoneAndDirection (fixes #1736)
- related to change c3571b7357 (does not affect 1912 or older).

  Remnant check for data() should have used valid() method instead.

TUT: add fluxSummary cellZoneAndDirection to angledDuct/implicit
2020-06-19 12:52:00 +02:00
Mark Olesen
a4864eb1a8 TUT: relocate flange.ans -> tutorials/resources/geometry
- makes it easier to copy/duplicate the case
2020-06-19 10:09:09 +02:00
Andrew Heather
7d4cdc4f8c TUT: Updated vortexShed case wrt latest Curle FO updates 2020-06-18 21:55:44 +01:00
Mark Olesen
7db868b509 TUT: bridge using external lumped point motion (#1341)
- see its accompanying README for additional setup instructions
2020-06-17 15:16:27 +02:00
Mark Olesen
b0136d835e ENH: lumped point motion using local linear basic functions (#1341)
- the earlier implementation of externally controlled lumped point
  motion (see merge request !120 and OpenFOAM-v1706 release notes) was
  conceived for the motion of simple structures such as buildings or
  simple beams. The motion controller was simply defined in terms of
  an orientation axis and divisions along that axis.

  To include complex structures, multiple motion controllers are
  defined in terms of support points and connectivity.

  The points can have additional node Ids associated with them, which
  makes it easier to map to/from FEA models.

  OLD system/lumpedPointMovement specification
  --------------------------------------------

      //- Reference axis for the locations
      axis            (0 0 1);

      //- Locations of the lumped points
      locations       (0 0.05 .. 0.5);

  NEW system/lumpedPointMovement specification
  --------------------------------------------

      // Locations of the lumped points
      points
      (
          (0  0  0.00)
          (0  0  0.05)
          ...
          (0  0  0.50)
      );

      //- Connectivity for motion controllers
      controllers
      {
          vertical
          {
              pointLabels (0 1 2 3 4 5 6 7 8 9 10);
          }
      }

  And the controller(s) must be associated with the given
  pointDisplacement patch. Eg,

     somePatch
     {
         type            lumpedPointDisplacement;
         value           uniform (0 0 0);
         controllers     ( vertical );   // <-- NEW
     }

TUT: adjust building motion tutorial

- use new controllor definitions
- replace building response file with executable
- add updateControl in dynamicMeshDict for slowly moving structure
2020-06-17 15:16:27 +02:00
Mark Olesen
17ea2c544d TUT: include geometricVoF library for interface sampling 2020-06-17 10:55:24 +02:00
OpenFOAM bot
01ec92fd35 GIT: remove leading/trailing blank lines, trailing whitespace 2020-06-17 10:46:26 +02:00
Mark Olesen
5982a1aab4 STYLE: update tutorials
- use simpler decomposeParDict in tutorials, several had old
  'boilerplate' decomposeParDict

- use simpler libs () format

- update surface sampling to use dictionary format
2020-06-17 10:11:33 +02:00
Kutalmis Bercin
5225697542 GIT: add missing function object examples for MachNo, log, pow 2020-06-17 08:54:05 +01:00
Kutalmis Bercin
4d295c84a0 DOC-STYLE: various release changes 2020-06-16 10:51:44 +01:00
Mark Olesen
458cec60b1 ENH: support time-varying Tref for externalCoupledTemperature (#1729) 2020-06-15 15:41:05 +02:00
Vaggelis Papoutsis
c344520474 TUT: updated/cleaned the optimisation tutorials
- Removed some unnecessary dynamicMeshDicts.
- Removed the writeActiveDesignVariables execution from the Allrun
  scripts, since it is no longer necessary to execute it before
  adjointOptimisationFoam.
- Updated the entries in dynamicMeshDict according to efbc9fc99.
2020-06-12 13:27:55 +01:00
Andrew Heather
01221babfc TUT: Corrected link in README - fixes #1698 2020-06-12 10:03:12 +01:00
sergio
ffa7bfb4f5 TUT: Setting up tutorials for change on planeImplicit function 2020-06-11 12:54:57 -07:00