Commit Graph

24244 Commits

Author SHA1 Message Date
568cb050f2 STYLE: place projectCurveEdge, projectEdge into blockEdges namespace
- consistent with other blockEdge types
- adjust some debug output
2020-10-07 09:17:00 +02:00
57a76e2647 Merge branch 'feature-blockMesh-edges' into 'develop'
Feature block mesh edges

See merge request Development/openfoam!383
2020-10-06 09:37:10 +01:00
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
1d08ed9be2 ENH: support arc edge specification with origin point
- The arc will frequently enclose an angle less than 180 degrees.
  For the case, it is possible to define the arc by its endpoints
  and its centre (origin) point. For example,

      arc 0 1 origin (0 0 0);

  When defined in the way, any discrepancy in the arc radius for the
  endpoints is resolved by adjusting the origin to ensure that the
  average radius is satisfied.

  It is also possible to specify a \em flatness factor as a multiplier
  of the radius. For example,

      arc 0 1 origin 1.1 (0 0 0);

ENH: minor code cleanup for block edges

ENH: expose point appending as polyList::concat
2020-10-05 14:08:48 +02:00
8939a55653 ENH: relocate blockMesh polyMesh generation into library (for code reuse)
STYLE: adjust blockMesh advanced/non-advanced options

- make -merge-points "non-advanced" (for better exposure)
- make -write-obj "advanced" (-write-vtk is preferred)
2020-10-05 12:36:04 +02:00
179e4cbcf2 STYLE: dimensionSet lookup with LITERAL, not REGEX 2020-10-02 09:19:32 +02:00
f9190e2a3c ENH: primitiveEntry construct with empty token list
- contents to be filled with a later assignment.

  This can help avoid deduction issues when populating from a list of
  tokens, and the templated version is selected:

  ```
  template<class T>
  primitiveEntry(const keyType&, const T&);
  ```

ENH: support construct empty ITstream with given name

- populate contents later by assigment
2020-10-02 09:16:07 +02:00
a415f04431 COMP: cannot compare 'this' for different DynamicList types
- Eg, cannot compare addresses of DynamicList<T,16> and DynamicList<T,8>
  [clang], so compare their cdata pointers instead.
2020-10-01 11:35:59 +02:00
9785029979 BUG: CompactListList transfer leaves old size (fixes #1863)
- use clear/swap paradigm for more code reuse

Note: fixed similar issue with copy/reuse constructor
2020-10-01 11:35:59 +02:00
56c9134ccc ENH: add identity(IntRange) and Istream operator for common types
- provides consistency with identity(label, label) and looks more
  familiar than using labelRange::labels()

- relocates labelRange IO operators to IntRange

ENH: make sliceRange interators random access

STYLE: scalarRanges::match() instead of predicate operator
2020-10-01 11:35:43 +02:00
3b3cffc758 BUG: mapPolyMesh: incorrect addressing. Fixes #1864
Triggered when running e.g. postProcess
2020-09-30 11:44:25 +01:00
27e71c2d9e Merge branch 'Pstream-ranges' into 'develop'
Pstream ranges

See merge request Development/openfoam!382
2020-09-29 10:16:37 +01:00
5dc5ea928a ENH: add UPstream::subProcs() static method
- returns a range of `int` values that can be iterated across.
  For example,

      for (const int proci : Pstream::subProcs()) { ... }

  instead of

      for
      (
          int proci = Pstream::firstSlave();
          proci <= Pstream::lastSlave();
          ++proci
      )
      {
          ...
      }
2020-09-28 14:26:07 +02:00
e18ff114a6 ENH: add UPstream::allProcs() method
- returns a range of `int` values that can be iterated across.
  For example,

      for (const int proci : Pstream::allProcs()) { ... }

  instead of

      for (label proci = 0; proci < Pstream::nProcs(); ++proci) { ... }
2020-09-28 14:25:59 +02:00
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
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
245ac07312 COMP: add missing include and clone() method to TableFile 2020-09-28 11:08:32 +02:00
43b9b63ab0 ENH: fanPressureFvPatchScalarField - updated fanCurve to use a Function1 2020-09-28 11:08:32 +02:00
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
bb3660b9a5 ENH: add construct ConstantField with uniform value 2020-09-25 15:30:50 +02:00
97be8fc767 ENH: add finer control to the expected expression types
- adds "future-proofing" for derived expression boundary conditions
  by moving potential failure modes into the base class.
2020-09-25 08:45:16 +02:00
ea42a7a6d4 ENH: change uniformGradient from Function1 to PatchFunction1 2020-09-25 08:39:57 +02:00
0dfdeb36d4 COMP: declare scalarRanges default constructor (gcc-4.8.5)
- failed to properly use the inherited constructors

STYLE: adjust documentation comments
2020-09-25 08:39:57 +02:00
a4c2842420 Merge remote-tracking branch 'origin/master' into develop 2020-09-24 16:17:22 +02:00
cbc0da8a60 CONFIG: increment patch level 2020-09-24 13:46:35 +02:00
d22134ed12 BUG: unexpected treatment of missing fractionExpr (fixes #1858)
- specifying gradientExpr without a valueExpr, a missing fractionExpr
  should be treated as 0 (gradient only), not as 1 (value only)

ENH: improve sanity checks + evaluation short-cuts in exprMixedFvPatchField
2020-09-24 13:46:32 +02:00
1550a12223 BUG: fractionExpr "0" ignored (fixes #1855)
- incorrect branching logic caused the "0" case to be ignored
2020-09-24 11:59:17 +02:00
413ccd5ce3 STYLE: adjust tests and one code instance for updated labelRange 2020-09-23 10:46:04 +02:00
2aa46d4379 STYLE: manage send/recv ensight parallel output with integer range 2020-09-23 10:46:04 +02:00
d204d33c4e ENH: new IntRange class, enhancements to labelRange, sliceRange
- add reverse iterators and replace std::iterator
  (deprecated in C++17) with full definitions

- simplify construction of iterators

- construct labelRange from a single single parameter.
  This creates a (0,len) range.

- make basic constructors forms constexpr.
  Remove unused size checks.

- Derive labelRange from new IntRange template class.
  Allows reuse of base functionality with different integral sizes.

Deprecations:

  - deprecate labelRange::valid() in favour of using
    labelRange::empty() or the bool operator.
    For example,

        if (range) ...  vs older  if (range.valid()) ...

DEFEATURE: drop labelRange::null, scalarRange::null static variables

- turned out to be not particularly useful.
  Can simply use constexpr contructor forms

DEFEATURE: drop labelRange::identity static method

- simply use the single-parameter constructor
2020-09-23 10:45:57 +02:00
ad8ac2fcd0 STYLE: remove unused code references to Pstream::procID() 2020-09-23 09:25:07 +02:00
48cb2de4eb STYLE: adjust send/receive in tests 2020-09-23 09:25:07 +02:00
52025dfb1b STYLE: add END tag for dependency files
- aids when locating truncated files
2020-09-23 09:25:07 +02:00
2cba04e204 STYLE: make some tmp, refPtr constructors constexpr 2020-09-23 09:25:07 +02:00
49ae975b72 Merge branch 'lagragianEvaporation' into 'develop'
New Evap-Cond Lagrangian model  (FuchsKnudsen)  for solution (liquid + solid) droplets

See merge request Development/openfoam!377
2020-09-22 16:37:02 +01:00
274bb0740e STY: Headers and code style 2020-09-22 16:35:53 +01:00
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
973e2d4e2d COMP: remnant foam-extend code in faMatrix::setValues (fixes #1834)
BUG: faMatrix::residual changes source vector (fixes #1835)

ENH: improve code alignment between faMatrix and fvMatrix

- support setValues() with a single value
2020-09-16 17:27:56 +02:00
bf3b4fabb4 ENH: UniformList to wrap a single value into a list-like container
- refactor UniformField accordingly
2020-09-16 17:27:56 +02:00
0d08942bf3 STYLE: mark globalMeshData::ListPlusEqOp as deprecated
- can use ListOps::appendEqOp as the more general form.
  Note that this uses a different template parameter.
  Eg,
      `globalMeshData::ListPlusEqOp<labelList>()`
  vs. `ListOps::appendEqOp<label>()`
2020-09-16 17:27:56 +02:00
0a1cd580ac ENH: improvements for nastran surface writer
- select default nastran PLOAD2 or PLOAD4 based on field type.
  Default to PLOAD2 for scalar types and PLOAD4 for vectors etc.

- relocate nastran SHELL/MAT cards.
  Previously wrote at the end of the file, now emit when writing the
  geometry itself. This improves modularity (of code and files)

- initial support for common geometry file for nastran
2020-09-16 17:27:56 +02:00
7d203443c3 ENH: refactor surface writer collated time management (#1600)
- abstracted out from ensight surface writer for potential reuse by
  other surface writers.
2020-09-16 17:27:56 +02:00
f8ffee8135 ENH: support fieldScale for more surface writers 2020-09-16 17:27:56 +02:00
a9bf69b551 ENH: suppress surface Face-id field if writer manages that itself (#1600)
- for CAE formats such as abaqus, nastran, starcd, etc, the element id
  is already part of the output format itself. For these cases, there
  is no use in generating an additional "Ids" field.

ENH: add code to ignore negative face ids

- these will arise from very special cases, such as when a
  solid element and side are encoded into a single integer.

BUG: starcd surface values output did not use original face ids
2020-09-16 17:27:56 +02:00
a001c0d2fa BUG: volPointInterpolation: fixes #1831 2020-09-16 15:30:09 +01:00
52e0ebca57 ENH: gradingDescriptor(s) correct() and normalise() methods
- single entry point to handle negative expansions etc.
  Reduces typos and forgotten code (as per #1841)
2020-09-16 09:47:08 +02:00
9762b547fe BUG: gradingDescriptor stream input ignores negative expansion (Fix #1841)
- mostly only tripped when using fractional edge grading, since this
  is where the list reading is used. Overseen in commit 7da0b5bee1.
2020-09-16 09:25:28 +02:00
ab55157358 BUG: snappyHexMesh: fixes #1836.
When truncating layers in one go (nBufferCellsNoExtrude -1) it
should set the nCells per face to be the min of the number of points
per edge.
2020-09-10 14:09:58 +01:00
c9ab12cb3d ENH: IOobject: print some more info 2020-09-10 14:09:57 +01:00
1e95af4d57 STYLE: use more generic terms allow/deny for selections 2020-09-09 13:54:34 +02:00