Replies: 1 comment 1 reply
-
I resolved the above error by modifying CConfig.hpp but my Plunging_Phase is not working yet |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, Thank you in advance for your help.
It seems like the current version has 'PITCHING_PHASE' option but not 'PLUNGING_PHASE'
I like to implement the 'PLUNGING_PHASE' option but I encountered some errors during ninja compling as below,
It seems like ‘MarkerPlunging_Phase’ was not declared, but where and How can I declare that?
So far I modified CConfig.cpp and CMeshSover.cpp by copying the sentences for PITCHING_PHASE.
Thanks for your help. I'm not familiar with these coding stuff and still learning
error message during ninja compiling
[1/11] Compiling C++ object SU2_CFD/src/libSU2core.a.p/solvers_CMeshSolver.cpp.o
FAILED: SU2_CFD/src/libSU2core.a.p/solvers_CMeshSolver.cpp.o
c++ -ISU2_CFD/src/libSU2core.a.p -ISU2_CFD/src -I../SU2_CFD/src -I../externals/CLI11 -I../externals/cgns/adf -I../externals/cgns/adfh -Iexternals/cgns -I../externals/cgns -Iexternals/cgns/hdf5 -I../externals/cgns/hdf5 -I../externals/metis/include -I../externals/metis/GKlib -I../externals/metis/libmetis -I../externals/parmetis/include -I../externals/parmetis/libparmetis -Iexternals/tecio -I../externals/tecio -Iexternals/tecio/teciompisrc -I../externals/tecio/teciompisrc -I../externals/mel -ICommon/src -I../Common/src -I/usr/lib/x86_64-linux-gnu/openmpi/include -I/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -std=c++11 -O3 -fPIC -pthread -Wno-empty-body -Wno-ignored-qualifiers -Wno-unused-parameter -Wno-deprecated-declarations -Wno-error=cast-function-type -Wno-cast-function-type -Wno-error=stringop-truncation -Wno-stringop-truncation -Wno-error=missing-field-initializers -Wno-missing-field-initializers -Wno-error=class-memaccess -Wno-class-memaccess -DHAVE_CGNS -DNDEBUG -DHAVE_MPI -DHAVE_METIS -DHAVE_PARMETIS -DHAVE_TECIO -DTECIOMPI -MD -MQ SU2_CFD/src/libSU2core.a.p/solvers_CMeshSolver.cpp.o -MF SU2_CFD/src/libSU2core.a.p/solvers_CMeshSolver.cpp.o.d -o SU2_CFD/src/libSU2core.a.p/solvers_CMeshSolver.cpp.o -c ../SU2_CFD/src/solvers/CMeshSolver.cpp
../SU2_CFD/src/solvers/CMeshSolver.cpp: In member function ‘void CMeshSolver::Surface_Plunging(CGeometry*, CConfig*, long unsigned int)’:
../SU2_CFD/src/solvers/CMeshSolver.cpp:1292:26: error: ‘class CConfig’ has no member named ‘GetMarkerPlunging_Phase’; did you mean ‘GetMarkerPitching_Phase’?
1292 | Phase[iDim] = config->GetMarkerPlunging_Phase(jMarker, iDim)*DEG2RAD;
| ^~~~~~~~~~~~~~~~~~~~~~~
| GetMarkerPitching_Phase
[2/11] Compiling C++ object Common/src/libSU2Common.a.p/CConfig.cpp.o
FAILED: Common/src/libSU2Common.a.p/CConfig.cpp.o
c++ -ICommon/src/libSU2Common.a.p -ICommon/src -I../Common/src -I../externals/CLI11 -I../externals/cgns/adf -I../externals/cgns/adfh -Iexternals/cgns -I../externals/cgns -Iexternals/cgns/hdf5 -I../externals/cgns/hdf5 -I../externals/metis/include -I../externals/metis/GKlib -I../externals/metis/libmetis -I../externals/parmetis/include -I../externals/parmetis/libparmetis -Iexternals/tecio -I../externals/tecio -Iexternals/tecio/teciompisrc -I../externals/tecio/teciompisrc -I../externals/mel -I/usr/lib/x86_64-linux-gnu/openmpi/include -I/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -std=c++11 -O3 -fPIC -pthread -Wno-empty-body -Wno-ignored-qualifiers -Wno-unused-parameter -Wno-deprecated-declarations -Wno-error=cast-function-type -Wno-cast-function-type -Wno-error=stringop-truncation -Wno-stringop-truncation -Wno-error=missing-field-initializers -Wno-missing-field-initializers -Wno-error=class-memaccess -Wno-class-memaccess -DHAVE_CGNS -DNDEBUG -DHAVE_MPI -DHAVE_METIS -DHAVE_PARMETIS -DHAVE_TECIO -DTECIOMPI -MD -MQ Common/src/libSU2Common.a.p/CConfig.cpp.o -MF Common/src/libSU2Common.a.p/CConfig.cpp.o.d -o Common/src/libSU2Common.a.p/CConfig.cpp.o -c ../Common/src/CConfig.cpp
../Common/src/CConfig.cpp: In member function ‘void CConfig::SetPointersNull()’:
../Common/src/CConfig.cpp:987:3: error: ‘MarkerPlunging_Phase’ was not declared in this scope; did you mean ‘MarkerPitching_Phase’?
987 | MarkerPlunging_Phase = nullptr;
| ^~~~~~~~~~~~~~~~~~~~
| MarkerPitching_Phase
../Common/src/CConfig.cpp: In member function ‘void CConfig::SetConfig_Options()’:
../Common/src/CConfig.cpp:2162:45: error: ‘Plunging_Phase’ was not declared in this scope; did you mean ‘Pitching_Phase’?
2162 | addDoubleArrayOption("PLUNGING_PHASE", 3, Plunging_Phase);
| ^~~~~~~~~~~~~~
| Pitching_Phase
../Common/src/CConfig.cpp:2179:49: error: ‘nMarkerPlunging_Phase’ was not declared in this scope; did you mean ‘nMarkerPitching_Phase’?
2179 | addDoubleListOption("SURFACE_PLUNGING_PHASE", nMarkerPlunging_Phase, MarkerPlunging_Phase);
| ^~~~~~~~~~~~~~~~~~~~~
| nMarkerPitching_Phase
../Common/src/CConfig.cpp:2179:72: error: ‘MarkerPlunging_Phase’ was not declared in this scope; did you mean ‘MarkerPitching_Phase’?
2179 | addDoubleListOption("SURFACE_PLUNGING_PHASE", nMarkerPlunging_Phase, MarkerPlunging_Phase);
| ^~~~~~~~~~~~~~~~~~~~
| MarkerPitching_Phase
ninja: build stopped: subcommand failed.
In CMeshSolver I modified as follows,
void CMeshSolver::Surface_Plunging(CGeometry *geometry, CConfig *config, unsigned long iter) {
su2double deltaT, time_new, time_old, Lref;
su2double Center[3] = {0.0}, VarCoord[3] = {0.0}, Omega[3] = {0.0}, Ampl[3] = {0.0}, Phase[3] = {0.0};
su2double VarCoordAbs[3] = {0.0};
const su2double DEG2RAD = PI_NUMBER/180.0;
unsigned short iMarker, jMarker;
unsigned long iPoint, iVertex;
string Marker_Tag, Moving_Tag;
unsigned short iDim;
/--- Retrieve values from the config file ---/
deltaT = config->GetDelta_UnstTimeND();
Lref = config->GetLength_Ref();
/--- Compute delta time based on physical time step ---/
time_new = iter*deltaT;
if (iter == 0) time_old = time_new;
else time_old = (iter-1)*deltaT;
/--- Store displacement of each node on the plunging surface ---/
/--- Loop over markers and find the particular marker(s) (surface) to plunge ---/
for (iMarker = 0; iMarker < config->GetnMarker_All(); iMarker++) {
if (config->GetMarker_All_Moving(iMarker) != YES) continue;
}
/--- When updating the origins it is assumed that all markers have the
same plunging movement, because we use the last VarCoord set ---/
/--- Set the mesh motion center to the new location after
incrementing the position with the translation. This new
location will be used for subsequent mesh motion for the given marker.---/
for (jMarker=0; jMarkerGetnMarker_Moving(); jMarker++) {
}
/--- Set the moment computation center to the new location after
incrementing the position with the plunging. ---/
for (jMarker=0; jMarker < config->GetnMarker_Monitoring(); jMarker++) {
Center[0] = config->GetRefOriginMoment_X(jMarker) + VarCoord[0];
Center[1] = config->GetRefOriginMoment_Y(jMarker) + VarCoord[1];
Center[2] = config->GetRefOriginMoment_Z(jMarker) + VarCoord[2];
config->SetRefOriginMoment_X(jMarker, Center[0]);
config->SetRefOriginMoment_Y(jMarker, Center[1]);
config->SetRefOriginMoment_Z(jMarker, Center[2]);
}
}
In CConfig.cpp I modified as follows,
/--- Moving mesh pointers ---/
nKind_SurfaceMovement = 0;
Kind_SurfaceMovement = nullptr;
LocationStations = nullptr;
MarkerMotion_Origin = nullptr;
MarkerTranslation_Rate = nullptr;
MarkerRotation_Rate = nullptr;
MarkerPitching_Omega = nullptr;
MarkerPitching_Ampl = nullptr;
MarkerPitching_Phase = nullptr;
MarkerPlunging_Omega = nullptr;
MarkerPlunging_Ampl = nullptr;
MarkerPlunging_Phase = nullptr;
addDoubleArrayOption("PLUNGING_OMEGA", 3, Plunging_Omega);
addDoubleListOption("SURFACE_PLUNGING_PHASE", nMarkerPlunging_Phase, MarkerPlunging_Phase);
Beta Was this translation helpful? Give feedback.
All reactions