-
Notifications
You must be signed in to change notification settings - Fork 848
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Coupled solver for thermoelasticity #2404
Changes from 4 commits
3a0b257
9daea2e
323c27b
46249b6
60d7b6c
b1499dd
0298a31
3c83bbe
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -30,6 +30,7 @@ | |||||||||
#include "../../include/numerics/elasticity/CFEAElasticity.hpp" | ||||||||||
#include "../../../Common/include/toolboxes/printing_toolbox.hpp" | ||||||||||
#include "../../../Common/include/toolboxes/geometry_toolbox.hpp" | ||||||||||
#include "../../include/solvers/CHeatSolver.hpp" | ||||||||||
#include <algorithm> | ||||||||||
|
||||||||||
using namespace GeometryToolbox; | ||||||||||
|
@@ -563,6 +564,10 @@ void CFEASolver::Preprocessing(CGeometry *geometry, CSolver **solver_container, | |||||||||
const bool disc_adj_fem = (config->GetKind_Solver() == MAIN_SOLVER::DISC_ADJ_FEM); | ||||||||||
const bool topology_mode = config->GetTopology_Optimization(); | ||||||||||
|
||||||||||
if (config->GetWeakly_Coupled_Heat()) { | ||||||||||
heat_solver = solver_container[HEAT_SOL]; | ||||||||||
} | ||||||||||
|
||||||||||
/* | ||||||||||
* For topology optimization we apply a filter on the design density field to avoid | ||||||||||
* numerical issues (checkerboards), ensure mesh independence, and impose a length scale. | ||||||||||
|
@@ -687,6 +692,10 @@ void CFEASolver::Compute_StiffMatrix(CGeometry *geometry, CNumerics **numerics, | |||||||||
su2double val_Sol = nodes->GetSolution(indexNode[iNode],iDim) + val_Coord; | ||||||||||
element->SetRef_Coord(iNode, iDim, val_Coord); | ||||||||||
element->SetCurr_Coord(iNode, iDim, val_Sol); | ||||||||||
} | ||||||||||
if (heat_solver) { | ||||||||||
auto nodal_temperatures = dynamic_cast<CSolver *>(heat_solver)->GetNodalTemperature(); | ||||||||||
element->SetTemperature(iNode, nodal_temperatures[indexNode[iNode]]); | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Temperature is the solution of the heat solver, the "solution" (and other fields) are stored in CVariable classes which are the "nodes" member of the solvers.
Suggested change
|
||||||||||
} | ||||||||||
} | ||||||||||
|
||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you added this by mistake |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need to include CHeatSolver anymore because you are only using the virtual interface (CSolver).