Skip to content

Commit 5fdc664

Browse files
committed
add translation
1 parent 3e8ba47 commit 5fdc664

4 files changed

Lines changed: 34 additions & 6 deletions

File tree

Common/include/CConfig.hpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5924,6 +5924,14 @@ class CConfig {
59245924
*/
59255925
su2double GetMarkerTranslationRate(unsigned short iMarkerMoving, unsigned short iDim) const { return MarkerTranslation_Rate[3*iMarkerMoving + iDim];}
59265926

5927+
/*!
5928+
* \brief Set the translation rate of the marker.
5929+
* \param[in] iDim - spatial component
5930+
* \param[in] val - translational velocity
5931+
* \return Translational velocity of the mesh.
5932+
*/
5933+
void SetMarkerTranslation_Rate(unsigned short iMarkerMoving, unsigned short iDim, su2double val) const { MarkerTranslation_Rate[3*iMarkerMoving + iDim] = val;}
5934+
59275935
/*!
59285936
* \brief Get the rotation rate of the mesh.
59295937
* \param[in] iDim - spatial component
@@ -5950,7 +5958,8 @@ class CConfig {
59505958
* \brief Set the rotation rate of the marker.
59515959
* \param[in] iMarkerMoving - Index of the moving marker (as specified in Marker_Moving)
59525960
* \param[in] iDim - spatial component
5953-
* \return Rotation velocity of the marker.
5961+
* \param[in] val - Rotational velocity
5962+
59545963
*/
59555964
void SetMarkerRotation_Rate(unsigned short iMarkerMoving, unsigned short iDim, su2double val) const { MarkerRotation_Rate[3*iMarkerMoving + iDim] = val;}
59565965

SU2_CFD/include/drivers/CDriver.hpp

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,8 +535,23 @@ class CDriver : public CDriverBase {
535535
* \param[in] rot_z - Value of Angular velocity about z-axes.
536536
*/
537537
void SetRotationRate(passivedouble rot_x, passivedouble rot_y, passivedouble rot_z);
538-
538+
/*!
539+
* \brief Set the moving wall marker rotation rates.
540+
* \param[in] iMaker - Index of moving wall marker.
541+
* \param[in] rot_x - Value of Angular velocity about x-axes.
542+
* \param[in] rot_y - Value of Angular velocity about y-axes.
543+
* \param[in] rot_z - Value of Angular velocity about z-axes.
544+
*/
539545
void SetMarkerRotationRate(short int iMarker, passivedouble rot_x, passivedouble rot_y, passivedouble rot_z);
546+
/*!
547+
* \brief Set the moving wall marker rotation rates.
548+
* \param[in] iMaker - Index of moving wall marker.
549+
* \param[in] vel_x - Value of velocity about x-axes.
550+
* \param[in] vel_y - Value of velocity about y-axes.
551+
* \param[in] vel_z - Value of velocity about z-axes.
552+
*/
553+
void SetMarkerTranslationRate(short int iMarker, passivedouble vel_x, passivedouble vel_y, passivedouble vel_z);
554+
540555
/// \}
541556
};
542557

SU2_CFD/src/iteration/CIteration.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,7 @@ void CIteration::SetGrid_Movement(CGeometry** geometry, CSurfaceMovement* surfac
9696
/*--- Apply rigid mesh transformation to entire grid first, if necessary ---*/
9797

9898
if (IntIter == 0) {
99-
cout << "TESTING:\n";
100-
101-
cout << config->GetSurface_Movement(MOVING_WALL);
102-
cout << "\n";
99+
103100
if (Kind_Grid_Movement == AEROELASTIC_RIGID_MOTION) {
104101
if (rank == MASTER_NODE) cout << endl << " Performing rigid mesh transformation." << endl;
105102

SU2_CFD/src/python_wrapper_structure.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,4 +173,11 @@ void CDriver::SetMarkerRotationRate(short int iMarker, passivedouble rot_x, pass
173173
config_container[iZone]->SetMarkerRotation_Rate(iMarker, 2, rot_z);
174174
}
175175
}
176+
void CDriver::SetMarkerTranslationRate(short int iMarker, passivedouble vel_x, passivedouble vel_y, passivedouble vel_z){
177+
for (iZone = 0; iZone < nZone; iZone++) {
178+
config_container[iZone]->SetMarkerTranslation_Rate(iMarker, 0, vel_x);
179+
config_container[iZone]->SetMarkerTranslation_Rate(iMarker, 1, vel_y);
180+
config_container[iZone]->SetMarkerTranslation_Rate(iMarker, 2, vel_z);
181+
}
182+
}
176183

0 commit comments

Comments
 (0)