From 9bc071697f0bae0bba1e5f1e1f6938f1a9c741d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vo=C3=9F=2C=20Arne?= Date: Fri, 24 Feb 2023 12:48:27 +0100 Subject: [PATCH 01/14] Adding a new choice (Z_DIR) for parameter GUST_DIR and a note with respect to the wavelength of 1-cos gusts to the config_template. --- config_template.cfg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config_template.cfg b/config_template.cfg index 0463ce3357f7..fb51116a546d 100644 --- a/config_template.cfg +++ b/config_template.cfg @@ -544,10 +544,11 @@ WIND_GUST = NO % Type of gust (NONE, TOP_HAT, SINE, ONE_M_COSINE, VORTEX, EOG) GUST_TYPE = NONE % -% Direction of the gust (X_DIR or Y_DIR) +% Direction of the gust (X_DIR, Y_DIR or Z_DIR) GUST_DIR = Y_DIR % % Gust wavelenght (meters) +% Note for 1-cos gusts: this is the full gust length, not the gust gradient H (half gust length) as used for example in CS-25. GUST_WAVELENGTH= 10.0 % % Number of gust periods From c015566dca0e3bc817188741c3c886ff7b7a2edb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vo=C3=9F=2C=20Arne?= Date: Fri, 24 Feb 2023 12:49:55 +0100 Subject: [PATCH 02/14] Implement new option Z_DIR --- Common/include/option_structure.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Common/include/option_structure.hpp b/Common/include/option_structure.hpp index 72347466647c..3b6303c7fad0 100644 --- a/Common/include/option_structure.hpp +++ b/Common/include/option_structure.hpp @@ -778,11 +778,13 @@ static const MapType Gust_Type_Map = { */ enum ENUM_GUST_DIR { X_DIR = 0, /*!< \brief Gust direction-X. */ - Y_DIR = 1 /*!< \brief Gust direction-Y. */ + Y_DIR = 1, /*!< \brief Gust direction-Y. */ + Z_DIR = 2 /*!< \brief Gust direction-Z. */ }; static const MapType Gust_Dir_Map = { MakePair("X_DIR", X_DIR) MakePair("Y_DIR", Y_DIR) + MakePair("Z_DIR", Z_DIR) }; // If you add to ENUM_CENTERED, you must also add the option to ENUM_CONVECTIVE From cc353ee548a2189fc9289842cb0e0e0dabc4f7f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vo=C3=9F=2C=20Arne?= Date: Fri, 24 Feb 2023 12:56:17 +0100 Subject: [PATCH 03/14] I think we don't need to set any source terms because they depend on the gust derivatives, which are zero in all implemented cases. This piece of code belongs to the split velocity method, which is currently not used as far as I understand. However, when trying to remove it, I broke the code elsewhere. --- SU2_CFD/src/numerics/flow/flow_sources.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/SU2_CFD/src/numerics/flow/flow_sources.cpp b/SU2_CFD/src/numerics/flow/flow_sources.cpp index 2fb164f3d1fe..3d297157a515 100644 --- a/SU2_CFD/src/numerics/flow/flow_sources.cpp +++ b/SU2_CFD/src/numerics/flow/flow_sources.cpp @@ -784,8 +784,13 @@ CNumerics::ResidualType<> CSourceWindGust::ComputeResidual(const CConfig* config //residual[3] = smz*Volume; residual[3] = se*Volume; } else { - SU2_MPI::Error("You should only be in the gust source term in two dimensions", CURRENT_FUNCTION); - } + // SU2_MPI::Error("You should only be in the gust source term in two dimensions", CURRENT_FUNCTION); + residual[0] = 0.0; + residual[1] = 0.0; + residual[2] = 0.0; + residual[3] = 0.0; + residual[4] = 0.0; + } /*--- For now the source term Jacobian is just set to zero ---*/ //bool implicit = (config->GetKind_TimeIntScheme_Flow() == EULER_IMPLICIT); From af9ee8283d5f10b2c96ad0487ea4cb1cf6b59da8 Mon Sep 17 00:00:00 2001 From: voss_ar Date: Wed, 12 Apr 2023 11:03:40 +0200 Subject: [PATCH 04/14] - extending gust to 3D - fixing 1-cosing gust amplitude --- SU2_CFD/src/iteration/CFluidIteration.cpp | 32 ++++++++++++++--------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/SU2_CFD/src/iteration/CFluidIteration.cpp b/SU2_CFD/src/iteration/CFluidIteration.cpp index db7a7a18be46..c1130421f2c6 100644 --- a/SU2_CFD/src/iteration/CFluidIteration.cpp +++ b/SU2_CFD/src/iteration/CFluidIteration.cpp @@ -318,13 +318,12 @@ void CFluidIteration::SetWind_GustField(CConfig* config, CGeometry** geometry, C // derivatives needed for the source term are calculated when applicable. If the gust derivatives are zero the source // term is also zero. The source term itself is implemented in the class CSourceWindGust - if (rank == MASTER_NODE) cout << endl << "Running simulation with a Wind Gust." << endl; unsigned short iDim, nDim = geometry[MESH_0]->GetnDim(); // We assume nDim = 2 - if (nDim != 2) { - if (rank == MASTER_NODE) { - cout << endl << "WARNING - Wind Gust capability is only verified for 2 dimensional simulations." << endl; - } - } +// if (nDim != 2) { +// if (rank == MASTER_NODE) { +// cout << endl << "WARNING - Wind Gust capability is only verified for 2 dimensional simulations." << endl; +// } +// } /*--- Gust Parameters from config ---*/ unsigned short Gust_Type = config->GetGust_Type(); @@ -340,7 +339,7 @@ void CFluidIteration::SetWind_GustField(CConfig* config, CGeometry** geometry, C unsigned long iPoint; unsigned short iMGlevel, nMGlevel = config->GetnMGLevels(); - su2double x, y, x_gust, dgust_dx, dgust_dy, dgust_dt; + su2double x, y, x_gust, dgust_dx, dgust_dy, dgust_dz, dgust_dt; su2double *Gust, *GridVel, *NewGridVel, *GustDer; su2double Physical_dt = config->GetDelta_UnstTime(); @@ -358,8 +357,15 @@ void CFluidIteration::SetWind_GustField(CConfig* config, CGeometry** geometry, C NewGridVel[iDim] = 0.0; } - GustDer = new su2double[3]; - for (unsigned short i = 0; i < 3; i++) { + // Print some information to check that we are doing the right thing. Not sure how to convert the index back to a string... + if (rank == MASTER_NODE) cout << endl << " Setting up a wind gust type " << Gust_Type << " with amplitude of " << gust_amp << " in direction " << GustDir << endl; + if (rank == MASTER_NODE) cout << " U_inf = " << Uinf << endl; + if (rank == MASTER_NODE) cout << " Physical_t = " << Physical_t << endl; + su2double loc_x = (xbegin + L + Uinf * (Physical_t - tbegin)); + if (rank == MASTER_NODE) cout << " Location_x = " << loc_x << endl; + + GustDer = new su2double[4]; + for (unsigned short i = 0; i < 4; i++) { GustDer[i] = 0.0; } @@ -393,6 +399,7 @@ void CFluidIteration::SetWind_GustField(CConfig* config, CGeometry** geometry, C } dgust_dx = 0.0; dgust_dy = 0.0; + dgust_dz = 0.0; dgust_dt = 0.0; /*--- Begin applying the gust ---*/ @@ -429,7 +436,7 @@ void CFluidIteration::SetWind_GustField(CConfig* config, CGeometry** geometry, C case ONE_M_COSINE: // Check if we are in the region where the gust is active if (x_gust > 0 && x_gust < n) { - Gust[GustDir] = gust_amp * (1 - cos(2 * PI_NUMBER * x_gust)); + Gust[GustDir] = gust_amp * 0.5 * (1 - cos(2 * PI_NUMBER * x_gust)); // Gust derivatives // dgust_dx = gust_amp*2*PI_NUMBER*(sin(2*PI_NUMBER*x_gust))/L; @@ -473,8 +480,9 @@ void CFluidIteration::SetWind_GustField(CConfig* config, CGeometry** geometry, C GustDer[0] = dgust_dx; GustDer[1] = dgust_dy; - GustDer[2] = dgust_dt; - + GustDer[2] = dgust_dz; + GustDer[3] = dgust_dt; + // I think we don't need to set any source terms because they depend on the derivatives, which are zero in all cases from above. solver[iMGlevel][FLOW_SOL]->GetNodes()->SetWindGust(iPoint, Gust); solver[iMGlevel][FLOW_SOL]->GetNodes()->SetWindGustDer(iPoint, GustDer); From 4ca52818bf28fa4ef1e88cd2556d8fa8e4ec0d75 Mon Sep 17 00:00:00 2001 From: voss_ar Date: Thu, 13 Apr 2023 10:16:00 +0200 Subject: [PATCH 05/14] Modifying the switch for resetting or keeping existing grid velocity to handle elastic mesh deformation. --- SU2_CFD/src/iteration/CFluidIteration.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SU2_CFD/src/iteration/CFluidIteration.cpp b/SU2_CFD/src/iteration/CFluidIteration.cpp index c1130421f2c6..a5adf9e62569 100644 --- a/SU2_CFD/src/iteration/CFluidIteration.cpp +++ b/SU2_CFD/src/iteration/CFluidIteration.cpp @@ -358,7 +358,7 @@ void CFluidIteration::SetWind_GustField(CConfig* config, CGeometry** geometry, C } // Print some information to check that we are doing the right thing. Not sure how to convert the index back to a string... - if (rank == MASTER_NODE) cout << endl << " Setting up a wind gust type " << Gust_Type << " with amplitude of " << gust_amp << " in direction " << GustDir << endl; + if (rank == MASTER_NODE) cout << endl << "Setting up a wind gust type " << Gust_Type << " with amplitude of " << gust_amp << " in direction " << GustDir << endl; if (rank == MASTER_NODE) cout << " U_inf = " << Uinf << endl; if (rank == MASTER_NODE) cout << " Physical_t = " << Physical_t << endl; su2double loc_x = (xbegin + L + Uinf * (Physical_t - tbegin)); @@ -388,7 +388,7 @@ void CFluidIteration::SetWind_GustField(CConfig* config, CGeometry** geometry, C for (iPoint = 0; iPoint < geometry[iMGlevel]->GetnPoint(); iPoint++) { /*--- Reset the Grid Velocity to zero if there is no grid movement ---*/ - if (Kind_Grid_Movement == GUST && !(config->GetFSI_Simulation())) { + if (Kind_Grid_Movement == GUST && !(config->GetFSI_Simulation()) && !(config->GetDynamic_Grid())) { for (iDim = 0; iDim < nDim; iDim++) geometry[iMGlevel]->nodes->SetGridVel(iPoint, iDim, 0.0); } From eb8a6ec3e12ff8e4c42bda1b89b3dc8cf3b9a906 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arne=20Vo=C3=9F?= Date: Fri, 14 Apr 2023 09:18:39 +0200 Subject: [PATCH 06/14] Restore 2D gusts --- SU2_CFD/src/iteration/CFluidIteration.cpp | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/SU2_CFD/src/iteration/CFluidIteration.cpp b/SU2_CFD/src/iteration/CFluidIteration.cpp index a5adf9e62569..49aeb6e18341 100644 --- a/SU2_CFD/src/iteration/CFluidIteration.cpp +++ b/SU2_CFD/src/iteration/CFluidIteration.cpp @@ -364,8 +364,8 @@ void CFluidIteration::SetWind_GustField(CConfig* config, CGeometry** geometry, C su2double loc_x = (xbegin + L + Uinf * (Physical_t - tbegin)); if (rank == MASTER_NODE) cout << " Location_x = " << loc_x << endl; - GustDer = new su2double[4]; - for (unsigned short i = 0; i < 4; i++) { + GustDer = new su2double[nDim+1]; + for (unsigned short i = 0; i < nDim+1; i++) { GustDer[i] = 0.0; } @@ -477,11 +477,17 @@ void CFluidIteration::SetWind_GustField(CConfig* config, CGeometry** geometry, C } /*--- Set the Wind Gust, Wind Gust Derivatives and the Grid Velocities ---*/ - - GustDer[0] = dgust_dx; - GustDer[1] = dgust_dy; - GustDer[2] = dgust_dz; - GustDer[3] = dgust_dt; + if (nDim = 2) { + GustDer[0] = dgust_dx; + GustDer[1] = dgust_dy; + GustDer[2] = dgust_dt; + } + else { + GustDer[0] = dgust_dx; + GustDer[1] = dgust_dy; + GustDer[2] = dgust_dz; + GustDer[3] = dgust_dt; + } // I think we don't need to set any source terms because they depend on the derivatives, which are zero in all cases from above. solver[iMGlevel][FLOW_SOL]->GetNodes()->SetWindGust(iPoint, Gust); solver[iMGlevel][FLOW_SOL]->GetNodes()->SetWindGustDer(iPoint, GustDer); From 1c1cfffcde07d9f2efa1f1c8047b7f6fe1257860 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arne=20Vo=C3=9F?= Date: Fri, 14 Apr 2023 10:09:29 +0200 Subject: [PATCH 07/14] Refined cirterion on decision of keeping or overwriting existing grid velocities, should fix test case 'sine_gust'. --- SU2_CFD/src/iteration/CFluidIteration.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SU2_CFD/src/iteration/CFluidIteration.cpp b/SU2_CFD/src/iteration/CFluidIteration.cpp index 49aeb6e18341..d4fed319d19b 100644 --- a/SU2_CFD/src/iteration/CFluidIteration.cpp +++ b/SU2_CFD/src/iteration/CFluidIteration.cpp @@ -388,7 +388,7 @@ void CFluidIteration::SetWind_GustField(CConfig* config, CGeometry** geometry, C for (iPoint = 0; iPoint < geometry[iMGlevel]->GetnPoint(); iPoint++) { /*--- Reset the Grid Velocity to zero if there is no grid movement ---*/ - if (Kind_Grid_Movement == GUST && !(config->GetFSI_Simulation()) && !(config->GetDynamic_Grid())) { + if (Kind_Grid_Movement == GUST && !(config->GetFSI_Simulation()) && !(config->GetDeform_Mesh())) { for (iDim = 0; iDim < nDim; iDim++) geometry[iMGlevel]->nodes->SetGridVel(iPoint, iDim, 0.0); } From 2259d67272a5f180714d19a77d2a4d1aaeaea232 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arne=20Vo=C3=9F?= Date: Fri, 14 Apr 2023 10:19:38 +0200 Subject: [PATCH 08/14] - Implemented style suggestions from CodeFactor, no functional change - Removed commented out code / warning messages w.r.t 2D gusts only --- SU2_CFD/src/iteration/CFluidIteration.cpp | 23 +++++++++------------- SU2_CFD/src/numerics/flow/flow_sources.cpp | 16 +++++++-------- 2 files changed, 17 insertions(+), 22 deletions(-) diff --git a/SU2_CFD/src/iteration/CFluidIteration.cpp b/SU2_CFD/src/iteration/CFluidIteration.cpp index d4fed319d19b..df256b876ec8 100644 --- a/SU2_CFD/src/iteration/CFluidIteration.cpp +++ b/SU2_CFD/src/iteration/CFluidIteration.cpp @@ -318,12 +318,7 @@ void CFluidIteration::SetWind_GustField(CConfig* config, CGeometry** geometry, C // derivatives needed for the source term are calculated when applicable. If the gust derivatives are zero the source // term is also zero. The source term itself is implemented in the class CSourceWindGust - unsigned short iDim, nDim = geometry[MESH_0]->GetnDim(); // We assume nDim = 2 -// if (nDim != 2) { -// if (rank == MASTER_NODE) { -// cout << endl << "WARNING - Wind Gust capability is only verified for 2 dimensional simulations." << endl; -// } -// } + unsigned short iDim, nDim = geometry[MESH_0]->GetnDim(); /*--- Gust Parameters from config ---*/ unsigned short Gust_Type = config->GetGust_Type(); @@ -477,16 +472,16 @@ void CFluidIteration::SetWind_GustField(CConfig* config, CGeometry** geometry, C } /*--- Set the Wind Gust, Wind Gust Derivatives and the Grid Velocities ---*/ - if (nDim = 2) { - GustDer[0] = dgust_dx; - GustDer[1] = dgust_dy; - GustDer[2] = dgust_dt; + if (nDim == 2) { + GustDer[0] = dgust_dx; + GustDer[1] = dgust_dy; + GustDer[2] = dgust_dt; } else { - GustDer[0] = dgust_dx; - GustDer[1] = dgust_dy; - GustDer[2] = dgust_dz; - GustDer[3] = dgust_dt; + GustDer[0] = dgust_dx; + GustDer[1] = dgust_dy; + GustDer[2] = dgust_dz; + GustDer[3] = dgust_dt; } // I think we don't need to set any source terms because they depend on the derivatives, which are zero in all cases from above. solver[iMGlevel][FLOW_SOL]->GetNodes()->SetWindGust(iPoint, Gust); diff --git a/SU2_CFD/src/numerics/flow/flow_sources.cpp b/SU2_CFD/src/numerics/flow/flow_sources.cpp index 3d297157a515..a06cf7134f16 100644 --- a/SU2_CFD/src/numerics/flow/flow_sources.cpp +++ b/SU2_CFD/src/numerics/flow/flow_sources.cpp @@ -783,14 +783,14 @@ CNumerics::ResidualType<> CSourceWindGust::ComputeResidual(const CConfig* config residual[2] = smy*Volume; //residual[3] = smz*Volume; residual[3] = se*Volume; - } else { - // SU2_MPI::Error("You should only be in the gust source term in two dimensions", CURRENT_FUNCTION); - residual[0] = 0.0; - residual[1] = 0.0; - residual[2] = 0.0; - residual[3] = 0.0; - residual[4] = 0.0; - } + } + else { + residual[0] = 0.0; + residual[1] = 0.0; + residual[2] = 0.0; + residual[3] = 0.0; + residual[4] = 0.0; + } /*--- For now the source term Jacobian is just set to zero ---*/ //bool implicit = (config->GetKind_TimeIntScheme_Flow() == EULER_IMPLICIT); From 02f5388bb197fce307c1fcea383ab46245c23508 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arne=20Vo=C3=9F?= Date: Fri, 12 May 2023 16:41:51 +0200 Subject: [PATCH 09/14] Proposal for a test case for cosine gusts in z-direction on a 3D mesh. Test duration: 0.83 min Not sure where the mesh and the restart files should go, so this will break the testing until I commit the missing files. --- TestCases/gust/cosine_gust_zdir.cfg | 172 ++++++++++++++++++++++++++++ TestCases/hybrid_regression.py | 9 ++ 2 files changed, 181 insertions(+) create mode 100644 TestCases/gust/cosine_gust_zdir.cfg diff --git a/TestCases/gust/cosine_gust_zdir.cfg b/TestCases/gust/cosine_gust_zdir.cfg new file mode 100644 index 000000000000..0c523862f407 --- /dev/null +++ b/TestCases/gust/cosine_gust_zdir.cfg @@ -0,0 +1,172 @@ +% ------------- DIRECT, ADJOINT, AND LINEARIZED PROBLEM DEFINITION ------------% +% +% Solver type (EULER, NAVIER_STOKES, RANS, +% INC_EULER, INC_NAVIER_STOKES, INC_RANS, +% NEMO_EULER, NEMO_NAVIER_STOKES, +% FEM_EULER, FEM_NAVIER_STOKES, FEM_RANS, FEM_LES, +% HEAT_EQUATION_FVM, ELASTICITY) +SOLVER= EULER +% +% Mathematical problem (DIRECT, CONTINUOUS_ADJOINT) +MATH_PROBLEM= DIRECT +% +% Restart solution (NO, YES) +RESTART_SOL= YES +% +% Iteration number to begin unsteady restarts +RESTART_ITER= 72 +% +% ------------------------------- SOLVER CONTROL ------------------------------% +% +% Maximum number of inner iterations +INNER_ITER= 30 +% +% Min value of the residual (log10 of the residual) +CONV_RESIDUAL_MINVAL= -6 +% +% Start convergence criteria at iteration number +CONV_STARTITER= 0 +% +% ------------------------- UNSTEADY SIMULATION -------------------------------% +% +TIME_DOMAIN=YES +TIME_MARCHING= DUAL_TIME_STEPPING-2ND_ORDER +TIME_STEP= 0.001 +TIME_ITER= 80 +% +% --------------------------- GUST SIMULATION ---------------------------------% +% +% The gust simulation requires the GRID_MOVEMENT flag to be set to YES. +% and the GRID_MOVEMENT_KIND to be set to GUST or any of the other options. +% Apply a wind gust (NO, YES) +GRID_MOVEMENT=GUST +WIND_GUST= YES +GUST_TYPE= ONE_M_COSINE +GUST_DIR= Z_DIR +GUST_WAVELENGTH= 5.0 +GUST_PERIODS= 1.0 +% Gust amplitude corresponds to ~2.0 deg AoA +GUST_AMPL= 2.37 +% +GUST_BEGIN_TIME= 0.0 +GUST_BEGIN_LOC=-10.0 +% -------------------- COMPRESSIBLE FREE-STREAM DEFINITION --------------------% +% +% Mach number (non-dimensional, based on the free-stream values) +MACH_NUMBER= 0.2 +% +% Angle of attack (degrees, only for compressible flows) +AOA= 0.0 +% +% Side-slip angle (degrees, only for compressible flows) +SIDESLIP_ANGLE= 0.0 +% +% Free-stream option to choose between density and temperature (default) for +% initializing the solution (TEMPERATURE_FS, DENSITY_FS) +FREESTREAM_OPTION= DENSITY_FS +% +% Free-stream pressure (101325.0 N/m^2, 2116.216 psf by default) +FREESTREAM_PRESSURE= 101325.0 +% +% Free-stream density (1.2886 Kg/m^3, 0.0025 slug/ft^3 by default) +FREESTREAM_DENSITY= 1.225 +% +% Free-stream temperature (288.15 K, 518.67 R by default) +FREESTREAM_TEMPERATURE= 288.15 +% +% ---------------------- REFERENCE VALUE DEFINITION ---------------------------% +% +% Reference origin for moment computation (m or in) +REF_ORIGIN_MOMENT_X = 0.25 +REF_ORIGIN_MOMENT_Y = 0.00 +REF_ORIGIN_MOMENT_Z = 0.00 +% +% Reference length for moment non-dimensional coefficients (m or in) +REF_LENGTH= 1.0 +% +% Reference area for non-dimensional force coefficients (0 implies automatic +% calculation) (m^2 or in^2) +REF_AREA= 3.0 +% +% Aircraft semi-span (0 implies automatic calculation) (m or in) +SEMI_SPAN= 1.5 +% +% Flow non-dimensionalization (DIMENSIONAL, FREESTREAM_PRESS_EQ_ONE, +% FREESTREAM_VEL_EQ_MACH, FREESTREAM_VEL_EQ_ONE) +REF_DIMENSIONALIZATION= DIMENSIONAL + +% -------------------- BOUNDARY CONDITION DEFINITION --------------------------% +% +% Euler wall boundary marker(s) (NONE = no marker) +% Implementation identical to MARKER_SYM. +MARKER_EULER= ( wing, tip) +% +% Far-field boundary marker(s) (NONE = no marker) +MARKER_FAR= ( far_away ) + +% ------------------------ SURFACES IDENTIFICATION ----------------------------% +% +% Marker(s) of the surface in the surface flow solution file +MARKER_PLOTTING = ( wing, tip ) +% +% Marker(s) of the surface where the non-dimensional coefficients are evaluated. +MARKER_MONITORING = ( wing, tip ) + +% ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% +% +% CFL number (initial value for the adaptive CFL number) +CFL_NUMBER= 1000.0 +% +% Adaptive CFL number (NO, YES) +CFL_ADAPT= YES +% +% -------------------------- MULTIGRID PARAMETERS -----------------------------% +% +% Multi-grid levels (0 = no multi-grid) +MGLEVEL= 3 +% +% Multi-grid cycle (V_CYCLE, W_CYCLE, FULLMG_CYCLE) +MGCYCLE= W_CYCLE + +% -------------------- FLOW NUMERICAL METHOD DEFINITION -----------------------% +% +% Convective numerical method (JST, JST_KE, JST_MAT, LAX-FRIEDRICH, CUSP, ROE, AUSM, +% AUSMPLUSUP, AUSMPLUSUP2, AUSMPWPLUS, HLLC, TURKEL_PREC, +% SW, MSW, FDS, SLAU, SLAU2, L2ROE, LMROE) +CONV_NUM_METHOD_FLOW= JST +% +% Max number of iterations of the linear solver for the implicit formulation +LINEAR_SOLVER_ITER= 20 +% +% ------------------------- SCREEN/HISTORY VOLUME OUTPUT --------------------------% +% +% Screen output fields (use 'SU2_CFD -d ' to view list of available fields) +SCREEN_OUTPUT= (TIME_ITER, INNER_ITER, RMS_DENSITY, LIFT, MOMENT_X, MOMENT_Y, MOMENT_Z) +% +% History output groups (use 'SU2_CFD -d ' to view list of available fields) +HISTORY_OUTPUT= (ITER, RMS_RES, AERO_COEFF, CAUCHY, WALL_TIME) +% +% ------------------------- INPUT/OUTPUT FILE INFORMATION --------------------------% +% +% Mesh input file +MESH_FILENAME= mesh_rectangular_wing.su2 +% +% Mesh input file format (SU2, CGNS) +MESH_FORMAT= SU2 +% +% Restart flow input file +SOLUTION_FILENAME= restart_gust.dat +RESTART_FILENAME= restart_gust.dat +SURFACE_FILENAME= surface_gust +VOLUME_FILENAME= volume_gust +CONV_FILENAME= history_gust +% +% Output tabular file format (TECPLOT, CSV) +TABULAR_FORMAT= CSV +% +% Files to output +% Possible formats : (TECPLOT, TECPLOT_BINARY, SURFACE_TECPLOT, +% SURFACE_TECPLOT_BINARY, CSV, SURFACE_CSV, PARAVIEW, PARAVIEW_BINARY, SURFACE_PARAVIEW, +% SURFACE_PARAVIEW_BINARY, MESH, RESTART_BINARY, RESTART_ASCII, CGNS, SURFACE_CGNS, STL) +OUTPUT_FILES= (RESTART, RESTART_ASCII, TECPLOT, SURFACE_TECPLOT) + diff --git a/TestCases/hybrid_regression.py b/TestCases/hybrid_regression.py index 4e2094b56f67..211294d2fd23 100644 --- a/TestCases/hybrid_regression.py +++ b/TestCases/hybrid_regression.py @@ -478,6 +478,15 @@ def main(): sine_gust.test_vals = [-1.977520, 3.481804, -0.012402, -0.007454] sine_gust.unsteady = True test_list.append(sine_gust) + + # Cosine gust in z-direction + cosine_gust = TestCase('cosine_gust_zdir') + cosine_gust.cfg_dir = "gust" + cosine_gust.cfg_file = "cosine_gust_zdir.cfg" + cosine_gust.test_iter = 79 + cosine_gust.test_vals = [-2.418813, 0.004650, -0.001878, -0.000637, -0.000271] + cosine_gust.unsteady = True + test_list.append(cosine_gust) # Aeroelastic aeroelastic = TestCase('aeroelastic') From cb9701e07ec5e682222fa748e196616c17496dc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arne=20Vo=C3=9F?= Date: Mon, 22 May 2023 10:38:18 +0200 Subject: [PATCH 10/14] Removed Tecplot outputs from testcase. --- TestCases/gust/cosine_gust_zdir.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TestCases/gust/cosine_gust_zdir.cfg b/TestCases/gust/cosine_gust_zdir.cfg index 0c523862f407..be0e38a8fd0f 100644 --- a/TestCases/gust/cosine_gust_zdir.cfg +++ b/TestCases/gust/cosine_gust_zdir.cfg @@ -168,5 +168,5 @@ TABULAR_FORMAT= CSV % Possible formats : (TECPLOT, TECPLOT_BINARY, SURFACE_TECPLOT, % SURFACE_TECPLOT_BINARY, CSV, SURFACE_CSV, PARAVIEW, PARAVIEW_BINARY, SURFACE_PARAVIEW, % SURFACE_PARAVIEW_BINARY, MESH, RESTART_BINARY, RESTART_ASCII, CGNS, SURFACE_CGNS, STL) -OUTPUT_FILES= (RESTART, RESTART_ASCII, TECPLOT, SURFACE_TECPLOT) +OUTPUT_FILES= (RESTART, RESTART_ASCII) From dc7fb834856f7e7a9d10d3366290b9fdca2ea44e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arne=20Vo=C3=9F?= Date: Mon, 22 May 2023 14:51:22 +0200 Subject: [PATCH 11/14] Adding testcase for gust in combination with mesh deformation by using the SU2-internal option SURFACE_MOVEMENT= DEFORMING --- TestCases/gust/gust_with_mesh_deformation.cfg | 182 ++++++++++++++++++ TestCases/hybrid_regression.py | 9 + 2 files changed, 191 insertions(+) create mode 100644 TestCases/gust/gust_with_mesh_deformation.cfg diff --git a/TestCases/gust/gust_with_mesh_deformation.cfg b/TestCases/gust/gust_with_mesh_deformation.cfg new file mode 100644 index 000000000000..460340af08ee --- /dev/null +++ b/TestCases/gust/gust_with_mesh_deformation.cfg @@ -0,0 +1,182 @@ +% ------------- DIRECT, ADJOINT, AND LINEARIZED PROBLEM DEFINITION ------------% +% +% Solver type (EULER, NAVIER_STOKES, RANS, +% INC_EULER, INC_NAVIER_STOKES, INC_RANS, +% NEMO_EULER, NEMO_NAVIER_STOKES, +% FEM_EULER, FEM_NAVIER_STOKES, FEM_RANS, FEM_LES, +% HEAT_EQUATION_FVM, ELASTICITY) +SOLVER= EULER +% +% Mathematical problem (DIRECT, CONTINUOUS_ADJOINT) +MATH_PROBLEM= DIRECT +% +% ------------------------------- SOLVER CONTROL ------------------------------% +% +% Maximum number of inner iterations +INNER_ITER= 100 +% +% Min value of the residual (log10 of the residual) +CONV_RESIDUAL_MINVAL= -6 +% +% Start convergence criteria at iteration number +CONV_STARTITER= 0 +% +% ------------------------- UNSTEADY SIMULATION -------------------------------% +% +TIME_DOMAIN=YES +TIME_MARCHING= DUAL_TIME_STEPPING-2ND_ORDER +TIME_STEP= 0.001 +TIME_ITER= 26 +% +% --------------------------- GUST SIMULATION ---------------------------------% +% +% The gust simulation requires the GRID_MOVEMENT flag to be set to YES. +% and the GRID_MOVEMENT_KIND to be set to GUST or any of the other options. +% Apply a wind gust (NO, YES) +GRID_MOVEMENT=GUST +WIND_GUST= YES +GUST_TYPE= ONE_M_COSINE +GUST_DIR= Y_DIR +GUST_WAVELENGTH= 10.0 +GUST_PERIODS= 1.0 +% Gust amplitude corresponds to ~2.0 deg AoA +GUST_AMPL= 1.0 +% +GUST_BEGIN_TIME= 0.0 +GUST_BEGIN_LOC=-10.0 +% --------------------------- MESH DEFORMATION--------------------------------% +% Type of dynamic surface movement (NONE, DEFORMING, MOVING_WALL, +% AEROELASTIC, AEROELASTIC_RIGID_MOTION EXTERNAL, EXTERNAL_ROTATION) +SURFACE_MOVEMENT= DEFORMING +% +% Moving wall boundary marker(s) (NONE = no marker, ignored for RIGID_MOTION) +MARKER_MOVING= ( airfoil ) +% +% Plunging angular freq. (rad/s) in x, y, & z directions +SURFACE_PLUNGING_OMEGA= 0.0 125.6 0.0 +% +% Plunging amplitude (m or ft) in x, y, & z directions +SURFACE_PLUNGING_AMPL= 0.0 0.001 0.0 +% +% Move Motion Origin for marker moving (1 or 0) +MOVE_MOTION_ORIGIN = 0 +% -------------------- COMPRESSIBLE FREE-STREAM DEFINITION --------------------% +% +% Mach number (non-dimensional, based on the free-stream values) +MACH_NUMBER= 0.2 +% +% Angle of attack (degrees, only for compressible flows) +AOA= 0.0 +% +% Side-slip angle (degrees, only for compressible flows) +SIDESLIP_ANGLE= 0.0 +% +% Free-stream option to choose between density and temperature (default) for +% initializing the solution (TEMPERATURE_FS, DENSITY_FS) +FREESTREAM_OPTION= DENSITY_FS +% +% Free-stream pressure (101325.0 N/m^2, 2116.216 psf by default) +FREESTREAM_PRESSURE= 101325.0 +% +% Free-stream density (1.2886 Kg/m^3, 0.0025 slug/ft^3 by default) +FREESTREAM_DENSITY= 1.225 +% +% Free-stream temperature (288.15 K, 518.67 R by default) +FREESTREAM_TEMPERATURE= 288.15 +% +% ---------------------- REFERENCE VALUE DEFINITION ---------------------------% +% +% Reference origin for moment computation (m or in) +REF_ORIGIN_MOMENT_X = 0.25 +REF_ORIGIN_MOMENT_Y = 0.00 +REF_ORIGIN_MOMENT_Z = 0.00 +% +% Reference length for moment non-dimensional coefficients (m or in) +REF_LENGTH= 1.0 +% +% Reference area for non-dimensional force coefficients (0 implies automatic +% calculation) (m^2 or in^2) +REF_AREA= 1.0 +% +% Aircraft semi-span (0 implies automatic calculation) (m or in) +SEMI_SPAN= 1.0 +% +% Flow non-dimensionalization (DIMENSIONAL, FREESTREAM_PRESS_EQ_ONE, +% FREESTREAM_VEL_EQ_MACH, FREESTREAM_VEL_EQ_ONE) +REF_DIMENSIONALIZATION= DIMENSIONAL + +% -------------------- BOUNDARY CONDITION DEFINITION --------------------------% +% +% Euler wall boundary marker(s) (NONE = no marker) +% Implementation identical to MARKER_SYM. +MARKER_EULER= ( airfoil ) +% +% Far-field boundary marker(s) (NONE = no marker) +MARKER_FAR= ( farfield ) + +% ------------------------ SURFACES IDENTIFICATION ----------------------------% +% +% Marker(s) of the surface in the surface flow solution file +MARKER_PLOTTING = ( airfoil ) +% +% Marker(s) of the surface where the non-dimensional coefficients are evaluated. +MARKER_MONITORING = ( airfoil ) + +% ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% +% +% CFL number (initial value for the adaptive CFL number) +CFL_NUMBER= 100.0 +% +% Adaptive CFL number (NO, YES) +CFL_ADAPT= YES +% +% -------------------------- MULTIGRID PARAMETERS -----------------------------% +% +% Multi-grid levels (0 = no multi-grid) +MGLEVEL= 3 +% +% Multi-grid cycle (V_CYCLE, W_CYCLE, FULLMG_CYCLE) +MGCYCLE= W_CYCLE + +% -------------------- FLOW NUMERICAL METHOD DEFINITION -----------------------% +% +% Convective numerical method (JST, JST_KE, JST_MAT, LAX-FRIEDRICH, CUSP, ROE, AUSM, +% AUSMPLUSUP, AUSMPLUSUP2, AUSMPWPLUS, HLLC, TURKEL_PREC, +% SW, MSW, FDS, SLAU, SLAU2, L2ROE, LMROE) +CONV_NUM_METHOD_FLOW= JST +% +% Max number of iterations of the linear solver for the implicit formulation +LINEAR_SOLVER_ITER= 20 +% +% ------------------------- SCREEN/HISTORY VOLUME OUTPUT --------------------------% +% +% Screen output fields (use 'SU2_CFD -d ' to view list of available fields) +SCREEN_OUTPUT= (TIME_ITER, INNER_ITER, RMS_DENSITY, LIFT, MOMENT_Z) +% +% History output groups (use 'SU2_CFD -d ' to view list of available fields) +HISTORY_OUTPUT= (ITER, RMS_RES, AERO_COEFF, CAUCHY, WALL_TIME) +% +% ------------------------- INPUT/OUTPUT FILE INFORMATION --------------------------% +% +% Mesh input file +MESH_FILENAME= mesh_NACA0012_inv.su2 +% +% Mesh input file format (SU2, CGNS) +MESH_FORMAT= SU2 +% +% Restart flow input file +SOLUTION_FILENAME= restart_gust.dat +RESTART_FILENAME= restart_gust.dat +SURFACE_FILENAME= surface_gust +VOLUME_FILENAME= volume_gust +CONV_FILENAME= history_gust +% +% Output tabular file format (TECPLOT, CSV) +TABULAR_FORMAT= CSV +% +% Files to output +% Possible formats : (TECPLOT, TECPLOT_BINARY, SURFACE_TECPLOT, +% SURFACE_TECPLOT_BINARY, CSV, SURFACE_CSV, PARAVIEW, PARAVIEW_BINARY, SURFACE_PARAVIEW, +% SURFACE_PARAVIEW_BINARY, MESH, RESTART_BINARY, RESTART_ASCII, CGNS, SURFACE_CGNS, STL) +OUTPUT_FILES= (TECPLOT, SURFACE_TECPLOT) + diff --git a/TestCases/hybrid_regression.py b/TestCases/hybrid_regression.py index 564df0f4a1d0..e0febfcfb2ef 100644 --- a/TestCases/hybrid_regression.py +++ b/TestCases/hybrid_regression.py @@ -479,6 +479,15 @@ def main(): cosine_gust.test_vals = [-2.418813, 0.004650, -0.001878, -0.000637, -0.000271] cosine_gust.unsteady = True test_list.append(cosine_gust) + + # Gust with mesh deformation + gust_mesh_defo = TestCase('gust_with_mesh_deformation') + gust_mesh_defo.cfg_dir = "gust" + gust_mesh_defo.cfg_file = "gust_with_mesh_deformation.cfg" + gust_mesh_defo.test_iter = 25 + gust_mesh_defo.test_vals = [-1.585670, 0.004771, 0.000413] + gust_mesh_defo.unsteady = True + test_list.append(gust_mesh_defo) # Aeroelastic aeroelastic = TestCase('aeroelastic') From 8897fe1a5219c42eac7a5c77e9ae4daf02d76ff2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arne=20Vo=C3=9F?= Date: Mon, 22 May 2023 15:52:31 +0200 Subject: [PATCH 12/14] Remove Tecplot outputs --- TestCases/gust/gust_with_mesh_deformation.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TestCases/gust/gust_with_mesh_deformation.cfg b/TestCases/gust/gust_with_mesh_deformation.cfg index 460340af08ee..9cf091689515 100644 --- a/TestCases/gust/gust_with_mesh_deformation.cfg +++ b/TestCases/gust/gust_with_mesh_deformation.cfg @@ -178,5 +178,5 @@ TABULAR_FORMAT= CSV % Possible formats : (TECPLOT, TECPLOT_BINARY, SURFACE_TECPLOT, % SURFACE_TECPLOT_BINARY, CSV, SURFACE_CSV, PARAVIEW, PARAVIEW_BINARY, SURFACE_PARAVIEW, % SURFACE_PARAVIEW_BINARY, MESH, RESTART_BINARY, RESTART_ASCII, CGNS, SURFACE_CGNS, STL) -OUTPUT_FILES= (TECPLOT, SURFACE_TECPLOT) +OUTPUT_FILES= (NONE) From 59a142b6f85c3398f3129b44edbe1e5dd64ca0ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arne=20Vo=C3=9F?= Date: Mon, 22 May 2023 17:22:04 +0200 Subject: [PATCH 13/14] Modified config to make testcase faster. New test duration: 0.42 min. --- TestCases/gust/gust_with_mesh_deformation.cfg | 8 ++++---- TestCases/hybrid_regression.py | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/TestCases/gust/gust_with_mesh_deformation.cfg b/TestCases/gust/gust_with_mesh_deformation.cfg index 9cf091689515..7c0117fc6857 100644 --- a/TestCases/gust/gust_with_mesh_deformation.cfg +++ b/TestCases/gust/gust_with_mesh_deformation.cfg @@ -26,7 +26,7 @@ CONV_STARTITER= 0 TIME_DOMAIN=YES TIME_MARCHING= DUAL_TIME_STEPPING-2ND_ORDER TIME_STEP= 0.001 -TIME_ITER= 26 +TIME_ITER= 7 % % --------------------------- GUST SIMULATION ---------------------------------% % @@ -37,13 +37,13 @@ GRID_MOVEMENT=GUST WIND_GUST= YES GUST_TYPE= ONE_M_COSINE GUST_DIR= Y_DIR -GUST_WAVELENGTH= 10.0 +GUST_WAVELENGTH= 5.0 GUST_PERIODS= 1.0 % Gust amplitude corresponds to ~2.0 deg AoA GUST_AMPL= 1.0 % GUST_BEGIN_TIME= 0.0 -GUST_BEGIN_LOC=-10.0 +GUST_BEGIN_LOC=-5.0 % --------------------------- MESH DEFORMATION--------------------------------% % Type of dynamic surface movement (NONE, DEFORMING, MOVING_WALL, % AEROELASTIC, AEROELASTIC_RIGID_MOTION EXTERNAL, EXTERNAL_ROTATION) @@ -56,7 +56,7 @@ MARKER_MOVING= ( airfoil ) SURFACE_PLUNGING_OMEGA= 0.0 125.6 0.0 % % Plunging amplitude (m or ft) in x, y, & z directions -SURFACE_PLUNGING_AMPL= 0.0 0.001 0.0 +SURFACE_PLUNGING_AMPL= 0.0 0.0001 0.0 % % Move Motion Origin for marker moving (1 or 0) MOVE_MOTION_ORIGIN = 0 diff --git a/TestCases/hybrid_regression.py b/TestCases/hybrid_regression.py index e0febfcfb2ef..12b81ba08708 100644 --- a/TestCases/hybrid_regression.py +++ b/TestCases/hybrid_regression.py @@ -484,8 +484,8 @@ def main(): gust_mesh_defo = TestCase('gust_with_mesh_deformation') gust_mesh_defo.cfg_dir = "gust" gust_mesh_defo.cfg_file = "gust_with_mesh_deformation.cfg" - gust_mesh_defo.test_iter = 25 - gust_mesh_defo.test_vals = [-1.585670, 0.004771, 0.000413] + gust_mesh_defo.test_iter = 6 + gust_mesh_defo.test_vals = [-1.844778, 0.000846, -0.000408] gust_mesh_defo.unsteady = True test_list.append(gust_mesh_defo) From 605839acb6d902cfd58c82faf2b04ed6c6ea999c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arne=20Vo=C3=9F?= Date: Thu, 25 May 2023 08:56:30 +0200 Subject: [PATCH 14/14] Apply suggestions from Code Review --- SU2_CFD/src/iteration/CFluidIteration.cpp | 24 ++--- SU2_CFD/src/numerics/flow/flow_sources.cpp | 2 +- TestCases/gust/cosine_gust_zdir.cfg | 87 +++-------------- TestCases/gust/gust_with_mesh_deformation.cfg | 96 ++++--------------- 4 files changed, 41 insertions(+), 168 deletions(-) diff --git a/SU2_CFD/src/iteration/CFluidIteration.cpp b/SU2_CFD/src/iteration/CFluidIteration.cpp index 59d3d3868389..298ee40d56c3 100644 --- a/SU2_CFD/src/iteration/CFluidIteration.cpp +++ b/SU2_CFD/src/iteration/CFluidIteration.cpp @@ -329,23 +329,17 @@ void CFluidIteration::SetWind_GustField(CConfig* config, CGeometry** geometry, C su2double Uinf = solver[MESH_0][FLOW_SOL]->GetVelocity_Inf(0); // Assumption gust moves at infinity velocity - Gust = new su2double[nDim]; - NewGridVel = new su2double[nDim]; - for (iDim = 0; iDim < nDim; iDim++) { - Gust[iDim] = 0.0; - NewGridVel[iDim] = 0.0; - } + Gust = new su2double[nDim](); + NewGridVel = new su2double[nDim](); + GustDer = new su2double[nDim+1](); // Print some information to check that we are doing the right thing. Not sure how to convert the index back to a string... - if (rank == MASTER_NODE) cout << endl << "Setting up a wind gust type " << Gust_Type << " with amplitude of " << gust_amp << " in direction " << GustDir << endl; - if (rank == MASTER_NODE) cout << " U_inf = " << Uinf << endl; - if (rank == MASTER_NODE) cout << " Physical_t = " << Physical_t << endl; - su2double loc_x = (xbegin + L + Uinf * (Physical_t - tbegin)); - if (rank == MASTER_NODE) cout << " Location_x = " << loc_x << endl; - - GustDer = new su2double[nDim+1]; - for (unsigned short i = 0; i < nDim+1; i++) { - GustDer[i] = 0.0; + if (rank == MASTER_NODE) { + cout << endl << "Setting up a wind gust type " << Gust_Type << " with amplitude of " << gust_amp << " in direction " << GustDir << endl; + cout << " U_inf = " << Uinf << endl; + cout << " Physical_t = " << Physical_t << endl; + su2double loc_x = (xbegin + L + Uinf * (Physical_t - tbegin)); + cout << " Location_x = " << loc_x << endl; } // Vortex variables diff --git a/SU2_CFD/src/numerics/flow/flow_sources.cpp b/SU2_CFD/src/numerics/flow/flow_sources.cpp index a06cf7134f16..cd8e8d1d4ad4 100644 --- a/SU2_CFD/src/numerics/flow/flow_sources.cpp +++ b/SU2_CFD/src/numerics/flow/flow_sources.cpp @@ -790,7 +790,7 @@ CNumerics::ResidualType<> CSourceWindGust::ComputeResidual(const CConfig* config residual[2] = 0.0; residual[3] = 0.0; residual[4] = 0.0; - } + } /*--- For now the source term Jacobian is just set to zero ---*/ //bool implicit = (config->GetKind_TimeIntScheme_Flow() == EULER_IMPLICIT); diff --git a/TestCases/gust/cosine_gust_zdir.cfg b/TestCases/gust/cosine_gust_zdir.cfg index be0e38a8fd0f..515a8d44c495 100644 --- a/TestCases/gust/cosine_gust_zdir.cfg +++ b/TestCases/gust/cosine_gust_zdir.cfg @@ -1,30 +1,26 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% SU2 configuration file % +% Case description: Cosine gust in z-direction of a 3D mesh % +% Author: Arne Voß % +% Institution: DLR % +% Date: 25.05.2023 % +% File Version 7.5.1 "Blackbird" % +% % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % ------------- DIRECT, ADJOINT, AND LINEARIZED PROBLEM DEFINITION ------------% % -% Solver type (EULER, NAVIER_STOKES, RANS, -% INC_EULER, INC_NAVIER_STOKES, INC_RANS, -% NEMO_EULER, NEMO_NAVIER_STOKES, -% FEM_EULER, FEM_NAVIER_STOKES, FEM_RANS, FEM_LES, -% HEAT_EQUATION_FVM, ELASTICITY) SOLVER= EULER -% -% Mathematical problem (DIRECT, CONTINUOUS_ADJOINT) MATH_PROBLEM= DIRECT % -% Restart solution (NO, YES) RESTART_SOL= YES -% -% Iteration number to begin unsteady restarts RESTART_ITER= 72 % % ------------------------------- SOLVER CONTROL ------------------------------% % -% Maximum number of inner iterations INNER_ITER= 30 -% -% Min value of the residual (log10 of the residual) CONV_RESIDUAL_MINVAL= -6 -% -% Start convergence criteria at iteration number CONV_STARTITER= 0 % % ------------------------- UNSTEADY SIMULATION -------------------------------% @@ -49,124 +45,67 @@ GUST_PERIODS= 1.0 GUST_AMPL= 2.37 % GUST_BEGIN_TIME= 0.0 +% Gust is placed 5m ahead of the wing GUST_BEGIN_LOC=-10.0 % -------------------- COMPRESSIBLE FREE-STREAM DEFINITION --------------------% % -% Mach number (non-dimensional, based on the free-stream values) MACH_NUMBER= 0.2 -% -% Angle of attack (degrees, only for compressible flows) AOA= 0.0 -% -% Side-slip angle (degrees, only for compressible flows) SIDESLIP_ANGLE= 0.0 -% -% Free-stream option to choose between density and temperature (default) for -% initializing the solution (TEMPERATURE_FS, DENSITY_FS) FREESTREAM_OPTION= DENSITY_FS -% -% Free-stream pressure (101325.0 N/m^2, 2116.216 psf by default) FREESTREAM_PRESSURE= 101325.0 -% -% Free-stream density (1.2886 Kg/m^3, 0.0025 slug/ft^3 by default) FREESTREAM_DENSITY= 1.225 -% -% Free-stream temperature (288.15 K, 518.67 R by default) FREESTREAM_TEMPERATURE= 288.15 % % ---------------------- REFERENCE VALUE DEFINITION ---------------------------% % -% Reference origin for moment computation (m or in) REF_ORIGIN_MOMENT_X = 0.25 REF_ORIGIN_MOMENT_Y = 0.00 REF_ORIGIN_MOMENT_Z = 0.00 -% -% Reference length for moment non-dimensional coefficients (m or in) REF_LENGTH= 1.0 -% -% Reference area for non-dimensional force coefficients (0 implies automatic -% calculation) (m^2 or in^2) REF_AREA= 3.0 -% -% Aircraft semi-span (0 implies automatic calculation) (m or in) SEMI_SPAN= 1.5 -% -% Flow non-dimensionalization (DIMENSIONAL, FREESTREAM_PRESS_EQ_ONE, -% FREESTREAM_VEL_EQ_MACH, FREESTREAM_VEL_EQ_ONE) REF_DIMENSIONALIZATION= DIMENSIONAL % -------------------- BOUNDARY CONDITION DEFINITION --------------------------% % -% Euler wall boundary marker(s) (NONE = no marker) -% Implementation identical to MARKER_SYM. MARKER_EULER= ( wing, tip) -% -% Far-field boundary marker(s) (NONE = no marker) MARKER_FAR= ( far_away ) % ------------------------ SURFACES IDENTIFICATION ----------------------------% % -% Marker(s) of the surface in the surface flow solution file MARKER_PLOTTING = ( wing, tip ) -% -% Marker(s) of the surface where the non-dimensional coefficients are evaluated. MARKER_MONITORING = ( wing, tip ) % ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% % -% CFL number (initial value for the adaptive CFL number) CFL_NUMBER= 1000.0 -% -% Adaptive CFL number (NO, YES) CFL_ADAPT= YES % % -------------------------- MULTIGRID PARAMETERS -----------------------------% % -% Multi-grid levels (0 = no multi-grid) MGLEVEL= 3 -% -% Multi-grid cycle (V_CYCLE, W_CYCLE, FULLMG_CYCLE) MGCYCLE= W_CYCLE % -------------------- FLOW NUMERICAL METHOD DEFINITION -----------------------% % -% Convective numerical method (JST, JST_KE, JST_MAT, LAX-FRIEDRICH, CUSP, ROE, AUSM, -% AUSMPLUSUP, AUSMPLUSUP2, AUSMPWPLUS, HLLC, TURKEL_PREC, -% SW, MSW, FDS, SLAU, SLAU2, L2ROE, LMROE) CONV_NUM_METHOD_FLOW= JST -% -% Max number of iterations of the linear solver for the implicit formulation LINEAR_SOLVER_ITER= 20 % % ------------------------- SCREEN/HISTORY VOLUME OUTPUT --------------------------% % -% Screen output fields (use 'SU2_CFD -d ' to view list of available fields) SCREEN_OUTPUT= (TIME_ITER, INNER_ITER, RMS_DENSITY, LIFT, MOMENT_X, MOMENT_Y, MOMENT_Z) -% -% History output groups (use 'SU2_CFD -d ' to view list of available fields) HISTORY_OUTPUT= (ITER, RMS_RES, AERO_COEFF, CAUCHY, WALL_TIME) % % ------------------------- INPUT/OUTPUT FILE INFORMATION --------------------------% % -% Mesh input file MESH_FILENAME= mesh_rectangular_wing.su2 -% -% Mesh input file format (SU2, CGNS) MESH_FORMAT= SU2 -% -% Restart flow input file SOLUTION_FILENAME= restart_gust.dat RESTART_FILENAME= restart_gust.dat SURFACE_FILENAME= surface_gust VOLUME_FILENAME= volume_gust CONV_FILENAME= history_gust -% -% Output tabular file format (TECPLOT, CSV) TABULAR_FORMAT= CSV -% -% Files to output -% Possible formats : (TECPLOT, TECPLOT_BINARY, SURFACE_TECPLOT, -% SURFACE_TECPLOT_BINARY, CSV, SURFACE_CSV, PARAVIEW, PARAVIEW_BINARY, SURFACE_PARAVIEW, -% SURFACE_PARAVIEW_BINARY, MESH, RESTART_BINARY, RESTART_ASCII, CGNS, SURFACE_CGNS, STL) OUTPUT_FILES= (RESTART, RESTART_ASCII) - +% \ No newline at end of file diff --git a/TestCases/gust/gust_with_mesh_deformation.cfg b/TestCases/gust/gust_with_mesh_deformation.cfg index 7c0117fc6857..6f208952ac98 100644 --- a/TestCases/gust/gust_with_mesh_deformation.cfg +++ b/TestCases/gust/gust_with_mesh_deformation.cfg @@ -1,24 +1,22 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% SU2 configuration file % +% Case description: Cosine gust combined with mesh deformation % +% Author: Arne Voß % +% Institution: DLR % +% Date: 25.05.2023 % +% File Version 7.5.1 "Blackbird" % +% % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % ------------- DIRECT, ADJOINT, AND LINEARIZED PROBLEM DEFINITION ------------% % -% Solver type (EULER, NAVIER_STOKES, RANS, -% INC_EULER, INC_NAVIER_STOKES, INC_RANS, -% NEMO_EULER, NEMO_NAVIER_STOKES, -% FEM_EULER, FEM_NAVIER_STOKES, FEM_RANS, FEM_LES, -% HEAT_EQUATION_FVM, ELASTICITY) SOLVER= EULER -% -% Mathematical problem (DIRECT, CONTINUOUS_ADJOINT) MATH_PROBLEM= DIRECT -% % ------------------------------- SOLVER CONTROL ------------------------------% % -% Maximum number of inner iterations INNER_ITER= 100 -% -% Min value of the residual (log10 of the residual) CONV_RESIDUAL_MINVAL= -6 -% -% Start convergence criteria at iteration number CONV_STARTITER= 0 % % ------------------------- UNSTEADY SIMULATION -------------------------------% @@ -39,11 +37,10 @@ GUST_TYPE= ONE_M_COSINE GUST_DIR= Y_DIR GUST_WAVELENGTH= 5.0 GUST_PERIODS= 1.0 -% Gust amplitude corresponds to ~2.0 deg AoA GUST_AMPL= 1.0 -% GUST_BEGIN_TIME= 0.0 GUST_BEGIN_LOC=-5.0 +% % --------------------------- MESH DEFORMATION--------------------------------% % Type of dynamic surface movement (NONE, DEFORMING, MOVING_WALL, % AEROELASTIC, AEROELASTIC_RIGID_MOTION EXTERNAL, EXTERNAL_ROTATION) @@ -60,123 +57,66 @@ SURFACE_PLUNGING_AMPL= 0.0 0.0001 0.0 % % Move Motion Origin for marker moving (1 or 0) MOVE_MOTION_ORIGIN = 0 +% % -------------------- COMPRESSIBLE FREE-STREAM DEFINITION --------------------% % -% Mach number (non-dimensional, based on the free-stream values) MACH_NUMBER= 0.2 -% -% Angle of attack (degrees, only for compressible flows) AOA= 0.0 -% -% Side-slip angle (degrees, only for compressible flows) SIDESLIP_ANGLE= 0.0 -% -% Free-stream option to choose between density and temperature (default) for -% initializing the solution (TEMPERATURE_FS, DENSITY_FS) FREESTREAM_OPTION= DENSITY_FS -% -% Free-stream pressure (101325.0 N/m^2, 2116.216 psf by default) FREESTREAM_PRESSURE= 101325.0 -% -% Free-stream density (1.2886 Kg/m^3, 0.0025 slug/ft^3 by default) FREESTREAM_DENSITY= 1.225 -% -% Free-stream temperature (288.15 K, 518.67 R by default) FREESTREAM_TEMPERATURE= 288.15 % % ---------------------- REFERENCE VALUE DEFINITION ---------------------------% % -% Reference origin for moment computation (m or in) REF_ORIGIN_MOMENT_X = 0.25 REF_ORIGIN_MOMENT_Y = 0.00 REF_ORIGIN_MOMENT_Z = 0.00 -% -% Reference length for moment non-dimensional coefficients (m or in) REF_LENGTH= 1.0 -% -% Reference area for non-dimensional force coefficients (0 implies automatic -% calculation) (m^2 or in^2) REF_AREA= 1.0 -% -% Aircraft semi-span (0 implies automatic calculation) (m or in) SEMI_SPAN= 1.0 -% -% Flow non-dimensionalization (DIMENSIONAL, FREESTREAM_PRESS_EQ_ONE, -% FREESTREAM_VEL_EQ_MACH, FREESTREAM_VEL_EQ_ONE) REF_DIMENSIONALIZATION= DIMENSIONAL - +% % -------------------- BOUNDARY CONDITION DEFINITION --------------------------% % -% Euler wall boundary marker(s) (NONE = no marker) -% Implementation identical to MARKER_SYM. MARKER_EULER= ( airfoil ) -% -% Far-field boundary marker(s) (NONE = no marker) MARKER_FAR= ( farfield ) - +% % ------------------------ SURFACES IDENTIFICATION ----------------------------% % -% Marker(s) of the surface in the surface flow solution file MARKER_PLOTTING = ( airfoil ) -% -% Marker(s) of the surface where the non-dimensional coefficients are evaluated. MARKER_MONITORING = ( airfoil ) - +% % ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% % -% CFL number (initial value for the adaptive CFL number) CFL_NUMBER= 100.0 -% -% Adaptive CFL number (NO, YES) CFL_ADAPT= YES % % -------------------------- MULTIGRID PARAMETERS -----------------------------% % -% Multi-grid levels (0 = no multi-grid) MGLEVEL= 3 -% -% Multi-grid cycle (V_CYCLE, W_CYCLE, FULLMG_CYCLE) MGCYCLE= W_CYCLE - +% % -------------------- FLOW NUMERICAL METHOD DEFINITION -----------------------% % -% Convective numerical method (JST, JST_KE, JST_MAT, LAX-FRIEDRICH, CUSP, ROE, AUSM, -% AUSMPLUSUP, AUSMPLUSUP2, AUSMPWPLUS, HLLC, TURKEL_PREC, -% SW, MSW, FDS, SLAU, SLAU2, L2ROE, LMROE) CONV_NUM_METHOD_FLOW= JST -% -% Max number of iterations of the linear solver for the implicit formulation LINEAR_SOLVER_ITER= 20 % % ------------------------- SCREEN/HISTORY VOLUME OUTPUT --------------------------% % -% Screen output fields (use 'SU2_CFD -d ' to view list of available fields) SCREEN_OUTPUT= (TIME_ITER, INNER_ITER, RMS_DENSITY, LIFT, MOMENT_Z) -% -% History output groups (use 'SU2_CFD -d ' to view list of available fields) HISTORY_OUTPUT= (ITER, RMS_RES, AERO_COEFF, CAUCHY, WALL_TIME) % % ------------------------- INPUT/OUTPUT FILE INFORMATION --------------------------% % -% Mesh input file MESH_FILENAME= mesh_NACA0012_inv.su2 -% -% Mesh input file format (SU2, CGNS) MESH_FORMAT= SU2 -% -% Restart flow input file SOLUTION_FILENAME= restart_gust.dat RESTART_FILENAME= restart_gust.dat SURFACE_FILENAME= surface_gust VOLUME_FILENAME= volume_gust CONV_FILENAME= history_gust -% -% Output tabular file format (TECPLOT, CSV) TABULAR_FORMAT= CSV -% -% Files to output -% Possible formats : (TECPLOT, TECPLOT_BINARY, SURFACE_TECPLOT, -% SURFACE_TECPLOT_BINARY, CSV, SURFACE_CSV, PARAVIEW, PARAVIEW_BINARY, SURFACE_PARAVIEW, -% SURFACE_PARAVIEW_BINARY, MESH, RESTART_BINARY, RESTART_ASCII, CGNS, SURFACE_CGNS, STL) OUTPUT_FILES= (NONE) - +% \ No newline at end of file