- Dec 12, 2019
-
-
Vaggelis Papoutsis authored
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
-
- Dec 11, 2019
-
-
Mark OLESEN authored
COMP: delay evaluation of fieldToken enumeration types - lazy evaluation at runTime instead of compile-time to make the code independent of initialization order. Otherwise triggers problems on gcc-4.8.5 on some systems where glibc is the same age, or older.
-
Mark OLESEN authored
-
Mark OLESEN authored
- remove/fully deprecated newElmt in next release
-
Mark OLESEN authored
- same result, but approx 4x faster for this case
-
Mark OLESEN authored
-
Mark OLESEN authored
- update repository links
-
Mattijs Janssens authored
ENH: Added new scaledFixedValue boundary condition See merge request !302
-
- Dec 10, 2019
-
-
Mark OLESEN authored
-
Mark OLESEN authored
Feature particle patch postpro filtering ### Summary Adds options to write particle-patch interactions to file, and to select particle fields to post-process for the `patchPostProcessing` cloud function object ### Resolved bugs (If applicable) none ### Details of new models (If applicable) Cloud patch interaction models: Optionally write patch interaction statistics, e.g. number and mass of particles that stick, escape etc. to file using the optional `writeToFile` entry, e.g. ``` localInteractionCoeffs { patches ( "(walls|cyc.*)" { type rebound; } "inlet|outlet" { type escape; } ); // New optional entry writeToFile yes; } ``` Cloud function objects: New `fields` optional entry can be used to select which particle fields to post-process; if empty or the entry is not given all fields are written (to provide backwards compatibility) ``` patchPostProcessing1 { type patchPostProcessing; // Optional new entry fields (position "U.*" d T nParticle); maxStoredParcels 20; patches ( cycLeft_half0 cycLeft_half1 ); } ``` See the `$FOAM_TUTORIALS/lagrangian/reactingParcelFilm/filter` tutorial for an example ### Risks Low risk See merge request !301
-
Andrew Heather authored
Feature expressions ### Summary This branch represents an implementation of what is considered to be the most useful aspects of swak4Foam ([Swiss-Army-Knife for FOAM](https://openfoamwiki.net/index.php/Contrib/swak4Foam)) from Bernhard Gschaider, namely the ability to use text-based expressions instead of coding in C++ for the following cases: - expression-based boundary conditions (also known as _groovy_ boundary conditions) - expression-based setFields (also known as _funky_ set fields) The idea of what we currently term *expressions* was pioneered by (Bernhard Gschaider) and is now firmly established in `swak4Foam`. Among other things, expressions attempt to bridge the gap between using standard, predefined boundary conditions and writing dedicated, special-purpose ones. Although part of this gap is now covered within OpenFOAM by using dynamically compiled user coding (eg, coded boundary conditions), there remains substantial areas where it can be significantly more convenient to have a series of predefined functions and expression sytax with some access to base OpenFOAM field functionality that enables rapid deployment of boundary conditions, or custom-defined `setFields` without writing code. A significant portion of `swak4Foam` expressions has been adapted for direct integration into OpenFOAM. During the integration and rewrite, we have tried to pare things down to a smaller subset with the aim of covering 90% or more of the common cases. The remaining cases are left to be reassessed for extending the *expressions* functionality in the future, but they also may be better served with other approaches (eg, with coded conditions) that were not available when `swak4Foam` was originally conceived. To the greatest extent possible, the integrated *expressions* have been designed to avoid name clashes with `swak` so it should remain possible to use the most recent versions of `swak` without problem. ### Risks - New functionality, so low chance of regression. - The scope of the functionality will be revised in the future ### Naming (for `swak4Foam` users) The following are the *expressions* correspondences to `swak`: - The `exprFixedValue` and `exprGradient` boundary conditions are roughly equivalent to the _groovy_ boundary conditions. - The utilities `setExprFields` and `setExprBoundaryFields` are roughly equivalent to the _funky_ utilities of similar name. The naming of the boundary conditions and utilities not only reflects the slightly different input requirements, but simultaneously seeks to avoid any potential name-clash with `swak4Foam` in a mixed environment. The names for the boundary condition dictionary entries tend be shorter and slightly different (eg, `valueExpr` vs `valueExpression`) to serve as a small reminder that the *expressions* syntax is slightly different than the *groovy* equivalents. It also allows the user to fashion dictionary entries that are sufficient for **both** boundary condition variants and quickly toggle between them simply by changing the boundary condition `type`. See merge request !300
-
Mark OLESEN authored
-
Mark OLESEN authored
- these are the expressions equivalent of funkySetFields and funkySetBoundaryFields
-
Mark OLESEN authored
-
Mark OLESEN authored
-
Mark OLESEN authored
-
Mark OLESEN authored
-
Mark OLESEN authored
- make ensightParts parallel-aware when handling zones and patches STYLE: use of serial/parallel more evident in write templates
-
Mark OLESEN authored
- not yet triggered by any code, but avoid anyhow
-
- Dec 09, 2019
-
-
The optional 'fields' entry can be used to limit which particle fields are written to file. If empty/not specified, all properties are written to maintain backwards compatibility. patchPostProcessing1 { type patchPostProcessing; maxStoredParcels 20; fields (position "U.*" d T nParticle); patches ( cycLeft_half0 cycLeft_half1 ); }
-
-
File writing is off by default; to activate, add to the patch interaction model coeff dictionary writeToFile yes;
-
Mark OLESEN authored
- replace stringOps::toScalar with a more generic stringOps::evaluate method that handles scalars, vectors etc. - improve #eval to handle various mathematical operations. Previously only handled scalars. Now produce vectors, tensors etc for the entries. These tokens are streamed directly into the entry.
-
Mark OLESEN authored
-
Mark OLESEN authored
-
Mark OLESEN authored
-
- Dec 06, 2019
-
-
-
Andrew Heather authored
This condition applies a scalar multiplier to the value of another boundary condition. Usage Property | Description | Required | Default value scale | Time varing scale | yes | patch | patchField providing the raw patch value | yes | Example of the boundary condition specification to scale a reference velocity of (15 0 0) supplied as a fixedValue by a table of values that ramps the scale from 0 to 1 over 1 second: <patchName> { type scaledFixedValue; scale table ( ( 0 0) ( 1.0 1.0) (100.0 1.0) ); patch { type fixedValue; value uniform (15 0 0); } }
-
Andrew Heather authored
-
Mark OLESEN authored
-
Mark OLESEN authored
Set the m4 -I include accordingly to have the folllowing: - the directory of the parser. - include/ in the top-level source tree of the current target (eg, src/finiteVolume/include-m4/ when compiling libfiniteVolume) - include/ from OpenFOAM Additional -dry-run option for makeParser, wrap-lemon for expanding m4 only. Extend m4 wrapping support to include bison as well.
-
Mark OLESEN authored
-
Mark OLESEN authored
- include the trailing newline for the "// comment" form, but also add in leading space removal. This ensure that we do not introduce odd indentation, while also eliminating lines that are solely C++ comments.
-
Mark OLESEN authored
-
Mark OLESEN authored
- output the "uniform", "nonuniform" Field entry tags as words instead of raw character strings, which can help for direct tokenization or when sending/receiving via Pstreams.
-
Mark OLESEN authored
-
Andrew Heather authored
-
- Dec 03, 2019
-
-
Mark OLESEN authored
- include some specialization for zip/unzip fields
-
- Dec 09, 2019
-
-
Mark OLESEN authored
-
- Dec 06, 2019
-
-
Mark OLESEN authored
- some support for "uniform" bool fields. Calculating an averaged value for a boolField does not work very well, but we simply define that the field average is 'true' when more than 1/2 of its values are true. Not exactly true, but allows templated definitions to work smoothly. - additional output method writeValue(). This outputs the single (uniform) value or the first value of the field.
-