Add thermal expansion effects to FEA solver by pcarruscag · Pull Request #2399 · su2code/SU2
Conversation
Proposed Changes
Fixed delta T based on freestream temperature and material reference temperature for now.
Thermal expansion coefficient can have one value per material (same as E, nu, and rho).
PR Checklist
- I am submitting my contribution to the develop branch.
- My contribution generates no new compiler warnings (try with --warnlevel=3 when using meson).
- My contribution is commented and consistent with SU2 style (https://su2code.github.io/docs_v7/Style-Guide/).
- I used the pre-commit hook to prevent dirty commits and used
pre-commit run --allto format old commits. - I have added a test case that demonstrates my contribution, if necessary.
- I have updated appropriate documentation (Tutorials, Docs Page, config_template.cpp), if necessary.
| * \brief Shape function Jacobian (dNi) evaluated at point Xi,Eta. | ||
| */ | ||
| inline static void ShapeFunctionJacobian(su2double Xi, su2double Eta, su2double dNi[][2]) { | ||
| inline static void ShapeFunctionJacobian(const su2double& Xi, const su2double& Eta, su2double dNi[][2]) { |
Check notice
Code scanning / CodeQL
No raw arrays in interfaces
Raw arrays should not be used in interfaces. A container class should be used instead.
| "of entries (the number of materials).", CURRENT_FUNCTION); | ||
| if (nMaterialThermalExpansion == 0) { | ||
| nMaterialThermalExpansion = 1; | ||
| MaterialThermalExpansion = new su2double[1](); |
Check warning
Code scanning / CodeQL
Resource not released in destructor
Resource MaterialThermalExpansion is acquired by class CConfig but not released anywhere in this class.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
COption deletes it its destructor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters