Commit Graph

23295 Commits

Author SHA1 Message Date
c1b07cd103 BUG: post-processing of parcels on patch interaction models
Adding check for p.active at the end of KinematicParcel::move.
    p.hitFace() is called only for active parcels.

    Setting to zero the initialization for stored lists of stick and
escape parcels
    in LocalInteraction and StandardWallInteraction models

    NOTE: KinematicParcel::hitPatch counts overall system escaped
    parcels and mass based on polyPatch type and not on type of
    patchInteractionModel. Thus, if a patch is a Wall for fluid
    but escape for parcel the overall report will be wrong but
    the local report for each patch is correct
2019-12-16 14:57:28 -08:00
f45c7fb7bd Merge branch 'feature-appyBoundaryLayer-writeTurbulenceFields' into 'develop'
ENH: applyBoundaryLayer - optionally write turbulence fields

See merge request Development/openfoam!313
2019-12-16 22:18:38 +00:00
1a3b50f635 GIT: stray line 2019-12-16 16:26:17 +01:00
eaa138443a STYLE: library functions using std::string 2019-12-16 16:16:53 +01:00
83e0501a77 Merge branch 'develop' of https://develop.openfoam.com/Development/openfoam into develop 2019-12-16 13:40:35 +00:00
193b7dba22 CONFIG: relocate WM_PROJECT definition in bashrc, cshrc
- locate where the user is less tempted to change it (#1515).
  It really should be considered an invariant environment variable.

STYLE: wmake -help information to stdout, die errors to stderr
2019-12-16 14:34:36 +01:00
da06067213 ENH: surfaceDistance: FO to calc distance-to-surface field. Fixes #1523. 2019-12-16 12:18:34 +00:00
9edaf8bfa5 CONFIG: default compilation is 'Opt' in Makefiles
- only include compiler-family rules for C++ once

STYLE: minor cleanup of wmake/src Makefile
2019-12-16 11:22:16 +01:00
1a16207e0d COMP: compilation of Test-QRMatrix (clang, int64)
- remove unused local functions from volumeExprDriver
2019-12-16 11:22:15 +01:00
c614388ddb BUG: Tensor2D derives from VectorSpace, not MatrixSpace 2019-12-15 19:02:18 +01:00
3176b3a5de ENH: add wmake -show-path-{c,cxx} | -help-full
- The wmake -show-path-{c,cxx} options return the fully qualified
  paths to the respective compilers. This can be useful when verifying
  that the correct compiler is indeed configured.

- The -help-full to display the "advanced" options, but in the normal
  case just show the basic options.
2019-12-15 17:19:05 +01:00
3b514140dc COMP: constructor used assignment operator 2019-12-15 13:37:37 +01:00
624591b886 COMP: ignore unused-const-variable in generated scanner code 2019-12-15 13:28:24 +01:00
77a5e574af COMP: fully qualify IListStream parameter (fixes #1521)
- stops clang-9 error of List being constrained by private inheritance
2019-12-15 12:53:28 +01:00
b601d7bfb9 Merge branch 'integration-feature-numerics' into 'develop'
Integration feature numerics

See merge request Development/openfoam!308
2019-12-14 15:34:14 +00:00
75ba4a07ef STYLE: consistent quoting for 'cd' 2019-12-14 13:34:48 +01:00
84095ef631 ENH: Adding solarBeamWithTrees tutorial 2019-12-13 16:40:32 -08:00
33e0c4ba88 ENH: improve expression string expansions
- reuse more of stringOps expansions to reduce code and improve the
  syntax flexiblity.

  We can now embed "pre-calculated" values into an expression.
  For example,

       angle       35;
       valueExpr   "vector(${{cos(degToRad($angle))}}, 2, 3)";

  and the ${{..}} will be evaluated with the regular string evaluation
  and used to build the entire expression for boundary condition
  evaluation.

  Could also use for fairly wild indirect referencing:

       axis1   (1 0 0);
       axis2   (0 1 0);
       axis3   (0 0 1);
       index   100;
       expr   "$[(vector) axis${{ ($index % 3) +1 }}] / ${{max(1,$index)}}";
2019-12-14 00:11:28 +01:00
b63721f8bc Merge branch 'feature-proudmann-fo' into 'develop'
ENH: Added new function object to compute the Proudman acoustic power

See merge request Development/openfoam!303
2019-12-13 20:04:26 +00:00
ad82e9c429 Merge branch 'feature-limitFields-FO' into 'develop'
ENH: Added new limitFields function object

See merge request Development/openfoam!304
2019-12-13 20:04:05 +00:00
69a8369541 COMP: add note about gcc-9 and deprecated-copy 2019-12-13 20:54:28 +01:00
b87ea76fc1 ENH: relocate findMinData/findMaxData to FieldOps namespace 2019-12-13 17:04:20 +01:00
6ce3e0bd67 BUG: expression BCs missing their variables on output 2019-12-13 15:49:25 +01:00
db8a840459 COMP: BFGS and SR1 failed to compile with SP
- Failed due to double*Matrix<float> multiplication.

Style changes

- use SquareMatrix with Identity on construction

- use Zero in constructors

- remove trailing space and semi-colons
2019-12-12 11:40:01 -05:00
8ece5f7aae BUG: string expand swallowing '$(..)' construct
- this regression caused dynamic code with includes to fail since they
  often have -I$(LIB_SRC)/...  content
2019-12-13 14:17:32 +01:00
7aa2bf832f STYLE: header format 2019-12-13 12:33:23 +01:00
17d9969ae5 ENH: stringOps::findTrim helper
- finds beg/end indices of string trimmed of leading/trailing whitespace
2019-12-13 12:10:53 +01:00
b61d4ab488 STYLE: adjust deprecations for OSspecific
- skip processing OSspecific/MSwindows since this can cause duplicate
  doxygen entries

STYLE: adjust formatting in code templates

STYLE: use std::string methods without extra qualifications
2019-12-13 11:08:12 +01:00
370c8a39af ENH: additional feedback about controlled mesh motion update type
- ensure that the updateControl is "non-sticky" on re-read,
  even if we do not support runtime-modifiable here

STYLE: add syntax example (wingMotion), but with updateInterval 1
2019-12-13 10:53:56 +01:00
49ed79d537 ENH: improve some timeControl handling
- synchronize the scalar interval value with the integer version.
  This ensures that the interval() method returns the correct
  representative value.

- added clear() method to reset to 'always' (pass-through)
2019-12-13 10:53:56 +01:00
b502086a29 Revert "string trim"
This reverts commit 677e314279.
2019-12-13 10:53:40 +01:00
677e314279 string trim 2019-12-13 10:05:28 +01:00
373ad6df0e ENH: additional feedback about controlled mesh motion update type
- ensure that the updateControl is "non-sticky" on re-read,
  even if we do not support runtime-modifiable here

STYLE: add syntax example (wingMotion), but with updateInterval 1
2019-12-13 10:02:57 +01:00
e90de78cac ENH: add timeControl clear() method to reset to 'always' (pass-through) 2019-12-13 10:02:41 +01:00
042c529f9f Merge branch 'feature-adjoint-shapeOptimisation' into 'develop'
ENH: New adjont shape optimisation functionality

See merge request Development/openfoam!307
2019-12-12 14:18:20 +00:00
b863254308 ENH: New adjont shape optimisation functionality
The adjoint library is enhanced with new functionality enabling
automated shape optimisation loops.  A parameterisation scheme based on
volumetric B-Splines is introduced, the control points of which act as
the design variables in the optimisation loop [1, 2].  The control
points of the volumetric B-Splines boxes can be defined in either
Cartesian or cylindrical coordinates.

The entire loop (solution of the flow and adjoint equations, computation
of sensitivity derivatives, update of the design variables and mesh) is
run within adjointOptimisationFoam. A number of methods to update the
design variables are implemented, including popular Quasi-Newton methods
like BFGS and methods capable of handling constraints like loop using
the SQP or constraint projection.

The software was developed by PCOpt/NTUA and FOSS GP, with contributions from

Dr. Evangelos Papoutsis-Kiachagias,
Konstantinos Gkaragounis,
Professor Kyriakos Giannakoglou,
Andy Heather

[1] E.M. Papoutsis-Kiachagias, N. Magoulas, J. Mueller, C. Othmer,
K.C.  Giannakoglou: 'Noise Reduction in Car Aerodynamics using a
Surrogate Objective Function and the Continuous  Adjoint Method with
Wall Functions', Computers & Fluids, 122:223-232, 2015

[2] E. M. Papoutsis-Kiachagias, V. G. Asouti, K. C. Giannakoglou,
K.  Gkagkas, S. Shimokawa, E. Itakura: ‘Multi-point aerodynamic shape
optimization of cars based on continuous adjoint’, Structural and
Multidisciplinary Optimization, 59(2):675–694, 2019
2019-12-12 14:17:29 +00:00
a8ab9b8796 CONFIG: prefer use of ParaView_MESA_DIR in runTimePostProcessing
- when using VTK from ParaView sources it can better to tag them as
  such, but simultaneously not mask the ParaView with hardware
  rendering.

  The additional ParaView_MESA_DIR variable allows this.
  The balance of library and path setup is unaffected by this.

DOC: update doc/BuildIssues
2019-12-12 14:29:59 +01:00
455c619edc STYLE: typo in doc 2019-12-12 14:07:17 +01:00
ff995c5d53 COMP: Resolved compiler warning in evalEntry 2019-12-12 12:39:47 +00:00
58b02969c0 Merge branch 'misc-kbc' into 'develop'
ENH|BUG: Misc

See merge request Development/openfoam!305
2019-12-12 11:30:35 +00:00
8225733399 BUG: fix kkLOmega model - omegaWallFunction inconsistency (#1484)
- `Pkt` was directed to `GName` to allow wall functions
     are usable by kkLOmega model
  - `Pkt` was changed to a non-const object, so that omegaWallFunc
    can modify `Pkt` at the wall, if need be.
  - Elementwise backward compatibility was checked by
    pimpleFoam/RAS/ellipsekkLOmega
  - New implementation was checked by changing omega:hole boundary
    in pimpleFoam/RAS/ellipsekkLOmega to omegaWallFunction
2019-12-12 11:24:47 +00:00
af0e454ccf BUG: fix QRMatrix (#1261, #1240)
QRMatrix (i.e. QR decomposition, QR factorisation or orthogonal-triangular
    decomposition) decomposes a scalar/complex matrix \c A into the following
    matrix product:

    \verbatim
        A = Q*R,
    \endverbatim

    where
     \c Q is a unitary similarity matrix,
     \c R is an upper triangular matrix.

Usage
    Input types:
     - \c A can be a \c SquareMatrix<Type> or \c RectangularMatrix<Type>

    Output types:
     - \c Q is always of the type of the matrix \c A
     - \c R is always of the type of the matrix \c A

    Options for the output forms of \c QRMatrix (for an (m-by-n) input matrix
    \c A with k = min(m, n)):
     - outputTypes::FULL_R:     computes only \c R                   (m-by-n)
     - outputTypes::FULL_QR:    computes both \c R and \c Q          (m-by-m)
     - outputTypes::REDUCED_R:  computes only reduced \c R           (k-by-n)

    Options where to store \c R:
     - storeMethods::IN_PLACE:        replaces input matrix content with \c R
     - storeMethods::OUT_OF_PLACE:    creates new object of \c R

    Options for the computation of column pivoting:
     - colPivoting::FALSE:            switches off column pivoting
     - colPivoting::TRUE:             switches on column pivoting

    Direct solution of linear systems A x = b is possible by solve() alongside
    the following limitations:
     - \c A         = a scalar square matrix
     - output type  = outputTypes::FULL_QR
     - store method = storeMethods::IN_PLACE

Notes
    - QR decomposition is not unique if \c R is not positive diagonal \c R.
    - The option combination:
      - outputTypes::REDUCED_R
      - storeMethods::IN_PLACE
      will not modify the rows of input matrix \c A after its nth row.
    - Both FULL_R and REDUCED_R QR decompositions execute the same number of
      operations. Yet REDUCED_R QR decomposition returns only the first n rows
      of \c R if m > n for an input m-by-n matrix \c A.
    - For m <= n, FULL_R and REDUCED_R will produce the same matrices
2019-12-12 11:22:14 +00:00
3afc352757 ENH: add threshold for the number of warnings in MatrixTools::equal() 2019-12-12 11:22:14 +00:00
3a5ad7eed7 ENH: add identity matrix constructor to RectangularMatrix 2019-12-12 11:22:14 +00:00
64614cfce8 ENH: add new funcs into SquareMatrix
- query func `symmetric()`
    - query func `tridiagonal()`
    - `resize()`
    - `labelpair` identity constructor

    STYLE: add `#if(0 | RUNALL)` to improve test control in Test-Matrix
2019-12-12 11:22:13 +00:00
f9e5392171 BUG: fix tut regression for potentialFoam (#1518) 2019-12-12 11:22:13 +00:00
64242fc096 TUT: generalise planarPoiseuille for all laminar models (#1509) 2019-12-12 11:22:13 +00:00
be235787cf DOC: add missing tags into Stokes.H (#1509)
STYLE: add missing comment dashes, DOI
  DOC: add DOI into WatersKing.C
2019-12-12 11:22:13 +00:00
55c880b7dc Merge branch 'feature-mesh-update-controls' into 'develop'
Feature mesh update controls

See merge request Development/openfoam!306
2019-12-12 11:03:02 +00:00
280be6312c ENH: update handling of "writeTime" in timeControl class
- handle zero or negative values as being identical to 1.
  As per timeStep control and what the comments suggested.

- drop old outputTime enumeration, since this is covered by the
  writeTime enumeration and a corresponding Enum name.

- support construction of a "pass-through" control object that always
  executes and add some method to test for these conditions and be able
  to output some meaning full information.
  Eg,

     if (ctrl.execute())
     {
         if (!ctrl.always())
         {
             Info<< "Sampling executed based on " << ctrl.type() << nl;
         }
         ...
     }

     To produce "Sampling executed based on runTime"
2019-12-12 09:09:50 +01:00