Skip to content

Commit

Permalink
Handle temperature from the heat_solver and use in calculating stress…
Browse files Browse the repository at this point in the history
… and stiffness
  • Loading branch information
Vaish-W committed Jan 3, 2025
1 parent 46249b6 commit f48826a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
1 change: 0 additions & 1 deletion SU2_CFD/include/solvers/CFEASolver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#pragma once

#include "CFEASolverBase.hpp"
#include "CHeatSolver.hpp"

/*!
* \class CFEASolver
Expand Down
20 changes: 18 additions & 2 deletions SU2_CFD/src/solvers/CFEASolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -694,8 +694,8 @@ void CFEASolver::Compute_StiffMatrix(CGeometry *geometry, CNumerics **numerics,
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]]);
const su2double temperature = heat_solver->GetNodes()->GetSolution(indexNode[iNode], 0);
element->SetTemperature(iNode, temperature);
}
}

Expand Down Expand Up @@ -804,6 +804,14 @@ void CFEASolver::Compute_StiffMatrix_NodalStressRes(CGeometry *geometry, CNumeri
de_elem->SetRef_Coord(iNode, iDim, val_Coord);
}
}
if (heat_solver) {
const su2double temperature = heat_solver->GetNodes()->GetSolution(indexNode[iNode], 0);
fea_elem->SetTemperature(iNode, temperature);

if (de_effects) {
de_elem->SetTemperature(iNode, temperature);
}
}
}

/*--- In topology mode determine the penalty to apply to the stiffness. ---*/
Expand Down Expand Up @@ -1102,6 +1110,10 @@ void CFEASolver::Compute_NodalStressRes(CGeometry *geometry, CNumerics **numeric
element->SetCurr_Coord(iNode, iDim, val_Sol);
element->SetRef_Coord(iNode, iDim, val_Coord);
}
if (heat_solver) {
const su2double temperature = heat_solver->GetNodes()->GetSolution(indexNode[iNode], 0);
element->SetTemperature(iNode, temperature);
}
}

/*--- In topology mode determine the penalty to apply to the stiffness ---*/
Expand Down Expand Up @@ -1218,6 +1230,10 @@ void CFEASolver::Compute_NodalStress(CGeometry *geometry, CNumerics **numerics,
element->SetCurr_Coord(iNode, iDim, val_Sol);
element->SetRef_Coord(iNode, iDim, val_Coord);
}
if (heat_solver) {
const su2double temperature = heat_solver->GetNodes()->GetSolution(indexNode[iNode], 0);
element->SetTemperature(iNode, temperature);
}
}

/*--- In topology mode determine the penalty to apply to the stiffness ---*/
Expand Down

0 comments on commit f48826a

Please sign in to comment.