Commit Graph

469 Commits

Author SHA1 Message Date
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
Mark Olesen
52be5d0428 TUT: use mergeType points for wedge geometries (#2241) 2021-10-21 15:31:11 +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
847b61d1f9 GIT: fix some merge and edit rubbish 2021-07-28 10:02:27 +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
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
mattijs
1f84dcbac6 ENH: blockMesh: avoid 'empty' for initial mesh. Fixes #2125. 2021-06-17 10:18:39 +01: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
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
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
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
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
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
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
Andrew Heather
79e353b84e RELEASE: Updated version to v2012 2020-12-23 10:01:39 +01:00
Mark Olesen
7bdb509494 TUT: adjust tutorials for test loop 2020-12-22 12:27:21 +01:00
Kutalmis Bercin
bcae4b7a4f TUT: Alltest: minor corrections (#1956) 2020-12-11 14:33:04 +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
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
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
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
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
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
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
Andrew Heather
538d749220 REL: Updated headers to version v2006 2020-06-29 17:27:54 +01: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
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
Mark Olesen
458cec60b1 ENH: support time-varying Tref for externalCoupledTemperature (#1729) 2020-06-15 15:41:05 +02:00
Kutalmis Bercin
a5c6516e23 DOC: elaborate the usage of function objects
ENH: update libs of etc/caseDicts/postProcess items
  ENH: ensure destructor=default
  ENH: ensure constness
  ENH: ensure no 'copy construct' and 'no copy assignment' exist
  TUT: add examples of function objects with full set
       of settings into a TUT if unavailable
  TUT: update pisoFoam/RAS/cavity tutorial in terms of usage
2020-06-08 15:43:47 +01:00
Sergio Ferraris
775fe1d596 ENH: Adding finalOnLastPimpleIterOnly to allow Final solver in PIMPLE
The PIMPLE option finalOnLastPimpleIterOnly allows the call the Final
solver only in the last PIMPLE loop. The default is false which is
the present behavior.
2020-06-08 15:42:52 +01:00
Kutalmis Bercin
01514e4d43 TUT: clean up multiphase tutorials 2020-04-14 16:30:44 +01:00
Mark Olesen
9b1c0786ce TUT: verificationAndValidation Allrun uses bash
STYLE: double-quote "$@" for isTest/notTest
2020-03-30 21:14:29 +02:00
Mark Olesen
06c4dc34ee ENH: adjust sampling onto meshed surfaces (#1600)
- base level surface container is now a meshedSurface instead of
  a triSurface. This avoid automatic triangulation of surfaces
  when they are read, and simplifies the internals.

- sampling types:
  * "meshedSurface" (compat: "sampledTriSurfaceMesh")
  * "meshedSurfaceNormal" (compat: "sampledTriSurfaceMeshNormal")
2020-03-12 16:20:57 +01:00
Mark Olesen
2c4b639e1f ENH: 'mag' postOperation for surfaceFieldValue (#1622)
- support postOperation for volFieldValue as well
2020-03-11 11:59:04 +01:00
Kutalmis Bercin
cee3dab140 TUT: cleanup compressible tutorials
- for all tutorial cases:
     - correct/uniformize dict-style
     - rm redundant dict entries

 - compressible.overRhoPimpleDyMFoam.twoSimpleRotors: rm redundant file: pointDisplacement
 - compressible.overRhoSimpleFoam.hotCylinder
 - compressible.rhoCentralDyMFoam.movingCone
 - compressible.rhoCentralFoam.forwardStep: activate purgeWrite=10
 - compressible.rhoCentralFoam.LadenburgJet60psi: rm redundant files: mapFieldsDict & sample
 - compressible.rhoCentralFoam.shockTube: rm redundant file: sample; command: cleanSample
 - compressible.rhoPimpleFoam.laminar.sineWaveDamping: rm redundant file: V; activate purgeWrite=10
 - compressible.rhoPimpleFoam.LES.pitzDaily: activate purgeWrite=10
 - compressible.rhoPimpleFoam.RAS.aerofoilNACA0012: activate purgeWrite=10
 - compressible.rhoPimpleFoam.RAS.angledDuct: add Allclean
 - compressible.rhoPimpleFoam.RAS.mixerVessel2D: add Allclean; rm makeMesh
 - compressible.rhoPimpleFoam.RAS.angledDuctLTS: add Allclean
 - compressible.rhoPimpleFoam.RAS.TJunctionAverage
 - compressible.rhoPorousSimpleFoam.angledDuct
 - compressible.rhoSimpleFoam.aerofoilNACA0012
 - compressible.rhoSimpleFoam.angledDuctExplicitFixedCoeff
 - compressible.rhoSimpleFoam.squareBend
 - compressible.rhoSimpleFoam.gasMixing.injectorPipe
 - compressible.sonicDyMFoam.movingCone: rm redundant file: cuttingPlane
 - compressible.sonicFoam.laminar.shockTube
 - compressible.sonicFoam.RAS.nacaAirfoil
 - compressible.sonicFoam.RAS.prism
2020-01-29 12:26:36 +00:00
Kutalmis Bercin
f55da4b690 ENH: allow datToFoam writing points dict directly
- refactors the corresponding tutorial by removing redundant files and items:
    compressible/rhoCentralFoam/biconic25-55Run35
2020-01-29 12:26:36 +00:00
OpenFOAM bot
596e4aef3f STYLE: remove trailing space, tabs 2020-01-22 10:00:03 +01:00
Mark Olesen
b0072bfab8 ENH: regIOobject store() now also registers the object
- previously the store() method just set the ownedByRegistry flag.
  Now ensure that it is indeed registered first.

- support register/store of tmp<> items.
  The tmp parameter is not cleared, but changed from PTR to CREF
  to allow further use.

  The implicit registration allows code simplification using the
  GeometricField::New factory method, for example.

  Old Code
  ========
      volScalarField* ptr = new volScalarField
      (
          IOobject
          (
              fieldName,
              mesh.time().timeName(),
              mesh,
              IOobject::NO_READ,
              IOobject::NO_WRITE,
              true  // Register
          ),
          mesh,
          dimless,
          zeroGradientFvPatchField<scalar>::typeName
      );
      ptr->store();

  New Code
  ========
      auto tptr = volScalarField::New
      (
          fieldName,
          mesh,
          dimless,
          zeroGradientFvPatchField<scalar>::typeName
      );
      regIOobject::store(tptr);

  or even
      regIOobject::store
      (
          volScalarField::New
          (
              fieldName,
              mesh,
              dimless,
              zeroGradientFvPatchField<scalar>::typeName
          )
      );
2020-01-13 15:37:25 +00:00
Kutalmis Bercin
152890d288 TUT: change residuals FO remnants to solverInfo FO (#1290) 2020-01-10 09:44:38 +00:00
Andrew Heather
ae2ab06312 REL: Release preparations 2019-12-23 09:49:23 +00:00