Releases: mdolab/dafoam
v4.0.2
Changes
- Fixed a bug in the mesh quality check for unsteady solvers. 27d7279
- Added a fixed-point adjoint solver for DAPimpleFoam. 29c2d82
- Reformatted the residual printouts format for the primal and adjoint calls. 835898c
- Changed all timing printouts to elapsedCpuTime. 85be15a
- Added plot3D output for deformedFFDs. bb9f773
- Enabled using the maximal value for timeOp for unsteady functions. d7e792d
- Clean up BC classes to improve code coverage. b3925f7
- Added a fixedWallHeatFlux BC for incompressible solvers. 3aefec6
- Added failed flag mechanism for unsteady optimizations. 61ad79a
- Printed out KSPConvergenceReason for the adjoint. 6abcded
- Enabled time-dependent fields as inputs. It supported linear or RBF interpolation methods. 9c996da
- Change the
components
key toindices
for vectors. c267091
Dependency update
- N/A
Backward-incompatible changes
- For the variance function and others, the key to specify the component of a vector was changed from
components
toindices'. This is to avoid conflict with the
components` key in the inputInfo dict.
v4.0.1
Changes
- Added a new solver, DAPimpleDyMFoam, for optimization with dynamic meshes. cf91033
- Add formatting tests for C++ and Python files. 4966835
- Improved the test code coverage. 0cb854e
- Updated the GitHub Actions and Docker image version to Ubuntu 22.04. 3a6d290 and e24828a
- Fixed a bug in the size check of the variance function. 7cb5b11
- Added a preliminary version of an implicit Runge-Kutta solver (DAIrkPimpleFoam). 0b9018f and b47e789
- Added an option to use custom calculation of near wall distance for heat flux calculation. 14df4d5
- Added a util to set field value at a prescribed probe point for a field. 7de50c6
- Fixed the unsteady preconditioner for DARhoPimpleFoam. 8e4331c
- Added an option to use a step-averaged function in optimization. fbca951
- Added an option to use combined functions for unsteady cases. f9dde92
- Added a new function (residual L2 norm). 1b6e94a
- Added a flag to use total heat flux. 8f6be26
- Added the actuatorLine and actuatorPoint features back. b8b1b97
Dependency update
- OS is updated to Ubuntu 22.04
- Gcc is updated to 11.4
- OpenMPI is updated to 4.1.2 (Ubuntu's built-in OpenMPI)
- Petsc is updated to 3.15
- Python is updated to 3.9
- Numpy is updated to 1.23.5
- Scipy is updated to 1.31.1
- CGNS is updated to 4.5.0
- pyHyp is updated to 2.6.1
- IDWarp is updated to 2.6.2
Backward-incompatible changes
- For unsteady cases, users need to define a new key: "unsteadyCompOutput"
v4.0.0
A major code restructuring to facilitate the usage and development of DAFoam.
Changes
- Re-designed the build process to make it faster. We do not need to recompile the whole DAFoam lib for new code developments. The only command to run is
Allmake
(no need to runAllclean
), and the build process will automatically detect the new code changes and recompile only the new code. - Completely remove the support for v2-style scripts.
- Unified all the Jacobian-vector products into one function: calcJacTVecProduct; there is no need to write a new function for derivatives such as calcdFdW, calcdRdXv, etc
- Added DAInput and DAOutput classes to allow adding design variables easily
- Re-designed the tests and made them run much faster
- Removed all finite-difference-based partial derivatives, except for dRdWTPC computation.
- Combined all incompressible, compressible, and solid libs into one
- Re-designed the forward mode so that it applies to any design variables
- Re-designed the MDO coupling interface; it reads information from inputInfo and outputInto instead of couplingInfo.
- Re-designed the DAFunction (was DAObjFunc) interface
- Re-designed the designVar key in DAOption (it is called inputInfo). It uses inputInfo to set inputs for solvers, instead of using user-defined functions to update DAOption.
- Re-designed the interface to OpenFOAM-v1812, OpenFOAM-v1812 dependencies
Dependency update
- OpenFOAM-v1812-AD is updated to v1.3.2
- pyOFM is updated to v1.2.3
Backward-incompatible changes
- v2-style scripts are deprecated
- v3-style scripts can be used with updated parameters. Check the DAFoam tutorials for details
v3.1.2
Changes
- Added primal and adjoint solvers for DARhoPimpleFoam 217f5e1. This solver is still in the beta state.
- Changed the intermediate optimization folder format to 0.0001, 0.0002, etc. 5f2cc15
- Allowed multi betaFI by using new names such as betaFINuTilda. 7570ed7
- Added an option to use step-averaged states for steady-state solvers. 1b56851 This is for steady-state solvers with oscillating flow states due to separation.
- Enabled using objective function's standard deviation as convergence criterion for steady-state solvers. d58cd15
- Added the radial basis function for regressionModel. Also added the ReLU activation function. 35e0a4c
- Allowed parallel field inversion cases with v3 run scripts. d0379b0
- Allowed saving flow features to the disk for field inversion. 8afd2ab
- Added TensorFlow callback functions for the regModel 304957a
- Enabled using multiple regression models for computing multiple augmented fields in field inversion. be232cb
- Allowed prescribing heat source for DAHeatTransferFoam. 8a9c93a
- Added an option to use the latest flow fields instead of reading initial fields from the 0 folders for unsteady solvers. eb6d1b3
Dependency update
- Updated the pyOFM version to 1.2.2 with new APIs for read/write fields.
Backward-incompatible changes
- The naming convention for optimization intermediate folders has changed to 0.0001, 0.0002, etc. This will not change how we run the case, but it may create backward compatibility for some post-processing scripts that need to read the intermediate folders.
- The augmented flow variable's name has changed from
betaFI
to more specific variable names, such asbetaFINuTilda
,betaFIOmega
, etc. Users need to changebetaFI
in their runScript.py to the new naming convention. - The
regressionModel
dict has a new interface that supports multiple regression models. See an example from here - The
tensorflow
dict has a new interface that supports multiple regression model. See here
v3.1.1
Changes
-
Changed how the primalResTol is calculated. 376843f The primalResTol did not consider the turbulence model, and it is fixed now.
-
Added a refDiffSquare option to compute the variance of all existing objective functions wrt prescribed values. 1c40d73 This can be used in unsteady FIML, e.g., to match a prescribed time series for CL.
-
Added post-processing util to extract time series ee24e98 and RMSE 13b4bc2 for unsteady cases.
-
Added a homTemp boundary condition from Eric 695e280.
Dependency update
None
Backward-incompatible changes
- Slightly changed the docker image's loadDAFoam.sh (changed $HOME to /home/dafoamuser) to make it more compatible with Singularity. This change is implemented in the docker images v3.1.1+.
v3.1.0
Changes
-
Enabled unsteady adjoint-based optimization with pimpleFoam. 6f44401 f1495b9
-
Added a new objective function that can calculate the variance of a selected variable with provided reference data. 8acedec
-
Added the actuator disk direction as the design variable. 234fbd3
-
Fixed a parallel bug in fvSource calculation. Contribution from @bernardopacini 1098eef
-
Added a new boundary condition with time-varying angle of attack. 7c5ebda
-
Added an interface to pass OpenFOAM fields in the C++ layer to the Python layer. 7c5ebda
-
Fixed an issue to avoid the dF partials calculation from initializing the objFunc class multiple times. b3b52df
-
Fixed a bug for conjugate heat transfer. The setThermal was not set to the C++ AD layer, it is fixed now. d7073e1
-
Fixed an issue in area calculation for heat transfer objFunc. The area was calculated once and not updated. It is fixed now. b3b52df
-
Added a regression model class that can use local flow features to compute a field variable. fae63b7
-
Added a new feature that automatically validates if the state variables are valid (i.e., if there are nan and inf values) during each primal iteration. If invalid values are detected, the primal will reset these invalid values to its initial reference ones and return a fail flag for the primal. aafbff4
-
Added a new feature to use internal design variables for all v2 scripts. This new feature allows us to directly set the angle of attack, beta, and alpha variables without the need to load the FFD. f713943
-
Reimplemented the sensitivity map and made the sensitivity fields fully consistent with the other fields in OpenFOAM. aa18fb4
-
Changed the naming convention for the optimization intermediate solutions. It was called 0.0000001, 0.000002, etc. Now it is called 1e-8, 2e-8, etc. The new naming convention is fully consistent with OpenFOAM's built-in standard. aa18fb4
-
Updated the solidDisplacement solver and made its derivatives accurate. d44b670
Dependency update
None
Backward-incompatible changes
None
v3.0.8
Changes
- Added an option to use constrainHbyA 35e4cd4. This allows the DASolvers to be more consistent with OpenFOAM's original solvers.
- Added an option to automatically check if the patch names in primalBC and objFunc are valid. a649d7e
- Fixed the inaccurate mesh quality objFunc in parallel. 0cf80ff
- Renamed the calcLiftPerS utility to calcForcePerS, so it is more general. fa18d2a
- Added the writeDeformedFFDs feature back. Also added an option to write deformed constraints. 388bd48
- Added a location (e.g., maximal radius) objective function. 3956592
- Fixed a bug for the vector sensitivity map. Also allowed using vector field variables are design variables. 767274c
Dependency update
None
Backward-incompatible changes
None
v3.0.7
Changes
- Used OpenFOAM's built-in conjugate heat transfer coupling scheme: turbulentTemperatureCoupledBaffleMixed. The old fluid (heat flux) and solid (temperature) coupling scheme is deprecated. cc521c5
- Added a new solver DAHeatTransferFoam for conjugate heat transfer. cc521c5
- Added an initial version of the CFD-based wing-propeller coupling interface. 6c6f385
- Added
deactivateValue
calls aftergetGradient
calls for all AD functions. 6f90b77 Now, all the AD functions will call the forward func twice. The first time is for computing the matrix-vector products or partial derivatives. Then, we will deactivate all the inputs and call the forward func one more time. This will let the zero-seed inputs propagate to the outputs to clean up the seeds for all intermediate OF variables. Not doing this may potentially mess up the seeds for future AD functions. - Fixed a bug that relative tolerances were sometimes not properly set when solving multiple adjoint equations in an optimization iteration. 273a80b
- Allowed using totalPressure and totalTemperature as the boundary conditions for turbomachinery cases. 046b0d2. Check the new Rotor37 setup from here
- Added an automatic docker image build CI. 0080e31. Now the DAFoam repo will automatically build and deploy a new docker image: dafoam/opt-packages:latest for each new commit.
Dependency update
We have updated the following dependencies. Check the latest installation guide for more details.
-
pyOptSparse updated to 2.10.1
-
OpenMDAO updated to 3.26
-
FUNtoFEM updated to v0.3
-
Mphys updated to b6db10
Backward-incompatible changes
None
v3.0.6
Changes
- Added a new feature to call Python functions in the C++ layer. 1f68006
- Use TensorFlow Python APIs for predicting and calculating gradients. The old TensorFlow C APIs are deprecated. 1f68006
- Fixed a bug for multi-point setup caused by a recent update. fd32b81
- Updated the CoDiPack and MediPack versions and used the latest APIs for AD tapes 6e9cd14
- Added an option to use uniform fvSource as a design variables to replace the uniformPressureGradient option 106f054
- Allowed using non-geo design variable setup for topology optimization or field inversion. Now we don't need to set up FFD or meshOptions for these cases. fb38ae1 Check the new tutorial run script from here
- Showed errors in the GitHub Actions tests by removing the
2> errorLog.txt
compilation argument in the test scripts. 3c477e2
Dependency update
- OpenFOAM-AD upgraded to v1.3.0 with the latest CoDiPack and MeDiPack versions.
- Deprecated the TensorFlow C APIs and used the Python APIs instead.
Backward-incompatible changes
None
v3.0.5
Changes
- Added the conjugate heat transfer optimization capability 6233802
- Added a function to calculate fvSource based on propeller design parameters b3f73e2
- Added wall heat flux objective function to solid solvers d8b721a
- Added a new key
couplingInfo
in DAOption for setting MDO coupling information 9768b2c - Changed docker test image OS to Ubuntu 20.04 2f13ee8
Dependency update
None
Backward-incompatible changes
- The old
fsi
key for setting aerostructural coupling is deprecated. Now the aerostructural information is set in the new keycouplingInfo
. See an example from here check_total
function needs an additional key calledfunctionals
. For example, we need to replace the old keycruise.aero_post.CL
withcruise.aero_post.functionals.CL
. See an example from here