@@ -566,7 +566,7 @@ void CFEASolver::Preprocessing(CGeometry *geometry, CSolver **solver_container,
566566
567567 /* --- Set the pointer to the heat solver so we can access temperatures. ---*/
568568 if (config->GetWeakly_Coupled_Heat ()) {
569- heat_solver = solver_container[HEAT_SOL];
569+ heat_nodes = solver_container[HEAT_SOL]-> GetNodes () ;
570570 }
571571
572572 /*
@@ -652,6 +652,7 @@ void CFEASolver::Compute_StiffMatrix(CGeometry *geometry, CNumerics **numerics,
652652 const bool topology_mode = config->GetTopology_Optimization ();
653653 const su2double simp_exponent = config->GetSIMP_Exponent ();
654654 const su2double simp_minstiff = config->GetSIMP_MinStiffness ();
655+ const su2double t_ref = config->GetTemperature_Ref ();
655656
656657 /* --- Start OpenMP parallel region. ---*/
657658
@@ -694,8 +695,8 @@ void CFEASolver::Compute_StiffMatrix(CGeometry *geometry, CNumerics **numerics,
694695 element->SetRef_Coord (iNode, iDim, val_Coord);
695696 element->SetCurr_Coord (iNode, iDim, val_Sol);
696697 }
697- if (heat_solver ) {
698- element->SetTemperature (iNode, heat_solver-> GetNodes ()-> GetSolution (indexNode[iNode], 0 ));
698+ if (heat_nodes ) {
699+ element->SetTemperature (iNode, heat_nodes-> GetSolution (indexNode[iNode], 0 ) * t_ref );
699700 }
700701 }
701702
@@ -749,6 +750,7 @@ void CFEASolver::Compute_StiffMatrix_NodalStressRes(CGeometry *geometry, CNumeri
749750 const bool topology_mode = config->GetTopology_Optimization ();
750751 const su2double simp_exponent = config->GetSIMP_Exponent ();
751752 const su2double simp_minstiff = config->GetSIMP_MinStiffness ();
753+ const su2double t_ref = config->GetTemperature_Ref ();
752754
753755 /* --- Start OpenMP parallel region. ---*/
754756
@@ -804,8 +806,8 @@ void CFEASolver::Compute_StiffMatrix_NodalStressRes(CGeometry *geometry, CNumeri
804806 de_elem->SetRef_Coord (iNode, iDim, val_Coord);
805807 }
806808 }
807- if (heat_solver ) {
808- fea_elem->SetTemperature (iNode, heat_solver-> GetNodes ()-> GetSolution (indexNode[iNode], 0 ));
809+ if (heat_nodes ) {
810+ fea_elem->SetTemperature (iNode, heat_nodes-> GetSolution (indexNode[iNode], 0 ) * t_ref );
809811 }
810812 }
811813
@@ -890,6 +892,7 @@ void CFEASolver::Compute_MassMatrix(const CGeometry *geometry, CNumerics **numer
890892
891893 const bool topology_mode = config->GetTopology_Optimization ();
892894 const su2double simp_minstiff = config->GetSIMP_MinStiffness ();
895+ const su2double t_ref = config->GetTemperature_Ref ();
893896
894897 /* --- Never record this method as the mass matrix is passive (but the mass residual is not). ---*/
895898 const bool wasActive = AD::BeginPassive ();
@@ -930,8 +933,8 @@ void CFEASolver::Compute_MassMatrix(const CGeometry *geometry, CNumerics **numer
930933 su2double val_Coord = Get_ValCoord (geometry, indexNode[iNode], iDim);
931934 element->SetRef_Coord (iNode, iDim, val_Coord);
932935 }
933- if (heat_solver ) {
934- element->SetTemperature (iNode, heat_solver-> GetNodes ()-> GetSolution (indexNode[iNode], 0 ));
936+ if (heat_nodes ) {
937+ element->SetTemperature (iNode, heat_nodes-> GetSolution (indexNode[iNode], 0 ) * t_ref );
935938 }
936939 }
937940
@@ -980,6 +983,7 @@ void CFEASolver::Compute_MassRes(const CGeometry *geometry, CNumerics **numerics
980983
981984 const bool topology_mode = config->GetTopology_Optimization ();
982985 const su2double simp_minstiff = config->GetSIMP_MinStiffness ();
986+ const su2double t_ref = config->GetTemperature_Ref ();
983987
984988 /* --- Clear vector before calculation. ---*/
985989 TimeRes.SetValZero ();
@@ -1014,8 +1018,8 @@ void CFEASolver::Compute_MassRes(const CGeometry *geometry, CNumerics **numerics
10141018 su2double val_Coord = Get_ValCoord (geometry, indexNode[iNode], iDim);
10151019 element->SetRef_Coord (iNode, iDim, val_Coord);
10161020 }
1017- if (heat_solver ) {
1018- element->SetTemperature (iNode, heat_solver-> GetNodes ()-> GetSolution (indexNode[iNode], 0 ));
1021+ if (heat_nodes ) {
1022+ element->SetTemperature (iNode, heat_nodes-> GetSolution (indexNode[iNode], 0 ) * t_ref );
10191023 }
10201024 }
10211025
@@ -1062,6 +1066,7 @@ void CFEASolver::Compute_NodalStressRes(CGeometry *geometry, CNumerics **numeric
10621066 const bool topology_mode = config->GetTopology_Optimization ();
10631067 const su2double simp_exponent = config->GetSIMP_Exponent ();
10641068 const su2double simp_minstiff = config->GetSIMP_MinStiffness ();
1069+ const su2double t_ref = config->GetTemperature_Ref ();
10651070
10661071 /* --- Start OpenMP parallel region. ---*/
10671072
@@ -1111,8 +1116,8 @@ void CFEASolver::Compute_NodalStressRes(CGeometry *geometry, CNumerics **numeric
11111116 element->SetCurr_Coord (iNode, iDim, val_Sol);
11121117 element->SetRef_Coord (iNode, iDim, val_Coord);
11131118 }
1114- if (heat_solver ) {
1115- element->SetTemperature (iNode, heat_solver-> GetNodes ()-> GetSolution (indexNode[iNode], 0 ));
1119+ if (heat_nodes ) {
1120+ element->SetTemperature (iNode, heat_nodes-> GetSolution (indexNode[iNode], 0 ) * t_ref );
11161121 }
11171122 }
11181123
@@ -1158,6 +1163,7 @@ void CFEASolver::Compute_NodalStress(CGeometry *geometry, CNumerics **numerics,
11581163 const bool topology_mode = config->GetTopology_Optimization ();
11591164 const su2double simp_exponent = config->GetSIMP_Exponent ();
11601165 const su2double simp_minstiff = config->GetSIMP_MinStiffness ();
1166+ const su2double t_ref = config->GetTemperature_Ref ();
11611167
11621168 const auto stressParam = config->GetStressPenaltyParam ();
11631169 const su2double stress_scale = 1.0 / stressParam[0 ];
@@ -1230,8 +1236,8 @@ void CFEASolver::Compute_NodalStress(CGeometry *geometry, CNumerics **numerics,
12301236 element->SetCurr_Coord (iNode, iDim, val_Sol);
12311237 element->SetRef_Coord (iNode, iDim, val_Coord);
12321238 }
1233- if (heat_solver ) {
1234- element->SetTemperature (iNode, heat_solver-> GetNodes ()-> GetSolution (indexNode[iNode], 0 ));
1239+ if (heat_nodes ) {
1240+ element->SetTemperature (iNode, heat_nodes-> GetSolution (indexNode[iNode], 0 ) * t_ref );
12351241 }
12361242 }
12371243
@@ -1434,6 +1440,8 @@ void CFEASolver::Compute_NodalStress(CGeometry *geometry, CNumerics **numerics,
14341440
14351441void CFEASolver::Compute_BodyForces (CGeometry *geometry, CNumerics **numerics, const CConfig *config) {
14361442
1443+ const su2double t_ref = config->GetTemperature_Ref ();
1444+
14371445 /* --- Start OpenMP parallel region. ---*/
14381446
14391447 SU2_OMP_PARALLEL
@@ -1473,8 +1481,8 @@ void CFEASolver::Compute_BodyForces(CGeometry *geometry, CNumerics **numerics, c
14731481 su2double val_Coord = Get_ValCoord (geometry, indexNode[iNode], iDim);
14741482 element->SetRef_Coord (iNode, iDim, val_Coord);
14751483 }
1476- if (heat_solver ) {
1477- element->SetTemperature (iNode, heat_solver-> GetNodes ()-> GetSolution (indexNode[iNode], 0 ));
1484+ if (heat_nodes ) {
1485+ element->SetTemperature (iNode, heat_nodes-> GetSolution (indexNode[iNode], 0 ) * t_ref );
14781486 }
14791487 }
14801488
@@ -3017,6 +3025,7 @@ void CFEASolver::Stiffness_Penalty(CGeometry *geometry, CNumerics **numerics, CC
30173025 PenaltyValue = 0.0 ;
30183026 return ;
30193027 }
3028+ const su2double t_ref = config->GetTemperature_Ref ();
30203029
30213030 su2double weightedValue = 0.0 ;
30223031 su2double weightedValue_reduce = 0.0 ;
@@ -3048,8 +3057,8 @@ void CFEASolver::Stiffness_Penalty(CGeometry *geometry, CNumerics **numerics, CC
30483057 su2double val_Coord = Get_ValCoord (geometry, indexNode[iNode], iDim);
30493058 element->SetRef_Coord (iNode, iDim, val_Coord);
30503059 }
3051- if (heat_solver ) {
3052- element->SetTemperature (iNode, heat_solver-> GetNodes ()-> GetSolution (indexNode[iNode], 0 ));
3060+ if (heat_nodes ) {
3061+ element->SetTemperature (iNode, heat_nodes-> GetSolution (indexNode[iNode], 0 ) * t_ref );
30533062 }
30543063 }
30553064
0 commit comments