diff --git a/.github/workflows/regression.yml b/.github/workflows/regression.yml
index c3b9dfda7358..9326c472348b 100644
--- a/.github/workflows/regression.yml
+++ b/.github/workflows/regression.yml
@@ -87,5 +87,5 @@ jobs:
- name: Run Tests in Container
uses: docker://su2code/test-su2:20191031
with:
- args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}}
+ args: -b ${{github.ref}} -t release_v7.0.0 -c develop -s ${{matrix.testscript}}
diff --git a/Common/include/config_structure.hpp b/Common/include/config_structure.hpp
index c2e964c021f5..f44bd68b0e6a 100644
--- a/Common/include/config_structure.hpp
+++ b/Common/include/config_structure.hpp
@@ -1,4 +1,4 @@
-/*!
+/*!
* \file config_structure.hpp
* \brief All the information about the definition of the physical problem.
* The subroutines and functions are in the config_structure.cpp file.
@@ -479,6 +479,7 @@ class CConfig {
*Kind_SurfaceMovement, /*!< \brief Kind of the static mesh movement. */
nKind_SurfaceMovement, /*!< \brief Kind of the dynamic mesh movement. */
Kind_Gradient_Method, /*!< \brief Numerical method for computation of spatial gradients. */
+ Kind_Gradient_Method_Recon, /*!< \brief Numerical method for computation of spatial gradients used for upwind reconstruction. */
Kind_Deform_Linear_Solver, /*!< Numerical method to deform the grid */
Kind_Deform_Linear_Solver_Prec, /*!< \brief Preconditioner of the linear solver. */
Kind_Linear_Solver, /*!< \brief Numerical solver for the implicit scheme. */
@@ -533,7 +534,9 @@ class CConfig {
Kind_Matrix_Coloring, /*!< \brief Type of matrix coloring for sparse Jacobian computation. */
Kind_Solver_Fluid_FSI, /*!< \brief Kind of solver for the fluid in FSI applications. */
Kind_Solver_Struc_FSI, /*!< \brief Kind of solver for the structure in FSI applications. */
- Kind_BGS_RelaxMethod; /*!< \brief Kind of relaxation method for Block Gauss Seidel method in FSI problems. */
+ Kind_BGS_RelaxMethod; /*!< \brief Kind of relaxation method for Block Gauss Seidel method in FSI problems. */
+ bool ReconstructionGradientRequired; /*!< \brief Enable or disable a second gradient calculation for upwind reconstruction only. */
+ bool LeastSquaresRequired; /*!< \brief Enable or disable memory allocation for least-squares gradient methods. */
bool Energy_Equation; /*!< \brief Solve the energy equation for incompressible flows. */
bool MUSCL, /*!< \brief MUSCL scheme .*/
@@ -580,8 +583,6 @@ class CConfig {
unsigned short Linear_Solver_ILU_n; /*!< \brief ILU fill=in level. */
su2double SemiSpan; /*!< \brief Wing Semi span. */
su2double Roe_Kappa; /*!< \brief Relaxation of the Roe scheme. */
- su2double Relaxation_Factor_Flow; /*!< \brief Relaxation coefficient of the linear solver mean flow. */
- su2double Relaxation_Factor_Turb; /*!< \brief Relaxation coefficient of the linear solver turbulence. */
su2double Relaxation_Factor_AdjFlow; /*!< \brief Relaxation coefficient of the linear solver adjoint mean flow. */
su2double Relaxation_Factor_CHT; /*!< \brief Relaxation coefficient for the update of conjugate heat variables. */
su2double AdjTurb_Linear_Error; /*!< \brief Min error of the turbulent adjoint linear solver for the implicit formulation. */
@@ -789,7 +790,6 @@ class CConfig {
Wrt_Performance, /*!< \brief Write the performance summary at the end of a calculation. */
Wrt_AD_Statistics, /*!< \brief Write the tape statistics (discrete adjoint). */
Wrt_MeshQuality, /*!< \brief Write the mesh quality statistics to the visualization files. */
- Wrt_InletFile, /*!< \brief Write a template inlet profile file */
Wrt_Slice, /*!< \brief Write 1D slice of a 2D cartesian solution */
Wrt_Projected_Sensitivity, /*!< \brief Write projected sensitivities (dJ/dx) on surfaces to ASCII file. */
Plot_Section_Forces; /*!< \brief Write sectional forces for specified markers. */
@@ -1657,14 +1657,21 @@ class CConfig {
su2double GetGamma(void);
/*!
- * \brief Get the values of the CFL adapation.
- * \return Value of CFL adapation
+ * \brief Get the values of the CFL adaption parameters.
+ * \return Value of CFL adaption parameter
*/
su2double GetCFL_AdaptParam(unsigned short val_index);
/*!
- * \brief Get the values of the CFL adapation.
- * \return Value of CFL adapation
+ * \brief Set the values of the CFL adaption parameters.
+ * \param[in] val_index - Index of the particular CFL adaption parameter
+ * \param[in] val_cfl_param - Value of the CFL adaption parameter
+ */
+ inline void SetCFL_AdaptParam(unsigned short val_index, su2double val_cfl_param) { CFL_AdaptParam[val_index] = val_cfl_param; }
+
+ /*!
+ * \brief Get the value of the CFL adaption flag.
+ * \return TRUE if CFL adaption is active; otherwise FALSE.
*/
bool GetCFL_Adapt(void);
@@ -3284,18 +3291,6 @@ class CConfig {
* \return TRUE means that the mesh quality metrics will be written to the visualization files.
*/
bool GetWrt_MeshQuality(void);
-
- /*!
- * \brief Get information about writing a template inlet profile file.
- * \return TRUE means that a template inlet profile file will be written.
- */
- bool GetWrt_InletFile(void);
-
- /*!
- * \brief Set information about writing a template inlet profile file.
- * \param[in] val_wrt_inletfile - flag for whether to write a template inlet profile file.
- */
- void SetWrt_InletFile(bool val_wrt_inletfile);
/*!
* \brief Get information about writing a 1D slice of a 2D cartesian solution.
@@ -4016,11 +4011,29 @@ class CConfig {
void SetKt_PolyCoeffND(su2double val_coeff, unsigned short val_index);
/*!
- * \brief Get the kind of method for computation of spatial gradients.
- * \return Numerical method for computation of spatial gradients.
+ * \brief Get the kind of method for computation of spatial gradients used for viscous and source terms.
+ * \return Numerical method for computation of spatial gradients used for viscous and source terms.
*/
unsigned short GetKind_Gradient_Method(void);
+ /*!
+ * \brief Get the kind of method for computation of spatial gradients used for upwind reconstruction.
+ * \return Numerical method for computation of spatial gradients used for upwind reconstruction.
+ */
+ unsigned short GetKind_Gradient_Method_Recon(void);
+
+ /*!
+ * \brief Get flag for whether a second gradient calculation is required for upwind reconstruction alone.
+ * \return TRUE means that a second gradient will be calculated for upwind reconstruction.
+ */
+ bool GetReconstructionGradientRequired(void);
+
+ /*!
+ * \brief Get flag for whether a least-squares gradient method is being applied.
+ * \return TRUE means that a least-squares gradient method is being applied.
+ */
+ bool GetLeastSquaresRequired(void);
+
/*!
* \brief Get the kind of solver for the implicit solver.
* \return Numerical solver for implicit formulation (solving the linear system).
@@ -4094,23 +4107,11 @@ class CConfig {
*/
su2double GetLinear_Solver_Smoother_Relaxation(void) const;
- /*!
- * \brief Get the relaxation coefficient of the linear solver for the implicit formulation.
- * \return relaxation coefficient of the linear solver for the implicit formulation.
- */
- su2double GetRelaxation_Factor_Flow(void);
-
/*!
* \brief Get the relaxation coefficient of the linear solver for the implicit formulation.
* \return relaxation coefficient of the linear solver for the implicit formulation.
*/
su2double GetRelaxation_Factor_AdjFlow(void);
-
- /*!
- * \brief Get the relaxation coefficient of the linear solver for the implicit formulation.
- * \return relaxation coefficient of the linear solver for the implicit formulation.
- */
- su2double GetRelaxation_Factor_Turb(void);
/*!
* \brief Get the relaxation coefficient of the CHT coupling.
@@ -9222,14 +9223,14 @@ class CConfig {
unsigned short GetnConv_Field();
/*!
- * \brief Set_StartTime
- * \param starttime
+ * \brief Set the start time to track a phase of the code (preprocessing, compute, output).
+ * \param[in] Value of the start time to track a phase of the code.
*/
void Set_StartTime(su2double starttime);
/*!
- * \brief Get_StartTime
- * \return
+ * \brief Get the start time to track a phase of the code (preprocessing, compute, output).
+ * \return Value of the start time to track a phase of the code.
*/
su2double Get_StartTime();
diff --git a/Common/include/config_structure.inl b/Common/include/config_structure.inl
index 8a09a88697ed..e5fafdb52129 100644
--- a/Common/include/config_structure.inl
+++ b/Common/include/config_structure.inl
@@ -988,6 +988,12 @@ inline su2double CConfig::GetmaxTurkelBeta() { return Max_Beta_RoeTurkel; }
inline unsigned short CConfig::GetKind_Gradient_Method(void) { return Kind_Gradient_Method; }
+inline unsigned short CConfig::GetKind_Gradient_Method_Recon(void) { return Kind_Gradient_Method_Recon; }
+
+inline bool CConfig::GetReconstructionGradientRequired(void) { return ReconstructionGradientRequired; }
+
+inline bool CConfig::GetLeastSquaresRequired(void) { return LeastSquaresRequired; }
+
inline unsigned short CConfig::GetKind_Linear_Solver(void) { return Kind_Linear_Solver; }
inline unsigned short CConfig::GetKind_Deform_Linear_Solver(void) { return Kind_Deform_Linear_Solver; }
@@ -1012,12 +1018,8 @@ inline unsigned long CConfig::GetLinear_Solver_Restart_Frequency(void) { return
inline su2double CConfig::GetLinear_Solver_Smoother_Relaxation(void) const { return Linear_Solver_Smoother_Relaxation; }
-inline su2double CConfig::GetRelaxation_Factor_Flow(void) { return Relaxation_Factor_Flow; }
-
inline su2double CConfig::GetRelaxation_Factor_AdjFlow(void) { return Relaxation_Factor_AdjFlow; }
-inline su2double CConfig::GetRelaxation_Factor_Turb(void) { return Relaxation_Factor_Turb; }
-
inline su2double CConfig::GetRelaxation_Factor_CHT(void) { return Relaxation_Factor_CHT; }
inline su2double CConfig::GetRoe_Kappa(void) { return Roe_Kappa; }
@@ -1667,10 +1669,6 @@ inline bool CConfig::GetWrt_AD_Statistics(void) { return Wrt_AD_Statistics; }
inline bool CConfig::GetWrt_MeshQuality(void) { return Wrt_MeshQuality; }
-inline bool CConfig::GetWrt_InletFile(void) { return Wrt_InletFile; }
-
-inline void CConfig::SetWrt_InletFile(bool val_wrt_inletfile) { Wrt_InletFile = val_wrt_inletfile; }
-
inline bool CConfig::GetWrt_Slice(void) { return Wrt_Slice; }
inline bool CConfig::GetWrt_Projected_Sensitivity(void) { return Wrt_Projected_Sensitivity; }
diff --git a/Common/include/option_structure.hpp b/Common/include/option_structure.hpp
index 535bcd2f15ff..672488311a44 100644
--- a/Common/include/option_structure.hpp
+++ b/Common/include/option_structure.hpp
@@ -1,4 +1,4 @@
-/*!
+/*!
* \file option_structure.hpp
* \brief Defines classes for referencing options for easy input in CConfig
* \author J. Hicken, B. Tracey
@@ -971,11 +971,15 @@ static const map Space_Ite_Map_FEA = CCreateMap Gradient_Map = CCreateMap
+("NONE", NO_GRADIENT)
("GREEN_GAUSS", GREEN_GAUSS)
+("LEAST_SQUARES", LEAST_SQUARES)
("WEIGHTED_LEAST_SQUARES", WEIGHTED_LEAST_SQUARES);
/*!
@@ -1930,13 +1934,15 @@ enum PERIODIC_QUANTITIES {
PERIODIC_SENSOR = 6, /*!< \brief Dissipation sensor communication (periodic only). */
PERIODIC_SOL_GG = 7, /*!< \brief Solution gradient communication for Green-Gauss (periodic only). */
PERIODIC_PRIM_GG = 8, /*!< \brief Primitive gradient communication for Green-Gauss (periodic only). */
- PERIODIC_SOL_LS = 9, /*!< \brief Solution gradient communication for Least Squares (periodic only). */
- PERIODIC_PRIM_LS = 10, /*!< \brief Primitive gradient communication for Least Squares (periodic only). */
+ PERIODIC_SOL_LS = 9, /*!< \brief Solution gradient communication for weighted Least Squares (periodic only). */
+ PERIODIC_PRIM_LS = 10, /*!< \brief Primitive gradient communication for weighted Least Squares (periodic only). */
PERIODIC_LIM_SOL_1 = 11, /*!< \brief Solution limiter communication phase 1 of 2 (periodic only). */
PERIODIC_LIM_SOL_2 = 12, /*!< \brief Solution limiter communication phase 2 of 2 (periodic only). */
PERIODIC_LIM_PRIM_1 = 13, /*!< \brief Primitive limiter communication phase 1 of 2 (periodic only). */
PERIODIC_LIM_PRIM_2 = 14, /*!< \brief Primitive limiter communication phase 2 of 2 (periodic only). */
- PERIODIC_IMPLICIT = 15 /*!< \brief Implicit update communication to ensure consistency across periodic boundaries. */
+ PERIODIC_IMPLICIT = 15, /*!< \brief Implicit update communication to ensure consistency across periodic boundaries. */
+ PERIODIC_SOL_ULS = 16, /*!< \brief Solution gradient communication for unwieghted Least Squares (periodic only). */
+ PERIODIC_PRIM_ULS = 17 /*!< \brief Primitive gradient communication for unweighted Least Squares (periodic only). */
};
/*!
diff --git a/Common/src/config_structure.cpp b/Common/src/config_structure.cpp
index 1327bc65f8b3..ffbc10b91ab6 100644
--- a/Common/src/config_structure.cpp
+++ b/Common/src/config_structure.cpp
@@ -243,8 +243,6 @@ CConfig::CConfig(char case_filename[MAX_STRING_SIZE], CConfig *config) {
if (runtime_file) {
if (all_options.find("TIME_ITER") == all_options.end())
config->SetnTime_Iter(nTimeIter);
- if (all_options.find("CFL_NUMBER") == all_options.end())
- config->SetCFL(MESH_0, CFLFineGrid);
}
}
@@ -789,8 +787,6 @@ void CConfig::SetPointersNull(void) {
Aeroelastic_Simulation = false;
nSpanMaxAllZones = 1;
-
- Wrt_InletFile = false;
Restart_Bandwidth_Agg = 0.0;
@@ -1457,10 +1453,6 @@ void CConfig::SetConfig_Options() {
/* DESCRIPTION: Relaxation factor for iterative linear smoothers (SMOOTHER_ILU/JACOBI/LU-SGS/LINELET) */
addDoubleOption("LINEAR_SOLVER_SMOOTHER_RELAXATION", Linear_Solver_Smoother_Relaxation, 1.0);
/* DESCRIPTION: Relaxation of the flow equations solver for the implicit formulation */
- addDoubleOption("RELAXATION_FACTOR_FLOW", Relaxation_Factor_Flow, 1.0);
- /* DESCRIPTION: Relaxation of the turb equations solver for the implicit formulation */
- addDoubleOption("RELAXATION_FACTOR_TURB", Relaxation_Factor_Turb, 1.0);
- /* DESCRIPTION: Relaxation of the adjoint flow equations solver for the implicit formulation */
addDoubleOption("RELAXATION_FACTOR_ADJFLOW", Relaxation_Factor_AdjFlow, 1.0);
/* DESCRIPTION: Relaxation of the CHT coupling */
addDoubleOption("RELAXATION_FACTOR_CHT", Relaxation_Factor_CHT, 1.0);
@@ -1536,6 +1528,9 @@ void CConfig::SetConfig_Options() {
/*!\brief NUM_METHOD_GRAD
* \n DESCRIPTION: Numerical method for spatial gradients \n OPTIONS: See \link Gradient_Map \endlink. \n DEFAULT: WEIGHTED_LEAST_SQUARES. \ingroup Config*/
addEnumOption("NUM_METHOD_GRAD", Kind_Gradient_Method, Gradient_Map, WEIGHTED_LEAST_SQUARES);
+ /*!\brief NUM_METHOD_GRAD
+ * \n DESCRIPTION: Numerical method for spatial gradients used only for upwind reconstruction \n OPTIONS: See \link Gradient_Map \endlink. \n DEFAULT: NO_GRADIENT. \ingroup Config*/
+ addEnumOption("NUM_METHOD_GRAD_RECON", Kind_Gradient_Method_Recon, Gradient_Map, NO_GRADIENT);
/*!\brief VENKAT_LIMITER_COEFF
* \n DESCRIPTION: Coefficient for the limiter. DEFAULT value 0.5. Larger values decrease the extent of limiting, values approaching zero cause lower-order approximation to the solution. \ingroup Config */
addDoubleOption("VENKAT_LIMITER_COEFF", Venkat_LimiterCoeff, 0.05);
@@ -1570,7 +1565,7 @@ void CConfig::SetConfig_Options() {
/*!\brief USE_ACCURATE_FLUX_JACOBIANS \n DESCRIPTION: Use numerically computed Jacobians for AUSM+up(2) and SLAU(2) \ingroup Config*/
addBoolOption("USE_ACCURATE_FLUX_JACOBIANS", Use_Accurate_Jacobians, false);
/*!\brief CENTRAL_JACOBIAN_FIX_FACTOR \n DESCRIPTION: Improve the numerical properties (diagonal dominance) of the global Jacobian matrix, 3 to 4 is "optimum" (central schemes) \ingroup Config*/
- addDoubleOption("CENTRAL_JACOBIAN_FIX_FACTOR", Cent_Jac_Fix_Factor, 1.0);
+ addDoubleOption("CENTRAL_JACOBIAN_FIX_FACTOR", Cent_Jac_Fix_Factor, 4.0);
/*!\brief CONV_NUM_METHOD_ADJFLOW
* \n DESCRIPTION: Convective numerical method for the adjoint solver.
@@ -3890,7 +3885,6 @@ void CConfig::SetPostprocessing(unsigned short val_software, unsigned short val_
/*--- Setting relaxation factor and CFL for the adjoint runs ---*/
if (ContinuousAdjoint) {
- Relaxation_Factor_Flow = Relaxation_Factor_AdjFlow;
CFL[0] = CFL[0] * CFLRedCoeff_AdjFlow;
CFL_AdaptParam[2] *= CFLRedCoeff_AdjFlow;
CFL_AdaptParam[3] *= CFLRedCoeff_AdjFlow;
@@ -4553,6 +4547,81 @@ void CConfig::SetPostprocessing(unsigned short val_software, unsigned short val_
RampOutletPressure = false;
RampRotatingFrame = false;
}
+
+ /* 2nd-order MUSCL is not possible for the continuous adjoint
+ turbulence model. */
+
+ if (MUSCL_AdjTurb) {
+ SU2_MPI::Error(string("MUSCL_ADJTURB= YES not currently supported.\n") +
+ string("Please select MUSCL_ADJTURB= NO (first-order)."),
+ CURRENT_FUNCTION);
+ }
+
+ /* Check for whether we need a second gradient method to calculate
+ gradients for uwpind reconstruction. Set additional booleans to
+ minimize overhead as appropriate. */
+
+ if (MUSCL_Flow || MUSCL_Turb || MUSCL_Heat || MUSCL_AdjFlow) {
+
+ ReconstructionGradientRequired = true;
+
+ if ((Kind_Gradient_Method_Recon == NO_GRADIENT) ||
+ (Kind_Gradient_Method_Recon == Kind_Gradient_Method)) {
+
+ /* The default behavior if no reconstruction gradient is specified
+ is to use the same gradient as needed for the viscous/source terms
+ without recomputation. If they are using the same method, then
+ we also want to avoid recomputation. */
+
+ ReconstructionGradientRequired = false;
+ Kind_Gradient_Method_Recon = Kind_Gradient_Method;
+ }
+
+ }
+
+ /* Simpler boolean to control allocation of least-squares memory. */
+
+ LeastSquaresRequired = false;
+ if ((Kind_Gradient_Method_Recon == LEAST_SQUARES) ||
+ (Kind_Gradient_Method_Recon == WEIGHTED_LEAST_SQUARES) ||
+ (Kind_Gradient_Method == LEAST_SQUARES) ||
+ (Kind_Gradient_Method == WEIGHTED_LEAST_SQUARES)) {
+ LeastSquaresRequired = true;
+ }
+
+ if (Kind_Gradient_Method == LEAST_SQUARES) {
+ SU2_MPI::Error(string("LEAST_SQUARES gradient method not allowed for viscous / source terms.\n") +
+ string("Please select either WEIGHTED_LEAST_SQUARES or GREEN_GAUSS."),
+ CURRENT_FUNCTION);
+ }
+
+ /* Protect against using CFL adaption for non-flow or certain
+ unsteady flow problems. */
+
+ bool fvm_flow = ((Kind_Solver == INC_EULER) ||
+ (Kind_Solver == INC_NAVIER_STOKES) ||
+ (Kind_Solver == INC_RANS) ||
+ (Kind_Solver == EULER) ||
+ (Kind_Solver == NAVIER_STOKES) ||
+ (Kind_Solver == RANS) ||
+ (Kind_Solver == DISC_ADJ_EULER) ||
+ (Kind_Solver == DISC_ADJ_RANS) ||
+ (Kind_Solver == DISC_ADJ_NAVIER_STOKES) ||
+ (Kind_Solver == DISC_ADJ_INC_EULER) ||
+ (Kind_Solver == DISC_ADJ_INC_RANS) ||
+ (Kind_Solver == DISC_ADJ_INC_NAVIER_STOKES));
+ if (CFL_Adapt && !fvm_flow) {
+ SU2_MPI::Error(string("CFL adaption only available for finite-volume fluid solvers.\n") +
+ string("Please select CFL_ADAPT = NO."),
+ CURRENT_FUNCTION);
+ }
+
+ if (CFL_Adapt && (TimeMarching == TIME_STEPPING)) {
+ SU2_MPI::Error(string("CFL adaption not available for TIME_STEPPING integration.\n") +
+ string("Please select CFL_ADAPT = NO."),
+ CURRENT_FUNCTION);
+ }
+
}
void CConfig::SetMarkers(unsigned short val_software) {
@@ -5956,9 +6025,15 @@ void CConfig::SetOutput(unsigned short val_software, unsigned short val_izone) {
Kind_Solver != DISC_ADJ_FEM_EULER && Kind_Solver != DISC_ADJ_FEM_NS &&
Kind_Solver != DISC_ADJ_FEM_RANS) {
if (!fea){
+ switch (Kind_Gradient_Method_Recon) {
+ case GREEN_GAUSS: cout << "Gradient for upwind reconstruction: Green-Gauss." << endl; break;
+ case LEAST_SQUARES: cout << "Gradient for upwind reconstruction: unweighted Least-Squares." << endl; break;
+ case WEIGHTED_LEAST_SQUARES: cout << "Gradient for upwind reconstruction: inverse-distance weighted Least-Squares." << endl; break;
+ }
switch (Kind_Gradient_Method) {
- case GREEN_GAUSS: cout << "Gradient computation using Green-Gauss theorem." << endl; break;
- case WEIGHTED_LEAST_SQUARES: cout << "Gradient Computation using weighted Least-Squares method." << endl; break;
+ case GREEN_GAUSS: cout << "Gradient for viscous and source terms: Green-Gauss." << endl; break;
+ case LEAST_SQUARES: cout << "Gradient for viscous and source terms: unweighted Least-Squares." << endl; break;
+ case WEIGHTED_LEAST_SQUARES: cout << "Gradient for viscous and source terms: inverse-distance weighted Least-Squares." << endl; break;
}
}
else{
diff --git a/Common/src/linear_algebra/CSysSolve.cpp b/Common/src/linear_algebra/CSysSolve.cpp
index 1eb0e4fa3186..9a072133a823 100644
--- a/Common/src/linear_algebra/CSysSolve.cpp
+++ b/Common/src/linear_algebra/CSysSolve.cpp
@@ -334,7 +334,7 @@ unsigned long CSysSolve::CG_LinSolver(const CSysVector &
}
- (*residual) = norm_r;
+ (*residual) = norm_r/norm0;
return (unsigned long) i;
}
@@ -750,7 +750,7 @@ unsigned long CSysSolve::Smoother_LinSolver(const CSysVectorCMarkerProfileReaderFVM.cpp file.
+ * \author T. Economon
+ * \version 6.2.0 "Falcon"
+ *
+ * The current SU2 release has been coordinated by the
+ * SU2 International Developers Society
+ * with selected contributions from the open-source community.
+ *
+ * The main research teams contributing to the current release are:
+ * - Prof. Juan J. Alonso's group at Stanford University.
+ * - Prof. Piero Colonna's group at Delft University of Technology.
+ * - Prof. Nicolas R. Gauger's group at Kaiserslautern University of Technology.
+ * - Prof. Alberto Guardone's group at Polytechnic University of Milan.
+ * - Prof. Rafael Palacios' group at Imperial College London.
+ * - Prof. Vincent Terrapon's group at the University of Liege.
+ * - Prof. Edwin van der Weide's group at the University of Twente.
+ * - Lab. of New Concepts in Aeronautics at Tech. Institute of Aeronautics.
+ *
+ * Copyright 2012-2019, Francisco D. Palacios, Thomas D. Economon,
+ * Tim Albring, and the SU2 contributors.
+ *
+ * SU2 is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * SU2 is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with SU2. If not, see .
+ */
+
+#pragma once
+
+#include
+#include
+#include
+#include
+
+#include "../../Common/include/mpi_structure.hpp"
+#include "../../Common/include/config_structure.hpp"
+#include "../../Common/include/geometry_structure.hpp"
+
+using namespace std;
+
+/*!
+ * \class CMarkerProfileReaderFVM
+ * \brief Class for the marker profile reader of the finite volume solver (FVM).
+ * \author: T. Economon
+ */
+class CMarkerProfileReaderFVM {
+
+protected:
+
+ int rank; /*!< \brief MPI Rank. */
+ int size; /*!< \brief MPI Size. */
+
+ CConfig *config; /*!< \brief Local pointer to the config parameter object. */
+
+ CGeometry *geometry; /*!< \brief Local pointer to the geometry object. */
+
+ unsigned short dimension; /*!< \brief Dimension of the problem (2 or 3). */
+ unsigned short markerType; /*!< \brief Type of marker where the profiles are being applied. */
+
+ unsigned short numberOfVars; /*!< \brief Number of variables added to the number of coordinates to write each line in the template profile file. */
+
+ unsigned long numberOfProfiles; /*!< \brief Auxiliary structure for holding the number of markers in a profile file. */
+
+ string filename; /*!< \brief File name of the marker profile file. */
+
+ vector profileTags; /*!< \brief Auxiliary structure for holding the string names of the markers in a profile file. */
+
+ vector numberOfRowsInProfile; /*!< \brief Auxiliary structure for holding the number of rows for a particular marker in a profile file. */
+ vector numberOfColumnsInProfile; /*!< \brief Auxiliary structure for holding the number of columns for a particular marker in a profile file. */
+
+ vector > profileData; /*!< \brief Auxiliary structure for holding the data values from a profile file. */
+ vector > > profileCoords; /*!< \brief Data structure for holding the merged inlet boundary coordinates from all ranks. */
+
+private:
+
+ /*!
+ * \brief Read a native SU2 marker profile file in ASCII format.
+ */
+ void ReadMarkerProfile();
+
+ /*!
+ * \brief Merge the node coordinates of all profile-type boundaries from all processors.
+ */
+ void MergeProfileMarkers();
+
+ /*!
+ * \brief Write a template profile file if the requested file is not found.
+ */
+ void WriteMarkerProfileTemplate();
+
+public:
+
+ /*!
+ * \brief Constructor of the CMarkerProfileReaderFVM class.
+ * \param[in] val_geometry - Pointer to the current geometry
+ * \param[in] val_config - Pointer to the current config structure
+ * \param[in] val_filename - Name of the profile file to be read
+ * \param[in] val_kind_marker - Type of marker where profile will be applied
+ * \param[in] val_number_vars - Number of columns of profile data to be written to template file (excluding coordinates)
+ */
+ CMarkerProfileReaderFVM(CGeometry *val_geometry,
+ CConfig *val_config,
+ string val_filename,
+ unsigned short val_kind_marker,
+ unsigned short val_number_vars);
+
+ /*!
+ * \brief Destructor of the CMeshReaderFVM class.
+ */
+ ~CMarkerProfileReaderFVM(void);
+
+ /*!
+ * \brief Get the number of profiles found within the input file.
+ * \returns Number of profiles found within the input file.
+ */
+ inline unsigned long GetNumberOfProfiles() {
+ return numberOfProfiles;
+ }
+
+ /*!
+ * \brief Get the string tag for the marker where the profile is applied.
+ * \param[in] val_iProfile - current profile index.
+ * \returns String tag for the marker where the profile is applied.
+ */
+ inline const string &GetTagForProfile(int val_iProfile) const {
+ return profileTags[val_iProfile];
+ }
+
+ /*!
+ * \brief Get the number of rows of data in a profile.
+ * \param[in] val_iProfile - current profile index.
+ * \returns Number of rows of data in a profile.
+ */
+ inline unsigned long GetNumberOfRowsInProfile(int val_iProfile) {
+ return numberOfRowsInProfile[val_iProfile];
+ }
+
+ /*!
+ * \brief Get the number of columns of data in a profile.
+ * \param[in] val_iProfile - current profile index.
+ * \returns Number of columns of data in a profile.
+ */
+ inline unsigned long GetNumberOfColumnsInProfile(int val_iProfile) {
+ return numberOfColumnsInProfile[val_iProfile];
+ }
+
+ /*!
+ * \brief Get the 1D vector of data for a profile from the input file.
+ * \param[in] val_iProfile - current profile index.
+ * \returns 1D vector of data for a profile from the input file.
+ */
+ inline const vector &GetDataForProfile(int val_iProfile) const {
+ return profileData[val_iProfile];
+ }
+
+};
diff --git a/SU2_CFD/include/output/COutput.hpp b/SU2_CFD/include/output/COutput.hpp
index 02bfeb2389e3..8c21a269c74a 100644
--- a/SU2_CFD/include/output/COutput.hpp
+++ b/SU2_CFD/include/output/COutput.hpp
@@ -1,4 +1,4 @@
-/*!
+/*!
* \file COutput.hpp
* \brief Headers of the output class.
* \author T.Albring
@@ -348,13 +348,6 @@ class COutput {
*/
inline string GetRestart_Filename() {return restartFilename;}
- /*!
- * \brief Set the CFL number based on the current residuals
- * \param[in] solver_container - Container vector with all the solutions.
- * \param[in] config - Definition of the particular problem.
- */
- void SetCFL_Number(CSolver ****solver_container, CConfig *config);
-
/*!
* \brief Set the current iteration indices
* \param[in] TimeIter - Timer iteration index
diff --git a/SU2_CFD/include/output/COutputLegacy.hpp b/SU2_CFD/include/output/COutputLegacy.hpp
index 626fd0503bd8..2fd9e322ba15 100644
--- a/SU2_CFD/include/output/COutputLegacy.hpp
+++ b/SU2_CFD/include/output/COutputLegacy.hpp
@@ -1,4 +1,4 @@
-/*!
+/*!
* \file output.hpp
* \brief Headers of the main subroutines for generating the file outputs.
* The subroutines and functions are in the output_structure.cpp file.
@@ -205,12 +205,6 @@ class COutputLegacy {
**NuFactorIn,
**NuFactorOut;
- unsigned long nMarker_InletFile; /*!< \brief Counter for total number of inlet boundaries written to inlet profile file. */
- vector Marker_Tags_InletFile; /*!< \brief Marker tags for the strings of the markers in the inlet profile file. */
- unsigned long *nRow_InletFile; /*!< \brief Counters for the number of points per marker in the inlet profile file. */
- unsigned long *nRowCum_InletFile; /*!< \brief Counters for the number of points per marker in cumulative storage format in the inlet profile file. */
- su2double **InletCoords; /*!< \brief Data structure for holding the merged inlet boundary coordinates from all ranks. */
-
protected:
int rank, /*!< \brief MPI Rank. */
@@ -767,19 +761,6 @@ class COutputLegacy {
*/
void SpecialOutput_ForcesBreakdown(CSolver *****solver, CGeometry ****geometry, CConfig **config, unsigned short val_iZone, bool output);
- /*!
- * \brief Write the history file and the convergence on the screen for serial computations.
- * \param[in] ConvHist_file - Pointer to the convergence history file (which is defined in the main subroutine).
- * \param[in] geometry - Geometrical definition of the problem.
- * \param[in] solver_container - Container vector with all the solutions.
- * \param[in] config - Definition of the particular problem.
- * \param[in] integration - Generic subroutines for space integration, time integration, and monitoring.
- * \param[in] iExtIter - Current external (time) iteration.
- * \param[in] timeused - Current number of clock tick in the computation (related with total time).
- * \param[in] val_nZone - iZone index.
- */
- void SetCFL_Number(CSolver *****solver_container, CConfig **config, unsigned short val_iZone);
-
/*!
* \brief Write the sensitivity (including mesh sensitivity) computed with the discrete adjoint method
* on the surface and in the volume to a file.
@@ -1027,28 +1008,6 @@ class COutputLegacy {
*/
void DeallocateSurfaceData_Parallel(CConfig *config, CGeometry *geometry);
- /*!
- * \brief Merge the node coordinates of all inlet boundaries from all processors.
- * \param[in] config - Definition of the particular problem.
- * \param[in] geometry - Geometrical definition of the problem.
- */
- void MergeInletCoordinates(CConfig *config, CGeometry *geometry);
-
- /*!
- * \brief Write a template inlet profile file for all inlets for flow problems.
- * \param[in] config - Definition of the particular problem.
- * \param[in] geometry - Geometrical definition of the problem.
- * \param[in] solver - Solver container.
- */
- void Write_InletFile_Flow(CConfig *config, CGeometry *geometry, CSolver **solver);
-
- /*!
- * \brief Deallocate temporary memory needed for merging and writing inlet boundary coordinates.
- * \param[in] config - Definition of the particular problem.
- * \param[in] geometry - Geometrical definition of the problem.
- */
- void DeallocateInletCoordinates(CConfig *config, CGeometry *geometry);
-
/*!
* \brief Create and write a CSV file with a slice of data.
* \param[in] config - Definition of the particular problem.
diff --git a/SU2_CFD/include/solver_structure.hpp b/SU2_CFD/include/solver_structure.hpp
index 91b03aa811d9..d11e89994772 100644
--- a/SU2_CFD/include/solver_structure.hpp
+++ b/SU2_CFD/include/solver_structure.hpp
@@ -1,4 +1,4 @@
-/*!
+/*!
* \file solver_structure.hpp
* \brief Headers of the main subroutines for solving partial differential equations.
* The subroutines and functions are in the solver_structure.cpp,
@@ -94,6 +94,13 @@ class CSolver {
bool adjoint; /*!< \brief Boolean to determine whether solver is initialized as a direct or an adjoint solver. */
unsigned short MGLevel; /*!< \brief Multigrid level of this solver object. */
unsigned short IterLinSolver; /*!< \brief Linear solver iterations. */
+ su2double ResLinSolver; /*!< \brief Final linear solver residual. */
+ su2double NonLinRes_Value, /*!< \brief Summed value of the nonlinear residual indicator. */
+ NonLinRes_Func; /*!< \brief Current value of the nonlinear residual indicator at one iteration. */
+ unsigned short NonLinRes_Counter; /*!< \brief Number of elements of the nonlinear residual indicator series. */
+ vector NonLinRes_Series; /*!< \brief Vector holding the nonlinear residual indicator series. */
+ su2double Old_Func, /*!< \brief Old value of the nonlinear residual indicator. */
+ New_Func; /*!< \brief Current value of the nonlinear residual indicator. */
unsigned short nVar, /*!< \brief Number of variables of the problem. */
nPrimVar, /*!< \brief Number of primitive variables of the problem. */
nPrimVarGrad, /*!< \brief Number of primitive variables of the problem in the gradient computation. */
@@ -104,7 +111,10 @@ class CSolver {
unsigned long nPoint; /*!< \brief Number of points of the computational grid. */
unsigned long nPointDomain; /*!< \brief Number of points of the computational grid. */
su2double Max_Delta_Time, /*!< \brief Maximum value of the delta time for all the control volumes. */
- Min_Delta_Time; /*!< \brief Minimum value of the delta time for all the control volumes. */
+ Min_Delta_Time; /*!< \brief Minimum value of the delta time for all the control volumes. */
+ su2double Max_CFL_Local; /*!< \brief Maximum value of the CFL across all the control volumes. */
+ su2double Min_CFL_Local; /*!< \brief Minimum value of the CFL across all the control volumes. */
+ su2double Avg_CFL_Local; /*!< \brief Average value of the CFL across all the control volumes. */
su2double *Residual_RMS, /*!< \brief Vector with the mean residual for each variable. */
*Residual_Max, /*!< \brief Vector with the maximal residual for each variable. */
*Residual, /*!< \brief Auxiliary nVar vector. */
@@ -147,14 +157,7 @@ class CSolver {
unsigned long nMarker, /*!< \brief Total number of markers using the grid information. */
*nVertex; /*!< \brief Store nVertex at each marker for deallocation */
- unsigned long nMarker_InletFile; /*!< \brief Auxiliary structure for holding the number of markers in an inlet profile file. */
- vector Marker_Tags_InletFile; /*!< \brief Auxiliary structure for holding the string names of the markers in an inlet profile file. */
- unsigned long *nRow_InletFile; /*!< \brief Auxiliary structure for holding the number of rows for a particular marker in an inlet profile file. */
- unsigned long *nRowCum_InletFile; /*!< \brief Auxiliary structure for holding the number of rows in cumulative storage format for a particular marker in an inlet profile file. */
- unsigned long maxCol_InletFile; /*!< \brief Auxiliary structure for holding the maximum number of columns in all inlet marker profiles (for data structure size) */
- unsigned long *nCol_InletFile; /*!< \brief Auxiliary structure for holding the number of columns for a particular marker in an inlet profile file. */
- passivedouble *Inlet_Data; /*!< \brief Auxiliary structure for holding the data values from an inlet profile file. */
-
+
bool rotate_periodic; /*!< \brief Flag that controls whether the periodic solution needs to be rotated for the solver. */
bool implicit_periodic; /*!< \brief Flag that controls whether the implicit system should be treated by the periodic BC comms. */
@@ -164,8 +167,6 @@ class CSolver {
su2double ***VertexTractionAdjoint; /*- Also temporary -*/
string SolverName; /*!< \brief Store the name of the solver for output purposes. */
-
- su2double valResidual; /*!< \brief Store the residual of the linear system solution. */
/*!
* \brief Pure virtual function, all derived solvers MUST implement a method returning their "nodes".
@@ -189,7 +190,7 @@ class CSolver {
CVariable* base_nodes; /*!< \brief Pointer to CVariable to allow polymorphic access to solver nodes. */
public:
-
+
CSysVector LinSysSol; /*!< \brief vector to store iterative solution of implicit linear system. */
CSysVector LinSysRes; /*!< \brief vector to store iterative residual of implicit linear system. */
CSysVector LinSysAux; /*!< \brief vector to store iterative residual of implicit linear system. */
@@ -278,6 +279,12 @@ class CSolver {
*/
void SetIterLinSolver(unsigned short val_iterlinsolver);
+ /*!
+ * \brief Set the final linear solver residual.
+ * \param[in] val_reslinsolver - Value of final linear solver residual.
+ */
+ void SetResLinSolver(su2double val_reslinsolver);
+
/*!
* \brief Set the value of the max residual and RMS residual.
* \param[in] val_iterlinsolver - Number of linear iterations.
@@ -331,6 +338,12 @@ class CSolver {
*/
unsigned short GetIterLinSolver(void);
+ /*!
+ * \brief Get the final linear solver residual.
+ * \return Value of final linear solver residual.
+ */
+ inline su2double GetResLinSolver(void) { return ResLinSolver; }
+
/*!
* \brief Get the value of the maximum delta time.
* \return Value of the maximum delta time.
@@ -355,6 +368,24 @@ class CSolver {
*/
virtual su2double GetMin_Delta_Time(unsigned short val_Species);
+ /*!
+ * \brief Get the value of the maximum local CFL number.
+ * \return Value of the maximum local CFL number.
+ */
+ inline su2double GetMax_CFL_Local(void) { return Max_CFL_Local; }
+
+ /*!
+ * \brief Get the value of the minimum local CFL number.
+ * \return Value of the minimum local CFL number.
+ */
+ inline su2double GetMin_CFL_Local(void) { return Min_CFL_Local; }
+
+ /*!
+ * \brief Get the value of the average local CFL number.
+ * \return Value of the average local CFL number.
+ */
+ inline su2double GetAvg_CFL_Local(void) { return Avg_CFL_Local; }
+
/*!
* \brief Get the number of variables of the problem.
*/
@@ -583,15 +614,18 @@ class CSolver {
/*!
* \brief Compute the Green-Gauss gradient of the solution.
* \param[in] geometry - Geometrical definition of the problem.
+ * \param[in] config - Definition of the particular problem.
+ * \param[in] reconstruction - indicator that the gradient being computed is for upwind reconstruction.
*/
- void SetSolution_Gradient_GG(CGeometry *geometry, CConfig *config);
+ void SetSolution_Gradient_GG(CGeometry *geometry, CConfig *config, bool reconstruction = false);
/*!
* \brief Compute the Least Squares gradient of the solution.
* \param[in] geometry - Geometrical definition of the problem.
* \param[in] config - Definition of the particular problem.
+ * \param[in] reconstruction - indicator that the gradient being computed is for upwind reconstruction.
*/
- void SetSolution_Gradient_LS(CGeometry *geometry, CConfig *config);
+ void SetSolution_Gradient_LS(CGeometry *geometry, CConfig *config, bool reconstruction = false);
/*!
* \brief Compute the Least Squares gradient of the grid velocity.
@@ -1370,6 +1404,27 @@ class CSolver {
*/
virtual void ImplicitEuler_Iteration(CGeometry *geometry, CSolver **solver_container, CConfig *config);
+ /*!
+ * \brief A virtual member.
+ * \param[in] solver - Container vector with all the solutions.
+ * \param[in] config - Definition of the particular problem.
+ */
+ virtual void ComputeUnderRelaxationFactor(CSolver **solver, CConfig *config);
+
+ /*!
+ * \brief Adapt the CFL number based on the local under-relaxation parameters
+ * computed for each nonlinear iteration.
+ * \param[in] geometry - Geometrical definition of the problem.
+ * \param[in] config - Definition of the particular problem.
+ * \param[in] solver_container - Container vector with all the solutions.
+ */
+ void AdaptCFLNumber(CGeometry **geometry, CSolver ***solver_container, CConfig *config);
+
+ /*!
+ * \brief Reset the local CFL adaption variables
+ */
+ void ResetCFLAdapt();
+
/*!
* \brief A virtual member.
* \param[in] geometry - Geometrical definition of the problem.
@@ -1498,15 +1553,17 @@ class CSolver {
* \brief A virtual member.
* \param[in] geometry - Geometrical definition of the problem.
* \param[in] config - Definition of the particular problem.
+ * \param[in] reconstruction - indicator that the gradient being computed is for upwind reconstruction.
*/
- virtual void SetPrimitive_Gradient_GG(CGeometry *geometry, CConfig *config);
+ virtual void SetPrimitive_Gradient_GG(CGeometry *geometry, CConfig *config, bool reconstruction = false);
/*!
* \brief A virtual member.
* \param[in] geometry - Geometrical definition of the problem.
* \param[in] config - Definition of the particular problem.
+ * \param[in] reconstruction - indicator that the gradient being computed is for upwind reconstruction.
*/
- virtual void SetPrimitive_Gradient_LS(CGeometry *geometry, CConfig *config);
+ virtual void SetPrimitive_Gradient_LS(CGeometry *geometry, CConfig *config, bool reconstruction = false);
/*!
* \brief A virtual member.
@@ -3568,14 +3625,6 @@ class CSolver {
*/
void Read_SU2_Restart_Metadata(CGeometry *geometry, CConfig *config, bool adjoint_run, string val_filename);
- /*!
- * \brief Read a native SU2 inlet file in ASCII format.
- * \param[in] geometry - Geometrical definition of the problem.
- * \param[in] config - Definition of the particular problem.
- * \param[in] val_filename - String name of the restart file.
- */
- void Read_InletFile_ASCII(CGeometry *geometry, CConfig *config, string val_filename);
-
/*!
* \brief Load a inlet profile data from file into a particular solver.
* \param[in] geometry - Geometrical definition of the problem.
@@ -4575,12 +4624,6 @@ class CSolver {
*/
virtual su2double GetMaximum_Volume(){ return 0.0; }
- /*!
- * \brief Get residual of the linear solver
- * \return
- */
- su2double GetLinSol_Residual(){ return valResidual; }
-
protected:
/*!
* \brief Allocate the memory for the verification solution, if necessary.
@@ -5210,16 +5253,18 @@ class CEulerSolver : public CSolver {
* and stores the result in the Gradient_Primitive variable.
* \param[in] geometry - Geometrical definition of the problem.
* \param[in] config - Definition of the particular problem.
+ * \param[in] reconstruction - indicator that the gradient being computed is for upwind reconstruction.
*/
- void SetPrimitive_Gradient_GG(CGeometry *geometry, CConfig *config);
+ void SetPrimitive_Gradient_GG(CGeometry *geometry, CConfig *config, bool reconstruction = false);
/*!
* \brief Compute the gradient of the primitive variables using a Least-Squares method,
* and stores the result in the Gradient_Primitive variable.
* \param[in] geometry - Geometrical definition of the problem.
* \param[in] config - Definition of the particular problem.
+ * \param[in] reconstruction - indicator that the gradient being computed is for upwind reconstruction.
*/
- void SetPrimitive_Gradient_LS(CGeometry *geometry, CConfig *config);
+ void SetPrimitive_Gradient_LS(CGeometry *geometry, CConfig *config, bool reconstruction = false);
/*!
* \brief Compute the limiter of the primitive variables.
@@ -5651,6 +5696,13 @@ class CEulerSolver : public CSolver {
*/
void ImplicitEuler_Iteration(CGeometry *geometry, CSolver **solver_container, CConfig *config);
+ /*!
+ * \brief Compute a suitable under-relaxation parameter to limit the change in the solution variables over a nonlinear iteration for stability.
+ * \param[in] solver - Container vector with all the solutions.
+ * \param[in] config - Definition of the particular problem.
+ */
+ void ComputeUnderRelaxationFactor(CSolver **solver, CConfig *config);
+
/*!
* \brief Compute the pressure forces and all the adimensional coefficients.
* \param[in] geometry - Geometrical definition of the problem.
@@ -7514,16 +7566,18 @@ class CIncEulerSolver : public CSolver {
* and stores the result in the Gradient_Primitive variable.
* \param[in] geometry - Geometrical definition of the problem.
* \param[in] config - Definition of the particular problem.
+ * \param[in] reconstruction - indicator that the gradient being computed is for upwind reconstruction.
*/
- void SetPrimitive_Gradient_GG(CGeometry *geometry, CConfig *config);
+ void SetPrimitive_Gradient_GG(CGeometry *geometry, CConfig *config, bool reconstruction = false);
/*!
* \brief Compute the gradient of the primitive variables using a Least-Squares method,
* and stores the result in the Gradient_Primitive variable.
* \param[in] geometry - Geometrical definition of the problem.
* \param[in] config - Definition of the particular problem.
+ * \param[in] reconstruction - indicator that the gradient being computed is for upwind reconstruction.
*/
- void SetPrimitive_Gradient_LS(CGeometry *geometry, CConfig *config);
+ void SetPrimitive_Gradient_LS(CGeometry *geometry, CConfig *config, bool reconstruction = false);
/*!
* \brief Compute the limiter of the primitive variables.
@@ -7701,6 +7755,13 @@ class CIncEulerSolver : public CSolver {
*/
void ImplicitEuler_Iteration(CGeometry *geometry, CSolver **solver_container, CConfig *config);
+ /*!
+ * \brief Compute a suitable under-relaxation parameter to limit the change in the solution variables over a nonlinear iteration for stability.
+ * \param[in] solver - Container vector with all the solutions.
+ * \param[in] config - Definition of the particular problem.
+ */
+ void ComputeUnderRelaxationFactor(CSolver **solver, CConfig *config);
+
/*!
* \brief Provide the non dimensional lift coefficient (inviscid contribution).
* \param val_marker Surface where the coefficient is going to be computed.
@@ -9632,6 +9693,13 @@ class CTurbSolver : public CSolver {
void SetResidual_DualTime(CGeometry *geometry, CSolver **solver_container, CConfig *config,
unsigned short iRKStep, unsigned short iMesh, unsigned short RunTime_EqSystem);
+ /*!
+ * \brief Compute a suitable under-relaxation parameter to limit the change in the solution variables over a nonlinear iteration for stability.
+ * \param[in] solver - Container vector with all the solutions.
+ * \param[in] config - Definition of the particular problem.
+ */
+ void ComputeUnderRelaxationFactor(CSolver **solver, CConfig *config);
+
/*!
* \brief Load a solution from a restart file.
* \param[in] geometry - Geometrical definition of the problem.
diff --git a/SU2_CFD/include/solver_structure.inl b/SU2_CFD/include/solver_structure.inl
index 8ade67dfd50b..cd64b4d31d68 100644
--- a/SU2_CFD/include/solver_structure.inl
+++ b/SU2_CFD/include/solver_structure.inl
@@ -39,6 +39,8 @@
inline void CSolver::SetIterLinSolver(unsigned short val_iterlinsolver) { IterLinSolver = val_iterlinsolver; }
+inline void CSolver::SetResLinSolver(su2double val_reslinsolver) { ResLinSolver = val_reslinsolver; }
+
inline void CSolver::SetNondimensionalization(CConfig *config, unsigned short iMesh) { }
inline bool CSolver::GetAdjoint(void) { return adjoint; }
@@ -104,9 +106,9 @@ inline su2double* CSolver::GetPsiRhos_Inf(void) { return NULL; }
inline su2double CSolver::GetPsiE_Inf(void) { return 0; }
-inline void CSolver::SetPrimitive_Gradient_GG(CGeometry *geometry, CConfig *config) { }
+inline void CSolver::SetPrimitive_Gradient_GG(CGeometry *geometry, CConfig *config, bool reconstruction) { }
-inline void CSolver::SetPrimitive_Gradient_LS(CGeometry *geometry, CConfig *config) { }
+inline void CSolver::SetPrimitive_Gradient_LS(CGeometry *geometry, CConfig *config, bool reconstruction) { }
inline void CSolver::SetPrimitive_Limiter_MPI(CGeometry *geometry, CConfig *config) { }
@@ -873,6 +875,8 @@ inline void CSolver::ExplicitEuler_Iteration(CGeometry *geometry, CSolver **solv
inline void CSolver::ImplicitEuler_Iteration(CGeometry *geometry, CSolver **solver_container, CConfig *config) { }
+inline void CSolver::ComputeUnderRelaxationFactor(CSolver **solver_container, CConfig *config) { }
+
inline void CSolver::ImplicitNewmark_Iteration(CGeometry *geometry, CSolver **solver_container, CConfig *config) { }
inline void CSolver::ImplicitNewmark_Update(CGeometry *geometry, CSolver **solver_container, CConfig *config) { }
diff --git a/SU2_CFD/include/variables/CAdjEulerVariable.hpp b/SU2_CFD/include/variables/CAdjEulerVariable.hpp
index 4d56bcdd22bc..d9aab8fefa78 100644
--- a/SU2_CFD/include/variables/CAdjEulerVariable.hpp
+++ b/SU2_CFD/include/variables/CAdjEulerVariable.hpp
@@ -53,6 +53,9 @@ class CAdjEulerVariable : public CVariable {
MatrixType IntBoundary_Jump; /*!< \brief Interior boundary jump vector. */
MatrixType HB_Source; /*!< \brief Harmonic balance source term. */
+ VectorOfMatrix& Gradient_Reconstruction; /*!< \brief Reference to the gradient of the primitive variables for MUSCL reconstruction for the convective term */
+ VectorOfMatrix Gradient_Aux; /*!< \brief Auxiliary structure to store a second gradient for reconstruction, if required. */
+
public:
/*!
* \brief Constructor of the class.
@@ -144,4 +147,34 @@ class CAdjEulerVariable : public CVariable {
inline su2double GetHarmonicBalance_Source(unsigned long iPoint, unsigned long iVar) const final {
return HB_Source(iPoint,iVar);
}
+
+ /*!
+ * \brief Get the value of the reconstruction variables gradient at a node.
+ * \param[in] iPoint - Index of the current node.
+ * \param[in] iVar - Index of the variable.
+ * \param[in] iDim - Index of the dimension.
+ * \return Value of the reconstruction variables gradient at a node.
+ */
+ inline su2double GetGradient_Reconstruction(unsigned long iPoint, unsigned long iVar, unsigned long iDim) const final {
+ return Gradient_Reconstruction(iPoint,iVar,iDim);
+ }
+
+ /*!
+ * \brief Get the value of the reconstruction variables gradient at a node.
+ * \param[in] iPoint - Index of the current node.
+ * \param[in] iVar - Index of the variable.
+ * \param[in] iDim - Index of the dimension.
+ * \param[in] value - Value of the reconstruction gradient component.
+ */
+ inline void SetGradient_Reconstruction(unsigned long iPoint, unsigned long iVar, unsigned long iDim, su2double value) final {
+ Gradient_Reconstruction(iPoint,iVar,iDim) = value;
+ }
+
+ /*!
+ * \brief Get the array of the reconstruction variables gradient at a node.
+ * \param[in] iPoint - Index of the current node.
+ * \return Array of the reconstruction variables gradient at a node.
+ */
+ inline su2double **GetGradient_Reconstruction(unsigned long iPoint) final { return Gradient_Reconstruction[iPoint]; }
+
};
diff --git a/SU2_CFD/include/variables/CEulerVariable.hpp b/SU2_CFD/include/variables/CEulerVariable.hpp
index 2c63aea50a05..cbfad5ec8aa4 100644
--- a/SU2_CFD/include/variables/CEulerVariable.hpp
+++ b/SU2_CFD/include/variables/CEulerVariable.hpp
@@ -53,9 +53,11 @@ class CEulerVariable : public CVariable {
MatrixType WindGustDer; /*! < \brief Wind gust derivatives value */
/*--- Primitive variable definition ---*/
- MatrixType Primitive; /*!< \brief Primitive variables (T, vx, vy, vz, P, rho, h, c) in compressible flows. */
- VectorOfMatrix Gradient_Primitive; /*!< \brief Gradient of the primitive variables (T, vx, vy, vz, P, rho). */
- MatrixType Limiter_Primitive; /*!< \brief Limiter of the primitive variables (T, vx, vy, vz, P, rho). */
+ MatrixType Primitive; /*!< \brief Primitive variables (T, vx, vy, vz, P, rho, h, c) in compressible flows. */
+ VectorOfMatrix Gradient_Primitive; /*!< \brief Gradient of the primitive variables (T, vx, vy, vz, P, rho). */
+ VectorOfMatrix& Gradient_Reconstruction; /*!< \brief Reference to the gradient of the primitive variables for MUSCL reconstruction for the convective term */
+ VectorOfMatrix Gradient_Aux; /*!< \brief Auxiliary structure to store a second gradient for reconstruction, if required. */
+ MatrixType Limiter_Primitive; /*!< \brief Limiter of the primitive variables (T, vx, vy, vz, P, rho). */
/*--- Secondary variable definition ---*/
MatrixType Secondary; /*!< \brief Primitive variables (T, vx, vy, vz, P, rho, h, c) in compressible flows. */
@@ -175,6 +177,35 @@ class CEulerVariable : public CVariable {
*/
inline su2double *GetLimiter_Primitive(unsigned long iPoint) final { return Limiter_Primitive[iPoint]; }
+ /*!
+ * \brief Get the value of the reconstruction variables gradient at a node.
+ * \param[in] iPoint - Index of the current node.
+ * \param[in] iVar - Index of the variable.
+ * \param[in] iDim - Index of the dimension.
+ * \return Value of the reconstruction variables gradient at a node.
+ */
+ inline su2double GetGradient_Reconstruction(unsigned long iPoint, unsigned long iVar, unsigned long iDim) const final {
+ return Gradient_Reconstruction(iPoint,iVar,iDim);
+ }
+
+ /*!
+ * \brief Get the value of the reconstruction variables gradient at a node.
+ * \param[in] iPoint - Index of the current node.
+ * \param[in] iVar - Index of the variable.
+ * \param[in] iDim - Index of the dimension.
+ * \param[in] value - Value of the reconstruction gradient component.
+ */
+ inline void SetGradient_Reconstruction(unsigned long iPoint, unsigned long iVar, unsigned long iDim, su2double value) final {
+ Gradient_Reconstruction(iPoint,iVar,iDim) = value;
+ }
+
+ /*!
+ * \brief Get the array of the reconstruction variables gradient at a node.
+ * \param[in] iPoint - Index of the current node.
+ * \return Array of the reconstruction variables gradient at a node.
+ */
+ inline su2double **GetGradient_Reconstruction(unsigned long iPoint) final { return Gradient_Reconstruction[iPoint]; }
+
/*!
* \brief A virtual member.
*/
diff --git a/SU2_CFD/include/variables/CHeatFVMVariable.hpp b/SU2_CFD/include/variables/CHeatFVMVariable.hpp
index 6cfa284de410..86da3b86afac 100644
--- a/SU2_CFD/include/variables/CHeatFVMVariable.hpp
+++ b/SU2_CFD/include/variables/CHeatFVMVariable.hpp
@@ -49,6 +49,9 @@ class CHeatFVMVariable final : public CVariable {
protected:
MatrixType Solution_Direct; /*!< \brief Direct solution container for use in the adjoint Heat solver. */
+ VectorOfMatrix& Gradient_Reconstruction; /*!< \brief Reference to the gradient of the primitive variables for MUSCL reconstruction for the convective term */
+ VectorOfMatrix Gradient_Aux; /*!< \brief Auxiliary structure to store a second gradient for reconstruction, if required. */
+
public:
/*!
* \brief Constructor of the class.
@@ -65,4 +68,33 @@ class CHeatFVMVariable final : public CVariable {
*/
~CHeatFVMVariable() = default;
+ /*!
+ * \brief Get the value of the reconstruction variables gradient at a node.
+ * \param[in] iPoint - Index of the current node.
+ * \param[in] iVar - Index of the variable.
+ * \param[in] iDim - Index of the dimension.
+ * \return Value of the reconstruction variables gradient at a node.
+ */
+ inline su2double GetGradient_Reconstruction(unsigned long iPoint, unsigned long iVar, unsigned long iDim) const final {
+ return Gradient_Reconstruction(iPoint,iVar,iDim);
+ }
+
+ /*!
+ * \brief Get the value of the reconstruction variables gradient at a node.
+ * \param[in] iPoint - Index of the current node.
+ * \param[in] iVar - Index of the variable.
+ * \param[in] iDim - Index of the dimension.
+ * \param[in] value - Value of the reconstruction gradient component.
+ */
+ inline void SetGradient_Reconstruction(unsigned long iPoint, unsigned long iVar, unsigned long iDim, su2double value) final {
+ Gradient_Reconstruction(iPoint,iVar,iDim) = value;
+ }
+
+ /*!
+ * \brief Get the array of the reconstruction variables gradient at a node.
+ * \param[in] iPoint - Index of the current node.
+ * \return Array of the reconstruction variables gradient at a node.
+ */
+ inline su2double **GetGradient_Reconstruction(unsigned long iPoint) final { return Gradient_Reconstruction[iPoint]; }
+
};
diff --git a/SU2_CFD/include/variables/CIncEulerVariable.hpp b/SU2_CFD/include/variables/CIncEulerVariable.hpp
index bfc999d4983c..6a689ade69be 100644
--- a/SU2_CFD/include/variables/CIncEulerVariable.hpp
+++ b/SU2_CFD/include/variables/CIncEulerVariable.hpp
@@ -47,11 +47,13 @@
*/
class CIncEulerVariable : public CVariable {
protected:
- VectorType Velocity2; /*!< \brief Square of the velocity vector. */
- MatrixType Primitive; /*!< \brief Primitive variables (T, vx, vy, vz, P, rho, h, c) in compressible flows. */
- VectorOfMatrix Gradient_Primitive; /*!< \brief Gradient of the primitive variables (T, vx, vy, vz, P, rho). */
- MatrixType Limiter_Primitive; /*!< \brief Limiter of the primitive variables (T, vx, vy, vz, P, rho). */
- VectorType Density_Old; /*!< \brief Old density for variable density turbulent flows (SST). */
+ VectorType Velocity2; /*!< \brief Square of the velocity vector. */
+ MatrixType Primitive; /*!< \brief Primitive variables (P, vx, vy, vz, T, rho, beta, lamMu, EddyMu, Kt_eff, Cp, Cv) in incompressible flows. */
+ VectorOfMatrix Gradient_Primitive; /*!< \brief Gradient of the primitive variables (P, vx, vy, vz, T, rho, beta). */
+ VectorOfMatrix& Gradient_Reconstruction; /*!< \brief Reference to the gradient of the primitive variables for MUSCL reconstruction for the convective term */
+ VectorOfMatrix Gradient_Aux; /*!< \brief Auxiliary structure to store a second gradient for reconstruction, if required. */
+ MatrixType Limiter_Primitive; /*!< \brief Limiter of the primitive variables (P, vx, vy, vz, T, rho, beta). */
+ VectorType Density_Old; /*!< \brief Old density for variable density turbulent flows (SST). */
public:
/*!
@@ -154,6 +156,35 @@ class CIncEulerVariable : public CVariable {
* \return Value of the primitive variables gradient.
*/
inline su2double *GetLimiter_Primitive(unsigned long iPoint) final { return Limiter_Primitive[iPoint]; }
+
+ /*!
+ * \brief Get the value of the reconstruction variables gradient at a node.
+ * \param[in] iPoint - Index of the current node.
+ * \param[in] iVar - Index of the variable.
+ * \param[in] iDim - Index of the dimension.
+ * \return Value of the reconstruction variables gradient at a node.
+ */
+ inline su2double GetGradient_Reconstruction(unsigned long iPoint, unsigned long iVar, unsigned long iDim) const final {
+ return Gradient_Reconstruction(iPoint,iVar,iDim);
+ }
+
+ /*!
+ * \brief Get the value of the reconstruction variables gradient at a node.
+ * \param[in] iPoint - Index of the current node.
+ * \param[in] iVar - Index of the variable.
+ * \param[in] iDim - Index of the dimension.
+ * \param[in] value - Value of the reconstruction gradient component.
+ */
+ inline void SetGradient_Reconstruction(unsigned long iPoint, unsigned long iVar, unsigned long iDim, su2double value) final {
+ Gradient_Reconstruction(iPoint,iVar,iDim) = value;
+ }
+
+ /*!
+ * \brief Get the array of the reconstruction variables gradient at a node.
+ * \param[in] iPoint - Index of the current node.
+ * \return Array of the reconstruction variables gradient at a node.
+ */
+ inline su2double **GetGradient_Reconstruction(unsigned long iPoint) final { return Gradient_Reconstruction[iPoint]; }
/*!
* \brief Set the value of the pressure.
diff --git a/SU2_CFD/include/variables/CTurbVariable.hpp b/SU2_CFD/include/variables/CTurbVariable.hpp
index f21384efcb09..30316bca4825 100644
--- a/SU2_CFD/include/variables/CTurbVariable.hpp
+++ b/SU2_CFD/include/variables/CTurbVariable.hpp
@@ -50,6 +50,9 @@ class CTurbVariable : public CVariable {
VectorType muT; /*!< \brief Eddy viscosity. */
MatrixType HB_Source; /*!< \brief Harmonic Balance source term. */
+ VectorOfMatrix& Gradient_Reconstruction; /*!< \brief Reference to the gradient of the primitive variables for MUSCL reconstruction for the convective term */
+ VectorOfMatrix Gradient_Aux; /*!< \brief Auxiliary structure to store a second gradient for reconstruction, if required. */
+
public:
/*!
* \brief Constructor of the class.
@@ -78,5 +81,35 @@ class CTurbVariable : public CVariable {
* \param[in] val_muT - Value of the eddy viscosity.
*/
inline void SetmuT(unsigned long iPoint, su2double val_muT) final { muT(iPoint) = val_muT; }
+
+ /*!
+ * \brief Get the value of the reconstruction variables gradient at a node.
+ * \param[in] iPoint - Index of the current node.
+ * \param[in] iVar - Index of the variable.
+ * \param[in] iDim - Index of the dimension.
+ * \return Value of the reconstruction variables gradient at a node.
+ */
+ inline su2double GetGradient_Reconstruction(unsigned long iPoint, unsigned long iVar, unsigned long iDim) const final {
+ return Gradient_Reconstruction(iPoint,iVar,iDim);
+ }
+
+ /*!
+ * \brief Get the value of the reconstruction variables gradient at a node.
+ * \param[in] iPoint - Index of the current node.
+ * \param[in] iVar - Index of the variable.
+ * \param[in] iDim - Index of the dimension.
+ * \param[in] value - Value of the reconstruction gradient component.
+ */
+ inline void SetGradient_Reconstruction(unsigned long iPoint, unsigned long iVar, unsigned long iDim, su2double value) final {
+ Gradient_Reconstruction(iPoint,iVar,iDim) = value;
+ }
+
+ /*!
+ * \brief Get the array of the reconstruction variables gradient at a node.
+ * \param[in] iPoint - Index of the current node.
+ * \return Array of the reconstruction variables gradient at a node.
+ */
+ inline su2double **GetGradient_Reconstruction(unsigned long iPoint) final { return Gradient_Reconstruction[iPoint]; }
+
};
diff --git a/SU2_CFD/include/variables/CVariable.hpp b/SU2_CFD/include/variables/CVariable.hpp
index 0a9f3369bb0e..b77edd764b48 100644
--- a/SU2_CFD/include/variables/CVariable.hpp
+++ b/SU2_CFD/include/variables/CVariable.hpp
@@ -92,7 +92,11 @@ class CVariable {
MatrixType External; /*!< \brief External (outer) contribution in discrete adjoint multizone problems. */
su2vector Non_Physical; /*!< \brief Non-physical points in the solution (force first order). */
-
+ su2vector Non_Physical_Counter; /*!< \brief Number of consecutive iterations that a point has been treated first-order. After a specified number of successful reconstructions, the point can be returned to second-order. */
+
+ VectorType UnderRelaxation; /*!< \brief Value of the under-relxation parameter local to the control volume. */
+ VectorType LocalCFL; /*!< \brief Value of the CFL number local to the control volume. */
+
MatrixType Solution_time_n; /*!< \brief Solution of the problem at time n for dual-time stepping technique. */
MatrixType Solution_time_n1; /*!< \brief Solution of the problem at time n-1 for dual-time stepping technique. */
VectorType Delta_Time; /*!< \brief Time step. */
@@ -194,14 +198,24 @@ class CVariable {
* \param[in] iPoint - Point index.
* \param[in] value - identification of the non-physical point.
*/
- inline void SetNon_Physical(unsigned long iPoint, bool value) { Non_Physical(iPoint) = !value; }
+ inline void SetNon_Physical(unsigned long iPoint, bool val_value) {
+ if (val_value) {
+ Non_Physical(iPoint) = val_value;
+ Non_Physical_Counter(iPoint) = 0;
+ } else {
+ Non_Physical_Counter(iPoint)++;
+ if (Non_Physical_Counter(iPoint) > 20) {
+ Non_Physical(iPoint) = val_value;
+ }
+ }
+ }
/*!
- * \brief Get the value of the non-physical point.
+ * \brief Get the value of the non-physical boolean at a point.
* \param[in] iPoint - Point index.
* \return Value of the Non-physical point.
*/
- inline su2double GetNon_Physical(unsigned long iPoint) const { return su2double(Non_Physical(iPoint)); }
+ inline bool GetNon_Physical(unsigned long iPoint) { return Non_Physical(iPoint); }
/*!
* \brief Get the solution.
@@ -284,6 +298,7 @@ class CVariable {
/*!
* \brief Set the variable solution at time n.
+ * \param[in] iPoint - Point index.
*/
inline void Set_Solution_time_n(unsigned long iPoint, unsigned long iVar, su2double val_sol) {
Solution_time_n(iPoint,iVar) = val_sol;
@@ -291,6 +306,7 @@ class CVariable {
/*!
* \brief Set the variable solution at time n-1.
+ * \param[in] iPoint - Point index.
*/
inline void Set_Solution_time_n1(unsigned long iPoint, unsigned long iVar, su2double val_sol) {
Solution_time_n1(iPoint,iVar) = val_sol;
@@ -315,6 +331,7 @@ class CVariable {
/*!
* \brief Set to zero velocity components of the solution.
+ * \param[in] iPoint - Point index.
*/
inline void SetVelSolutionOldZero(unsigned long iPoint) {
for (unsigned long iDim = 0; iDim < nDim; iDim++) Solution_Old(iPoint, iDim+1) = 0.0;
@@ -403,8 +420,6 @@ class CVariable {
/*!
* \brief A virtual member.
- * \param[in] val_var - Number of the variable.
- * \param[in] val_solution - Value that we want to add to the solution.
* \param[in] iPoint - Point index.
* \param[in] iVar - Number of the variable.
* \param[in] solution - Value that we want to add to the solution.
@@ -455,12 +470,14 @@ class CVariable {
/*!
* \brief Get the solution of the problem.
+ * \param[in] iPoint - Point index.
* \return Pointer to the solution vector.
*/
inline su2double *GetSolution(unsigned long iPoint) { return Solution[iPoint]; }
/*!
* \brief Get the old solution of the problem (Runge-Kutta method)
+ * \param[in] iPoint - Point index.
* \return Pointer to the old solution vector.
*/
inline su2double *GetSolution_Old(unsigned long iPoint) { return Solution_Old[iPoint]; }
@@ -474,12 +491,14 @@ class CVariable {
/*!
* \brief Get the solution at time n.
+ * \param[in] iPoint - Point index.
* \return Pointer to the solution (at time n) vector.
*/
inline su2double *GetSolution_time_n(unsigned long iPoint) { return Solution_time_n[iPoint]; }
/*!
* \brief Get the solution at time n-1.
+ * \param[in] iPoint - Point index.
* \return Pointer to the solution (at time n-1) vector.
*/
inline su2double *GetSolution_time_n1(unsigned long iPoint) { return Solution_time_n1[iPoint]; }
@@ -539,6 +558,34 @@ class CVariable {
val_residual[iVar] = Residual_Sum(iPoint,iVar);
}
+ /*!
+ * \brief Set the value of the under-relaxation parameter for the current control volume (CV).
+ * \param[in] iPoint - Point index.
+ * \param[in] val_under_relaxation - the input value of the under-relaxation parameter for this CV.
+ */
+ inline void SetUnderRelaxation(unsigned long iPoint, su2double val_under_relaxation) { UnderRelaxation(iPoint) = val_under_relaxation; }
+
+ /*!
+ * \brief Get the value of the under-relaxation parameter for the current control volume (CV).
+ * \param[in] iPoint - Point index.
+ * \return Value of the under-relaxation parameter for this CV.
+ */
+ inline su2double GetUnderRelaxation(unsigned long iPoint) const { return UnderRelaxation(iPoint); }
+
+ /*!
+ * \brief Set the value of the local CFL number for the current control volume (CV).
+ * \param[in] iPoint - Point index.
+ * \param[in] val_cfl - the input value of the local CFL number for this CV.
+ */
+ inline void SetLocalCFL(unsigned long iPoint, su2double val_cfl) { LocalCFL(iPoint) = val_cfl; }
+
+ /*!
+ * \brief Get the value of the local CFL number for the current control volume (CV).
+ * \param[in] iPoint - Point index.
+ * \return Value of the local CFL number for this CV.
+ */
+ inline su2double GetLocalCFL(unsigned long iPoint) const { return LocalCFL(iPoint); }
+
/*!
* \brief Set auxiliar variables, we are looking for the gradient of that variable.
* \param[in] iPoint - Point index.
@@ -849,6 +896,7 @@ class CVariable {
/*!
* \brief Get the value of the derivatives of the wind gust
+ * \param[in] iPoint - Point index.
* \return Value of the derivatives of the wind gust
*/
inline virtual su2double* GetWindGustDer(unsigned long iPoint) { return nullptr;}
@@ -1922,6 +1970,28 @@ class CVariable {
*/
inline virtual su2double *GetLimiter_Primitive(unsigned long iPoint) { return nullptr; }
+ /*!
+ * \brief Get the value of the primitive gradient for MUSCL reconstruction.
+ * \param[in] val_var - Index of the variable.
+ * \param[in] val_dim - Index of the dimension.
+ * \return Value of the primitive variables gradient.
+ */
+ inline virtual su2double GetGradient_Reconstruction(unsigned long iPoint, unsigned long val_var, unsigned long val_dim) const { return 0.0; }
+
+ /*!
+ * \brief Set the value of the primitive gradient for MUSCL reconstruction.
+ * \param[in] val_var - Index of the variable.
+ * \param[in] val_dim - Index of the dimension.
+ * \param[in] val_value - Value of the gradient.
+ */
+ inline virtual void SetGradient_Reconstruction(unsigned long iPoint, unsigned long val_var, unsigned long val_dim, su2double val_value) {}
+
+ /*!
+ * \brief Get the value of the primitive gradient for MUSCL reconstruction.
+ * \return Value of the primitive gradient for MUSCL reconstruction.
+ */
+ inline virtual su2double **GetGradient_Reconstruction(unsigned long iPoint) { return nullptr; }
+
/*!
* \brief Set the blending function for the blending of k-w and k-eps.
* \param[in] val_viscosity - Value of the vicosity.
diff --git a/SU2_CFD/obj/Makefile.am b/SU2_CFD/obj/Makefile.am
index c768f6ebd878..33b217f0a211 100644
--- a/SU2_CFD/obj/Makefile.am
+++ b/SU2_CFD/obj/Makefile.am
@@ -136,6 +136,7 @@ libSU2Core_sources = ../src/definition_structure.cpp \
../src/solvers/CMeshSolver.cpp \
../src/solver_structure.cpp \
../src/solver_template.cpp \
+ ../src/CMarkerProfileReaderFVM.cpp \
../src/interfaces/CInterface.cpp \
../src/interfaces/cfd/CConservativeVarsInterface.cpp \
../src/interfaces/cfd/CMixingPlaneInterface.cpp \
diff --git a/SU2_CFD/src/CMarkerProfileReaderFVM.cpp b/SU2_CFD/src/CMarkerProfileReaderFVM.cpp
new file mode 100644
index 000000000000..11a05b555d8b
--- /dev/null
+++ b/SU2_CFD/src/CMarkerProfileReaderFVM.cpp
@@ -0,0 +1,482 @@
+/*!
+ * \file CMarkerProfileReaderFVM.cpp
+ * \brief Class that handles the reading of marker profile files.
+ * \author T. Economon
+ * \version 6.2.0 "Falcon"
+ *
+ * The current SU2 release has been coordinated by the
+ * SU2 International Developers Society
+ * with selected contributions from the open-source community.
+ *
+ * The main research teams contributing to the current release are:
+ * - Prof. Juan J. Alonso's group at Stanford University.
+ * - Prof. Piero Colonna's group at Delft University of Technology.
+ * - Prof. Nicolas R. Gauger's group at Kaiserslautern University of Technology.
+ * - Prof. Alberto Guardone's group at Polytechnic University of Milan.
+ * - Prof. Rafael Palacios' group at Imperial College London.
+ * - Prof. Vincent Terrapon's group at the University of Liege.
+ * - Prof. Edwin van der Weide's group at the University of Twente.
+ * - Lab. of New Concepts in Aeronautics at Tech. Institute of Aeronautics.
+ *
+ * Copyright 2012-2019, Francisco D. Palacios, Thomas D. Economon,
+ * Tim Albring, and the SU2 contributors.
+ *
+ * SU2 is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * SU2 is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with SU2. If not, see .
+ */
+
+#include "../include/CMarkerProfileReaderFVM.hpp"
+
+CMarkerProfileReaderFVM::CMarkerProfileReaderFVM(CGeometry *val_geometry,
+ CConfig *val_config,
+ string val_filename,
+ unsigned short val_kind_marker,
+ unsigned short val_number_vars) {
+
+ /*--- Store input values and pointers to class data. ---*/
+
+ rank = SU2_MPI::GetRank();
+ size = SU2_MPI::GetSize();
+
+ this->config = val_config;
+ this->geometry = val_geometry;
+ dimension = geometry->GetnDim();
+
+ filename = val_filename;
+ markerType = val_kind_marker;
+ numberOfVars = val_number_vars;
+
+ /* Attempt to open the specified file. */
+ ifstream profile_file;
+ profile_file.open(filename.data(), ios::in);
+
+ /* If the file is not found, then we merge the information necessary
+ and write a template marker profile file. Otherwise, we read and
+ store the information in the marker profile file. */
+
+ if (profile_file.fail()) {
+ MergeProfileMarkers();
+ WriteMarkerProfileTemplate();
+ } else {
+ ReadMarkerProfile();
+ }
+
+}
+
+CMarkerProfileReaderFVM::~CMarkerProfileReaderFVM(void) { }
+
+void CMarkerProfileReaderFVM::ReadMarkerProfile() {
+
+ /*--- Open the profile file (we have already error checked) ---*/
+
+ ifstream profile_file;
+ profile_file.open(filename.data(), ios::in);
+
+ /*--- Identify the markers and data set in the profile file ---*/
+
+ string text_line;
+ while (getline (profile_file, text_line)) {
+
+ string::size_type position = text_line.find ("NMARK=",0);
+ if (position != string::npos) {
+ text_line.erase (0,6); numberOfProfiles = atoi(text_line.c_str());
+
+ numberOfRowsInProfile.resize(numberOfProfiles);
+ numberOfColumnsInProfile.resize(numberOfProfiles);
+
+ for (unsigned short iMarker = 0 ; iMarker < numberOfProfiles; iMarker++) {
+
+ getline (profile_file, text_line);
+ text_line.erase (0,11);
+ for (unsigned short iChar = 0; iChar < 20; iChar++) {
+ position = text_line.find( " ", 0 ); if (position != string::npos) text_line.erase (position,1);
+ position = text_line.find( "\r", 0 ); if (position != string::npos) text_line.erase (position,1);
+ position = text_line.find( "\n", 0 ); if (position != string::npos) text_line.erase (position,1);
+ }
+ profileTags.push_back(text_line.c_str());
+
+ getline (profile_file, text_line);
+ text_line.erase (0,5); numberOfRowsInProfile[iMarker] = atoi(text_line.c_str());
+
+ getline (profile_file, text_line);
+ text_line.erase (0,5); numberOfColumnsInProfile[iMarker] = atoi(text_line.c_str());
+
+ /*--- Skip the data. This is read in the next loop. ---*/
+
+ for (unsigned long iRow = 0; iRow < numberOfRowsInProfile[iMarker]; iRow++) getline (profile_file, text_line);
+
+ }
+ } else {
+ SU2_MPI::Error("While opening profile file, no \"NMARK=\" specification was found", CURRENT_FUNCTION);
+ }
+ }
+
+ profile_file.close();
+
+ /*--- Compute array bounds and offsets. Allocate data structure. ---*/
+
+ profileData.resize(numberOfProfiles);
+ for (unsigned short iMarker = 0; iMarker < numberOfProfiles; iMarker++) {
+ profileData[iMarker].resize(numberOfRowsInProfile[iMarker]*numberOfColumnsInProfile[iMarker], 0.0);
+ }
+
+ /*--- Read all lines in the profile file and extract data. ---*/
+
+ profile_file.open(filename.data(), ios::in);
+
+ int counter = 0;
+ while (getline (profile_file, text_line)) {
+
+ string::size_type position = text_line.find ("NMARK=",0);
+ if (position != string::npos) {
+
+ for (unsigned short iMarker = 0; iMarker < numberOfProfiles; iMarker++) {
+
+ /*--- Skip the tag, nRow, and nCol lines. ---*/
+
+ getline (profile_file, text_line);
+ getline (profile_file, text_line);
+ getline (profile_file, text_line);
+
+ /*--- Now read the data for each row and store. ---*/
+
+ for (unsigned long iRow = 0; iRow < numberOfRowsInProfile[iMarker]; iRow++) {
+
+ getline (profile_file, text_line);
+
+ istringstream point_line(text_line);
+
+ /*--- Store the values (starting with node coordinates) --*/
+
+ for (unsigned short iVar = 0; iVar < numberOfColumnsInProfile[iMarker]; iVar++)
+ point_line >> profileData[iMarker][iRow*numberOfColumnsInProfile[iMarker] + iVar];
+
+ /*--- Increment our local row counter. ---*/
+
+ counter++;
+
+ }
+ }
+ }
+ }
+
+ profile_file.close();
+
+}
+
+void CMarkerProfileReaderFVM::MergeProfileMarkers() {
+
+ /*--- Local variables needed on all processors ---*/
+
+ unsigned long iPoint, jPoint, kPoint;
+
+ int iProcessor, nProcessor = size;
+
+ unsigned long iVertex, iMarker;
+ unsigned long Buffer_Send_nPoin[1], *Buffer_Recv_nPoin = NULL;
+ unsigned long nLocalPoint = 0, MaxLocalPoint = 0;
+
+ unsigned long index, iChar;
+
+ char str_buf[MAX_STRING_SIZE];
+ vector Marker_Tags;
+ vector::iterator it;
+
+ vector nRowCum_Counter;
+
+ if (rank == MASTER_NODE) Buffer_Recv_nPoin = new unsigned long[nProcessor];
+
+ /*--- Search all boundaries on the present rank to count the number
+ of nodes found on profile markers. ---*/
+
+ nLocalPoint = 0; numberOfProfiles = 0;
+ for (iMarker = 0; iMarker < config->GetnMarker_All(); iMarker++) {
+ if (config->GetMarker_All_KindBC(iMarker) == markerType) {
+ numberOfProfiles++;
+ for (iVertex = 0; iVertex < geometry->nVertex[iMarker]; iVertex++) {
+ iPoint = geometry->vertex[iMarker][iVertex]->GetNode();
+
+ /*--- Only communicate owned nodes to avoid duplicates. ---*/
+
+ if (geometry->node[iPoint]->GetDomain())
+ nLocalPoint++;
+
+ }
+ }
+ }
+ Buffer_Send_nPoin[0] = nLocalPoint;
+
+ /*--- Communicate the total number of nodes on this domain. ---*/
+
+ SU2_MPI::Gather(&Buffer_Send_nPoin, 1, MPI_UNSIGNED_LONG,
+ Buffer_Recv_nPoin, 1, MPI_UNSIGNED_LONG, MASTER_NODE, MPI_COMM_WORLD);
+ SU2_MPI::Allreduce(&nLocalPoint, &MaxLocalPoint, 1, MPI_UNSIGNED_LONG, MPI_MAX, MPI_COMM_WORLD);
+
+ /*--- Send and Recv buffers. ---*/
+
+ su2double *Buffer_Send_X = new su2double[MaxLocalPoint];
+ su2double *Buffer_Recv_X = NULL;
+
+ su2double *Buffer_Send_Y = new su2double[MaxLocalPoint];
+ su2double *Buffer_Recv_Y = NULL;
+
+ su2double *Buffer_Send_Z = NULL, *Buffer_Recv_Z = NULL;
+ if (dimension == 3) Buffer_Send_Z = new su2double[MaxLocalPoint];
+
+ char *Buffer_Send_Str = new char[MaxLocalPoint*MAX_STRING_SIZE];
+ char *Buffer_Recv_Str = NULL;
+
+ /*--- Prepare the receive buffers in the master node only. ---*/
+
+ if (rank == MASTER_NODE) {
+
+ Buffer_Recv_X = new su2double[nProcessor*MaxLocalPoint];
+ Buffer_Recv_Y = new su2double[nProcessor*MaxLocalPoint];
+ if (dimension == 3) Buffer_Recv_Z = new su2double[nProcessor*MaxLocalPoint];
+ Buffer_Recv_Str = new char[nProcessor*MaxLocalPoint*MAX_STRING_SIZE];
+
+ /*--- Sum total number of nodes to be written and allocate arrays ---*/
+
+ unsigned long nGlobal_InletPoint = 0;
+ for (iProcessor = 0; iProcessor < nProcessor; iProcessor++) {
+ nGlobal_InletPoint += Buffer_Recv_nPoin[iProcessor];
+ }
+
+ profileCoords.resize(numberOfProfiles);
+ for (iMarker = 0; iMarker < numberOfProfiles; iMarker++) {
+ profileCoords[iMarker].resize(dimension);
+ }
+
+ }
+
+ /*--- Main communication routine. Loop over each coordinate and perform
+ the MPI comm. Temporary 1-D buffers are used to send the coordinates at
+ all nodes on each partition to the master node. These are then unpacked
+ by the master and sorted by marker tag in one large n-dim. array. ---*/
+
+ su2double *Coords_Local; jPoint = 0;
+ for (iMarker = 0; iMarker < config->GetnMarker_All(); iMarker++) {
+ if (config->GetMarker_All_KindBC(iMarker) == markerType) {
+
+ for (iVertex = 0; iVertex < geometry->nVertex[iMarker]; iVertex++) {
+ iPoint = geometry->vertex[iMarker][iVertex]->GetNode();
+
+ /*--- Only communicate owned nodes to avoid duplicates. ---*/
+
+ if (geometry->node[iPoint]->GetDomain()) {
+
+ /*--- Retrieve local coordinates at this node. ---*/
+
+ Coords_Local = geometry->node[iPoint]->GetCoord();
+
+ /*--- Load local coords into the temporary send buffer. ---*/
+
+ Buffer_Send_X[jPoint] = Coords_Local[0];
+ Buffer_Send_Y[jPoint] = Coords_Local[1];
+ if (dimension == 3) Buffer_Send_Z[jPoint] = Coords_Local[2];
+
+ /*--- If US system, the output should be in inches ---*/
+
+ if (config->GetSystemMeasurements() == US) {
+ Buffer_Send_X[jPoint] *= 12.0;
+ Buffer_Send_Y[jPoint] *= 12.0;
+ if (dimension == 3) Buffer_Send_Z[jPoint] *= 12.0;
+ }
+
+ /*--- Store the marker tag for this particular node. ---*/
+
+ SPRINTF(&Buffer_Send_Str[jPoint*MAX_STRING_SIZE], "%s",
+ config->GetMarker_All_TagBound(iMarker).c_str());
+
+ /*--- Increment jPoint as the counter. We need this because iPoint
+ may include halo nodes that we skip over during this loop. ---*/
+
+ jPoint++;
+
+ }
+ }
+ }
+ }
+
+ /*--- Gather the coordinate data on the master node using MPI. ---*/
+
+ SU2_MPI::Gather(Buffer_Send_X, (int)MaxLocalPoint, MPI_DOUBLE,
+ Buffer_Recv_X, (int)MaxLocalPoint, MPI_DOUBLE, MASTER_NODE, MPI_COMM_WORLD);
+ SU2_MPI::Gather(Buffer_Send_Y, (int)MaxLocalPoint, MPI_DOUBLE,
+ Buffer_Recv_Y, (int)MaxLocalPoint, MPI_DOUBLE, MASTER_NODE, MPI_COMM_WORLD);
+ if (dimension == 3) {
+ SU2_MPI::Gather(Buffer_Send_Z, (int)MaxLocalPoint, MPI_DOUBLE,
+ Buffer_Recv_Z, (int)MaxLocalPoint, MPI_DOUBLE, MASTER_NODE, MPI_COMM_WORLD);
+ }
+ SU2_MPI::Gather(Buffer_Send_Str, (int)MaxLocalPoint*MAX_STRING_SIZE, MPI_CHAR,
+ Buffer_Recv_Str, (int)MaxLocalPoint*MAX_STRING_SIZE, MPI_CHAR, MASTER_NODE, MPI_COMM_WORLD);
+
+ /*--- The master node unpacks and sorts this variable by marker tag. ---*/
+
+ if (rank == MASTER_NODE) {
+
+ profileTags.clear();
+
+ /*--- First, parse the marker tags to count how many total profile markers
+ we have now on the master. ---*/
+
+ for (iProcessor = 0; iProcessor < nProcessor; iProcessor++) {
+ for (iPoint = 0; iPoint < Buffer_Recv_nPoin[iProcessor]; iPoint++) {
+ index = (iProcessor*MaxLocalPoint + iPoint)*MAX_STRING_SIZE;
+ for (iChar = 0; iChar < MAX_STRING_SIZE; iChar++) {
+ str_buf[iChar] = Buffer_Recv_Str[index + iChar];
+ }
+ Marker_Tags.push_back(str_buf);
+ profileTags.push_back(str_buf);
+ }
+ }
+
+ /*--- Sort and remove the duplicate profile marker strings. ---*/
+
+ sort(profileTags.begin(), profileTags.end());
+ profileTags.erase(unique(profileTags.begin(),
+ profileTags.end()),
+ profileTags.end());
+
+ /*--- Store the unique number of markers for writing later. ---*/
+
+ numberOfProfiles = profileTags.size();
+
+ /*--- Count the number of rows (nodes) per marker. ---*/
+
+ numberOfRowsInProfile.resize(numberOfProfiles,0.0);
+ jPoint = 0;
+ for (iProcessor = 0; iProcessor < nProcessor; iProcessor++) {
+ for (iPoint = 0; iPoint < Buffer_Recv_nPoin[iProcessor]; iPoint++) {
+ for (iMarker = 0; iMarker < numberOfProfiles; iMarker++) {
+ if (profileTags[iMarker] == Marker_Tags[jPoint]) {
+ numberOfRowsInProfile[iMarker]++;
+ }
+ }
+ jPoint++;
+ }
+ }
+
+ /*--- Load up the coordinates, sorted into chunks per marker. ---*/
+
+ jPoint = 0; kPoint = 0;
+ for (iProcessor = 0; iProcessor < nProcessor; iProcessor++) {
+ for (iPoint = 0; iPoint < Buffer_Recv_nPoin[iProcessor]; iPoint++) {
+ for (iMarker = 0; iMarker < numberOfProfiles; iMarker++) {
+
+ if (profileTags[iMarker] == Marker_Tags[kPoint]) {
+
+ /*--- Find our current index for this marker and store coords. ---*/
+
+ profileCoords[iMarker][0].push_back(Buffer_Recv_X[jPoint]);
+ profileCoords[iMarker][1].push_back(Buffer_Recv_Y[jPoint]);
+ if (dimension == 3)
+ profileCoords[iMarker][2].push_back(Buffer_Recv_Z[jPoint]);
+
+ }
+ }
+
+ /*--- Increment point counter for marker tags and data. ---*/
+
+ kPoint++;
+ jPoint++;
+
+ }
+
+ /*--- Adjust jPoint to index of next proc's data in the buffers. ---*/
+
+ jPoint = (iProcessor+1)*MaxLocalPoint;
+
+ }
+ }
+
+ /*--- Immediately release the temporary data buffers. ---*/
+
+ delete [] Buffer_Send_X;
+ delete [] Buffer_Send_Y;
+ if (Buffer_Send_Z != NULL) delete [] Buffer_Send_Z;
+ delete [] Buffer_Send_Str;
+ if (rank == MASTER_NODE) {
+ delete [] Buffer_Recv_X;
+ delete [] Buffer_Recv_Y;
+ if (Buffer_Recv_Z != NULL) delete [] Buffer_Recv_Z;
+ delete [] Buffer_Recv_nPoin;
+ delete [] Buffer_Recv_Str;
+ }
+
+}
+
+void CMarkerProfileReaderFVM::WriteMarkerProfileTemplate() {
+
+ /*--- Count the number of columns that we have for this case.
+ Here, we have dimension entries for node coordinates and then the
+ total number of columns of data specified in the constructor. ---*/
+
+ const unsigned short nColumns = dimension + numberOfVars;
+
+ /*--- Write the profile file. Note that we have already merged
+ all of the information for the markers and coordinates previously
+ in the MergeProfileMarkers() routine and only the master writes. ---*/
+
+ if (rank == MASTER_NODE) {
+
+ ofstream node_file("profile_example.dat");
+
+ node_file << "NMARK= " << numberOfProfiles << endl;
+
+ for (unsigned short iMarker = 0; iMarker < numberOfProfiles; iMarker++) {
+
+ /*--- Access the default data for this marker. ---*/
+
+ string Marker_Tag = profileTags[iMarker];
+
+ /*--- Header information for this marker. ---*/
+
+ node_file << "MARKER_TAG= " << Marker_Tag << endl;
+ node_file << "NROW=" << numberOfRowsInProfile[iMarker] << endl;
+ node_file << "NCOL=" << nColumns << endl;
+
+ node_file << setprecision(15);
+ node_file << std::scientific;
+
+ /*--- Loop over the data structure and write the coords and vars. ---*/
+
+ for (unsigned long iPoint = 0; iPoint < numberOfRowsInProfile[iMarker]; iPoint++) {
+
+ for (unsigned short iDim = 0; iDim < dimension; iDim++) {
+ node_file << profileCoords[iMarker][iDim][iPoint] << "\t";
+ }
+ for (unsigned short iDim = 0; iDim < numberOfVars; iDim++) {
+ node_file << 0.0 << "\t";
+ }
+ node_file << endl;
+ }
+
+ }
+ node_file.close();
+
+ /*--- Print a message to inform the user about the template file. ---*/
+
+ stringstream err;
+ err << endl;
+ err << " Could not find the input file for the marker profile." << endl;
+ err << " Looked for: " << filename << "." << endl;
+ err << " Created a template profile file with node coordinates" << endl;
+ err << " and correct number of columns at `profile_example.dat`." << endl;
+ err << " You can use this file as a guide for making your own profile" << endl;
+ err << " specification." << endl << endl;
+ SU2_MPI::Error(err.str(), CURRENT_FUNCTION);
+
+ }
+
+}
diff --git a/SU2_CFD/src/drivers/CDriver.cpp b/SU2_CFD/src/drivers/CDriver.cpp
index 2e3d2b509446..3afb9836b59a 100644
--- a/SU2_CFD/src/drivers/CDriver.cpp
+++ b/SU2_CFD/src/drivers/CDriver.cpp
@@ -528,12 +528,13 @@ void CDriver::Postprocessing() {
cout.precision(6);
cout << endl << endl <<"-------------------------- Performance Summary --------------------------" << endl;
cout << "Simulation totals:" << endl;
+ cout << setw(25) << "Wall-clock time (hrs):" << setw(12) << (TotalTime)/(60.0*60.0) << " | ";
+ cout << setw(20) << "Core-hrs:" << setw(12) << (su2double)size*(TotalTime)/(60.0*60.0) << endl;
cout << setw(25) << "Cores:" << setw(12) << size << " | ";
cout << setw(20) << "DOFs/point:" << setw(12) << (su2double)DOFsPerPoint << endl;
cout << setw(25) << "Points/core:" << setw(12) << 1.0e6*MpointsDomain/(su2double)size << " | ";
cout << setw(20) << "Ghost points/core:" << setw(12) << 1.0e6*(Mpoints-MpointsDomain)/(su2double)size << endl;
- cout << setw(25) << "Wall-clock time (hrs):" << setw(12) << (TotalTime)/(60.0*60.0) << " | ";
- cout << setw(20) << "Core-hrs:" << setw(12) << (su2double)size*(TotalTime)/(60.0*60.0) << endl;
+ cout << setw(25) << "Ghost/Owned Point Ratio:" << setw(12) << (Mpoints-MpointsDomain)/MpointsDomain << " | " << endl;
cout << endl;
cout << "Preprocessing phase:" << endl;
cout << setw(25) << "Preproc. Time (s):" << setw(12)<< UsedTimePreproc << " | ";
@@ -715,8 +716,10 @@ void CDriver::Geometrical_Preprocessing(CConfig* config, CGeometry **&geometry,
/*--- If activated by the compile directive, perform a partition analysis. ---*/
#if PARTITION
- if( fem_solver ) Partition_Analysis_FEM(geometry[MESH_0], config);
- else Partition_Analysis(geometry[MESH_0], config);
+ if (!dummy){
+ if( fem_solver ) Partition_Analysis_FEM(geometry[MESH_0], config);
+ else Partition_Analysis(geometry[MESH_0], config);
+ }
#endif
/*--- Check if Euler & Symmetry markers are straight/plane. This information
@@ -4036,6 +4039,7 @@ void CFluidDriver::Preprocess(unsigned long Iter) {
}
}
+
void CFluidDriver::Run() {
unsigned short iZone, jZone, checkConvergence;
@@ -4156,14 +4160,6 @@ bool CFluidDriver::Monitor(unsigned long ExtIter) {
runtime->SetTimeIter(ExtIter);
delete runtime;
- /*--- Evaluate the new CFL number (adaptive). ---*/
- if (config_container[ZONE_0]->GetCFL_Adapt() == YES) {
- for (iZone = 0; iZone < nZone; iZone++){
- if (!(config_container[iZone]->GetMultizone_Problem())) // This needs to be changed everywhere in the code, in a future PR
- output_container[iZone]->SetCFL_Number(solver_container[iZone], config_container[iZone]);
- }
- }
-
/*--- Check whether the current simulation has reached the specified
convergence criteria, and set StopCalc to true, if so. ---*/
@@ -4302,7 +4298,6 @@ void CTurbomachineryDriver::SetTurboPerformance(unsigned short targetZone){
bool CTurbomachineryDriver::Monitor(unsigned long ExtIter) {
- su2double CFL;
su2double rot_z_ini, rot_z_final ,rot_z;
su2double outPres_ini, outPres_final, outPres;
unsigned long rampFreq, finalRamp_Iter;
@@ -4338,26 +4333,6 @@ bool CTurbomachineryDriver::Monitor(unsigned long ExtIter) {
config_container, integration_container, false, UsedTime, iZone, iInst);
}
-
- /*--- Evaluate the new CFL number (adaptive). ---*/
- if (config_container[ZONE_0]->GetCFL_Adapt() == YES) {
- if(mixingplane){
- CFL = 0;
- for (iZone = 0; iZone < nZone; iZone++){
- output_container[iZone]->SetCFL_Number(solver_container[iZone], config_container[iZone]);
- CFL += config_container[iZone]->GetCFL(MESH_0);
- }
- /*--- For fluid-multizone the new CFL number is the same for all the zones and it is equal to the zones' minimum value. ---*/
- for (iZone = 0; iZone < nZone; iZone++){
- config_container[iZone]->SetCFL(MESH_0, CFL/nZone);
- }
- }
- else{
- output_container[ZONE_0]->SetCFL_Number(solver_container[ZONE_0], config_container[ZONE_0]);
- }
- }
-
-
/*--- ROTATING FRAME Ramp: Compute the updated rotational velocity. ---*/
if (config_container[ZONE_0]->GetGrid_Movement() && config_container[ZONE_0]->GetRampRotatingFrame()) {
rampFreq = SU2_TYPE::Int(config_container[ZONE_0]->GetRampRotatingFrame_Coeff(1));
diff --git a/SU2_CFD/src/integration_structure.cpp b/SU2_CFD/src/integration_structure.cpp
index 39630542f60b..ac83b970e2e4 100644
--- a/SU2_CFD/src/integration_structure.cpp
+++ b/SU2_CFD/src/integration_structure.cpp
@@ -449,8 +449,18 @@ void CIntegration::SetDualTime_Solver(CGeometry *geometry, CSolver *solver, CCon
solver->GetNodes()->Set_Solution_time_n1();
solver->GetNodes()->Set_Solution_time_n();
+ solver->ResetCFLAdapt();
for (iPoint = 0; iPoint < geometry->GetnPoint(); iPoint++) {
+
+ /*--- Initialize the underrelaxation ---*/
+
+ solver->GetNodes()->SetUnderRelaxation(iPoint, 1.0);
+
+ /*--- Initialize the local CFL number ---*/
+
+ solver->GetNodes()->SetLocalCFL(iPoint, config->GetCFL(iMesh));
+
geometry->node[iPoint]->SetVolume_nM1();
geometry->node[iPoint]->SetVolume_n();
diff --git a/SU2_CFD/src/iteration_structure.cpp b/SU2_CFD/src/iteration_structure.cpp
index 9eb81179c540..1192a3d40a9d 100644
--- a/SU2_CFD/src/iteration_structure.cpp
+++ b/SU2_CFD/src/iteration_structure.cpp
@@ -508,11 +508,6 @@ void CFluidIteration::Preprocess(COutput *output,
SetWind_GustField(config[val_iZone], geometry[val_iZone][val_iInst], solver[val_iZone][val_iInst]);
}
- /*--- Evaluate the new CFL number (adaptive). ---*/
- if ((config[val_iZone]->GetCFL_Adapt() == YES) && ( OuterIter != 0 ) ) {
- output->SetCFL_Number(solver[val_iZone], config[val_iZone]);
- }
-
}
void CFluidIteration::Iterate(COutput *output,
@@ -586,6 +581,13 @@ void CFluidIteration::Iterate(COutput *output,
config, RUNTIME_HEAT_SYS, val_iZone, val_iInst);
}
+ /*--- Adapt the CFL number using an exponential progression
+ with under-relaxation approach. ---*/
+
+ if (config[val_iZone]->GetCFL_Adapt() == YES) {
+ solver[val_iZone][val_iInst][MESH_0][FLOW_SOL]->AdaptCFLNumber(geometry[val_iZone][val_iInst], solver[val_iZone][val_iInst], config[val_iZone]);
+ }
+
/*--- Call Dynamic mesh update if AEROELASTIC motion was specified ---*/
if ((config[val_iZone]->GetGrid_Movement()) && (config[val_iZone]->GetAeroelastic_Simulation()) && unsteady) {
@@ -683,11 +685,6 @@ bool CFluidIteration::Monitor(COutput *output,
config[val_iZone]->GetOuterIter(),
config[val_iZone]->GetInnerIter());
}
-
- if (config[val_iZone]->GetCFL_Adapt() == YES) {
- if (!(config[val_iZone]->GetMultizone_Problem())) // This needs to be changed everywhere in the code, in a future PR
- output->SetCFL_Number(solver[val_iZone], config[val_iZone]);
- }
/*--- If convergence was reached --*/
StopCalc = output->GetConvergence();
@@ -1206,11 +1203,6 @@ void CHeatIteration::Preprocess(COutput *output,
unsigned long OuterIter = config[val_iZone]->GetOuterIter();
- /*--- Evaluate the new CFL number (adaptive). ---*/
- if ((config[val_iZone]->GetCFL_Adapt() == YES) && ( OuterIter != 0 ) ) {
- output->SetCFL_Number(solver[val_iZone], config[val_iZone]);
- }
-
}
void CHeatIteration::Iterate(COutput *output,
diff --git a/SU2_CFD/src/meson.build b/SU2_CFD/src/meson.build
index 6bed9ea30ede..6352ed1662fb 100644
--- a/SU2_CFD/src/meson.build
+++ b/SU2_CFD/src/meson.build
@@ -31,6 +31,7 @@ su2_cfd_src = files(['solver_direct_transition.cpp',
'numerics_structure.cpp',
'numerics_template.cpp',
'solver_adjoint_discrete.cpp',
+ 'CMarkerProfileReaderFVM.cpp',
'SU2_CFD.cpp'])
su2_cfd_src += files(['output/CAdjElasticityOutput.cpp',
diff --git a/SU2_CFD/src/numerics_direct_mean.cpp b/SU2_CFD/src/numerics_direct_mean.cpp
index a76e150de33a..906b6f5560aa 100644
--- a/SU2_CFD/src/numerics_direct_mean.cpp
+++ b/SU2_CFD/src/numerics_direct_mean.cpp
@@ -4136,8 +4136,7 @@ void CAvgGrad_Base::SetStressTensor(const su2double *val_primvar,
for (iDim = 0 ; iDim < nDim; iDim++)
for (jDim = 0 ; jDim < nDim; jDim++)
tau[iDim][jDim] = total_viscosity*( val_gradprimvar[jDim+1][iDim] + val_gradprimvar[iDim+1][jDim] )
- - TWO3*total_viscosity*div_vel*delta[iDim][jDim]
- - TWO3*Density*val_turb_ke*delta[iDim][jDim];
+ - TWO3*total_viscosity*div_vel*delta[iDim][jDim];
}
}
diff --git a/SU2_CFD/src/output/CElasticityOutput.cpp b/SU2_CFD/src/output/CElasticityOutput.cpp
index 01c3d3cade19..89ca53e88e08 100644
--- a/SU2_CFD/src/output/CElasticityOutput.cpp
+++ b/SU2_CFD/src/output/CElasticityOutput.cpp
@@ -141,9 +141,9 @@ void CElasticityOutput::LoadHistoryData(CConfig *config, CGeometry *geometry, CS
SetHistoryOutputValue("LOAD_RAMP", fea_solver->GetForceCoeff());
SetHistoryOutputValue("LINSOL_ITER", fea_solver->GetIterLinSolver());
- SetHistoryOutputValue("LINSOL_RESIDUAL", log10(fea_solver->GetLinSol_Residual()));
-
-}
+ SetHistoryOutputValue("LINSOL_RESIDUAL", log10(fea_solver->GetResLinSolver()));
+
+}
void CElasticityOutput::SetHistoryOutputFields(CConfig *config){
diff --git a/SU2_CFD/src/output/CFlowCompOutput.cpp b/SU2_CFD/src/output/CFlowCompOutput.cpp
index 440e54e2f95f..ae0cc89b01a2 100644
--- a/SU2_CFD/src/output/CFlowCompOutput.cpp
+++ b/SU2_CFD/src/output/CFlowCompOutput.cpp
@@ -245,10 +245,16 @@ void CFlowCompOutput::SetHistoryOutputFields(CConfig *config){
/// DESCRIPTION: Temperature
AddHistoryOutput("TEMPERATURE", "Temp", ScreenOutputFormat::SCIENTIFIC, "HEAT", "Total avg. temperature on all surfaces set with MARKER_MONITORING.", HistoryFieldType::COEFFICIENT);
/// END_GROUP
+
+ AddHistoryOutput("MIN_DELTA_TIME", "Min DT", ScreenOutputFormat::SCIENTIFIC, "CFL_NUMBER", "Current minimum local time step");
+ AddHistoryOutput("MAX_DELTA_TIME", "Max DT", ScreenOutputFormat::SCIENTIFIC, "CFL_NUMBER", "Current maximum local time step");
+
+ AddHistoryOutput("MIN_CFL", "Min CFL", ScreenOutputFormat::SCIENTIFIC, "CFL_NUMBER", "Current minimum of the local CFL numbers");
+ AddHistoryOutput("MAX_CFL", "Max CFL", ScreenOutputFormat::SCIENTIFIC, "CFL_NUMBER", "Current maximum of the local CFL numbers");
+ AddHistoryOutput("AVG_CFL", "Avg CFL", ScreenOutputFormat::SCIENTIFIC, "CFL_NUMBER", "Current average of the local CFL numbers");
+
+ /// /// BEGIN_GROUP: FIXED_CL, DESCRIPTION: Relevant outputs for the Fixed CL mode
- AddHistoryOutput("CFL_NUMBER", "CFL number", ScreenOutputFormat::SCIENTIFIC, "CFL_NUMBER", "Current value of the CFL number");
-
- /// /// BEGIN_GROUP: FIXED_CL, DESCRIPTION: Relevant outputs for the Fixed CL mode
if (config->GetFixed_CL_Mode()){
/// DESCRIPTION: Difference between current and target CL
AddHistoryOutput("DELTA_CL", "Delta_CL", ScreenOutputFormat::SCIENTIFIC, "FIXED_CL", "Difference between Target CL and current CL", HistoryFieldType::COEFFICIENT);
@@ -644,17 +650,22 @@ void CFlowCompOutput::LoadHistoryData(CConfig *config, CGeometry *geometry, CSol
SetHistoryOutputValue("HEATFLUX", flow_solver->GetTotal_HeatFlux());
SetHistoryOutputValue("HEATFLUX_MAX", flow_solver->GetTotal_MaxHeatFlux());
SetHistoryOutputValue("TEMPERATURE", flow_solver->GetTotal_AvgTemperature());
-
- SetHistoryOutputValue("CFL_NUMBER", config->GetCFL(MESH_0));
-
+
+ SetHistoryOutputValue("MIN_DELTA_TIME", flow_solver->GetMin_Delta_Time());
+ SetHistoryOutputValue("MAX_DELTA_TIME", flow_solver->GetMax_Delta_Time());
+
+ SetHistoryOutputValue("MIN_CFL", flow_solver->GetMin_CFL_Local());
+ SetHistoryOutputValue("MAX_CFL", flow_solver->GetMax_CFL_Local());
+ SetHistoryOutputValue("AVG_CFL", flow_solver->GetAvg_CFL_Local());
+
SetHistoryOutputValue("LINSOL_ITER", flow_solver->GetIterLinSolver());
- SetHistoryOutputValue("LINSOL_RESIDUAL", log10(flow_solver->GetLinSol_Residual()));
+ SetHistoryOutputValue("LINSOL_RESIDUAL", log10(flow_solver->GetResLinSolver()));
if (config->GetDeform_Mesh()){
SetHistoryOutputValue("DEFORM_MIN_VOLUME", mesh_solver->GetMinimum_Volume());
SetHistoryOutputValue("DEFORM_MAX_VOLUME", mesh_solver->GetMaximum_Volume());
SetHistoryOutputValue("DEFORM_ITER", mesh_solver->GetIterLinSolver());
- SetHistoryOutputValue("DEFORM_RESIDUAL", log10(mesh_solver->GetLinSol_Residual()));
+ SetHistoryOutputValue("DEFORM_RESIDUAL", log10(mesh_solver->GetResLinSolver()));
}
if(config->GetFixed_CL_Mode()){
diff --git a/SU2_CFD/src/output/CFlowIncOutput.cpp b/SU2_CFD/src/output/CFlowIncOutput.cpp
index 1b3249df3c9e..d00a8d277963 100644
--- a/SU2_CFD/src/output/CFlowIncOutput.cpp
+++ b/SU2_CFD/src/output/CFlowIncOutput.cpp
@@ -199,7 +199,13 @@ void CFlowIncOutput::SetHistoryOutputFields(CConfig *config){
/// DESCRIPTION: Linear solver iterations
AddHistoryOutput("LINSOL_ITER", "LinSolIter", ScreenOutputFormat::INTEGER, "LINSOL", "Number of iterations of the linear solver.");
AddHistoryOutput("LINSOL_RESIDUAL", "LinSolRes", ScreenOutputFormat::FIXED, "LINSOL", "Residual of the linear solver.");
- AddHistoryOutput("CFL_NUMBER", "CFL number", ScreenOutputFormat::SCIENTIFIC, "CFL_NUMBER", "Current value of the CFL number");
+
+ AddHistoryOutput("MIN_DELTA_TIME", "Min DT", ScreenOutputFormat::SCIENTIFIC, "CFL_NUMBER", "Current minimum local time step");
+ AddHistoryOutput("MAX_DELTA_TIME", "Max DT", ScreenOutputFormat::SCIENTIFIC, "CFL_NUMBER", "Current maximum local time step");
+
+ AddHistoryOutput("MIN_CFL", "Min CFL", ScreenOutputFormat::SCIENTIFIC, "CFL_NUMBER", "Current minimum of the local CFL numbers");
+ AddHistoryOutput("MAX_CFL", "Max CFL", ScreenOutputFormat::SCIENTIFIC, "CFL_NUMBER", "Current maximum of the local CFL numbers");
+ AddHistoryOutput("AVG_CFL", "Avg CFL", ScreenOutputFormat::SCIENTIFIC, "CFL_NUMBER", "Current average of the local CFL numbers");
if (config->GetDeform_Mesh()){
AddHistoryOutput("DEFORM_MIN_VOLUME", "MinVolume", ScreenOutputFormat::SCIENTIFIC, "DEFORM", "Minimum volume in the mesh");
@@ -297,18 +303,22 @@ void CFlowIncOutput::LoadHistoryData(CConfig *config, CGeometry *geometry, CSolv
}
SetHistoryOutputValue("LINSOL_ITER", flow_solver->GetIterLinSolver());
- SetHistoryOutputValue("LINSOL_RESIDUAL", log10(flow_solver->GetLinSol_Residual()));
-
+ SetHistoryOutputValue("LINSOL_RESIDUAL", log10(flow_solver->GetResLinSolver()));
+
if (config->GetDeform_Mesh()){
SetHistoryOutputValue("DEFORM_MIN_VOLUME", mesh_solver->GetMinimum_Volume());
SetHistoryOutputValue("DEFORM_MAX_VOLUME", mesh_solver->GetMaximum_Volume());
SetHistoryOutputValue("DEFORM_ITER", mesh_solver->GetIterLinSolver());
- SetHistoryOutputValue("DEFORM_RESIDUAL", log10(mesh_solver->GetLinSol_Residual()));
- }
-
- SetHistoryOutputValue("CFL_NUMBER", config->GetCFL(MESH_0));
-
-
+ SetHistoryOutputValue("DEFORM_RESIDUAL", log10(mesh_solver->GetResLinSolver()));
+ }
+
+ SetHistoryOutputValue("MIN_DELTA_TIME", flow_solver->GetMin_Delta_Time());
+ SetHistoryOutputValue("MAX_DELTA_TIME", flow_solver->GetMax_Delta_Time());
+
+ SetHistoryOutputValue("MIN_CFL", flow_solver->GetMin_CFL_Local());
+ SetHistoryOutputValue("MAX_CFL", flow_solver->GetMax_CFL_Local());
+ SetHistoryOutputValue("AVG_CFL", flow_solver->GetAvg_CFL_Local());
+
/*--- Set the analyse surface history values --- */
SetAnalyzeSurface(flow_solver, geometry, config, false);
@@ -601,10 +611,10 @@ void CFlowIncOutput::LoadSurfaceData(CConfig *config, CGeometry *geometry, CSolv
}
bool CFlowIncOutput::SetInit_Residuals(CConfig *config){
-
- return (config->GetTime_Marching() != STEADY && (curInnerIter == 0))||
- (config->GetTime_Marching() == STEADY && (curTimeIter < 2));
-
+
+ return (config->GetTime_Marching() != STEADY && (curInnerIter == 0))||
+ (config->GetTime_Marching() == STEADY && (curInnerIter < 2));
+
}
bool CFlowIncOutput::SetUpdate_Averages(CConfig *config){
diff --git a/SU2_CFD/src/output/COutput.cpp b/SU2_CFD/src/output/COutput.cpp
index bd10fd90b1bf..3001691a5a55 100644
--- a/SU2_CFD/src/output/COutput.cpp
+++ b/SU2_CFD/src/output/COutput.cpp
@@ -279,100 +279,6 @@ void COutput::SetMultizoneHistory_Output(COutput **output, CConfig **config, CCo
}
-}
-void COutput::SetCFL_Number(CSolver ****solver_container, CConfig *config) {
-
- su2double CFLFactor = 1.0, power = 1.0, CFL = 0.0, CFLMin = 0.0, CFLMax = 0.0, Div = 1.0, Diff = 0.0, MGFactor[100];
- unsigned short iMesh;
-
- unsigned short FinestMesh = config->GetFinestMesh();
- unsigned short nVar = 1;
-
- bool energy = config->GetEnergy_Equation();
- bool weakly_coupled_heat = config->GetWeakly_Coupled_Heat();
-
- switch( config->GetKind_Solver()) {
- case EULER : case NAVIER_STOKES : case RANS:
- case INC_EULER : case INC_NAVIER_STOKES : case INC_RANS:
- if (energy) {
- nVar = solver_container[INST_0][FinestMesh][FLOW_SOL]->GetnVar();
- rhoResNew = solver_container[INST_0][FinestMesh][FLOW_SOL]->GetRes_RMS(nVar-1);
- }
- else if (weakly_coupled_heat) {
- rhoResNew = solver_container[INST_0][FinestMesh][HEAT_SOL]->GetRes_RMS(0);
- }
- else {
- rhoResNew = solver_container[INST_0][FinestMesh][FLOW_SOL]->GetRes_RMS(0);
- }
- break;
- case ADJ_EULER : case ADJ_NAVIER_STOKES: case ADJ_RANS:
- rhoResNew = solver_container[INST_0][FinestMesh][ADJFLOW_SOL]->GetRes_RMS(0);
- break;
- case HEAT_EQUATION_FVM:
- rhoResNew = solver_container[INST_0][FinestMesh][HEAT_SOL]->GetRes_RMS(0);
- break;
- }
-
- if (rhoResNew < EPS) rhoResNew = EPS;
- if (rhoResOld < EPS) rhoResOld = rhoResNew;
-
- Div = rhoResOld/rhoResNew;
- Diff = rhoResNew-rhoResOld;
-
- /*--- Compute MG factor ---*/
-
- for (iMesh = 0; iMesh <= config->GetnMGLevels(); iMesh++) {
- if (iMesh == MESH_0) MGFactor[iMesh] = 1.0;
- else MGFactor[iMesh] = MGFactor[iMesh-1] * config->GetCFL(iMesh)/config->GetCFL(iMesh-1);
- }
-
- if (Div < 1.0) power = config->GetCFL_AdaptParam(0);
- else power = config->GetCFL_AdaptParam(1);
-
- /*--- Detect a stall in the residual ---*/
-
- if ((fabs(Diff) <= rhoResNew*1E-8) && (curInnerIter != 0)) { Div = 0.1; power = config->GetCFL_AdaptParam(1); }
-
- CFLMin = config->GetCFL_AdaptParam(2);
- CFLMax = config->GetCFL_AdaptParam(3);
-
- CFLFactor = pow(Div, power);
-
- for (iMesh = 0; iMesh <= config->GetnMGLevels(); iMesh++) {
- CFL = config->GetCFL(iMesh);
- CFL *= CFLFactor;
-
- if ((iMesh == MESH_0) && (CFL <= CFLMin)) {
- for (iMesh = 0; iMesh <= config->GetnMGLevels(); iMesh++) {
- config->SetCFL(iMesh, 1.001*CFLMin*MGFactor[iMesh]);
- }
- break;
- }
- if ((iMesh == MESH_0) && (CFL >= CFLMax)) {
- for (iMesh = 0; iMesh <= config->GetnMGLevels(); iMesh++)
- config->SetCFL(iMesh, 0.999*CFLMax*MGFactor[iMesh]);
- break;
- }
-
- config->SetCFL(iMesh, CFL);
- }
-
- switch( config->GetKind_Solver()) {
- case EULER : case NAVIER_STOKES : case RANS:
- case INC_EULER : case INC_NAVIER_STOKES : case INC_RANS:
- nVar = solver_container[INST_0][FinestMesh][FLOW_SOL]->GetnVar();
- if (energy) rhoResOld = solver_container[INST_0][FinestMesh][FLOW_SOL]->GetRes_RMS(nVar-1);
- else if (weakly_coupled_heat) rhoResOld = solver_container[INST_0][FinestMesh][HEAT_SOL]->GetRes_RMS(0);
- else rhoResOld = solver_container[INST_0][FinestMesh][FLOW_SOL]->GetRes_RMS(0);
- break;
- case ADJ_EULER : case ADJ_NAVIER_STOKES: case ADJ_RANS:
- rhoResOld = solver_container[INST_0][FinestMesh][ADJFLOW_SOL]->GetRes_RMS(0);
- break;
- case HEAT_EQUATION_FVM:
- rhoResOld = solver_container[INST_0][FinestMesh][HEAT_SOL]->GetRes_RMS(0);
- break;
- }
-
}
void COutput::AllocateDataSorters(CConfig *config, CGeometry *geometry){
diff --git a/SU2_CFD/src/output/filewriter/CTecplotBinaryFileWriter.cpp b/SU2_CFD/src/output/filewriter/CTecplotBinaryFileWriter.cpp
index 484dd21b2f4a..892c11580f94 100644
--- a/SU2_CFD/src/output/filewriter/CTecplotBinaryFileWriter.cpp
+++ b/SU2_CFD/src/output/filewriter/CTecplotBinaryFileWriter.cpp
@@ -245,7 +245,7 @@ void CTecplotBinaryFileWriter::Write_Data(){
data_to_send[index++] =dataSorter->GetData(iVar,node_offset);
}
}
- SU2_MPI::Alltoallv(&data_to_send[0], &num_values_to_send[0], &values_to_send_displacements[0], MPI_DOUBLE,
+ CBaseMPIWrapper::Alltoallv(&data_to_send[0], &num_values_to_send[0], &values_to_send_displacements[0], MPI_DOUBLE,
&halo_var_data[0], &num_values_to_receive[0], &values_to_receive_displacements[0], MPI_DOUBLE,
MPI_COMM_WORLD);
}
diff --git a/SU2_CFD/src/output/output_structure_legacy.cpp b/SU2_CFD/src/output/output_structure_legacy.cpp
index 050bec05079b..998f8b430244 100644
--- a/SU2_CFD/src/output/output_structure_legacy.cpp
+++ b/SU2_CFD/src/output/output_structure_legacy.cpp
@@ -113,14 +113,6 @@ COutputLegacy::COutputLegacy(CConfig *config) {
nPointLinear = NULL;
nPointCumulative = NULL;
-
- /*--- Inlet profile data structures. ---*/
-
- nRow_InletFile = NULL;
- nRowCum_InletFile = NULL;
- InletCoords = NULL;
-
- Marker_Tags_InletFile.clear();
/*--- Initialize CGNS write flag ---*/
@@ -4390,23 +4382,13 @@ void COutputLegacy::SetConvHistory_Header(ofstream *ConvHist_file, CConfig *conf
if(config->GetnTimeInstances() > 1){
filename = config->GetMultiInstance_HistoryFileName(filename, val_iInst);
}
- strcpy (cstr, filename.data());
if (config->GetTime_Domain() && config->GetRestart()) {
- long iExtIter = config->GetRestart_Iter();
- if (SU2_TYPE::Int(iExtIter) < 10) SPRINTF (buffer, "_0000%d", SU2_TYPE::Int(iExtIter));
- if ((SU2_TYPE::Int(iExtIter) >= 10) && (SU2_TYPE::Int(iExtIter) < 100)) SPRINTF (buffer, "_000%d", SU2_TYPE::Int(iExtIter));
- if ((SU2_TYPE::Int(iExtIter) >= 100) && (SU2_TYPE::Int(iExtIter) < 1000)) SPRINTF (buffer, "_00%d", SU2_TYPE::Int(iExtIter));
- if ((SU2_TYPE::Int(iExtIter) >= 1000) && (SU2_TYPE::Int(iExtIter) < 10000)) SPRINTF (buffer, "_0%d", SU2_TYPE::Int(iExtIter));
- if (SU2_TYPE::Int(iExtIter) >= 10000) SPRINTF (buffer, "_%d", SU2_TYPE::Int(iExtIter));
- strcat(cstr, buffer);
+ filename = config->GetUnsteady_FileName(filename, config->GetRestart_Iter(), hist_ext);
}
- if ((config->GetTabular_FileFormat() == TECPLOT)) SPRINTF (buffer, ".dat");
- else if ((config->GetTabular_FileFormat() == TAB_TECPLOT)) SPRINTF (buffer, ".plt");
- else if ((config->GetTabular_FileFormat() == TAB_CSV)) SPRINTF (buffer, ".csv");
- strcat(cstr, buffer);
-
+ strcpy (cstr, filename.data());
+
ConvHist_file->open(cstr, ios::out);
ConvHist_file->precision(15);
@@ -4635,7 +4617,6 @@ void COutputLegacy::SetConvHistory_Body(ofstream *ConvHist_file,
}
if (fea || fluid_structure) output_files = false;
- if (config[val_iZone]->GetMultizone_Problem()) output_files = false;
/*--- We need to evaluate some of the objective functions to write the value on the history file ---*/
@@ -6387,102 +6368,6 @@ void COutputLegacy::SetConvHistory_Body(ofstream *ConvHist_file,
}
}
-void COutputLegacy::SetCFL_Number(CSolver *****solver_container, CConfig **config, unsigned short val_iZone) {
-
- su2double CFLFactor = 1.0, power = 1.0, CFL = 0.0, CFLMin = 0.0, CFLMax = 0.0, Div = 1.0, Diff = 0.0, MGFactor[100];
- unsigned short iMesh;
-
- unsigned short FinestMesh = config[val_iZone]->GetFinestMesh();
- unsigned long ExtIter = config[val_iZone]->GetInnerIter();
- unsigned short nVar = 1;
-
- bool energy = config[val_iZone]->GetEnergy_Equation();
- bool weakly_coupled_heat = config[val_iZone]->GetWeakly_Coupled_Heat();
-
- switch( config[val_iZone]->GetKind_Solver()) {
- case EULER : case NAVIER_STOKES : case RANS:
- case INC_EULER : case INC_NAVIER_STOKES : case INC_RANS:
- if (energy) {
- nVar = solver_container[val_iZone][INST_0][FinestMesh][FLOW_SOL]->GetnVar();
- RhoRes_New = solver_container[val_iZone][INST_0][FinestMesh][FLOW_SOL]->GetRes_RMS(nVar-1);
- }
- else if (weakly_coupled_heat) {
- RhoRes_New = solver_container[val_iZone][INST_0][FinestMesh][HEAT_SOL]->GetRes_RMS(0);
- }
- else {
- RhoRes_New = solver_container[val_iZone][INST_0][FinestMesh][FLOW_SOL]->GetRes_RMS(0);
- }
- break;
- case ADJ_EULER : case ADJ_NAVIER_STOKES: case ADJ_RANS:
- RhoRes_New = solver_container[val_iZone][INST_0][FinestMesh][ADJFLOW_SOL]->GetRes_RMS(0);
- break;
- case HEAT_EQUATION_FVM:
- RhoRes_New = solver_container[val_iZone][INST_0][FinestMesh][HEAT_SOL]->GetRes_RMS(0);
- break;
- }
-
- if (RhoRes_New < EPS) RhoRes_New = EPS;
- if (RhoRes_Old[val_iZone] < EPS) RhoRes_Old[val_iZone] = RhoRes_New;
-
- Div = RhoRes_Old[val_iZone]/RhoRes_New;
- Diff = RhoRes_New-RhoRes_Old[val_iZone];
-
- /*--- Compute MG factor ---*/
-
- for (iMesh = 0; iMesh <= config[val_iZone]->GetnMGLevels(); iMesh++) {
- if (iMesh == MESH_0) MGFactor[iMesh] = 1.0;
- else MGFactor[iMesh] = MGFactor[iMesh-1] * config[val_iZone]->GetCFL(iMesh)/config[val_iZone]->GetCFL(iMesh-1);
- }
-
- if (Div < 1.0) power = config[val_iZone]->GetCFL_AdaptParam(0);
- else power = config[val_iZone]->GetCFL_AdaptParam(1);
-
- /*--- Detect a stall in the residual ---*/
-
- if ((fabs(Diff) <= RhoRes_New*1E-8) && (ExtIter != 0)) { Div = 0.1; power = config[val_iZone]->GetCFL_AdaptParam(1); }
-
- CFLMin = config[val_iZone]->GetCFL_AdaptParam(2);
- CFLMax = config[val_iZone]->GetCFL_AdaptParam(3);
-
- CFLFactor = pow(Div, power);
-
- for (iMesh = 0; iMesh <= config[val_iZone]->GetnMGLevels(); iMesh++) {
- CFL = config[val_iZone]->GetCFL(iMesh);
- CFL *= CFLFactor;
-
- if ((iMesh == MESH_0) && (CFL <= CFLMin)) {
- for (iMesh = 0; iMesh <= config[val_iZone]->GetnMGLevels(); iMesh++) {
- config[val_iZone]->SetCFL(iMesh, 1.001*CFLMin*MGFactor[iMesh]);
- }
- break;
- }
- if ((iMesh == MESH_0) && (CFL >= CFLMax)) {
- for (iMesh = 0; iMesh <= config[val_iZone]->GetnMGLevels(); iMesh++)
- config[val_iZone]->SetCFL(iMesh, 0.999*CFLMax*MGFactor[iMesh]);
- break;
- }
-
- config[val_iZone]->SetCFL(iMesh, CFL);
- }
-
- switch( config[val_iZone]->GetKind_Solver()) {
- case EULER : case NAVIER_STOKES : case RANS:
- case INC_EULER : case INC_NAVIER_STOKES : case INC_RANS:
- nVar = solver_container[val_iZone][INST_0][FinestMesh][FLOW_SOL]->GetnVar();
- if (energy) RhoRes_Old[val_iZone] = solver_container[val_iZone][INST_0][FinestMesh][FLOW_SOL]->GetRes_RMS(nVar-1);
- else if (weakly_coupled_heat) RhoRes_Old[val_iZone] = solver_container[val_iZone][INST_0][FinestMesh][HEAT_SOL]->GetRes_RMS(0);
- else RhoRes_Old[val_iZone] = solver_container[val_iZone][INST_0][FinestMesh][FLOW_SOL]->GetRes_RMS(0);
- break;
- case ADJ_EULER : case ADJ_NAVIER_STOKES: case ADJ_RANS:
- RhoRes_Old[val_iZone] = solver_container[val_iZone][INST_0][FinestMesh][ADJFLOW_SOL]->GetRes_RMS(0);
- break;
- case HEAT_EQUATION_FVM:
- RhoRes_Old[val_iZone] = solver_container[val_iZone][INST_0][FinestMesh][HEAT_SOL]->GetRes_RMS(0);
- break;
- }
-
-}
-
void COutputLegacy::SpecialOutput_ForcesBreakdown(CSolver *****solver, CGeometry ****geometry, CConfig **config, unsigned short val_iZone, bool output) {
char cstr[200];
@@ -6503,8 +6388,12 @@ void COutputLegacy::SpecialOutput_ForcesBreakdown(CSolver *****solver, CGeometry
unsigned short FinestMesh = config[val_iZone]->GetFinestMesh();
unsigned short nDim = geometry[val_iZone][INST_0][FinestMesh]->GetnDim();
- bool flow = ((config[val_iZone]->GetKind_Solver() == EULER) || (config[val_iZone]->GetKind_Solver() == NAVIER_STOKES) ||
- (config[val_iZone]->GetKind_Solver() == RANS));
+ bool flow = ((config[val_iZone]->GetKind_Solver() == EULER) ||
+ (config[val_iZone]->GetKind_Solver() == NAVIER_STOKES) ||
+ (config[val_iZone]->GetKind_Solver() == RANS) ||
+ (config[val_iZone]->GetKind_Solver() == INC_EULER) ||
+ (config[val_iZone]->GetKind_Solver() == INC_NAVIER_STOKES) ||
+ (config[val_iZone]->GetKind_Solver() == INC_RANS));
/*--- Output the mean flow solution using only the master node ---*/
@@ -12379,18 +12268,6 @@ void COutputLegacy::SetResult_Files_Parallel(CSolver *****solver_container,
default: break;
}
- /*--- Write a template inlet profile file if requested. ---*/
-
- if (config[iZone]->GetWrt_InletFile()) {
- MergeInletCoordinates(config[iZone], geometry[iZone][iInst][MESH_0]);
-
- if (rank == MASTER_NODE) {
- Write_InletFile_Flow(config[iZone], geometry[iZone][iInst][MESH_0], solver_container[iZone][iInst][MESH_0]);
- DeallocateInletCoordinates(config[iZone], geometry[iZone][iInst][MESH_0]);
- }
- config[iZone]->SetWrt_InletFile(false);
- }
-
/*--- This switch statement will become a call to a virtual function
defined within each of the "physics" output child classes that loads
the local data for that particular problem alone. ---*/
@@ -12920,6 +12797,7 @@ void COutputLegacy::LoadLocalData_Flow(CConfig *config, CGeometry *geometry, CSo
nVar_Par +=1;
Variable_Names.push_back("Q_Criterion");
}
+
}
if (rotating_frame) {
@@ -13247,7 +13125,7 @@ void COutputLegacy::LoadLocalData_Flow(CConfig *config, CGeometry *geometry, CSo
iVar++;
}
}
-
+
/*--- Output the mesh quality metrics. ---*/
if (config->GetWrt_MeshQuality()) {
@@ -13255,7 +13133,7 @@ void COutputLegacy::LoadLocalData_Flow(CConfig *config, CGeometry *geometry, CSo
Local_Data[jPoint][iVar] = geometry->Aspect_Ratio[iPoint]; iVar++;
Local_Data[jPoint][iVar] = geometry->Volume_Ratio[iPoint]; iVar++;
}
-
+
}
/*--- Increment the point counter, as there may have been halos we
@@ -18540,402 +18418,6 @@ void COutputLegacy::DeallocateSurfaceData_Parallel(CConfig *config, CGeometry *g
}
-void COutputLegacy::MergeInletCoordinates(CConfig *config, CGeometry *geometry) {
-
- /*--- Local variables needed on all processors ---*/
-
- unsigned short iDim, nDim = geometry->GetnDim();
- unsigned long iPoint, jPoint, kPoint;
-
- int iProcessor, nProcessor = size;
-
- unsigned long iVertex, iMarker;
- unsigned long Buffer_Send_nPoin[1], *Buffer_Recv_nPoin = NULL;
- unsigned long nLocalPoint = 0, MaxLocalPoint = 0;
-
- unsigned long index, iChar;
-
- char str_buf[MAX_STRING_SIZE];
- vector Marker_Tags;
- vector::iterator it;
-
- unsigned long *nRowCum_Counter = NULL;
-
- if (rank == MASTER_NODE) Buffer_Recv_nPoin = new unsigned long[nProcessor];
-
- /*--- Search all boundaries on the present rank to count the number
- of nodes found on inlet markers. ---*/
-
- nLocalPoint = 0;
- for (iMarker = 0; iMarker < config->GetnMarker_All(); iMarker++) {
- if (config->GetMarker_All_KindBC(iMarker) == INLET_FLOW) {
- for (iVertex = 0; iVertex < geometry->nVertex[iMarker]; iVertex++) {
- iPoint = geometry->vertex[iMarker][iVertex]->GetNode();
-
- /*--- Only communicate owned nodes to avoid duplicates. ---*/
-
- if (geometry->node[iPoint]->GetDomain())
- nLocalPoint++;
-
- }
- }
- }
- Buffer_Send_nPoin[0] = nLocalPoint;
-
- /*--- Communicate the total number of nodes on this domain. ---*/
-
-#ifdef HAVE_MPI
- SU2_MPI::Gather(&Buffer_Send_nPoin, 1, MPI_UNSIGNED_LONG,
- Buffer_Recv_nPoin, 1, MPI_UNSIGNED_LONG, MASTER_NODE, MPI_COMM_WORLD);
- SU2_MPI::Allreduce(&nLocalPoint, &MaxLocalPoint, 1, MPI_UNSIGNED_LONG, MPI_MAX, MPI_COMM_WORLD);
-#else
- Buffer_Recv_nPoin[0] = Buffer_Send_nPoin[0];
- MaxLocalPoint = nLocalPoint;
-#endif
-
- /*--- Send and Recv buffers. ---*/
-
- su2double *Buffer_Send_X = new su2double[MaxLocalPoint];
- su2double *Buffer_Recv_X = NULL;
-
- su2double *Buffer_Send_Y = new su2double[MaxLocalPoint];
- su2double *Buffer_Recv_Y = NULL;
-
- su2double *Buffer_Send_Z = NULL, *Buffer_Recv_Z = NULL;
- if (nDim == 3) Buffer_Send_Z = new su2double[MaxLocalPoint];
-
- char *Buffer_Send_Str = new char[MaxLocalPoint*MAX_STRING_SIZE];
- char *Buffer_Recv_Str = NULL;
-
- /*--- Prepare the receive buffers in the master node only. ---*/
-
- if (rank == MASTER_NODE) {
-
- Buffer_Recv_X = new su2double[nProcessor*MaxLocalPoint];
- Buffer_Recv_Y = new su2double[nProcessor*MaxLocalPoint];
- if (nDim == 3) Buffer_Recv_Z = new su2double[nProcessor*MaxLocalPoint];
- Buffer_Recv_Str = new char[nProcessor*MaxLocalPoint*MAX_STRING_SIZE];
-
- /*--- Sum total number of nodes to be written and allocate arrays ---*/
-
- unsigned long nGlobal_InletPoint = 0;
- for (iProcessor = 0; iProcessor < nProcessor; iProcessor++) {
- nGlobal_InletPoint += Buffer_Recv_nPoin[iProcessor];
- }
- InletCoords = new su2double*[nDim];
- for (iDim = 0; iDim < nDim; iDim++) {
- InletCoords[iDim] = new su2double[nGlobal_InletPoint];
- }
- }
-
- /*--- Main communication routine. Loop over each coordinate and perform
- the MPI comm. Temporary 1-D buffers are used to send the coordinates at
- all nodes on each partition to the master node. These are then unpacked
- by the master and sorted by marker tag in one large n-dim. array. ---*/
-
- /*--- Loop over this partition to collect the coords of the local points. ---*/
-
- su2double *Coords_Local; jPoint = 0;
- for (iMarker = 0; iMarker < config->GetnMarker_All(); iMarker++) {
- if (config->GetMarker_All_KindBC(iMarker) == INLET_FLOW) {
-
- for (iVertex = 0; iVertex < geometry->nVertex[iMarker]; iVertex++) {
- iPoint = geometry->vertex[iMarker][iVertex]->GetNode();
-
- /*--- Only communicate owned nodes to avoid duplicates. ---*/
-
- if (geometry->node[iPoint]->GetDomain()) {
-
- /*--- Retrieve local coordinates at this node. ---*/
-
- Coords_Local = geometry->node[iPoint]->GetCoord();
-
- /*--- Load local coords into the temporary send buffer. ---*/
-
- Buffer_Send_X[jPoint] = Coords_Local[0];
- Buffer_Send_Y[jPoint] = Coords_Local[1];
- if (nDim == 3) Buffer_Send_Z[jPoint] = Coords_Local[2];
-
- /*--- If US system, the output should be in inches ---*/
-
- if (config->GetSystemMeasurements() == US) {
- Buffer_Send_X[jPoint] *= 12.0;
- Buffer_Send_Y[jPoint] *= 12.0;
- if (nDim == 3) Buffer_Send_Z[jPoint] *= 12.0;
- }
-
- /*--- Store the marker tag for this particular node. ---*/
-
- SPRINTF(&Buffer_Send_Str[jPoint*MAX_STRING_SIZE], "%s",
- config->GetMarker_All_TagBound(iMarker).c_str());
-
- /*--- Increment jPoint as the counter. We need this because iPoint
- may include halo nodes that we skip over during this loop. ---*/
-
- jPoint++;
-
- }
- }
- }
- }
-
- /*--- Gather the coordinate data on the master node using MPI. ---*/
-
-#ifdef HAVE_MPI
- SU2_MPI::Gather(Buffer_Send_X, MaxLocalPoint, MPI_DOUBLE, Buffer_Recv_X, MaxLocalPoint, MPI_DOUBLE, MASTER_NODE, MPI_COMM_WORLD);
- SU2_MPI::Gather(Buffer_Send_Y, MaxLocalPoint, MPI_DOUBLE, Buffer_Recv_Y, MaxLocalPoint, MPI_DOUBLE, MASTER_NODE, MPI_COMM_WORLD);
- if (nDim == 3) {
- SU2_MPI::Gather(Buffer_Send_Z, MaxLocalPoint, MPI_DOUBLE, Buffer_Recv_Z, MaxLocalPoint, MPI_DOUBLE, MASTER_NODE, MPI_COMM_WORLD);
- }
- SU2_MPI::Gather(Buffer_Send_Str, MaxLocalPoint*MAX_STRING_SIZE, MPI_CHAR, Buffer_Recv_Str, MaxLocalPoint*MAX_STRING_SIZE, MPI_CHAR, MASTER_NODE, MPI_COMM_WORLD);
-#else
- for (iPoint = 0; iPoint < MaxLocalPoint; iPoint++) {
- Buffer_Recv_X[iPoint] = Buffer_Send_X[iPoint];
- Buffer_Recv_Y[iPoint] = Buffer_Send_Y[iPoint];
- if (nDim == 3) Buffer_Recv_Z[iPoint] = Buffer_Send_Z[iPoint];
- index = iPoint*MAX_STRING_SIZE;
- for (iChar = 0; iChar < MAX_STRING_SIZE; iChar++) {
- Buffer_Recv_Str[index + iChar] = Buffer_Send_Str[index + iChar];
- }
- }
-#endif
-
- /*--- The master node unpacks and sorts this variable by marker tag. ---*/
-
- if (rank == MASTER_NODE) {
-
- Marker_Tags_InletFile.clear();
-
- /*--- First, parse the marker tags to count how many total inlet markers
- we have now on the master. ---*/
-
- for (iProcessor = 0; iProcessor < nProcessor; iProcessor++) {
- for (iPoint = 0; iPoint < Buffer_Recv_nPoin[iProcessor]; iPoint++) {
- index = (iProcessor*MaxLocalPoint + iPoint)*MAX_STRING_SIZE;
- for (iChar = 0; iChar < MAX_STRING_SIZE; iChar++) {
- str_buf[iChar] = Buffer_Recv_Str[index + iChar];
- }
- Marker_Tags.push_back(str_buf);
- Marker_Tags_InletFile.push_back(str_buf);
- }
- }
-
- /*--- Sort and remove the duplicate inlet marker strings. ---*/
-
- sort(Marker_Tags_InletFile.begin(), Marker_Tags_InletFile.end());
- Marker_Tags_InletFile.erase(unique(Marker_Tags_InletFile.begin(),
- Marker_Tags_InletFile.end()),
- Marker_Tags_InletFile.end());
-
- /*--- Store the unique number of markers for writing later. ---*/
-
- nMarker_InletFile = Marker_Tags_InletFile.size();
-
- /*--- Count the number of rows (nodes) per marker. ---*/
-
- nRow_InletFile = new unsigned long[nMarker_InletFile];
- for (iMarker = 0; iMarker < nMarker_InletFile; iMarker++) {
- nRow_InletFile[iMarker] = 0;
- }
-
- /*--- Now count the number of points per marker. ---*/
-
- jPoint = 0;
- for (iProcessor = 0; iProcessor < nProcessor; iProcessor++) {
- for (iPoint = 0; iPoint < Buffer_Recv_nPoin[iProcessor]; iPoint++) {
- for (iMarker = 0; iMarker < nMarker_InletFile; iMarker++) {
- if (Marker_Tags_InletFile[iMarker] == Marker_Tags[jPoint]) {
- nRow_InletFile[iMarker]++;
- }
- }
- jPoint++;
- }
- }
-
- /*--- Now put the number of points per marker into cumulative storage.
- We will also create an extra counter to make sorting easier. ---*/
-
- nRowCum_InletFile = new unsigned long[nMarker_InletFile+1];
- nRowCum_Counter = new unsigned long[nMarker_InletFile+1];
-
- nRowCum_InletFile[0] = 0; nRowCum_Counter[0] = 0;
- for (iMarker = 0; iMarker < nMarker_InletFile; iMarker++) {
- nRowCum_InletFile[iMarker+1] = nRowCum_InletFile[iMarker] + nRow_InletFile[iMarker];
- nRowCum_Counter[iMarker+1] = nRowCum_Counter[iMarker] + nRow_InletFile[iMarker];
- }
-
- /*--- Load up the coordinates, sorted into chunks per marker. ---*/
-
- jPoint = 0; kPoint = 0;
- for (iProcessor = 0; iProcessor < nProcessor; iProcessor++) {
- for (iPoint = 0; iPoint < Buffer_Recv_nPoin[iProcessor]; iPoint++) {
- for (iMarker = 0; iMarker < nMarker_InletFile; iMarker++) {
- if (Marker_Tags_InletFile[iMarker] == Marker_Tags[kPoint]) {
-
- /*--- Find our current index for this marker and store coords. ---*/
-
- index = nRowCum_Counter[iMarker];
- InletCoords[0][index] = Buffer_Recv_X[jPoint];
- InletCoords[1][index] = Buffer_Recv_Y[jPoint];
- if (nDim == 3) InletCoords[2][index] = Buffer_Recv_Z[jPoint];
-
- /*--- Increment the counter for this marker. ---*/
-
- nRowCum_Counter[iMarker]++;
-
- }
- }
-
- /*--- Increment point counter for marker tags and data. ---*/
-
- kPoint++;
- jPoint++;
-
- }
-
- /*--- Adjust jPoint to index of next proc's data in the buffers. ---*/
-
- jPoint = (iProcessor+1)*MaxLocalPoint;
-
- }
- }
-
- /*--- Immediately release the temporary data buffers. ---*/
-
- delete [] Buffer_Send_X;
- delete [] Buffer_Send_Y;
- if (Buffer_Send_Z != NULL) delete [] Buffer_Send_Z;
- delete [] Buffer_Send_Str;
- if (rank == MASTER_NODE) {
- delete [] Buffer_Recv_X;
- delete [] Buffer_Recv_Y;
- if (Buffer_Recv_Z != NULL) delete [] Buffer_Recv_Z;
- delete [] Buffer_Recv_nPoin;
- delete [] Buffer_Recv_Str;
- delete [] nRowCum_Counter;
- }
-
-}
-
-void COutputLegacy::Write_InletFile_Flow(CConfig *config, CGeometry *geometry, CSolver **solver) {
-
- unsigned short iMarker, iDim, iVar;
- unsigned long iPoint;
- su2double turb_val[2] = {0.0,0.0};
-
- const unsigned short nDim = geometry->GetnDim();
-
- bool turbulent = (config->GetKind_Solver() == RANS ||
- config->GetKind_Solver() == INC_RANS ||
- config->GetKind_Solver() == ADJ_RANS ||
- config->GetKind_Solver() == DISC_ADJ_RANS ||
- config->GetKind_Solver() == DISC_ADJ_INC_RANS);
-
- unsigned short nVar_Turb = 0;
- if (turbulent)
- switch (config->GetKind_Turb_Model()) {
- case SA: case SA_NEG: case SA_E: case SA_COMP: case SA_E_COMP:
- nVar_Turb = 1;
- turb_val[0] = solver[TURB_SOL]->GetNuTilde_Inf();
- break;
- case SST: case SST_SUST:
- nVar_Turb = 2;
- turb_val[0] = solver[TURB_SOL]->GetTke_Inf();
- turb_val[1] = solver[TURB_SOL]->GetOmega_Inf();
- break;
- default:
- SU2_MPI::Error("Specified turbulence model unavailable or none selected", CURRENT_FUNCTION);
- break;
- }
-
- /*--- Count the number of columns that we have for this flow case.
- Here, we have nDim entries for node coordinates, 2 entries for the total
- conditions or mass flow, another nDim for the direction vector, and
- finally entries for the number of turbulence variables. ---*/
-
- unsigned short nCol_InletFile = nDim + 2 + nDim + nVar_Turb;
-
- /*--- Write the inlet profile file. Note that we have already merged
- all of the information for the markers and coordinates previously
- in the MergeInletCoordinates() routine. ---*/
-
- ofstream node_file("inlet_example.dat");
-
- node_file << "NMARK= " << nMarker_InletFile << endl;
-
- for (iMarker = 0; iMarker < nMarker_InletFile; iMarker++) {
-
- /*--- Access the default data for this marker. ---*/
-
- string Marker_Tag = Marker_Tags_InletFile[iMarker];
- su2double p_total = config->GetInlet_Ptotal(Marker_Tag);
- su2double t_total = config->GetInlet_Ttotal(Marker_Tag);
- su2double* flow_dir = config->GetInlet_FlowDir(Marker_Tag);
-
- /*--- Header information for this marker. ---*/
-
- node_file << "MARKER_TAG= " << Marker_Tag << endl;
- node_file << "NROW=" << nRow_InletFile[iMarker] << endl;
- node_file << "NCOL=" << nCol_InletFile << endl;
-
- node_file << setprecision(15);
- node_file << std::scientific;
-
- /*--- Loop over the data structure and write the coords and vars to file. ---*/
-
- for (iPoint = nRowCum_InletFile[iMarker]; iPoint < nRowCum_InletFile[iMarker+1]; iPoint++) {
-
- for (iDim = 0; iDim < nDim; iDim++) {
- node_file << InletCoords[iDim][iPoint] << "\t";
- }
- node_file << t_total << "\t" << p_total;
- for (iDim = 0; iDim < nDim; iDim++) {
- node_file << "\t" << flow_dir[iDim];
- }
- for (iVar = 0; iVar < nVar_Turb; iVar++) {
- node_file << "\t" << turb_val[iVar];
- }
- node_file << endl;
- }
-
- }
- node_file.close();
-
- /*--- Print a message to inform the user about the template file. ---*/
-
- stringstream err;
- err << endl;
- err << " Created a template inlet profile file with node coordinates" << endl;
- err << " and solver variables at `inlet_example.dat`." << endl;
- err << " You can use this file as a guide for making your own inlet" << endl;
- err << " specification." << endl << endl;
- SU2_MPI::Error(err.str(), CURRENT_FUNCTION);
-
-}
-
-void COutputLegacy::DeallocateInletCoordinates(CConfig *config, CGeometry *geometry) {
-
- unsigned short iDim, nDim = geometry->GetnDim();
-
- /*--- The master node alone owns all data found in this routine. ---*/
-
- if (rank == MASTER_NODE) {
-
- /*--- Deallocate memory for inlet coordinate data ---*/
-
- if (nRow_InletFile != NULL) delete [] nRow_InletFile;
- if (nRowCum_InletFile != NULL) delete [] nRowCum_InletFile;
-
- Marker_Tags_InletFile.clear();
-
- for (iDim = 0; iDim < nDim; iDim++) {
- if (InletCoords[iDim] != NULL) delete [] InletCoords[iDim];
- }
- if (InletCoords != NULL) delete [] InletCoords;
- }
-
-}
-
void COutputLegacy::SpecialOutput_AnalyzeSurface(CSolver *solver, CGeometry *geometry, CConfig *config, bool output) {
unsigned short iDim, iMarker, iMarker_Analyze;
diff --git a/SU2_CFD/src/solver_adjoint_mean.cpp b/SU2_CFD/src/solver_adjoint_mean.cpp
index f9aeb308694a..8b284356fbcf 100644
--- a/SU2_CFD/src/solver_adjoint_mean.cpp
+++ b/SU2_CFD/src/solver_adjoint_mean.cpp
@@ -203,7 +203,7 @@ CAdjEulerSolver::CAdjEulerSolver(CGeometry *geometry, CConfig *config, unsigned
}
/*--- Computation of gradients by least squares ---*/
- if (config->GetKind_Gradient_Method() == WEIGHTED_LEAST_SQUARES) {
+ if (config->GetLeastSquaresRequired()) {
/*--- S matrix := inv(R)*traspose(inv(R)) ---*/
Smatrix = new su2double* [nDim];
for (iDim = 0; iDim < nDim; iDim++)
@@ -1626,9 +1626,9 @@ void CAdjEulerSolver::SetInitialCondition(CGeometry **geometry, CSolver ***solve
void CAdjEulerSolver::Preprocessing(CGeometry *geometry, CSolver **solver_container, CConfig *config, unsigned short iMesh, unsigned short iRKStep, unsigned short RunTime_EqSystem, bool Output) {
- unsigned long iPoint, ErrorCounter = 0;
+ unsigned long iPoint, nonPhysicalPoints = 0;
su2double SharpEdge_Distance;
- bool RightSol = true;
+ bool physical = true;
/*--- Retrieve information about the spatial and temporal integration for the
adjoint equations (note that the flow problem may use different methods). ---*/
@@ -1652,16 +1652,15 @@ void CAdjEulerSolver::Preprocessing(CGeometry *geometry, CSolver **solver_contai
/*--- Get the distance form a sharp edge ---*/
SharpEdge_Distance = geometry->node[iPoint]->GetSharpEdge_Distance();
-
- /*--- Initialize the non-physical points vector ---*/
- nodes->SetNon_Physical(iPoint,false);
-
/*--- Set the primitive variables compressible
adjoint variables ---*/
- RightSol = nodes->SetPrimVar(iPoint,SharpEdge_Distance, false, config);
- if (!RightSol) { nodes->SetNon_Physical(iPoint,true); ErrorCounter++; }
+ physical = nodes->SetPrimVar(iPoint,SharpEdge_Distance, false, config);
+
+ /* Check for non-realizable states for reporting. */
+
+ if (!physical) nonPhysicalPoints++;
/*--- Initialize the convective residual vector ---*/
@@ -1669,13 +1668,16 @@ void CAdjEulerSolver::Preprocessing(CGeometry *geometry, CSolver **solver_contai
}
-
if ((muscl) && (iMesh == MESH_0)) {
- /*--- Compute gradients for upwind second-order reconstruction ---*/
-
- if (config->GetKind_Gradient_Method() == GREEN_GAUSS) SetSolution_Gradient_GG(geometry, config);
- if (config->GetKind_Gradient_Method() == WEIGHTED_LEAST_SQUARES) SetSolution_Gradient_LS(geometry, config);
+ /*--- Gradient computation for MUSCL reconstruction. ---*/
+
+ if (config->GetKind_Gradient_Method_Recon() == GREEN_GAUSS)
+ SetSolution_Gradient_GG(geometry, config, true);
+ if (config->GetKind_Gradient_Method_Recon() == LEAST_SQUARES)
+ SetSolution_Gradient_LS(geometry, config, true);
+ if (config->GetKind_Gradient_Method_Recon() == WEIGHTED_LEAST_SQUARES)
+ SetSolution_Gradient_LS(geometry, config, true);
/*--- Limiter computation ---*/
@@ -1702,10 +1704,10 @@ void CAdjEulerSolver::Preprocessing(CGeometry *geometry, CSolver **solver_contai
if (config->GetComm_Level() == COMM_FULL) {
#ifdef HAVE_MPI
- unsigned long MyErrorCounter = ErrorCounter; ErrorCounter = 0;
- SU2_MPI::Allreduce(&MyErrorCounter, &ErrorCounter, 1, MPI_UNSIGNED_LONG, MPI_SUM, MPI_COMM_WORLD);
+ unsigned long MyErrorCounter = nonPhysicalPoints; nonPhysicalPoints = 0;
+ SU2_MPI::Allreduce(&MyErrorCounter, &nonPhysicalPoints, 1, MPI_UNSIGNED_LONG, MPI_SUM, MPI_COMM_WORLD);
#endif
- if (iMesh == MESH_0) config->SetNonphysical_Points(ErrorCounter);
+ if (iMesh == MESH_0) config->SetNonphysical_Points(nonPhysicalPoints);
}
}
@@ -1785,8 +1787,8 @@ void CAdjEulerSolver::Centered_Residual(CGeometry *geometry, CSolver **solver_co
void CAdjEulerSolver::Upwind_Residual(CGeometry *geometry, CSolver **solver_container, CNumerics *numerics, CConfig *config, unsigned short iMesh) {
su2double **Gradient_i, **Gradient_j, Project_Grad_i, Project_Grad_j, *Limiter_i = NULL,
- *Limiter_j = NULL, *Psi_i = NULL, *Psi_j = NULL, *V_i, *V_j, Non_Physical = 1.0;
- unsigned long iEdge, iPoint, jPoint;
+ *Limiter_j = NULL, *Psi_i = NULL, *Psi_j = NULL, *V_i, *V_j;
+ unsigned long iEdge, iPoint, jPoint, counter_local = 0, counter_global = 0;
unsigned short iDim, iVar;
bool implicit = (config->GetKind_TimeIntScheme_AdjFlow() == EULER_IMPLICIT);
@@ -1831,15 +1833,19 @@ void CAdjEulerSolver::Upwind_Residual(CGeometry *geometry, CSolver **solver_cont
/*--- Adjoint variables using gradient reconstruction and limiters ---*/
- Gradient_i = nodes->GetGradient(iPoint); Gradient_j = nodes->GetGradient(jPoint);
- if (limiter) { Limiter_i = nodes->GetLimiter(iPoint); Limiter_j = nodes->GetLimiter(jPoint); }
+ Gradient_i = nodes->GetGradient_Reconstruction(iPoint);
+ Gradient_j = nodes->GetGradient_Reconstruction(jPoint);
+
+ if (limiter) {
+ Limiter_i = nodes->GetLimiter(iPoint);
+ Limiter_j = nodes->GetLimiter(jPoint);
+ }
for (iVar = 0; iVar < nVar; iVar++) {
Project_Grad_i = 0; Project_Grad_j = 0;
- Non_Physical = nodes->GetNon_Physical(iPoint)*nodes->GetNon_Physical(jPoint);
for (iDim = 0; iDim < nDim; iDim++) {
- Project_Grad_i += Vector_i[iDim]*Gradient_i[iVar][iDim]*Non_Physical;
- Project_Grad_j += Vector_j[iDim]*Gradient_j[iVar][iDim]*Non_Physical;
+ Project_Grad_i += Vector_i[iDim]*Gradient_i[iVar][iDim];
+ Project_Grad_j += Vector_j[iDim]*Gradient_j[iVar][iDim];
}
if (limiter) {
Solution_i[iVar] = Psi_i[iVar] + Project_Grad_i*Limiter_i[iDim];
@@ -1851,6 +1857,33 @@ void CAdjEulerSolver::Upwind_Residual(CGeometry *geometry, CSolver **solver_cont
}
}
+ /* Check our reconstruction for exceeding bounds on the
+ adjoint density. */
+
+ su2double adj_limit = config->GetAdjointLimit();
+ bool phi_bound_i = (fabs(Solution_i[0]) > adj_limit);
+ bool phi_bound_j = (fabs(Solution_j[0]) > adj_limit);
+
+ if (phi_bound_i) nodes->SetNon_Physical(iPoint, true);
+ else nodes->SetNon_Physical(iPoint, false);
+
+ if (phi_bound_j) nodes->SetNon_Physical(jPoint, true);
+ else nodes->SetNon_Physical(jPoint, false);
+
+ /* Lastly, check for existing first-order points still active
+ from previous iterations. */
+
+ if (nodes->GetNon_Physical(iPoint)) {
+ counter_local++;
+ for (iVar = 0; iVar < nVar; iVar++)
+ Solution_i[iVar] = Psi_i[iVar];
+ }
+ if (nodes->GetNon_Physical(jPoint)) {
+ counter_local++;
+ for (iVar = 0; iVar < nVar; iVar++)
+ Solution_j[iVar] = Psi_j[iVar];
+ }
+
numerics->SetAdjointVar(Solution_i, Solution_j);
}
@@ -1875,6 +1908,17 @@ void CAdjEulerSolver::Upwind_Residual(CGeometry *geometry, CSolver **solver_cont
}
+ /*--- Warning message about non-physical reconstructions. ---*/
+
+ if (config->GetComm_Level() == COMM_FULL) {
+#ifdef HAVE_MPI
+ SU2_MPI::Reduce(&counter_local, &counter_global, 1, MPI_UNSIGNED_LONG, MPI_SUM, MASTER_NODE, MPI_COMM_WORLD);
+#else
+ counter_global = counter_local;
+#endif
+ if (iMesh == MESH_0) config->SetNonphysical_Reconstr(counter_global);
+ }
+
}
void CAdjEulerSolver::Source_Residual(CGeometry *geometry, CSolver **solver_container, CNumerics *numerics, CNumerics *second_numerics,
@@ -4980,7 +5024,7 @@ CAdjNSSolver::CAdjNSSolver(CGeometry *geometry, CConfig *config, unsigned short
}
/*--- Array structures for computation of gradients by least squares ---*/
- if (config->GetKind_Gradient_Method() == WEIGHTED_LEAST_SQUARES) {
+ if (config->GetLeastSquaresRequired()) {
/*--- S matrix := inv(R)*traspose(inv(R)) ---*/
Smatrix = new su2double* [nDim];
for (iDim = 0; iDim < nDim; iDim++)
@@ -5157,9 +5201,9 @@ void CAdjNSSolver::SetTime_Step(CGeometry *geometry, CSolver **solver_container,
void CAdjNSSolver::Preprocessing(CGeometry *geometry, CSolver **solver_container, CConfig *config, unsigned short iMesh, unsigned short iRKStep, unsigned short RunTime_EqSystem, bool Output) {
- unsigned long iPoint, ErrorCounter = 0;
+ unsigned long iPoint, nonPhysicalPoints = 0;
su2double SharpEdge_Distance;
- bool RightSol = true;
+ bool physical = true;
/*--- Retrieve information about the spatial and temporal integration for the
adjoint equations (note that the flow problem may use different methods). ---*/
@@ -5182,15 +5226,14 @@ void CAdjNSSolver::Preprocessing(CGeometry *geometry, CSolver **solver_container
SharpEdge_Distance = geometry->node[iPoint]->GetSharpEdge_Distance();
- /*--- Initialize the non-physical points vector ---*/
-
- nodes->SetNon_Physical(iPoint,false);
-
/*--- Set the primitive variables compressible
adjoint variables ---*/
- RightSol = nodes->SetPrimVar(iPoint,SharpEdge_Distance, false, config);
- if (!RightSol) { nodes->SetNon_Physical(iPoint,true); ErrorCounter++; }
+ physical = nodes->SetPrimVar(iPoint,SharpEdge_Distance, false, config);
+
+ /* Check for non-realizable states for reporting. */
+
+ if (!physical) nonPhysicalPoints++;
/*--- Initialize the convective residual vector ---*/
@@ -5200,6 +5243,14 @@ void CAdjNSSolver::Preprocessing(CGeometry *geometry, CSolver **solver_container
/*--- Compute gradients adj for solution reconstruction and viscous term ---*/
+ if (config->GetReconstructionGradientRequired()) {
+ if (config->GetKind_Gradient_Method_Recon() == GREEN_GAUSS)
+ SetSolution_Gradient_GG(geometry, config, true);
+ if (config->GetKind_Gradient_Method_Recon() == LEAST_SQUARES)
+ SetSolution_Gradient_LS(geometry, config, true);
+ if (config->GetKind_Gradient_Method_Recon() == WEIGHTED_LEAST_SQUARES)
+ SetSolution_Gradient_LS(geometry, config, true);
+ }
if (config->GetKind_Gradient_Method() == GREEN_GAUSS) SetSolution_Gradient_GG(geometry, config);
if (config->GetKind_Gradient_Method() == WEIGHTED_LEAST_SQUARES) SetSolution_Gradient_LS(geometry, config);
@@ -5229,10 +5280,10 @@ void CAdjNSSolver::Preprocessing(CGeometry *geometry, CSolver **solver_container
if (config->GetComm_Level() == COMM_FULL) {
#ifdef HAVE_MPI
- unsigned long MyErrorCounter = ErrorCounter; ErrorCounter = 0;
- SU2_MPI::Allreduce(&MyErrorCounter, &ErrorCounter, 1, MPI_UNSIGNED_LONG, MPI_SUM, MPI_COMM_WORLD);
+ unsigned long MyErrorCounter = nonPhysicalPoints; nonPhysicalPoints = 0;
+ SU2_MPI::Allreduce(&MyErrorCounter, &nonPhysicalPoints, 1, MPI_UNSIGNED_LONG, MPI_SUM, MPI_COMM_WORLD);
#endif
- if (iMesh == MESH_0) config->SetNonphysical_Points(ErrorCounter);
+ if (iMesh == MESH_0) config->SetNonphysical_Points(nonPhysicalPoints);
}
}
diff --git a/SU2_CFD/src/solver_adjoint_turbulent.cpp b/SU2_CFD/src/solver_adjoint_turbulent.cpp
index 99b6b030ca6f..f6f8bdcc6bbd 100644
--- a/SU2_CFD/src/solver_adjoint_turbulent.cpp
+++ b/SU2_CFD/src/solver_adjoint_turbulent.cpp
@@ -112,7 +112,7 @@ CAdjTurbSolver::CAdjTurbSolver(CGeometry *geometry, CConfig *config, unsigned sh
LinSysRes.Initialize(nPoint, nPointDomain, nVar, 0.0);
/*--- Computation of gradients by least squares ---*/
- if (config->GetKind_Gradient_Method() == WEIGHTED_LEAST_SQUARES) {
+ if (config->GetLeastSquaresRequired()) {
/*--- S matrix := inv(R)*traspose(inv(R)) ---*/
Smatrix = new su2double* [nDim];
for (iDim = 0; iDim < nDim; iDim++)
@@ -308,17 +308,6 @@ void CAdjTurbSolver::Upwind_Residual(CGeometry *geometry, CSolver **solver_conta
unsigned long iEdge, iPoint, jPoint;
su2double *U_i, *U_j, *TurbPsi_i, *TurbPsi_j, **TurbVar_Grad_i, **TurbVar_Grad_j;
-// su2double *Limiter_i = NULL, *Limiter_j = NULL, **Gradient_i, **Gradient_j, Project_Grad_i, Project_Grad_j;
-// unsigned short iDim, iVar;
-
- bool muscl = config->GetMUSCL_AdjTurb();
- bool limiter = (config->GetKind_SlopeLimit_AdjTurb() != NO_LIMITER);
-
- if (muscl) {
- if (config->GetKind_Gradient_Method() == GREEN_GAUSS) SetSolution_Gradient_GG(geometry, config);
- if (config->GetKind_Gradient_Method() == WEIGHTED_LEAST_SQUARES) SetSolution_Gradient_LS(geometry, config);
- if (limiter) SetSolution_Limiter(geometry, config);
- }
for (iEdge = 0; iEdge < geometry->GetnEdge(); iEdge++) {
@@ -344,48 +333,6 @@ void CAdjTurbSolver::Upwind_Residual(CGeometry *geometry, CSolver **solver_conta
TurbVar_Grad_j = solver_container[TURB_SOL]->GetNodes()->GetGradient(jPoint);
numerics->SetTurbVarGradient(TurbVar_Grad_i, TurbVar_Grad_j);
-// if (muscl) {
-//
-// /*--- Conservative solution using gradient reconstruction ---*/
-// for (iDim = 0; iDim < nDim; iDim++) {
-// Vector_i[iDim] = 0.5*(geometry->node[jPoint]->GetCoord(iDim) - geometry->node[iPoint]->GetCoord(iDim));
-// Vector_j[iDim] = 0.5*(geometry->node[iPoint]->GetCoord(iDim) - geometry->node[jPoint]->GetCoord(iDim));
-// }
-// Gradient_i = solver_container[FLOW_SOL]->GetNodes()->GetGradient(iPoint);
-// Gradient_j = solver_container[FLOW_SOL]->GetNodes()->GetGradient(jPoint);
-// for (iVar = 0; iVar < solver_container[FLOW_SOL]->GetnVar(); iVar++) {
-// Project_Grad_i = 0; Project_Grad_j = 0;
-// for (iDim = 0; iDim < nDim; iDim++) {
-// Project_Grad_i += Vector_i[iDim]*Gradient_i[iVar][iDim];
-// Project_Grad_j += Vector_j[iDim]*Gradient_j[iVar][iDim];
-// }
-// FlowSolution_i[iVar] = U_i[iVar] + Project_Grad_i;
-// FlowSolution_j[iVar] = U_j[iVar] + Project_Grad_j;
-// }
-// numerics->SetConservative(FlowSolution_i, FlowSolution_j);
-//
-// /*--- Adjoint turbulent variables using gradient reconstruction ---*/
-// Gradient_i = node[iPoint]->GetGradient(); Gradient_j = node[jPoint]->GetGradient();
-// if (limiter) { Limiter_i = node[iPoint]->GetLimiter(); Limiter_j = node[jPoint]->GetLimiter(); }
-// for (iVar = 0; iVar < nVar; iVar++) {
-// Project_Grad_i = 0; Project_Grad_j = 0;
-// for (iDim = 0; iDim < nDim; iDim++) {
-// Project_Grad_i += Vector_i[iDim]*Gradient_i[iVar][iDim];
-// Project_Grad_j += Vector_j[iDim]*Gradient_j[iVar][iDim];
-// }
-// if (limiter) {
-// Solution_i[iVar] = TurbPsi_i[iVar] + Project_Grad_i*Limiter_i[iVar];
-// Solution_j[iVar] = TurbPsi_j[iVar] + Project_Grad_j*Limiter_j[iVar];
-// }
-// else {
-// Solution_i[iVar] = TurbPsi_i[iVar] + Project_Grad_i;
-// Solution_j[iVar] = TurbPsi_j[iVar] + Project_Grad_j;
-// }
-// }
-// numerics->SetTurbVar(Solution_i, Solution_j);
-//
-// }
-
/*--- Set normal vectors and length ---*/
numerics->SetNormal(geometry->edge[iEdge]->GetNormal());
diff --git a/SU2_CFD/src/solver_direct_elasticity.cpp b/SU2_CFD/src/solver_direct_elasticity.cpp
index c76812680b89..24c90656ec02 100644
--- a/SU2_CFD/src/solver_direct_elasticity.cpp
+++ b/SU2_CFD/src/solver_direct_elasticity.cpp
@@ -3626,8 +3626,8 @@ void CFEASolver::Solve_System(CGeometry *geometry, CConfig *config) {
/*--- Store the value of the residual. ---*/
- valResidual = System.GetResidual();
-
+ SetResLinSolver(System.GetResidual());
+
}
diff --git a/SU2_CFD/src/solver_direct_heat.cpp b/SU2_CFD/src/solver_direct_heat.cpp
index 7e903c89af9b..44fb99fe1fe7 100644
--- a/SU2_CFD/src/solver_direct_heat.cpp
+++ b/SU2_CFD/src/solver_direct_heat.cpp
@@ -146,11 +146,15 @@ CHeatSolverFVM::CHeatSolverFVM(CGeometry *geometry, CConfig *config, unsigned sh
/*--- Computation of gradients by least squares ---*/
- if (config->GetKind_Gradient_Method() == WEIGHTED_LEAST_SQUARES) {
+ if (config->GetLeastSquaresRequired()) {
/*--- S matrix := inv(R)*traspose(inv(R)) ---*/
Smatrix = new su2double* [nDim];
for (iDim = 0; iDim < nDim; iDim++)
Smatrix[iDim] = new su2double [nDim];
+ /*--- c vector := transpose(WA)*(Wb) ---*/
+ Cvector = new su2double* [nVar+1];
+ for (iVar = 0; iVar < nVar+1; iVar++)
+ Cvector[iVar] = new su2double [nDim];
}
HeatFlux_per_Marker = new su2double[nMarker];
@@ -295,6 +299,14 @@ void CHeatSolverFVM::Preprocessing(CGeometry *geometry, CSolver **solver_contain
Jacobian.SetValZero();
+ if (config->GetReconstructionGradientRequired()) {
+ if (config->GetKind_Gradient_Method_Recon() == GREEN_GAUSS)
+ SetSolution_Gradient_GG(geometry, config, true);
+ if (config->GetKind_Gradient_Method_Recon() == LEAST_SQUARES)
+ SetSolution_Gradient_LS(geometry, config, true);
+ if (config->GetKind_Gradient_Method_Recon() == WEIGHTED_LEAST_SQUARES)
+ SetSolution_Gradient_LS(geometry, config, true);
+ }
if (config->GetKind_Gradient_Method() == GREEN_GAUSS) SetSolution_Gradient_GG(geometry, config);
if (config->GetKind_Gradient_Method() == WEIGHTED_LEAST_SQUARES) SetSolution_Gradient_LS(geometry, config);
}
@@ -555,7 +567,7 @@ void CHeatSolverFVM::Centered_Residual(CGeometry *geometry, CSolver **solver_con
void CHeatSolverFVM::Upwind_Residual(CGeometry *geometry, CSolver **solver_container, CNumerics *numerics, CConfig *config, unsigned short iMesh) {
su2double *V_i, *V_j, Temp_i, Temp_i_Corrected, Temp_j, Temp_j_Corrected, **Gradient_i, **Gradient_j, Project_Grad_i, Project_Grad_j,
- **Temp_i_Grad, **Temp_j_Grad, Project_Temp_i_Grad, Project_Temp_j_Grad, Non_Physical = 1.0;
+ **Temp_i_Grad, **Temp_j_Grad, Project_Temp_i_Grad, Project_Temp_j_Grad;
unsigned short iDim, iVar;
unsigned long iEdge, iPoint, jPoint;
bool flow = ((config->GetKind_Solver() == INC_NAVIER_STOKES)
@@ -594,10 +606,10 @@ void CHeatSolverFVM::Upwind_Residual(CGeometry *geometry, CSolver **solver_conta
Vector_j[iDim] = 0.5*(geometry->node[iPoint]->GetCoord(iDim) - geometry->node[jPoint]->GetCoord(iDim));
}
- Gradient_i = solver_container[FLOW_SOL]->GetNodes()->GetGradient_Primitive(iPoint);
- Gradient_j = solver_container[FLOW_SOL]->GetNodes()->GetGradient_Primitive(jPoint);
- Temp_i_Grad = nodes->GetGradient(iPoint);
- Temp_j_Grad = nodes->GetGradient(jPoint);
+ Gradient_i = solver_container[FLOW_SOL]->GetNodes()->GetGradient_Reconstruction(iPoint);
+ Gradient_j = solver_container[FLOW_SOL]->GetNodes()->GetGradient_Reconstruction(jPoint);
+ Temp_i_Grad = nodes->GetGradient_Reconstruction(iPoint);
+ Temp_j_Grad = nodes->GetGradient_Reconstruction(jPoint);
/*Loop to correct the flow variables*/
for (iVar = 0; iVar < nVarFlow; iVar++) {
@@ -605,8 +617,8 @@ void CHeatSolverFVM::Upwind_Residual(CGeometry *geometry, CSolver **solver_conta
/*Apply the Gradient to get the right temperature value on the edge */
Project_Grad_i = 0.0; Project_Grad_j = 0.0;
for (iDim = 0; iDim < nDim; iDim++) {
- Project_Grad_i += Vector_i[iDim]*Gradient_i[iVar][iDim]*Non_Physical;
- Project_Grad_j += Vector_j[iDim]*Gradient_j[iVar][iDim]*Non_Physical;
+ Project_Grad_i += Vector_i[iDim]*Gradient_i[iVar][iDim];
+ Project_Grad_j += Vector_j[iDim]*Gradient_j[iVar][iDim];
}
Primitive_Flow_i[iVar] = V_i[iVar] + Project_Grad_i;
@@ -616,8 +628,8 @@ void CHeatSolverFVM::Upwind_Residual(CGeometry *geometry, CSolver **solver_conta
/* Correct the temperature variables */
Project_Temp_i_Grad = 0.0; Project_Temp_j_Grad = 0.0;
for (iDim = 0; iDim < nDim; iDim++) {
- Project_Temp_i_Grad += Vector_i[iDim]*Temp_i_Grad[0][iDim]*Non_Physical;
- Project_Temp_j_Grad += Vector_j[iDim]*Temp_j_Grad[0][iDim]*Non_Physical;
+ Project_Temp_i_Grad += Vector_i[iDim]*Temp_i_Grad[0][iDim];
+ Project_Temp_j_Grad += Vector_j[iDim]*Temp_j_Grad[0][iDim];
}
Temp_i_Corrected = Temp_i + Project_Temp_i_Grad;
@@ -1360,7 +1372,7 @@ void CHeatSolverFVM::SetTime_Step(CGeometry *geometry, CSolver **solver_containe
/*--- Compute spectral radius based on thermal conductivity ---*/
- Min_Delta_Time = 1.E6; Max_Delta_Time = 0.0;
+ Min_Delta_Time = 1.E30; Max_Delta_Time = 0.0;
CFL_Reduction = config->GetCFLRedCoeff_Turb();
for (iPoint = 0; iPoint < nPointDomain; iPoint++) {
diff --git a/SU2_CFD/src/solver_direct_mean.cpp b/SU2_CFD/src/solver_direct_mean.cpp
index f34e36fcbfc5..318ac41ec1c8 100644
--- a/SU2_CFD/src/solver_direct_mean.cpp
+++ b/SU2_CFD/src/solver_direct_mean.cpp
@@ -479,8 +479,7 @@ CEulerSolver::CEulerSolver(CGeometry *geometry, CConfig *config, unsigned short
gradients by least squares, S matrix := inv(R)*traspose(inv(R)),
c vector := transpose(WA)*(Wb) ---*/
- if (config->GetKind_Gradient_Method() == WEIGHTED_LEAST_SQUARES) {
-
+ if (config->GetLeastSquaresRequired()) {
Smatrix = new su2double* [nDim];
for (iDim = 0; iDim < nDim; iDim++)
Smatrix[iDim] = new su2double [nDim];
@@ -488,7 +487,6 @@ CEulerSolver::CEulerSolver(CGeometry *geometry, CConfig *config, unsigned short
Cvector = new su2double* [nPrimVarGrad];
for (iVar = 0; iVar < nPrimVarGrad; iVar++)
Cvector[iVar] = new su2double [nDim];
-
}
/*--- Store the value of the characteristic primitive variables at the boundaries ---*/
@@ -888,8 +886,19 @@ CEulerSolver::CEulerSolver(CGeometry *geometry, CConfig *config, unsigned short
InitiateComms(geometry, config, SOLUTION);
CompleteComms(geometry, config, SOLUTION);
+ /* Store the initial CFL number for all grid points. */
+
+ const su2double CFL = config->GetCFL(MGLevel);
+ for (iPoint = 0; iPoint < nPoint; iPoint++) {
+ nodes->SetLocalCFL(iPoint, CFL);
+ }
+ Min_CFL_Local = CFL;
+ Max_CFL_Local = CFL;
+ Avg_CFL_Local = CFL;
+
/*--- Add the solver name (max 8 characters) ---*/
SolverName = "C.FLOW";
+
}
CEulerSolver::~CEulerSolver(void) {
@@ -3013,15 +3022,14 @@ void CEulerSolver::Preprocessing(CGeometry *geometry, CSolver **solver_container
if ((muscl && !center) && (iMesh == MESH_0) && !Output) {
- /*--- Gradient computation ---*/
-
- if (config->GetKind_Gradient_Method() == GREEN_GAUSS) {
- SetPrimitive_Gradient_GG(geometry, config);
- }
- if (config->GetKind_Gradient_Method() == WEIGHTED_LEAST_SQUARES) {
- SetPrimitive_Gradient_LS(geometry, config);
- }
-
+ /*--- Gradient computation for MUSCL reconstruction. ---*/
+
+ if (config->GetKind_Gradient_Method_Recon() == GREEN_GAUSS)
+ SetPrimitive_Gradient_GG(geometry, config, true);
+ if (config->GetKind_Gradient_Method_Recon() == LEAST_SQUARES)
+ SetPrimitive_Gradient_LS(geometry, config, true);
+ if (config->GetKind_Gradient_Method_Recon() == WEIGHTED_LEAST_SQUARES)
+ SetPrimitive_Gradient_LS(geometry, config, true);
/*--- Limiter computation ---*/
@@ -3070,21 +3078,19 @@ void CEulerSolver::Postprocessing(CGeometry *geometry, CSolver **solver_containe
unsigned long CEulerSolver::SetPrimitive_Variables(CSolver **solver_container, CConfig *config, bool Output) {
- unsigned long iPoint, ErrorCounter = 0;
- bool RightSol = true;
+ unsigned long iPoint, nonPhysicalPoints = 0;
+ bool physical = true;
for (iPoint = 0; iPoint < nPoint; iPoint ++) {
- /*--- Initialize the non-physical points vector ---*/
-
- nodes->SetNon_Physical(iPoint,false);
-
/*--- Compressible flow, primitive variables nDim+5, (T, vx, vy, vz, P, rho, h, c, lamMu, eddyMu, ThCond, Cp) ---*/
- RightSol = nodes->SetPrimVar(iPoint,FluidModel);
- nodes->SetSecondaryVar(iPoint,FluidModel);
+ physical = nodes->SetPrimVar(iPoint, FluidModel);
+ nodes->SetSecondaryVar(iPoint, FluidModel);
- if (!RightSol) { nodes->SetNon_Physical(iPoint,true); ErrorCounter++; }
+ /* Check for non-realizable states for reporting. */
+
+ if (!physical) nonPhysicalPoints++;
/*--- Initialize the convective, source and viscous residual vector ---*/
@@ -3092,7 +3098,7 @@ unsigned long CEulerSolver::SetPrimitive_Variables(CSolver **solver_container, C
}
- return ErrorCounter;
+ return nonPhysicalPoints;
}
void CEulerSolver::SetTime_Step(CGeometry *geometry, CSolver **solver_container, CConfig *config,
unsigned short iMesh, unsigned long Iteration) {
@@ -3102,12 +3108,12 @@ void CEulerSolver::SetTime_Step(CGeometry *geometry, CSolver **solver_container,
unsigned long iEdge, iVertex, iPoint, jPoint;
unsigned short iDim, iMarker;
- bool implicit = (config->GetKind_TimeIntScheme_Flow() == EULER_IMPLICIT);
- bool time_steping = config->GetTime_Marching() == TIME_STEPPING;
- bool dual_time = ((config->GetTime_Marching() == DT_STEPPING_1ST) ||
- (config->GetTime_Marching() == DT_STEPPING_2ND));
+ bool implicit = (config->GetKind_TimeIntScheme_Flow() == EULER_IMPLICIT);
+ bool time_stepping = config->GetTime_Marching() == TIME_STEPPING;
+ bool dual_time = ((config->GetTime_Marching() == DT_STEPPING_1ST) ||
+ (config->GetTime_Marching() == DT_STEPPING_2ND));
- Min_Delta_Time = 1.E6; Max_Delta_Time = 0.0;
+ Min_Delta_Time = 1.E30; Max_Delta_Time = 0.0;
/*--- Set maximum inviscid eigenvalue to zero, and compute sound speed ---*/
@@ -3195,7 +3201,7 @@ void CEulerSolver::SetTime_Step(CGeometry *geometry, CSolver **solver_container,
Vol = geometry->node[iPoint]->GetVolume();
if (Vol != 0.0) {
- Local_Delta_Time = config->GetCFL(iMesh)*Vol / nodes->GetMax_Lambda_Inv(iPoint);
+ Local_Delta_Time = nodes->GetLocalCFL(iPoint)*Vol / nodes->GetMax_Lambda_Inv(iPoint);
Global_Delta_Time = min(Global_Delta_Time, Local_Delta_Time);
Min_Delta_Time = min(Min_Delta_Time, Local_Delta_Time);
Max_Delta_Time = max(Max_Delta_Time, Local_Delta_Time);
@@ -3228,7 +3234,7 @@ void CEulerSolver::SetTime_Step(CGeometry *geometry, CSolver **solver_container,
/*--- For exact time solution use the minimum delta time of the whole mesh ---*/
- if (time_steping) {
+ if (time_stepping) {
#ifdef HAVE_MPI
su2double rbuf_time, sbuf_time;
sbuf_time = Global_Delta_Time;
@@ -3236,26 +3242,35 @@ void CEulerSolver::SetTime_Step(CGeometry *geometry, CSolver **solver_container,
SU2_MPI::Bcast(&rbuf_time, 1, MPI_DOUBLE, MASTER_NODE, MPI_COMM_WORLD);
Global_Delta_Time = rbuf_time;
#endif
- for (iPoint = 0; iPoint < nPointDomain; iPoint++) {
-
- /*--- Sets the regular CFL equal to the unsteady CFL ---*/
- config->SetCFL(iMesh,config->GetUnst_CFL());
-
- /*--- If the unsteady CFL is set to zero, it uses the defined unsteady time step, otherwise
- it computes the time step based on the unsteady CFL ---*/
- if (config->GetCFL(iMesh) == 0.0) {
- nodes->SetDelta_Time(iPoint,config->GetDelta_UnstTime());
- } else {
- nodes->SetDelta_Time(iPoint,Global_Delta_Time);
- }
- }
+ /*--- If the unsteady CFL is set to zero, it uses the defined
+ unsteady time step, otherwise it computes the time step based
+ on the unsteady CFL ---*/
+
+ if (config->GetUnst_CFL() == 0.0) {
+ Global_Delta_Time = config->GetDelta_UnstTime();
+ }
+ config->SetDelta_UnstTimeND(Global_Delta_Time);
+ for (iPoint = 0; iPoint < nPointDomain; iPoint++){
+
+ /*--- Sets the regular CFL equal to the unsteady CFL ---*/
+
+ nodes->SetLocalCFL(iPoint, config->GetUnst_CFL());
+ nodes->SetDelta_Time(iPoint, Global_Delta_Time);
+ Min_Delta_Time = Global_Delta_Time;
+ Max_Delta_Time = Global_Delta_Time;
+
+ }
}
/*--- Recompute the unsteady time step for the dual time strategy
if the unsteady CFL is diferent from 0 ---*/
if ((dual_time) && (Iteration == 0) && (config->GetUnst_CFL() != 0.0) && (iMesh == MESH_0)) {
- Global_Delta_UnstTimeND = config->GetUnst_CFL()*Global_Delta_Time/config->GetCFL(iMesh);
+
+ Global_Delta_UnstTimeND = 1e30;
+ for (iPoint = 0; iPoint < nPointDomain; iPoint++){
+ Global_Delta_UnstTimeND = min(Global_Delta_UnstTimeND,config->GetUnst_CFL()*Global_Delta_Time/nodes->GetLocalCFL(iPoint));
+ }
#ifdef HAVE_MPI
su2double rbuf_time, sbuf_time;
@@ -3340,7 +3355,7 @@ void CEulerSolver::Upwind_Residual(CGeometry *geometry, CSolver **solver_contain
CConfig *config, unsigned short iMesh) {
su2double **Gradient_i, **Gradient_j, Project_Grad_i, Project_Grad_j, RoeVelocity[3] = {0.0,0.0,0.0}, R, sq_vel, RoeEnthalpy,
- *V_i, *V_j, *S_i, *S_j, *Limiter_i = NULL, *Limiter_j = NULL, sqvel, Non_Physical = 1.0, Sensor_i, Sensor_j, Dissipation_i, Dissipation_j, *Coord_i, *Coord_j;
+ *V_i, *V_j, *S_i, *S_j, *Limiter_i = NULL, *Limiter_j = NULL, sqvel, Sensor_i, Sensor_j, Dissipation_i, Dissipation_j, *Coord_i, *Coord_j;
su2double z, velocity2_i, velocity2_j, mach_i, mach_j, vel_i_corr[3], vel_j_corr[3];
@@ -3396,8 +3411,9 @@ void CEulerSolver::Upwind_Residual(CGeometry *geometry, CSolver **solver_contain
Vector_j[iDim] = 0.5*(geometry->node[iPoint]->GetCoord(iDim) - geometry->node[jPoint]->GetCoord(iDim));
}
- Gradient_i = nodes->GetGradient_Primitive(iPoint);
- Gradient_j = nodes->GetGradient_Primitive(jPoint);
+ Gradient_i = nodes->GetGradient_Reconstruction(iPoint);
+ Gradient_j = nodes->GetGradient_Reconstruction(jPoint);
+
if (limiter) {
Limiter_i = nodes->GetLimiter_Primitive(iPoint);
Limiter_j = nodes->GetLimiter_Primitive(jPoint);
@@ -3405,10 +3421,9 @@ void CEulerSolver::Upwind_Residual(CGeometry *geometry, CSolver **solver_contain
for (iVar = 0; iVar < nPrimVarGrad; iVar++) {
Project_Grad_i = 0.0; Project_Grad_j = 0.0;
- Non_Physical = nodes->GetNon_Physical(iPoint)*nodes->GetNon_Physical(jPoint);
for (iDim = 0; iDim < nDim; iDim++) {
- Project_Grad_i += Vector_i[iDim]*Gradient_i[iVar][iDim]*Non_Physical;
- Project_Grad_j += Vector_j[iDim]*Gradient_j[iVar][iDim]*Non_Physical;
+ Project_Grad_i += Vector_i[iDim]*Gradient_i[iVar][iDim];
+ Project_Grad_j += Vector_j[iDim]*Gradient_j[iVar][iDim];
}
if (limiter) {
if (van_albada){
@@ -3484,26 +3499,48 @@ void CEulerSolver::Upwind_Residual(CGeometry *geometry, CSolver **solver_contain
}
RoeEnthalpy = (R*Primitive_j[nDim+3]+Primitive_i[nDim+3])/(R+1);
neg_sound_speed = ((Gamma-1)*(RoeEnthalpy-0.5*sq_vel) < 0.0);
-
+
if (neg_sound_speed) {
for (iVar = 0; iVar < nPrimVar; iVar++) {
Primitive_i[iVar] = V_i[iVar];
- Primitive_j[iVar] = V_j[iVar]; }
+ Primitive_j[iVar] = V_j[iVar];
+ }
+ nodes->SetNon_Physical(iPoint, true);
+ nodes->SetNon_Physical(iPoint, true);
Secondary_i[0] = S_i[0]; Secondary_i[1] = S_i[1];
Secondary_j[0] = S_i[0]; Secondary_j[1] = S_i[1];
- counter_local++;
}
-
+
if (neg_density_i || neg_pressure_i) {
for (iVar = 0; iVar < nPrimVar; iVar++) Primitive_i[iVar] = V_i[iVar];
+ nodes->SetNon_Physical(iPoint, true);
Secondary_i[0] = S_i[0]; Secondary_i[1] = S_i[1];
- counter_local++;
}
-
+
if (neg_density_j || neg_pressure_j) {
for (iVar = 0; iVar < nPrimVar; iVar++) Primitive_j[iVar] = V_j[iVar];
+ nodes->SetNon_Physical(jPoint, true);
Secondary_j[0] = S_j[0]; Secondary_j[1] = S_j[1];
+ }
+
+ if (!neg_sound_speed && !neg_density_i && !neg_pressure_i)
+ nodes->SetNon_Physical(iPoint, false);
+
+ if (!neg_sound_speed && !neg_density_j && !neg_pressure_j)
+ nodes->SetNon_Physical(jPoint, false);
+
+ /* Lastly, check for existing first-order points still active
+ from previous iterations. */
+
+ if (nodes->GetNon_Physical(iPoint)) {
counter_local++;
+ for (iVar = 0; iVar < nPrimVar; iVar++)
+ Primitive_i[iVar] = V_i[iVar];
+ }
+ if (nodes->GetNon_Physical(jPoint)) {
+ counter_local++;
+ for (iVar = 0; iVar < nPrimVar; iVar++)
+ Primitive_j[iVar] = V_j[iVar];
}
numerics->SetPrimitive(Primitive_i, Primitive_j);
@@ -5161,20 +5198,22 @@ void CEulerSolver::ImplicitEuler_Iteration(CGeometry *geometry, CSolver **solver
IterLinSol = System.Solve(Jacobian, LinSysRes, LinSysSol, geometry, config);
+ /*--- Store the value of the residual. ---*/
+
+ SetResLinSolver(System.GetResidual());
+
/*--- The the number of iterations of the linear solver ---*/
SetIterLinSolver(IterLinSol);
- /*--- Set the residual --- */
-
- valResidual = System.GetResidual();
+ ComputeUnderRelaxationFactor(solver_container, config);
/*--- Update solution (system written in terms of increments) ---*/
if (!adjoint) {
for (iPoint = 0; iPoint < nPointDomain; iPoint++) {
for (iVar = 0; iVar < nVar; iVar++) {
- nodes->AddSolution(iPoint,iVar, config->GetRelaxation_Factor_Flow()*LinSysSol[iPoint*nVar+iVar]);
+ nodes->AddSolution(iPoint, iVar, nodes->GetUnderRelaxation(iPoint)*LinSysSol[iPoint*nVar+iVar]);
}
}
}
@@ -5199,7 +5238,51 @@ void CEulerSolver::ImplicitEuler_Iteration(CGeometry *geometry, CSolver **solver
}
-void CEulerSolver::SetPrimitive_Gradient_GG(CGeometry *geometry, CConfig *config) {
+void CEulerSolver::ComputeUnderRelaxationFactor(CSolver **solver_container, CConfig *config) {
+
+ /* Loop over the solution update given by relaxing the linear
+ system for this nonlinear iteration. */
+
+ su2double localUnderRelaxation = 1.0;
+ const su2double allowableRatio = 0.2;
+ for (unsigned long iPoint = 0; iPoint < nPointDomain; iPoint++) {
+
+ localUnderRelaxation = 1.0;
+ for (unsigned short iVar = 0; iVar < nVar; iVar++) {
+
+ /* We impose a limit on the maximum percentage that the
+ density and energy can change over a nonlinear iteration. */
+
+ if ((iVar == 0) || (iVar == nVar-1)) {
+ const unsigned long index = iPoint*nVar + iVar;
+ su2double ratio = fabs(LinSysSol[index])/(nodes->GetSolution(iPoint, iVar)+EPS);
+ if (ratio > allowableRatio) {
+ localUnderRelaxation = min(allowableRatio/ratio, localUnderRelaxation);
+ }
+ }
+ }
+
+ /* In case of turbulence, take the min of the under-relaxation factor
+ between the mean flow and the turb model. */
+
+ if (config->GetKind_Turb_Model() != NONE)
+ localUnderRelaxation = min(localUnderRelaxation, solver_container[TURB_SOL]->GetNodes()->GetUnderRelaxation(iPoint));
+
+ /* Threshold the relaxation factor in the event that there is
+ a very small value. This helps avoid catastrophic crashes due
+ to non-realizable states by canceling the update. */
+
+ if (localUnderRelaxation < 1e-10) localUnderRelaxation = 0.0;
+
+ /* Store the under-relaxation factor for this point. */
+
+ nodes->SetUnderRelaxation(iPoint, localUnderRelaxation);
+
+ }
+
+}
+
+void CEulerSolver::SetPrimitive_Gradient_GG(CGeometry *geometry, CConfig *config, bool reconstruction) {
unsigned long iPoint, jPoint, iEdge, iVertex;
unsigned short iDim, iVar, iMarker;
su2double *PrimVar_Vertex, *PrimVar_i, *PrimVar_j, PrimVar_Average,
@@ -5280,8 +5363,11 @@ void CEulerSolver::SetPrimitive_Gradient_GG(CGeometry *geometry, CConfig *config
for (iVar = 0; iVar < nPrimVarGrad; iVar++) {
for (iDim = 0; iDim < nDim; iDim++) {
- Partial_Gradient = nodes->GetGradient_Primitive(iPoint,iVar, iDim)/Vol;
- nodes->SetGradient_Primitive(iPoint,iVar, iDim, Partial_Gradient);
+ Partial_Gradient = nodes->GetGradient_Primitive(iPoint, iVar, iDim)/Vol;
+ if (reconstruction)
+ nodes->SetGradient_Reconstruction(iPoint, iVar, iDim, Partial_Gradient);
+ else
+ nodes->SetGradient_Primitive(iPoint, iVar, iDim, Partial_Gradient);
}
}
@@ -5298,7 +5384,7 @@ void CEulerSolver::SetPrimitive_Gradient_GG(CGeometry *geometry, CConfig *config
}
-void CEulerSolver::SetPrimitive_Gradient_LS(CGeometry *geometry, CConfig *config) {
+void CEulerSolver::SetPrimitive_Gradient_LS(CGeometry *geometry, CConfig *config, bool reconstruction) {
unsigned short iVar, iDim, jDim, iNeigh;
unsigned long iPoint, jPoint;
@@ -5307,6 +5393,16 @@ void CEulerSolver::SetPrimitive_Gradient_LS(CGeometry *geometry, CConfig *config
su2double z11, z12, z13, z22, z23, z33, detR2;
bool singular;
+ /*--- Set a flag for unweighted or weighted least-squares. ---*/
+
+ bool weighted = true;
+ if (reconstruction) {
+ if (config->GetKind_Gradient_Method_Recon() == LEAST_SQUARES)
+ weighted = false;
+ } else if (config->GetKind_Gradient_Method() == LEAST_SQUARES) {
+ weighted = false;
+ }
+
/*--- Clear Rmatrix and Primitive gradient ---*/
nodes->SetRmatrixZero();
nodes->SetGradient_PrimitiveZero();
@@ -5347,10 +5443,14 @@ void CEulerSolver::SetPrimitive_Gradient_LS(CGeometry *geometry, CConfig *config
AD::SetPreaccIn(Coord_j, nDim);
AD::SetPreaccIn(PrimVar_j, nPrimVarGrad);
-
- weight = 0.0;
- for (iDim = 0; iDim < nDim; iDim++)
- weight += (Coord_j[iDim]-Coord_i[iDim])*(Coord_j[iDim]-Coord_i[iDim]);
+
+ if (weighted) {
+ weight = 0.0;
+ for (iDim = 0; iDim < nDim; iDim++)
+ weight += (Coord_j[iDim]-Coord_i[iDim])*(Coord_j[iDim]-Coord_i[iDim]);
+ } else {
+ weight = 1.0;
+ }
/*--- Sumations for entries of upper triangular matrix R ---*/
@@ -5384,8 +5484,13 @@ void CEulerSolver::SetPrimitive_Gradient_LS(CGeometry *geometry, CConfig *config
/*--- Correct the gradient values across any periodic boundaries. ---*/
for (unsigned short iPeriodic = 1; iPeriodic <= config->GetnMarker_Periodic()/2; iPeriodic++) {
- InitiatePeriodicComms(geometry, config, iPeriodic, PERIODIC_PRIM_LS);
- CompletePeriodicComms(geometry, config, iPeriodic, PERIODIC_PRIM_LS);
+ if (weighted) {
+ InitiatePeriodicComms(geometry, config, iPeriodic, PERIODIC_PRIM_LS);
+ CompletePeriodicComms(geometry, config, iPeriodic, PERIODIC_PRIM_LS);
+ } else {
+ InitiatePeriodicComms(geometry, config, iPeriodic, PERIODIC_PRIM_ULS);
+ CompletePeriodicComms(geometry, config, iPeriodic, PERIODIC_PRIM_ULS);
+ }
}
/*--- Second loop over points of the grid to compute final gradient ---*/
@@ -5483,14 +5588,17 @@ void CEulerSolver::SetPrimitive_Gradient_LS(CGeometry *geometry, CConfig *config
for (iVar = 0; iVar < nPrimVarGrad; iVar++) {
for (iDim = 0; iDim < nDim; iDim++) {
- nodes->SetGradient_Primitive(iPoint,iVar, iDim, Cvector[iVar][iDim]);
+ if (reconstruction)
+ nodes->SetGradient_Reconstruction(iPoint, iVar, iDim, Cvector[iVar][iDim]);
+ else
+ nodes->SetGradient_Primitive(iPoint, iVar, iDim, Cvector[iVar][iDim]);
}
}
}
/*--- Communicate the gradient values via MPI. ---*/
-
+
InitiateComms(geometry, config, PRIMITIVE_GRADIENT);
CompleteComms(geometry, config, PRIMITIVE_GRADIENT);
@@ -5584,8 +5692,8 @@ void CEulerSolver::SetPrimitive_Limiter(CGeometry *geometry, CConfig *config) {
iPoint = geometry->edge[iEdge]->GetNode(0);
jPoint = geometry->edge[iEdge]->GetNode(1);
- Gradient_i = nodes->GetGradient_Primitive(iPoint);
- Gradient_j = nodes->GetGradient_Primitive(jPoint);
+ Gradient_i = nodes->GetGradient_Reconstruction(iPoint);
+ Gradient_j = nodes->GetGradient_Reconstruction(jPoint);
Coord_i = geometry->node[iPoint]->GetCoord();
Coord_j = geometry->node[jPoint]->GetCoord();
@@ -5701,8 +5809,8 @@ void CEulerSolver::SetPrimitive_Limiter(CGeometry *geometry, CConfig *config) {
iPoint = geometry->edge[iEdge]->GetNode(0);
jPoint = geometry->edge[iEdge]->GetNode(1);
- Gradient_i = nodes->GetGradient_Primitive(iPoint);
- Gradient_j = nodes->GetGradient_Primitive(jPoint);
+ Gradient_i = nodes->GetGradient_Reconstruction(iPoint);
+ Gradient_j = nodes->GetGradient_Reconstruction(jPoint);
Coord_i = geometry->node[iPoint]->GetCoord();
Coord_j = geometry->node[jPoint]->GetCoord();
@@ -12354,7 +12462,7 @@ void CEulerSolver::SetResidual_DualTime(CGeometry *geometry, CSolver **solver_co
}
- /*--- Loop over the boundary edges ---*/
+ /*--- Loop over the boundary edges ---*/
for (iMarker = 0; iMarker < geometry->GetnMarker(); iMarker++) {
if ((config->GetMarker_All_KindBC(iMarker) != INTERNAL_BOUNDARY) &&
@@ -14192,8 +14300,7 @@ CNSSolver::CNSSolver(CGeometry *geometry, CConfig *config, unsigned short iMesh)
gradients by least squares, S matrix := inv(R)*traspose(inv(R)),
c vector := transpose(WA)*(Wb) ---*/
- if (config->GetKind_Gradient_Method() == WEIGHTED_LEAST_SQUARES) {
-
+ if (config->GetLeastSquaresRequired()) {
Smatrix = new su2double* [nDim];
for (iDim = 0; iDim < nDim; iDim++)
Smatrix[iDim] = new su2double [nDim];
@@ -14717,8 +14824,19 @@ CNSSolver::CNSSolver(CGeometry *geometry, CConfig *config, unsigned short iMesh)
InitiateComms(geometry, config, SOLUTION);
CompleteComms(geometry, config, SOLUTION);
+ /* Store the initial CFL number for all grid points. */
+
+ const su2double CFL = config->GetCFL(MGLevel);
+ for (iPoint = 0; iPoint < nPoint; iPoint++) {
+ nodes->SetLocalCFL(iPoint, CFL);
+ }
+ Min_CFL_Local = CFL;
+ Max_CFL_Local = CFL;
+ Avg_CFL_Local = CFL;
+
/*--- Add the solver name (max 8 characters) ---*/
SolverName = "C.FLOW";
+
}
CNSSolver::~CNSSolver(void) {
@@ -14860,6 +14978,17 @@ void CNSSolver::Preprocessing(CGeometry *geometry, CSolver **solver_container, C
}
}
+ /*--- Compute gradient for MUSCL reconstruction. ---*/
+
+ if (config->GetReconstructionGradientRequired() && (iMesh == MESH_0)) {
+ if (config->GetKind_Gradient_Method_Recon() == GREEN_GAUSS)
+ SetPrimitive_Gradient_GG(geometry, config, true);
+ if (config->GetKind_Gradient_Method_Recon() == LEAST_SQUARES)
+ SetPrimitive_Gradient_LS(geometry, config, true);
+ if (config->GetKind_Gradient_Method_Recon() == WEIGHTED_LEAST_SQUARES)
+ SetPrimitive_Gradient_LS(geometry, config, true);
+ }
+
/*--- Compute gradient of the primitive variables ---*/
if (config->GetKind_Gradient_Method() == GREEN_GAUSS) {
@@ -14926,10 +15055,10 @@ void CNSSolver::Preprocessing(CGeometry *geometry, CSolver **solver_container, C
unsigned long CNSSolver::SetPrimitive_Variables(CSolver **solver_container, CConfig *config, bool Output) {
- unsigned long iPoint, ErrorCounter = 0;
+ unsigned long iPoint, nonPhysicalPoints = 0;
su2double eddy_visc = 0.0, turb_ke = 0.0, DES_LengthScale = 0.0;
unsigned short turb_model = config->GetKind_Turb_Model();
- bool RightSol = true;
+ bool physical = true;
bool tkeNeeded = ((turb_model == SST) || (turb_model == SST_SUST)) ;
@@ -14946,17 +15075,15 @@ unsigned long CNSSolver::SetPrimitive_Variables(CSolver **solver_container, CCon
}
}
- /*--- Initialize the non-physical points vector ---*/
-
- nodes->SetNon_Physical(iPoint,false);
-
/*--- Compressible flow, primitive variables nDim+5, (T, vx, vy, vz, P, rho, h, c, lamMu, eddyMu, ThCond, Cp) ---*/
- RightSol = static_cast(nodes)->SetPrimVar(iPoint,eddy_visc, turb_ke, FluidModel);
+ physical = static_cast(nodes)->SetPrimVar(iPoint,eddy_visc, turb_ke, FluidModel);
nodes->SetSecondaryVar(iPoint,FluidModel);
- if (!RightSol) { nodes->SetNon_Physical(iPoint,true); ErrorCounter++; }
-
+ /* Check for non-realizable states for reporting. */
+
+ if (!physical) nonPhysicalPoints++;
+
/*--- Set the DES length scale ---*/
nodes->SetDES_LengthScale(iPoint,DES_LengthScale);
@@ -14967,7 +15094,7 @@ unsigned long CNSSolver::SetPrimitive_Variables(CSolver **solver_container, CCon
}
- return ErrorCounter;
+ return nonPhysicalPoints;
}
void CNSSolver::SetTime_Step(CGeometry *geometry, CSolver **solver_container, CConfig *config, unsigned short iMesh, unsigned long Iteration) {
@@ -14982,7 +15109,7 @@ void CNSSolver::SetTime_Step(CGeometry *geometry, CSolver **solver_container, CC
bool dual_time = ((config->GetTime_Marching() == DT_STEPPING_1ST) ||
(config->GetTime_Marching() == DT_STEPPING_2ND));
- Min_Delta_Time = 1.E6; Max_Delta_Time = 0.0;
+ Min_Delta_Time = 1.E30; Max_Delta_Time = 0.0;
/*--- Set maximum inviscid eigenvalue to zero, and compute sound speed and viscosity ---*/
@@ -15102,8 +15229,8 @@ void CNSSolver::SetTime_Step(CGeometry *geometry, CSolver **solver_container, CC
Vol = geometry->node[iPoint]->GetVolume();
if (Vol != 0.0) {
- Local_Delta_Time = config->GetCFL(iMesh)*Vol / nodes->GetMax_Lambda_Inv(iPoint);
- Local_Delta_Time_Visc = config->GetCFL(iMesh)*K_v*Vol*Vol/ nodes->GetMax_Lambda_Visc(iPoint);
+ Local_Delta_Time = nodes->GetLocalCFL(iPoint)*Vol / nodes->GetMax_Lambda_Inv(iPoint);
+ Local_Delta_Time_Visc = nodes->GetLocalCFL(iPoint)*K_v*Vol*Vol/ nodes->GetMax_Lambda_Visc(iPoint);
Local_Delta_Time = min(Local_Delta_Time, Local_Delta_Time_Visc);
Global_Delta_Time = min(Global_Delta_Time, Local_Delta_Time);
Min_Delta_Time = min(Min_Delta_Time, Local_Delta_Time);
@@ -15144,16 +15271,34 @@ void CNSSolver::SetTime_Step(CGeometry *geometry, CSolver **solver_container, CC
SU2_MPI::Bcast(&rbuf_time, 1, MPI_DOUBLE, MASTER_NODE, MPI_COMM_WORLD);
Global_Delta_Time = rbuf_time;
#endif
- for (iPoint = 0; iPoint < nPointDomain; iPoint++)
- nodes->SetDelta_Time(iPoint,Global_Delta_Time);
+ /*--- If the unsteady CFL is set to zero, it uses the defined
+ unsteady time step, otherwise it computes the time step based
+ on the unsteady CFL ---*/
+ if (config->GetUnst_CFL() == 0.0) {
+ Global_Delta_Time = config->GetDelta_UnstTime();
+ }
config->SetDelta_UnstTimeND(Global_Delta_Time);
+ for (iPoint = 0; iPoint < nPointDomain; iPoint++){
+
+ /*--- Sets the regular CFL equal to the unsteady CFL ---*/
+
+ nodes->SetLocalCFL(iPoint, config->GetUnst_CFL());
+ nodes->SetDelta_Time(iPoint, Global_Delta_Time);
+ Min_Delta_Time = Global_Delta_Time;
+ Max_Delta_Time = Global_Delta_Time;
+
+ }
}
/*--- Recompute the unsteady time step for the dual time strategy
if the unsteady CFL is diferent from 0 ---*/
if ((dual_time) && (Iteration == 0) && (config->GetUnst_CFL() != 0.0) && (iMesh == MESH_0)) {
- Global_Delta_UnstTimeND = config->GetUnst_CFL()*Global_Delta_Time/config->GetCFL(iMesh);
+
+ Global_Delta_UnstTimeND = 1e30;
+ for (iPoint = 0; iPoint < nPointDomain; iPoint++){
+ Global_Delta_UnstTimeND = min(Global_Delta_UnstTimeND,config->GetUnst_CFL()*Global_Delta_Time/nodes->GetLocalCFL(iPoint));
+ }
#ifdef HAVE_MPI
su2double rbuf_time, sbuf_time;
diff --git a/SU2_CFD/src/solver_direct_mean_inc.cpp b/SU2_CFD/src/solver_direct_mean_inc.cpp
index c159afa0b1d6..b387897d3886 100644
--- a/SU2_CFD/src/solver_direct_mean_inc.cpp
+++ b/SU2_CFD/src/solver_direct_mean_inc.cpp
@@ -321,7 +321,7 @@ CIncEulerSolver::CIncEulerSolver(CGeometry *geometry, CConfig *config, unsigned
gradients by least squares, S matrix := inv(R)*traspose(inv(R)),
c vector := transpose(WA)*(Wb) ---*/
- if (config->GetKind_Gradient_Method() == WEIGHTED_LEAST_SQUARES) {
+ if (config->GetLeastSquaresRequired()) {
Smatrix = new su2double* [nDim];
for (iDim = 0; iDim < nDim; iDim++)
@@ -594,7 +594,17 @@ CIncEulerSolver::CIncEulerSolver(CGeometry *geometry, CConfig *config, unsigned
InitiateComms(geometry, config, SOLUTION);
CompleteComms(geometry, config, SOLUTION);
-
+
+ /* Store the initial CFL number for all grid points. */
+
+ const su2double CFL = config->GetCFL(MGLevel);
+ for (iPoint = 0; iPoint < nPoint; iPoint++) {
+ nodes->SetLocalCFL(iPoint, CFL);
+ }
+ Min_CFL_Local = CFL;
+ Max_CFL_Local = CFL;
+ Avg_CFL_Local = CFL;
+
/*--- Add the solver name (max 8 characters) ---*/
SolverName = "INC.FLOW";
@@ -1523,14 +1533,14 @@ void CIncEulerSolver::Preprocessing(CGeometry *geometry, CSolver **solver_contai
if ((muscl && !center) && (iMesh == MESH_0) && !Output) {
- /*--- Gradient computation ---*/
+ /*--- Gradient computation for MUSCL reconstruction. ---*/
- if (config->GetKind_Gradient_Method() == GREEN_GAUSS) {
- SetPrimitive_Gradient_GG(geometry, config);
- }
- if (config->GetKind_Gradient_Method() == WEIGHTED_LEAST_SQUARES) {
- SetPrimitive_Gradient_LS(geometry, config);
- }
+ if (config->GetKind_Gradient_Method_Recon() == GREEN_GAUSS)
+ SetPrimitive_Gradient_GG(geometry, config, true);
+ if (config->GetKind_Gradient_Method_Recon() == LEAST_SQUARES)
+ SetPrimitive_Gradient_LS(geometry, config, true);
+ if (config->GetKind_Gradient_Method_Recon() == WEIGHTED_LEAST_SQUARES)
+ SetPrimitive_Gradient_LS(geometry, config, true);
/*--- Limiter computation ---*/
@@ -1579,22 +1589,18 @@ void CIncEulerSolver::Postprocessing(CGeometry *geometry, CSolver **solver_conta
unsigned long CIncEulerSolver::SetPrimitive_Variables(CSolver **solver_container, CConfig *config, bool Output) {
- unsigned long iPoint, ErrorCounter = 0;
+ unsigned long iPoint, nonPhysicalPoints = 0;
bool physical = true;
for (iPoint = 0; iPoint < nPoint; iPoint ++) {
-
- /*--- Initialize the non-physical points vector ---*/
-
- nodes->SetNon_Physical(iPoint,false);
-
+
/*--- Incompressible flow, primitive variables ---*/
physical = nodes->SetPrimVar(iPoint,FluidModel);
- /*--- Record any non-physical points. ---*/
+ /* Check for non-realizable states for reporting. */
- if (!physical) { nodes->SetNon_Physical(iPoint,true); ErrorCounter++; }
+ if (!physical) nonPhysicalPoints++;
/*--- Initialize the convective, source and viscous residual vector ---*/
@@ -1602,7 +1608,7 @@ unsigned long CIncEulerSolver::SetPrimitive_Variables(CSolver **solver_container
}
- return ErrorCounter;
+ return nonPhysicalPoints;
}
void CIncEulerSolver::SetTime_Step(CGeometry *geometry, CSolver **solver_container, CConfig *config,
@@ -1616,11 +1622,11 @@ void CIncEulerSolver::SetTime_Step(CGeometry *geometry, CSolver **solver_contain
unsigned short iDim, iMarker;
bool implicit = (config->GetKind_TimeIntScheme_Flow() == EULER_IMPLICIT);
- bool time_steping = config->GetTime_Marching() == TIME_STEPPING;
+ bool time_stepping = config->GetTime_Marching() == TIME_STEPPING;
bool dual_time = ((config->GetTime_Marching() == DT_STEPPING_1ST) ||
(config->GetTime_Marching() == DT_STEPPING_2ND));
- Min_Delta_Time = 1.E6; Max_Delta_Time = 0.0;
+ Min_Delta_Time = 1.E30; Max_Delta_Time = 0.0;
/*--- Set maximum inviscid eigenvalue to zero, and compute sound speed ---*/
@@ -1720,7 +1726,7 @@ void CIncEulerSolver::SetTime_Step(CGeometry *geometry, CSolver **solver_contain
Vol = geometry->node[iPoint]->GetVolume();
if (Vol != 0.0) {
- Local_Delta_Time = config->GetCFL(iMesh)*Vol / nodes->GetMax_Lambda_Inv(iPoint);
+ Local_Delta_Time = nodes->GetLocalCFL(iPoint)*Vol / nodes->GetMax_Lambda_Inv(iPoint);
Global_Delta_Time = min(Global_Delta_Time, Local_Delta_Time);
Min_Delta_Time = min(Min_Delta_Time, Local_Delta_Time);
Max_Delta_Time = max(Max_Delta_Time, Local_Delta_Time);
@@ -1753,7 +1759,7 @@ void CIncEulerSolver::SetTime_Step(CGeometry *geometry, CSolver **solver_contain
/*--- For time-accurate simulations use the minimum delta time of the whole mesh (global) ---*/
- if (time_steping) {
+ if (time_stepping) {
#ifdef HAVE_MPI
su2double rbuf_time, sbuf_time;
sbuf_time = Global_Delta_Time;
@@ -1761,20 +1767,23 @@ void CIncEulerSolver::SetTime_Step(CGeometry *geometry, CSolver **solver_contain
SU2_MPI::Bcast(&rbuf_time, 1, MPI_DOUBLE, MASTER_NODE, MPI_COMM_WORLD);
Global_Delta_Time = rbuf_time;
#endif
+ /*--- If the unsteady CFL is set to zero, it uses the defined
+ unsteady time step, otherwise it computes the time step based
+ on the unsteady CFL ---*/
+
+ if (config->GetUnst_CFL() == 0.0) {
+ Global_Delta_Time = config->GetDelta_UnstTime();
+ }
+ config->SetDelta_UnstTimeND(Global_Delta_Time);
for (iPoint = 0; iPoint < nPointDomain; iPoint++){
/*--- Sets the regular CFL equal to the unsteady CFL ---*/
- config->SetCFL(iMesh,config->GetUnst_CFL());
-
- /*--- If the unsteady CFL is set to zero, it uses the defined unsteady time step, otherwise
- it computes the time step based on the unsteady CFL ---*/
-
- if (config->GetCFL(iMesh) == 0.0){
- nodes->SetDelta_Time(iPoint,config->GetDelta_UnstTime());
- } else {
- nodes->SetDelta_Time(iPoint,Global_Delta_Time);
- }
+ nodes->SetLocalCFL(iPoint, config->GetUnst_CFL());
+ nodes->SetDelta_Time(iPoint, Global_Delta_Time);
+ Min_Delta_Time = Global_Delta_Time;
+ Max_Delta_Time = Global_Delta_Time;
+
}
}
@@ -1782,7 +1791,11 @@ void CIncEulerSolver::SetTime_Step(CGeometry *geometry, CSolver **solver_contain
if the unsteady CFL is diferent from 0 ---*/
if ((dual_time) && (Iteration == 0) && (config->GetUnst_CFL() != 0.0) && (iMesh == MESH_0)) {
- Global_Delta_UnstTimeND = config->GetUnst_CFL()*Global_Delta_Time/config->GetCFL(iMesh);
+
+ Global_Delta_UnstTimeND = 1e30;
+ for (iPoint = 0; iPoint < nPointDomain; iPoint++){
+ Global_Delta_UnstTimeND = min(Global_Delta_UnstTimeND,config->GetUnst_CFL()*Global_Delta_Time/nodes->GetLocalCFL(iPoint));
+ }
#ifdef HAVE_MPI
su2double rbuf_time, sbuf_time;
@@ -1868,7 +1881,7 @@ void CIncEulerSolver::Upwind_Residual(CGeometry *geometry, CSolver **solver_cont
CConfig *config, unsigned short iMesh) {
su2double **Gradient_i, **Gradient_j, Project_Grad_i, Project_Grad_j,
- *V_i, *V_j, *S_i, *S_j, *Limiter_i = NULL, *Limiter_j = NULL, Non_Physical = 1.0;
+ *V_i, *V_j, *S_i, *S_j, *Limiter_i = NULL, *Limiter_j = NULL;
unsigned long iEdge, iPoint, jPoint, counter_local = 0, counter_global = 0;
unsigned short iDim, iVar;
@@ -1907,8 +1920,9 @@ void CIncEulerSolver::Upwind_Residual(CGeometry *geometry, CSolver **solver_cont
Vector_j[iDim] = 0.5*(geometry->node[iPoint]->GetCoord(iDim) - geometry->node[jPoint]->GetCoord(iDim));
}
- Gradient_i = nodes->GetGradient_Primitive(iPoint);
- Gradient_j = nodes->GetGradient_Primitive(jPoint);
+ Gradient_i = nodes->GetGradient_Reconstruction(iPoint);
+ Gradient_j = nodes->GetGradient_Reconstruction(jPoint);
+
if (limiter) {
Limiter_i = nodes->GetLimiter_Primitive(iPoint);
Limiter_j = nodes->GetLimiter_Primitive(jPoint);
@@ -1916,10 +1930,9 @@ void CIncEulerSolver::Upwind_Residual(CGeometry *geometry, CSolver **solver_cont
for (iVar = 0; iVar < nPrimVarGrad; iVar++) {
Project_Grad_i = 0.0; Project_Grad_j = 0.0;
- Non_Physical = nodes->GetNon_Physical(iPoint)*nodes->GetNon_Physical(jPoint);
for (iDim = 0; iDim < nDim; iDim++) {
- Project_Grad_i += Vector_i[iDim]*Gradient_i[iVar][iDim]*Non_Physical;
- Project_Grad_j += Vector_j[iDim]*Gradient_j[iVar][iDim]*Non_Physical;
+ Project_Grad_i += Vector_i[iDim]*Gradient_i[iVar][iDim];
+ Project_Grad_j += Vector_j[iDim]*Gradient_j[iVar][iDim];
}
if (limiter) {
if (van_albada){
@@ -1940,6 +1953,47 @@ void CIncEulerSolver::Upwind_Residual(CGeometry *geometry, CSolver **solver_cont
Primitive_j[iVar] = V_j[iVar];
}
+ /*--- Check for non-physical solutions after reconstruction. If found,
+ use the cell-average value of the solution. This results in a locally
+ first-order approximation, but this is typically only active
+ during the start-up of a calculation or difficult transients. For
+ incompressible flow, only the temperature and density need to be
+ checked. Pressure is the dynamic pressure (can be negative). ---*/
+
+ if (config->GetEnergy_Equation()) {
+ bool neg_temperature_i = (Primitive_i[nDim+1] < 0.0);
+ bool neg_temperature_j = (Primitive_j[nDim+1] < 0.0);
+
+ bool neg_density_i = (Primitive_i[nDim+2] < 0.0);
+ bool neg_density_j = (Primitive_j[nDim+2] < 0.0);
+
+ if (neg_density_i || neg_temperature_i) {
+ nodes->SetNon_Physical(iPoint, true);
+ } else {
+ nodes->SetNon_Physical(iPoint, false);
+ }
+
+ if (neg_density_j || neg_temperature_j) {
+ nodes->SetNon_Physical(jPoint, true);
+ } else {
+ nodes->SetNon_Physical(jPoint, false);
+ }
+
+ /* Lastly, check for existing first-order points still active
+ from previous iterations. */
+
+ if (nodes->GetNon_Physical(iPoint)) {
+ counter_local++;
+ for (iVar = 0; iVar < nPrimVar; iVar++)
+ Primitive_i[iVar] = V_i[iVar];
+ }
+ if (nodes->GetNon_Physical(jPoint)) {
+ counter_local++;
+ for (iVar = 0; iVar < nPrimVar; iVar++)
+ Primitive_j[iVar] = V_j[iVar];
+ }
+ }
+
numerics->SetPrimitive(Primitive_i, Primitive_j);
} else {
@@ -3441,20 +3495,20 @@ void CIncEulerSolver::ImplicitEuler_Iteration(CGeometry *geometry, CSolver **sol
IterLinSol = System.Solve(Jacobian, LinSysRes, LinSysSol, geometry, config);
- /*--- The the number of iterations of the linear solver ---*/
+ /*--- Store the value of the residual. ---*/
- SetIterLinSolver(IterLinSol);
+ SetResLinSolver(System.GetResidual());
- /*--- Set the residual --- */
+ /*--- The the number of iterations of the linear solver ---*/
- valResidual = System.GetResidual();
+ SetIterLinSolver(IterLinSol);
/*--- Update solution (system written in terms of increments) ---*/
if (!adjoint) {
for (iPoint = 0; iPoint < nPointDomain; iPoint++) {
for (iVar = 0; iVar < nVar; iVar++) {
- nodes->AddSolution(iPoint,iVar, config->GetRelaxation_Factor_Flow()*LinSysSol[iPoint*nVar+iVar]);
+ nodes->AddSolution(iPoint, iVar, nodes->GetUnderRelaxation(iPoint)*LinSysSol[iPoint*nVar+iVar]);
}
}
}
@@ -3479,7 +3533,51 @@ void CIncEulerSolver::ImplicitEuler_Iteration(CGeometry *geometry, CSolver **sol
}
-void CIncEulerSolver::SetPrimitive_Gradient_GG(CGeometry *geometry, CConfig *config) {
+void CIncEulerSolver::ComputeUnderRelaxationFactor(CSolver **solver_container, CConfig *config) {
+
+ /* Loop over the solution update given by relaxing the linear
+ system for this nonlinear iteration. */
+
+ su2double localUnderRelaxation = 1.0;
+ const su2double allowableRatio = 0.2;
+ for (unsigned long iPoint = 0; iPoint < nPointDomain; iPoint++) {
+
+ localUnderRelaxation = 1.0;
+ for (unsigned short iVar = 0; iVar < nVar; iVar++) {
+
+ /* We impose a limit on the maximum percentage that the
+ temperature can change over a nonlinear iteration. */
+
+ if ((config->GetEnergy_Equation() && (iVar == nVar-1))) {
+ const unsigned long index = iPoint*nVar + iVar;
+ su2double ratio = fabs(LinSysSol[index])/(nodes->GetSolution(iPoint, iVar)+EPS);
+ if (ratio > allowableRatio) {
+ localUnderRelaxation = min(allowableRatio/ratio, localUnderRelaxation);
+ }
+ }
+ }
+
+ /* In case of turbulence, take the min of the under-relaxation factor
+ between the mean flow and the turb model. */
+
+ if (config->GetKind_Turb_Model() != NONE)
+ localUnderRelaxation = min(localUnderRelaxation, solver_container[TURB_SOL]->GetNodes()->GetUnderRelaxation(iPoint));
+
+ /* Threshold the relaxation factor in the event that there is
+ a very small value. This helps avoid catastrophic crashes due
+ to non-realizable states by canceling the update. */
+
+ if (localUnderRelaxation < 1e-10) localUnderRelaxation = 0.0;
+
+ /* Store the under-relaxation factor for this point. */
+
+ nodes->SetUnderRelaxation(iPoint, localUnderRelaxation);
+
+ }
+
+}
+
+void CIncEulerSolver::SetPrimitive_Gradient_GG(CGeometry *geometry, CConfig *config, bool reconstruction) {
unsigned long iPoint, jPoint, iEdge, iVertex;
unsigned short iDim, iVar, iMarker;
su2double *PrimVar_Vertex, *PrimVar_i, *PrimVar_j, PrimVar_Average,
@@ -3556,8 +3654,11 @@ void CIncEulerSolver::SetPrimitive_Gradient_GG(CGeometry *geometry, CConfig *con
for (iVar = 0; iVar < nPrimVarGrad; iVar++) {
for (iDim = 0; iDim < nDim; iDim++) {
- Partial_Gradient = nodes->GetGradient_Primitive(iPoint,iVar, iDim)/Vol;
- nodes->SetGradient_Primitive(iPoint,iVar, iDim, Partial_Gradient);
+ Partial_Gradient = nodes->GetGradient_Primitive(iPoint, iVar, iDim)/Vol;
+ if (reconstruction)
+ nodes->SetGradient_Reconstruction(iPoint, iVar, iDim, Partial_Gradient);
+ else
+ nodes->SetGradient_Primitive(iPoint, iVar, iDim, Partial_Gradient);
}
}
}
@@ -3573,7 +3674,7 @@ void CIncEulerSolver::SetPrimitive_Gradient_GG(CGeometry *geometry, CConfig *con
}
-void CIncEulerSolver::SetPrimitive_Gradient_LS(CGeometry *geometry, CConfig *config) {
+void CIncEulerSolver::SetPrimitive_Gradient_LS(CGeometry *geometry, CConfig *config, bool reconstruction) {
unsigned short iVar, iDim, jDim, iNeigh;
unsigned long iPoint, jPoint;
@@ -3582,6 +3683,16 @@ void CIncEulerSolver::SetPrimitive_Gradient_LS(CGeometry *geometry, CConfig *con
su2double z11, z12, z13, z22, z23, z33, detR2;
bool singular;
+ /*--- Set a flag for unweighted or weighted least-squares. ---*/
+
+ bool weighted = true;
+ if (reconstruction) {
+ if (config->GetKind_Gradient_Method_Recon() == LEAST_SQUARES)
+ weighted = false;
+ } else if (config->GetKind_Gradient_Method() == LEAST_SQUARES) {
+ weighted = false;
+ }
+
/*--- Clear Rmatrix, which could eventually be computed once
and stored for static meshes, as well as the prim gradient. ---*/
@@ -3625,9 +3736,13 @@ void CIncEulerSolver::SetPrimitive_Gradient_LS(CGeometry *geometry, CConfig *con
AD::SetPreaccIn(Coord_j, nDim);
AD::SetPreaccIn(PrimVar_j, nPrimVarGrad);
- weight = 0.0;
- for (iDim = 0; iDim < nDim; iDim++)
- weight += (Coord_j[iDim]-Coord_i[iDim])*(Coord_j[iDim]-Coord_i[iDim]);
+ if (weighted) {
+ weight = 0.0;
+ for (iDim = 0; iDim < nDim; iDim++)
+ weight += (Coord_j[iDim]-Coord_i[iDim])*(Coord_j[iDim]-Coord_i[iDim]);
+ } else {
+ weight = 1.0;
+ }
/*--- Sumations for entries of upper triangular matrix R ---*/
@@ -3662,8 +3777,13 @@ void CIncEulerSolver::SetPrimitive_Gradient_LS(CGeometry *geometry, CConfig *con
/*--- Correct the gradient values across any periodic boundaries. ---*/
for (unsigned short iPeriodic = 1; iPeriodic <= config->GetnMarker_Periodic()/2; iPeriodic++) {
- InitiatePeriodicComms(geometry, config, iPeriodic, PERIODIC_PRIM_LS);
- CompletePeriodicComms(geometry, config, iPeriodic, PERIODIC_PRIM_LS);
+ if (weighted) {
+ InitiatePeriodicComms(geometry, config, iPeriodic, PERIODIC_PRIM_LS);
+ CompletePeriodicComms(geometry, config, iPeriodic, PERIODIC_PRIM_LS);
+ } else {
+ InitiatePeriodicComms(geometry, config, iPeriodic, PERIODIC_PRIM_ULS);
+ CompletePeriodicComms(geometry, config, iPeriodic, PERIODIC_PRIM_ULS);
+ }
}
/*--- Second loop over points of the grid to compute final gradient ---*/
@@ -3761,7 +3881,10 @@ void CIncEulerSolver::SetPrimitive_Gradient_LS(CGeometry *geometry, CConfig *con
for (iVar = 0; iVar < nPrimVarGrad; iVar++) {
for (iDim = 0; iDim < nDim; iDim++) {
- nodes->SetGradient_Primitive(iPoint,iVar, iDim, Cvector[iVar][iDim]);
+ if (reconstruction)
+ nodes->SetGradient_Reconstruction(iPoint, iVar, iDim, Cvector[iVar][iDim]);
+ else
+ nodes->SetGradient_Primitive(iPoint, iVar, iDim, Cvector[iVar][iDim]);
}
}
@@ -3863,8 +3986,8 @@ void CIncEulerSolver::SetPrimitive_Limiter(CGeometry *geometry, CConfig *config)
iPoint = geometry->edge[iEdge]->GetNode(0);
jPoint = geometry->edge[iEdge]->GetNode(1);
- Gradient_i = nodes->GetGradient_Primitive(iPoint);
- Gradient_j = nodes->GetGradient_Primitive(jPoint);
+ Gradient_i = nodes->GetGradient_Reconstruction(iPoint);
+ Gradient_j = nodes->GetGradient_Reconstruction(jPoint);
Coord_i = geometry->node[iPoint]->GetCoord();
Coord_j = geometry->node[jPoint]->GetCoord();
@@ -6731,8 +6854,7 @@ CIncNSSolver::CIncNSSolver(CGeometry *geometry, CConfig *config, unsigned short
gradients by least squares, S matrix := inv(R)*traspose(inv(R)),
c vector := transpose(WA)*(Wb) ---*/
- if (config->GetKind_Gradient_Method() == WEIGHTED_LEAST_SQUARES) {
-
+ if (config->GetLeastSquaresRequired()) {
Smatrix = new su2double* [nDim];
for (iDim = 0; iDim < nDim; iDim++)
Smatrix[iDim] = new su2double [nDim];
@@ -7100,6 +7222,16 @@ CIncNSSolver::CIncNSSolver(CGeometry *geometry, CConfig *config, unsigned short
InitiateComms(geometry, config, SOLUTION);
CompleteComms(geometry, config, SOLUTION);
+ /* Store the initial CFL number for all grid points. */
+
+ const su2double CFL = config->GetCFL(MGLevel);
+ for (iPoint = 0; iPoint < nPoint; iPoint++) {
+ nodes->SetLocalCFL(iPoint, CFL);
+ }
+ Min_CFL_Local = CFL;
+ Max_CFL_Local = CFL;
+ Avg_CFL_Local = CFL;
+
/*--- Add the solver name (max 8 characters) ---*/
SolverName = "INC.FLOW";
@@ -7188,6 +7320,17 @@ void CIncNSSolver::Preprocessing(CGeometry *geometry, CSolver **solver_container
ErrorCounter = SetPrimitive_Variables(solver_container, config, Output);
+ /*--- Compute gradient for MUSCL reconstruction. ---*/
+
+if (config->GetReconstructionGradientRequired() && (iMesh == MESH_0)) {
+ if (config->GetKind_Gradient_Method_Recon() == GREEN_GAUSS)
+ SetPrimitive_Gradient_GG(geometry, config, true);
+ if (config->GetKind_Gradient_Method_Recon() == LEAST_SQUARES)
+ SetPrimitive_Gradient_LS(geometry, config, true);
+ if (config->GetKind_Gradient_Method_Recon() == WEIGHTED_LEAST_SQUARES)
+ SetPrimitive_Gradient_LS(geometry, config, true);
+ }
+
/*--- Compute gradient of the primitive variables ---*/
if (config->GetKind_Gradient_Method() == GREEN_GAUSS) {
@@ -7267,7 +7410,7 @@ void CIncNSSolver::Preprocessing(CGeometry *geometry, CSolver **solver_container
unsigned long CIncNSSolver::SetPrimitive_Variables(CSolver **solver_container, CConfig *config, bool Output) {
- unsigned long iPoint, ErrorCounter = 0;
+ unsigned long iPoint, nonPhysicalPoints = 0;
su2double eddy_visc = 0.0, turb_ke = 0.0, DES_LengthScale = 0.0;
unsigned short turb_model = config->GetKind_Turb_Model();
bool physical = true;
@@ -7286,18 +7429,14 @@ unsigned long CIncNSSolver::SetPrimitive_Variables(CSolver **solver_container, C
DES_LengthScale = solver_container[TURB_SOL]->GetNodes()->GetDES_LengthScale(iPoint);
}
}
-
- /*--- Initialize the non-physical points vector ---*/
-
- nodes->SetNon_Physical(iPoint,false);
-
+
/*--- Incompressible flow, primitive variables --- */
physical = static_cast(nodes)->SetPrimVar(iPoint,eddy_visc, turb_ke, FluidModel);
- /*--- Record any non-physical points. ---*/
+ /* Check for non-realizable states for reporting. */
- if (!physical) { nodes->SetNon_Physical(iPoint,true); ErrorCounter++; }
+ if (!physical) nonPhysicalPoints++;
/*--- Set the DES length scale ---*/
@@ -7309,7 +7448,7 @@ unsigned long CIncNSSolver::SetPrimitive_Variables(CSolver **solver_container, C
}
- return ErrorCounter;
+ return nonPhysicalPoints;
}
@@ -7326,7 +7465,7 @@ void CIncNSSolver::SetTime_Step(CGeometry *geometry, CSolver **solver_container,
(config->GetTime_Marching() == DT_STEPPING_2ND));
bool energy = config->GetEnergy_Equation();
- Min_Delta_Time = 1.E6; Max_Delta_Time = 0.0;
+ Min_Delta_Time = 1.E30; Max_Delta_Time = 0.0;
/*--- Set maximum inviscid eigenvalue to zero, and compute sound speed and viscosity ---*/
@@ -7454,8 +7593,8 @@ void CIncNSSolver::SetTime_Step(CGeometry *geometry, CSolver **solver_container,
Vol = geometry->node[iPoint]->GetVolume();
if (Vol != 0.0) {
- Local_Delta_Time = config->GetCFL(iMesh)*Vol / nodes->GetMax_Lambda_Inv(iPoint);
- Local_Delta_Time_Visc = config->GetCFL(iMesh)*K_v*Vol*Vol/ nodes->GetMax_Lambda_Visc(iPoint);
+ Local_Delta_Time = nodes->GetLocalCFL(iPoint)*Vol / nodes->GetMax_Lambda_Inv(iPoint);
+ Local_Delta_Time_Visc = nodes->GetLocalCFL(iPoint)*K_v*Vol*Vol/ nodes->GetMax_Lambda_Visc(iPoint);
Local_Delta_Time = min(Local_Delta_Time, Local_Delta_Time_Visc);
Global_Delta_Time = min(Global_Delta_Time, Local_Delta_Time);
Min_Delta_Time = min(Min_Delta_Time, Local_Delta_Time);
@@ -7495,14 +7634,34 @@ void CIncNSSolver::SetTime_Step(CGeometry *geometry, CSolver **solver_container,
SU2_MPI::Bcast(&rbuf_time, 1, MPI_DOUBLE, MASTER_NODE, MPI_COMM_WORLD);
Global_Delta_Time = rbuf_time;
#endif
- for (iPoint = 0; iPoint < nPointDomain; iPoint++)
- nodes->SetDelta_Time(iPoint,Global_Delta_Time);
+ /*--- If the unsteady CFL is set to zero, it uses the defined
+ unsteady time step, otherwise it computes the time step based
+ on the unsteady CFL ---*/
+
+ if (config->GetUnst_CFL() == 0.0) {
+ Global_Delta_Time = config->GetDelta_UnstTime();
+ }
+ config->SetDelta_UnstTimeND(Global_Delta_Time);
+ for (iPoint = 0; iPoint < nPointDomain; iPoint++){
+
+ /*--- Sets the regular CFL equal to the unsteady CFL ---*/
+
+ nodes->SetLocalCFL(iPoint, config->GetUnst_CFL());
+ nodes->SetDelta_Time(iPoint, Global_Delta_Time);
+ Min_Delta_Time = Global_Delta_Time;
+ Max_Delta_Time = Global_Delta_Time;
+
+ }
}
/*--- Recompute the unsteady time step for the dual time strategy
if the unsteady CFL is diferent from 0 ---*/
if ((dual_time) && (Iteration == 0) && (config->GetUnst_CFL() != 0.0) && (iMesh == MESH_0)) {
- Global_Delta_UnstTimeND = config->GetUnst_CFL()*Global_Delta_Time/config->GetCFL(iMesh);
+
+ Global_Delta_UnstTimeND = 1e30;
+ for (iPoint = 0; iPoint < nPointDomain; iPoint++){
+ Global_Delta_UnstTimeND = min(Global_Delta_UnstTimeND,config->GetUnst_CFL()*Global_Delta_Time/nodes->GetLocalCFL(iPoint));
+ }
#ifdef HAVE_MPI
su2double rbuf_time, sbuf_time;
diff --git a/SU2_CFD/src/solver_direct_transition.cpp b/SU2_CFD/src/solver_direct_transition.cpp
index 58dd46efba64..c2e2952b9c56 100644
--- a/SU2_CFD/src/solver_direct_transition.cpp
+++ b/SU2_CFD/src/solver_direct_transition.cpp
@@ -113,18 +113,18 @@ CTransLMSolver::CTransLMSolver(CGeometry *geometry, CConfig *config, unsigned sh
}
- /*--- Computation of gradients by least squares ---*/
- if (config->GetKind_Gradient_Method() == WEIGHTED_LEAST_SQUARES) {
- /*--- S matrix := inv(R)*traspose(inv(R)) ---*/
- Smatrix = new su2double* [nDim];
- for (iDim = 0; iDim < nDim; iDim++)
- Smatrix[iDim] = new su2double [nDim];
- /*--- c vector := transpose(WA)*(Wb) ---*/
- Cvector = new su2double* [nVar];
- for (iVar = 0; iVar < nVar; iVar++)
- Cvector[iVar] = new su2double [nDim];
- }
-
+ /*--- Computation of gradients by least squares ---*/
+ if (config->GetLeastSquaresRequired()) {
+ /*--- S matrix := inv(R)*traspose(inv(R)) ---*/
+ Smatrix = new su2double* [nDim];
+ for (iDim = 0; iDim < nDim; iDim++)
+ Smatrix[iDim] = new su2double [nDim];
+ /*--- c vector := transpose(WA)*(Wb) ---*/
+ Cvector = new su2double* [nVar];
+ for (iVar = 0; iVar < nVar; iVar++)
+ Cvector[iVar] = new su2double [nDim];
+ }
+
/*--- Read farfield conditions from config ---*/
Intermittency_Inf = config->GetIntermittency_FreeStream();
tu_Inf = config->GetTurbulenceIntensity_FreeStream();
diff --git a/SU2_CFD/src/solver_direct_turbulent.cpp b/SU2_CFD/src/solver_direct_turbulent.cpp
index 7886ec3f3ec5..8c7bcda58a7d 100644
--- a/SU2_CFD/src/solver_direct_turbulent.cpp
+++ b/SU2_CFD/src/solver_direct_turbulent.cpp
@@ -137,8 +137,9 @@ void CTurbSolver::Upwind_Residual(CGeometry *geometry, CSolver **solver_containe
/*--- Mean flow primitive variables using gradient reconstruction and limiters ---*/
- Gradient_i = solver_container[FLOW_SOL]->GetNodes()->GetGradient_Primitive(iPoint);
- Gradient_j = solver_container[FLOW_SOL]->GetNodes()->GetGradient_Primitive(jPoint);
+ Gradient_i = solver_container[FLOW_SOL]->GetNodes()->GetGradient_Reconstruction(iPoint);
+ Gradient_j = solver_container[FLOW_SOL]->GetNodes()->GetGradient_Reconstruction(jPoint);
+
if (limiter) {
Limiter_i = solver_container[FLOW_SOL]->GetNodes()->GetLimiter_Primitive(iPoint);
Limiter_j = solver_container[FLOW_SOL]->GetNodes()->GetLimiter_Primitive(jPoint);
@@ -164,8 +165,9 @@ void CTurbSolver::Upwind_Residual(CGeometry *geometry, CSolver **solver_containe
/*--- Turbulent variables using gradient reconstruction and limiters ---*/
- Gradient_i = nodes->GetGradient(iPoint);
- Gradient_j = nodes->GetGradient(jPoint);
+ Gradient_i = nodes->GetGradient_Reconstruction(iPoint);
+ Gradient_j = nodes->GetGradient_Reconstruction(jPoint);
+
if (limiter) {
Limiter_i = nodes->GetLimiter(iPoint);
Limiter_j = nodes->GetLimiter(jPoint);
@@ -379,7 +381,7 @@ void CTurbSolver::ImplicitEuler_Iteration(CGeometry *geometry, CSolver **solver_
/*--- Modify matrix diagonal to assure diagonal dominance ---*/
- Delta = Vol / (config->GetCFLRedCoeff_Turb()*solver_container[FLOW_SOL]->GetNodes()->GetDelta_Time(iPoint));
+ Delta = Vol / ((nodes->GetLocalCFL(iPoint)/solver_container[FLOW_SOL]->GetNodes()->GetLocalCFL(iPoint))*solver_container[FLOW_SOL]->GetNodes()->GetDelta_Time(iPoint));
Jacobian.AddVal2Diag(iPoint, Delta);
/*--- Right hand side of the system (-Residual) and initial guess (x = 0) ---*/
@@ -405,28 +407,27 @@ void CTurbSolver::ImplicitEuler_Iteration(CGeometry *geometry, CSolver **solver_
/*--- Solve or smooth the linear system ---*/
- System.Solve(Jacobian, LinSysRes, LinSysSol, geometry, config);
+ unsigned long IterLinSol = System.Solve(Jacobian, LinSysRes, LinSysSol, geometry, config);
+ SetIterLinSolver(IterLinSol);
+
+ /*--- Store the value of the residual. ---*/
+
+ SetResLinSolver(System.GetResidual());
+
+ ComputeUnderRelaxationFactor(solver_container, config);
/*--- Update solution (system written in terms of increments) ---*/
if (!adjoint) {
- /*--- Update and clip trubulent solution ---*/
+ /*--- Update the turbulent solution. Only SST variants are clipped. ---*/
switch (config->GetKind_Turb_Model()) {
- case SA: case SA_E: case SA_COMP: case SA_E_COMP:
-
- for (iPoint = 0; iPoint < nPointDomain; iPoint++) {
- nodes->AddClippedSolution(iPoint,0, config->GetRelaxation_Factor_Turb()*LinSysSol[iPoint], lowerlimit[0], upperlimit[0]);
- }
-
- break;
-
- case SA_NEG:
+ case SA: case SA_E: case SA_COMP: case SA_E_COMP: case SA_NEG:
for (iPoint = 0; iPoint < nPointDomain; iPoint++) {
- nodes->AddSolution(iPoint,0, config->GetRelaxation_Factor_Turb()*LinSysSol[iPoint]);
+ nodes->AddSolution(iPoint, 0, nodes->GetUnderRelaxation(iPoint)*LinSysSol[iPoint]);
}
break;
@@ -445,7 +446,7 @@ void CTurbSolver::ImplicitEuler_Iteration(CGeometry *geometry, CSolver **solver_
}
for (iVar = 0; iVar < nVar; iVar++) {
- nodes->AddConservativeSolution(iPoint,iVar, config->GetRelaxation_Factor_Turb()*LinSysSol[iPoint*nVar+iVar], density, density_old, lowerlimit[iVar], upperlimit[iVar]);
+ nodes->AddConservativeSolution(iPoint, iVar, nodes->GetUnderRelaxation(iPoint)*LinSysSol[iPoint*nVar+iVar], density, density_old, lowerlimit[iVar], upperlimit[iVar]);
}
}
@@ -471,6 +472,62 @@ void CTurbSolver::ImplicitEuler_Iteration(CGeometry *geometry, CSolver **solver_
}
+void CTurbSolver::ComputeUnderRelaxationFactor(CSolver **solver_container, CConfig *config) {
+
+ /* Only apply the turbulent under-relaxation to the SA variants. The
+ SA_NEG model is more robust due to allowing for negative nu_tilde,
+ so the under-relaxation is not applied to that variant. */
+
+ bool sa_model = ((config->GetKind_Turb_Model() == SA) ||
+ (config->GetKind_Turb_Model() == SA_E) ||
+ (config->GetKind_Turb_Model() == SA_COMP) ||
+ (config->GetKind_Turb_Model() == SA_E_COMP));
+
+ /* Loop over the solution update given by relaxing the linear
+ system for this nonlinear iteration. */
+
+ su2double localUnderRelaxation = 1.00;
+ const su2double allowableDecrease = -0.99;
+ const su2double allowableIncrease = 0.99;
+
+ for (unsigned long iPoint = 0; iPoint < nPointDomain; iPoint++) {
+
+ localUnderRelaxation = 1.0;
+ if (sa_model) {
+ for (unsigned short iVar = 0; iVar < nVar; iVar++) {
+
+ /* We impose a limit on the maximum percentage that the
+ turbulence variables can change over a nonlinear iteration. */
+
+ const unsigned long index = iPoint*nVar + iVar;
+ su2double ratio = LinSysSol[index]/(nodes->GetSolution(iPoint, iVar)+EPS);
+ if (ratio > allowableIncrease) {
+ localUnderRelaxation = min(allowableIncrease/ratio, localUnderRelaxation);
+ } else if (ratio < allowableDecrease) {
+ localUnderRelaxation = min(fabs(allowableDecrease)/ratio, localUnderRelaxation);
+ }
+
+ }
+ }
+
+ /* Choose the minimum factor between mean flow and turbulence. */
+
+ localUnderRelaxation = min(localUnderRelaxation, solver_container[FLOW_SOL]->GetNodes()->GetUnderRelaxation(iPoint));
+
+ /* Threshold the relaxation factor in the event that there is
+ a very small value. This helps avoid catastrophic crashes due
+ to non-realizable states by canceling the update. */
+
+ if (localUnderRelaxation < 1e-10) localUnderRelaxation = 0.0;
+
+ /* Store the under-relaxation factor for this point. */
+
+ nodes->SetUnderRelaxation(iPoint, localUnderRelaxation);
+
+ }
+
+}
+
void CTurbSolver::SetResidual_DualTime(CGeometry *geometry, CSolver **solver_container, CConfig *config,
unsigned short iRKStep, unsigned short iMesh, unsigned short RunTime_EqSystem) {
@@ -981,14 +1038,13 @@ CTurbSASolver::CTurbSASolver(CGeometry *geometry, CConfig *config, unsigned shor
/*--- Computation of gradients by least squares ---*/
- if (config->GetKind_Gradient_Method() == WEIGHTED_LEAST_SQUARES) {
+ if (config->GetLeastSquaresRequired()) {
/*--- S matrix := inv(R)*traspose(inv(R)) ---*/
Smatrix = new su2double* [nDim];
for (iDim = 0; iDim < nDim; iDim++)
Smatrix[iDim] = new su2double [nDim];
/*--- c vector := transpose(WA)*(Wb) ---*/
-
Cvector = new su2double* [nVar];
for (iVar = 0; iVar < nVar; iVar++)
Cvector[iVar] = new su2double [nDim];
@@ -1010,15 +1066,6 @@ CTurbSASolver::CTurbSASolver(CGeometry *geometry, CConfig *config, unsigned shor
}
}
-
- /*--- Initialize lower and upper limits---*/
-
- lowerlimit = new su2double[nVar];
- upperlimit = new su2double[nVar];
-
- lowerlimit[0] = 1.0e-10;
- upperlimit[0] = 1.0;
-
/*--- Read farfield conditions from config ---*/
@@ -1107,8 +1154,19 @@ CTurbSASolver::CTurbSASolver(CGeometry *geometry, CConfig *config, unsigned shor
SetImplicitPeriodic(true);
+ /* Store the initial CFL number for all grid points. */
+
+ const su2double CFL = config->GetCFL(MGLevel);
+ for (iPoint = 0; iPoint < nPoint; iPoint++) {
+ nodes->SetLocalCFL(iPoint, CFL);
+ }
+ Min_CFL_Local = CFL;
+ Max_CFL_Local = CFL;
+ Avg_CFL_Local = CFL;
+
/*--- Add the solver name (max 8 characters) ---*/
SolverName = "SA";
+
}
CTurbSASolver::~CTurbSASolver(void) {
@@ -1162,11 +1220,19 @@ void CTurbSASolver::Preprocessing(CGeometry *geometry, CSolver **solver_containe
Jacobian.SetValZero();
+ /*--- Upwind second order reconstruction and gradients ---*/
+
+ if (config->GetReconstructionGradientRequired()) {
+ if (config->GetKind_Gradient_Method_Recon() == GREEN_GAUSS)
+ SetSolution_Gradient_GG(geometry, config, true);
+ if (config->GetKind_Gradient_Method_Recon() == LEAST_SQUARES)
+ SetSolution_Gradient_LS(geometry, config, true);
+ if (config->GetKind_Gradient_Method_Recon() == WEIGHTED_LEAST_SQUARES)
+ SetSolution_Gradient_LS(geometry, config, true);
+ }
if (config->GetKind_Gradient_Method() == GREEN_GAUSS) SetSolution_Gradient_GG(geometry, config);
if (config->GetKind_Gradient_Method() == WEIGHTED_LEAST_SQUARES) SetSolution_Gradient_LS(geometry, config);
- /*--- Upwind second order reconstruction ---*/
-
if (limiter_turb) SetSolution_Limiter(geometry, config);
if (kind_hybridRANSLES != NO_HYBRIDRANSLES){
@@ -3317,7 +3383,7 @@ CTurbSSTSolver::CTurbSSTSolver(CGeometry *geometry, CConfig *config, unsigned sh
/*--- Computation of gradients by least squares ---*/
- if (config->GetKind_Gradient_Method() == WEIGHTED_LEAST_SQUARES) {
+ if (config->GetLeastSquaresRequired()) {
/*--- S matrix := inv(R)*traspose(inv(R)) ---*/
Smatrix = new su2double* [nDim];
for (iDim = 0; iDim < nDim; iDim++)
@@ -3426,7 +3492,17 @@ CTurbSSTSolver::CTurbSSTSolver(CGeometry *geometry, CConfig *config, unsigned sh
implicit flag in case we have periodic BCs. ---*/
SetImplicitPeriodic(true);
-
+
+ /* Store the initial CFL number for all grid points. */
+
+ const su2double CFL = config->GetCFL(MGLevel);
+ for (iPoint = 0; iPoint < nPoint; iPoint++) {
+ nodes->SetLocalCFL(iPoint, CFL);
+ }
+ Min_CFL_Local = CFL;
+ Max_CFL_Local = CFL;
+ Avg_CFL_Local = CFL;
+
/*--- Add the solver name (max 8 characters) ---*/
SolverName = "K-W SST";
@@ -3482,9 +3558,17 @@ void CTurbSSTSolver::Preprocessing(CGeometry *geometry, CSolver **solver_contain
/*--- Initialize the Jacobian matrices ---*/
Jacobian.SetValZero();
-
- /*--- Upwind second order reconstruction ---*/
+ /*--- Upwind second order reconstruction and gradients ---*/
+
+ if (config->GetReconstructionGradientRequired()) {
+ if (config->GetKind_Gradient_Method_Recon() == GREEN_GAUSS)
+ SetSolution_Gradient_GG(geometry, config, true);
+ if (config->GetKind_Gradient_Method_Recon() == LEAST_SQUARES)
+ SetSolution_Gradient_LS(geometry, config, true);
+ if (config->GetKind_Gradient_Method_Recon() == WEIGHTED_LEAST_SQUARES)
+ SetSolution_Gradient_LS(geometry, config, true);
+ }
if (config->GetKind_Gradient_Method() == GREEN_GAUSS) SetSolution_Gradient_GG(geometry, config);
if (config->GetKind_Gradient_Method() == WEIGHTED_LEAST_SQUARES) SetSolution_Gradient_LS(geometry, config);
@@ -3493,7 +3577,7 @@ void CTurbSSTSolver::Preprocessing(CGeometry *geometry, CSolver **solver_contain
}
void CTurbSSTSolver::Postprocessing(CGeometry *geometry, CSolver **solver_container, CConfig *config, unsigned short iMesh) {
- su2double rho = 0.0, mu = 0.0, dist, omega, kine, strMag, F2, muT, zeta;
+ su2double rho = 0.0, mu = 0.0, dist, omega, kine, F2, muT, zeta;
su2double a1 = constants[7];
unsigned long iPoint;
@@ -3515,8 +3599,11 @@ void CTurbSSTSolver::Postprocessing(CGeometry *geometry, CSolver **solver_contai
dist = geometry->node[iPoint]->GetWall_Distance();
- strMag = solver_container[FLOW_SOL]->GetNodes()->GetStrainMag(iPoint);
-
+ su2double *Vorticity = solver_container[FLOW_SOL]->GetNodes()->GetVorticity(iPoint);
+ su2double VorticityMag = sqrt(Vorticity[0]*Vorticity[0] +
+ Vorticity[1]*Vorticity[1] +
+ Vorticity[2]*Vorticity[2]);
+
nodes->SetBlendingFunc(iPoint,mu, dist, rho);
F2 = nodes->GetF2blending(iPoint);
@@ -3525,8 +3612,8 @@ void CTurbSSTSolver::Postprocessing(CGeometry *geometry, CSolver **solver_contai
kine = nodes->GetSolution(iPoint,0);
omega = nodes->GetSolution(iPoint,1);
- zeta = min(1.0/omega, a1/(strMag*F2));
- muT = min(max(rho*kine*zeta,0.0),1.0);
+ zeta = min(1.0/omega, a1/(VorticityMag*F2));
+ muT = max(rho*kine*zeta,0.0);
nodes->SetmuT(iPoint,muT);
}
diff --git a/SU2_CFD/src/solver_structure.cpp b/SU2_CFD/src/solver_structure.cpp
index fd673aff86b5..3264606200f5 100644
--- a/SU2_CFD/src/solver_structure.cpp
+++ b/SU2_CFD/src/solver_structure.cpp
@@ -50,6 +50,7 @@
#include "../../Common/include/toolboxes/MMS/CTGVSolution.hpp"
#include "../../Common/include/toolboxes/MMS/CUserDefinedSolution.hpp"
#include "../../Common/include/toolboxes/printing_toolbox.hpp"
+#include "../include/CMarkerProfileReaderFVM.hpp"
CSolver::CSolver(bool mesh_deform_mode) : System(mesh_deform_mode) {
@@ -104,15 +105,7 @@ CSolver::CSolver(bool mesh_deform_mode) : System(mesh_deform_mode) {
Restart_Data = NULL;
base_nodes = nullptr;
nOutputVariables = 0;
- valResidual = 0.0;
-
-
- /*--- Inlet profile data structures. ---*/
-
- nRowCum_InletFile = NULL;
- nRow_InletFile = NULL;
- nCol_InletFile = NULL;
- Inlet_Data = NULL;
+ ResLinSolver = 0.0;
/*--- Variable initialization to avoid valgrid warnings when not used. ---*/
@@ -137,6 +130,13 @@ CSolver::CSolver(bool mesh_deform_mode) : System(mesh_deform_mode) {
VertexTraction = NULL;
VertexTractionAdjoint = NULL;
+ /*--- Auxiliary data needed for CFL adaption. ---*/
+
+ NonLinRes_Value = 0;
+ NonLinRes_Func = 0;
+ Old_Func = 0;
+ New_Func = 0;
+ NonLinRes_Counter = 0;
nPrimVarGrad = 0;
nPrimVar = 0;
@@ -268,11 +268,6 @@ CSolver::~CSolver(void) {
if (Restart_Vars != NULL) {delete [] Restart_Vars; Restart_Vars = NULL;}
if (Restart_Data != NULL) {delete [] Restart_Data; Restart_Data = NULL;}
- if (nRowCum_InletFile != NULL) {delete [] nRowCum_InletFile; nRowCum_InletFile = NULL;}
- if (nRow_InletFile != NULL) {delete [] nRow_InletFile; nRow_InletFile = NULL;}
- if (nCol_InletFile != NULL) {delete [] nCol_InletFile; nCol_InletFile = NULL;}
- if (Inlet_Data != NULL) {delete [] Inlet_Data; Inlet_Data = NULL;}
-
if (VerificationSolution != NULL) {delete VerificationSolution; VerificationSolution = NULL;}
}
@@ -285,7 +280,8 @@ void CSolver::InitiatePeriodicComms(CGeometry *geometry,
/*--- Local variables ---*/
bool boundary_i, boundary_j;
-
+ bool weighted = true;
+
unsigned short iVar, jVar, iDim;
unsigned short iNeighbor, nNeighbor = 0;
unsigned short COUNT_PER_POINT = 0;
@@ -356,11 +352,11 @@ void CSolver::InitiatePeriodicComms(CGeometry *geometry,
ICOUNT = nPrimVarGrad;
JCOUNT = nDim;
break;
- case PERIODIC_SOL_LS:
+ case PERIODIC_SOL_LS: case PERIODIC_SOL_ULS:
COUNT_PER_POINT = nDim*nDim + nVar*nDim;
MPI_TYPE = COMM_TYPE_DOUBLE;
break;
- case PERIODIC_PRIM_LS:
+ case PERIODIC_PRIM_LS: case PERIODIC_PRIM_ULS:
COUNT_PER_POINT = nDim*nDim + nPrimVarGrad*nDim;
MPI_TYPE = COMM_TYPE_DOUBLE;
break;
@@ -873,7 +869,7 @@ void CSolver::InitiatePeriodicComms(CGeometry *geometry,
break;
- case PERIODIC_SOL_LS:
+ case PERIODIC_SOL_LS: case PERIODIC_SOL_ULS:
/*--- For L-S gradient calculations with rotational periodicity,
we will need to rotate the x,y,z components. To make the process
@@ -881,6 +877,13 @@ void CSolver::InitiatePeriodicComms(CGeometry *geometry,
neighbor points into their location on the donor marker before
computing the terms that we need to communicate. ---*/
+ /*--- Set a flag for unweighted or weighted least-squares. ---*/
+
+ weighted = true;
+ if (commType == PERIODIC_SOL_ULS) {
+ weighted = false;
+ }
+
/*--- Get coordinates for the current point. ---*/
Coord_i = geometry->node[iPoint]->GetCoord();
@@ -998,10 +1001,14 @@ void CSolver::InitiatePeriodicComms(CGeometry *geometry,
}
}
- weight = 0.0;
- for (iDim = 0; iDim < nDim; iDim++) {
- weight += ((rotCoord_j[iDim]-rotCoord_i[iDim])*
- (rotCoord_j[iDim]-rotCoord_i[iDim]));
+ if (weighted) {
+ weight = 0.0;
+ for (iDim = 0; iDim < nDim; iDim++) {
+ weight += ((rotCoord_j[iDim]-rotCoord_i[iDim])*
+ (rotCoord_j[iDim]-rotCoord_i[iDim]));
+ }
+ } else {
+ weight = 1.0;
}
/*--- Sumations for entries of upper triangular matrix R ---*/
@@ -1071,7 +1078,7 @@ void CSolver::InitiatePeriodicComms(CGeometry *geometry,
break;
- case PERIODIC_PRIM_LS:
+ case PERIODIC_PRIM_LS: case PERIODIC_PRIM_ULS:
/*--- For L-S gradient calculations with rotational periodicity,
we will need to rotate the x,y,z components. To make the process
@@ -1079,6 +1086,13 @@ void CSolver::InitiatePeriodicComms(CGeometry *geometry,
neighbor points into their location on the donor marker before
computing the terms that we need to communicate. ---*/
+ /*--- Set a flag for unweighted or weighted least-squares. ---*/
+
+ weighted = true;
+ if (commType == PERIODIC_PRIM_ULS) {
+ weighted = false;
+ }
+
/*--- Get coordinates ---*/
Coord_i = geometry->node[iPoint]->GetCoord();
@@ -1196,10 +1210,15 @@ void CSolver::InitiatePeriodicComms(CGeometry *geometry,
}
}
- weight = 0.0;
- for (iDim = 0; iDim < nDim; iDim++)
- weight += ((rotCoord_j[iDim]-rotCoord_i[iDim])*
- (rotCoord_j[iDim]-rotCoord_i[iDim]));
+ if (weighted) {
+ weight = 0.0;
+ for (iDim = 0; iDim < nDim; iDim++) {
+ weight += ((rotCoord_j[iDim]-rotCoord_i[iDim])*
+ (rotCoord_j[iDim]-rotCoord_i[iDim]));
+ }
+ } else {
+ weight = 1.0;
+ }
/*--- Sumations for entries of upper triangular matrix R ---*/
@@ -1715,7 +1734,7 @@ void CSolver::CompletePeriodicComms(CGeometry *geometry,
base_nodes->SetGradient_Primitive(iPoint, iVar, iDim, bufDRecv[buf_offset+iVar*nDim+iDim] + base_nodes->GetGradient_Primitive(iPoint, iVar, iDim));
break;
- case PERIODIC_SOL_LS:
+ case PERIODIC_SOL_LS: case PERIODIC_SOL_ULS:
/*--- For L-S, we build the upper triangular matrix and the
r.h.s. vector by accumulating from all periodic partial
@@ -1736,7 +1755,7 @@ void CSolver::CompletePeriodicComms(CGeometry *geometry,
break;
- case PERIODIC_PRIM_LS:
+ case PERIODIC_PRIM_LS: case PERIODIC_PRIM_ULS:
/*--- For L-S, we build the upper triangular matrix and the
r.h.s. vector by accumulating from all periodic partial
@@ -1875,11 +1894,11 @@ void CSolver::InitiateComms(CGeometry *geometry,
MPI_TYPE = COMM_TYPE_DOUBLE;
break;
case SOLUTION_GRADIENT:
- COUNT_PER_POINT = nVar*nDim;
+ COUNT_PER_POINT = nVar*nDim*2;
MPI_TYPE = COMM_TYPE_DOUBLE;
break;
case PRIMITIVE_GRADIENT:
- COUNT_PER_POINT = nPrimVarGrad*nDim;
+ COUNT_PER_POINT = nPrimVarGrad*nDim*2;
MPI_TYPE = COMM_TYPE_DOUBLE;
break;
case PRIMITIVE_LIMITER:
@@ -2007,14 +2026,20 @@ void CSolver::InitiateComms(CGeometry *geometry,
bufDSend[buf_offset] = base_nodes->GetSensor(iPoint);
break;
case SOLUTION_GRADIENT:
- for (iVar = 0; iVar < nVar; iVar++)
- for (iDim = 0; iDim < nDim; iDim++)
+ for (iVar = 0; iVar < nVar; iVar++) {
+ for (iDim = 0; iDim < nDim; iDim++) {
bufDSend[buf_offset+iVar*nDim+iDim] = base_nodes->GetGradient(iPoint, iVar, iDim);
+ bufDSend[buf_offset+iVar*nDim+iDim+nDim*nVar] = base_nodes->GetGradient_Reconstruction(iPoint, iVar, iDim);
+ }
+ }
break;
case PRIMITIVE_GRADIENT:
- for (iVar = 0; iVar < nPrimVarGrad; iVar++)
- for (iDim = 0; iDim < nDim; iDim++)
+ for (iVar = 0; iVar < nPrimVarGrad; iVar++) {
+ for (iDim = 0; iDim < nDim; iDim++) {
bufDSend[buf_offset+iVar*nDim+iDim] = base_nodes->GetGradient_Primitive(iPoint, iVar, iDim);
+ bufDSend[buf_offset+iVar*nDim+iDim+nDim*nPrimVarGrad] = base_nodes->GetGradient_Reconstruction(iPoint, iVar, iDim);
+ }
+ }
break;
case PRIMITIVE_LIMITER:
for (iVar = 0; iVar < nPrimVarGrad; iVar++)
@@ -2169,14 +2194,20 @@ void CSolver::CompleteComms(CGeometry *geometry,
base_nodes->SetSensor(iPoint,bufDRecv[buf_offset]);
break;
case SOLUTION_GRADIENT:
- for (iVar = 0; iVar < nVar; iVar++)
- for (iDim = 0; iDim < nDim; iDim++)
+ for (iVar = 0; iVar < nVar; iVar++) {
+ for (iDim = 0; iDim < nDim; iDim++) {
base_nodes->SetGradient(iPoint, iVar, iDim, bufDRecv[buf_offset+iVar*nDim+iDim]);
+ base_nodes->SetGradient_Reconstruction(iPoint, iVar, iDim, bufDRecv[buf_offset+iVar*nDim+iDim+nDim*nVar]);
+ }
+ }
break;
case PRIMITIVE_GRADIENT:
- for (iVar = 0; iVar < nPrimVarGrad; iVar++)
- for (iDim = 0; iDim < nDim; iDim++)
+ for (iVar = 0; iVar < nPrimVarGrad; iVar++) {
+ for (iDim = 0; iDim < nDim; iDim++) {
base_nodes->SetGradient_Primitive(iPoint, iVar, iDim, bufDRecv[buf_offset+iVar*nDim+iDim]);
+ base_nodes->SetGradient_Reconstruction(iPoint, iVar, iDim, bufDRecv[buf_offset+iVar*nDim+iDim+nDim*nPrimVarGrad]);
+ }
+ }
break;
case PRIMITIVE_LIMITER:
for (iVar = 0; iVar < nPrimVarGrad; iVar++)
@@ -2249,6 +2280,209 @@ void CSolver::CompleteComms(CGeometry *geometry,
}
+void CSolver::ResetCFLAdapt(){
+ NonLinRes_Series.clear();
+ NonLinRes_Value = 0;
+ NonLinRes_Func = 0;
+ Old_Func = 0;
+ New_Func = 0;
+ NonLinRes_Counter = 0;
+}
+
+
+void CSolver::AdaptCFLNumber(CGeometry **geometry,
+ CSolver ***solver_container,
+ CConfig *config) {
+
+ /* Adapt the CFL number on all multigrid levels using an
+ exponential progression with under-relaxation approach. */
+
+ vector MGFactor(config->GetnMGLevels()+1,1.0);
+ const su2double CFLFactorDecrease = config->GetCFL_AdaptParam(0);
+ const su2double CFLFactorIncrease = config->GetCFL_AdaptParam(1);
+ const su2double CFLMin = config->GetCFL_AdaptParam(2);
+ const su2double CFLMax = config->GetCFL_AdaptParam(3);
+
+ for (unsigned short iMesh = 0; iMesh <= config->GetnMGLevels(); iMesh++) {
+
+ /* Store the mean flow, and turbulence solvers more clearly. */
+
+ CSolver *solverFlow = solver_container[iMesh][FLOW_SOL];
+ CSolver *solverTurb = solver_container[iMesh][TURB_SOL];
+
+ /* Compute the reduction factor for CFLs on the coarse levels. */
+
+ if (iMesh == MESH_0) {
+ MGFactor[iMesh] = 1.0;
+ } else {
+ const su2double CFLRatio = config->GetCFL(iMesh)/config->GetCFL(iMesh-1);
+ MGFactor[iMesh] = MGFactor[iMesh-1]*CFLRatio;
+ }
+
+ /* Check whether we achieved the requested reduction in the linear
+ solver residual within the specified number of linear iterations. */
+
+ bool reduceCFL = false;
+ su2double linResFlow = solverFlow->GetResLinSolver();
+ su2double linResTurb = -1.0;
+ if ((iMesh == MESH_0) && (config->GetKind_Turb_Model() != NONE)) {
+ linResTurb = solverTurb->GetResLinSolver();
+ }
+
+ su2double maxLinResid = max(linResFlow, linResTurb);
+ if (maxLinResid > 0.5) {
+ reduceCFL = true;
+ }
+
+ /* Check that we are meeting our nonlinear residual reduction target
+ over time so that we do not get stuck in limit cycles. */
+
+ Old_Func = New_Func;
+ unsigned short Res_Count = 100;
+ if (NonLinRes_Series.size() == 0) NonLinRes_Series.resize(Res_Count,0.0);
+
+ /* Sum the RMS residuals for all equations. */
+
+ New_Func = 0.0;
+ for (unsigned short iVar = 0; iVar < solverFlow->GetnVar(); iVar++) {
+ New_Func += solverFlow->GetRes_RMS(iVar);
+ }
+ if ((iMesh == MESH_0) && (config->GetKind_Turb_Model() != NONE)) {
+ for (unsigned short iVar = 0; iVar < solverTurb->GetnVar(); iVar++) {
+ New_Func += solverTurb->GetRes_RMS(iVar);
+ }
+ }
+
+ /* Compute the difference in the nonlinear residuals between the
+ current and previous iterations. */
+
+ NonLinRes_Func = (New_Func - Old_Func);
+ NonLinRes_Series[NonLinRes_Counter] = NonLinRes_Func;
+
+ /* Increment the counter, if we hit the max size, then start over. */
+
+ NonLinRes_Counter++;
+ if (NonLinRes_Counter == Res_Count) NonLinRes_Counter = 0;
+
+ /* Sum the total change in nonlinear residuals over the previous
+ set of all stored iterations. */
+
+ NonLinRes_Value = New_Func;
+ if (config->GetTimeIter() >= Res_Count) {
+ NonLinRes_Value = 0.0;
+ for (unsigned short iCounter = 0; iCounter < Res_Count; iCounter++)
+ NonLinRes_Value += NonLinRes_Series[iCounter];
+ }
+
+ /* If the sum is larger than a small fraction of the current nonlinear
+ residual, then we are not decreasing the nonlinear residual at a high
+ rate. In this situation, we force a reduction of the CFL in all cells.
+ Reset the array so that we delay the next decrease for some iterations. */
+
+ if (fabs(NonLinRes_Value) < 0.1*New_Func) {
+ reduceCFL = true;
+ NonLinRes_Counter = 0;
+ for (unsigned short iCounter = 0; iCounter < Res_Count; iCounter++)
+ NonLinRes_Series[iCounter] = New_Func;
+ }
+
+ /* Loop over all points on this grid and apply CFL adaption. */
+
+ su2double myCFLMin = 1e30;
+ su2double myCFLMax = 0.0;
+ su2double myCFLSum = 0.0;
+ for (unsigned long iPoint = 0; iPoint < geometry[iMesh]->GetnPointDomain(); iPoint++) {
+
+ /* Get the current local flow CFL number at this point. */
+
+ su2double CFL = solverFlow->GetNodes()->GetLocalCFL(iPoint);
+
+ /* Get the current under-relaxation parameters that were computed
+ during the previous nonlinear update. If we have a turbulence model,
+ take the minimum under-relaxation parameter between the mean flow
+ and turbulence systems. */
+
+ su2double underRelaxationFlow = solverFlow->GetNodes()->GetUnderRelaxation(iPoint);
+ su2double underRelaxationTurb = 1.0;
+ if ((iMesh == MESH_0) && (config->GetKind_Turb_Model() != NONE))
+ underRelaxationTurb = solverTurb->GetNodes()->GetUnderRelaxation(iPoint);
+ const su2double underRelaxation = min(underRelaxationFlow,underRelaxationTurb);
+
+ /* If we apply a small under-relaxation parameter for stability,
+ then we should reduce the CFL before the next iteration. If we
+ are able to add the entire nonlinear update (under-relaxation = 1)
+ then we schedule an increase the CFL number for the next iteration. */
+
+ su2double CFLFactor = 1.0;
+ if ((underRelaxation < 0.1)) {
+ CFLFactor = CFLFactorDecrease;
+ } else if (underRelaxation >= 0.1 && underRelaxation < 1.0) {
+ CFLFactor = 1.0;
+ } else {
+ CFLFactor = CFLFactorIncrease;
+ }
+
+ /* Check if we are hitting the min or max and adjust. */
+
+ if (CFL*CFLFactor <= CFLMin) {
+ CFL = CFLMin;
+ CFLFactor = MGFactor[iMesh];
+ } else if (CFL*CFLFactor >= CFLMax) {
+ CFL = CFLMax;
+ CFLFactor = MGFactor[iMesh];
+ }
+
+ /* If we detect a stalled nonlinear residual, then force the CFL
+ for all points to the minimum temporarily to restart the ramp. */
+
+ if (reduceCFL) {
+ CFL = CFLMin;
+ CFLFactor = MGFactor[iMesh];
+ }
+
+ /* Apply the adjustment to the CFL and store local values. */
+
+ CFL *= CFLFactor;
+ solverFlow->GetNodes()->SetLocalCFL(iPoint, CFL);
+ if ((iMesh == MESH_0) && (config->GetKind_Turb_Model() != NONE)) {
+ solverTurb->GetNodes()->SetLocalCFL(iPoint, CFL);
+ }
+
+ /* Store min and max CFL for reporting on fine grid. */
+
+ myCFLMin = min(CFL,myCFLMin);
+ myCFLMax = max(CFL,myCFLMax);
+ myCFLSum += CFL;
+
+ }
+
+ /* Reduce the min/max/avg local CFL numbers. */
+
+ su2double rbuf_min, sbuf_min;
+ sbuf_min = myCFLMin;
+ SU2_MPI::Allreduce(&sbuf_min, &rbuf_min, 1, MPI_DOUBLE, MPI_MIN, MPI_COMM_WORLD);
+ Min_CFL_Local = rbuf_min;
+
+ su2double rbuf_max, sbuf_max;
+ sbuf_max = myCFLMax;
+ SU2_MPI::Allreduce(&sbuf_max, &rbuf_max, 1, MPI_DOUBLE, MPI_MAX, MPI_COMM_WORLD);
+ Max_CFL_Local = rbuf_max;
+
+ su2double rbuf_sum, sbuf_sum;
+ sbuf_sum = myCFLSum;
+ SU2_MPI::Allreduce(&sbuf_sum, &rbuf_sum, 1, MPI_DOUBLE, MPI_SUM, MPI_COMM_WORLD);
+ Avg_CFL_Local = rbuf_sum;
+
+ unsigned long Global_nPointDomain;
+ unsigned long Local_nPointDomain = geometry[iMesh]->GetnPointDomain();
+ SU2_MPI::Allreduce(&Local_nPointDomain, &Global_nPointDomain, 1,
+ MPI_UNSIGNED_LONG, MPI_SUM, MPI_COMM_WORLD);
+ Avg_CFL_Local /= (su2double)Global_nPointDomain;
+
+ }
+
+}
+
void CSolver::SetResidual_RMS(CGeometry *geometry, CConfig *config) {
unsigned short iVar;
@@ -2715,7 +2949,7 @@ void CSolver::SetAuxVar_Gradient_LS(CGeometry *geometry, CConfig *config) {
}
-void CSolver::SetSolution_Gradient_GG(CGeometry *geometry, CConfig *config) {
+void CSolver::SetSolution_Gradient_GG(CGeometry *geometry, CConfig *config, bool reconstruction) {
unsigned long Point = 0, iPoint = 0, jPoint = 0, iEdge, iVertex;
unsigned short iVar, iDim, iMarker;
su2double *Solution_Vertex, *Solution_i, *Solution_j, Solution_Average, **Gradient,
@@ -2781,7 +3015,10 @@ void CSolver::SetSolution_Gradient_GG(CGeometry *geometry, CConfig *config) {
for (iDim = 0; iDim < nDim; iDim++) {
Gradient = base_nodes->GetGradient(iPoint);
Grad_Val = Gradient[iVar][iDim] / (Vol+EPS);
- base_nodes->SetGradient(iPoint, iVar, iDim, Grad_Val);
+ if (reconstruction)
+ base_nodes->SetGradient_Reconstruction(iPoint, iVar, iDim, Grad_Val);
+ else
+ base_nodes->SetGradient(iPoint, iVar, iDim, Grad_Val);
}
}
@@ -2794,7 +3031,7 @@ void CSolver::SetSolution_Gradient_GG(CGeometry *geometry, CConfig *config) {
}
-void CSolver::SetSolution_Gradient_LS(CGeometry *geometry, CConfig *config) {
+void CSolver::SetSolution_Gradient_LS(CGeometry *geometry, CConfig *config, bool reconstruction) {
unsigned short iDim, jDim, iVar, iNeigh;
unsigned long iPoint, jPoint;
@@ -2802,10 +3039,16 @@ void CSolver::SetSolution_Gradient_LS(CGeometry *geometry, CConfig *config) {
su2double r11, r12, r13, r22, r23, r23_a, r23_b, r33, weight;
su2double detR2, z11, z12, z13, z22, z23, z33;
bool singular = false;
+
+ /*--- Set a flag for unweighted or weighted least-squares. ---*/
- su2double **Cvector = new su2double* [nVar];
- for (iVar = 0; iVar < nVar; iVar++)
- Cvector[iVar] = new su2double [nDim];
+ bool weighted = true;
+ if (reconstruction) {
+ if (config->GetKind_Gradient_Method_Recon() == LEAST_SQUARES)
+ weighted = false;
+ } else if (config->GetKind_Gradient_Method() == LEAST_SQUARES) {
+ weighted = false;
+ }
/*--- Clear Rmatrix, which could eventually be computed once
and stored for static meshes, as well as the gradient. ---*/
@@ -2840,9 +3083,13 @@ void CSolver::SetSolution_Gradient_LS(CGeometry *geometry, CConfig *config) {
Solution_j = base_nodes->GetSolution(jPoint);
- weight = 0.0;
- for (iDim = 0; iDim < nDim; iDim++)
- weight += (Coord_j[iDim]-Coord_i[iDim])*(Coord_j[iDim]-Coord_i[iDim]);
+ if (weighted) {
+ weight = 0.0;
+ for (iDim = 0; iDim < nDim; iDim++)
+ weight += (Coord_j[iDim]-Coord_i[iDim])*(Coord_j[iDim]-Coord_i[iDim]);
+ } else {
+ weight = 1.0;
+ }
/*--- Sumations for entries of upper triangular matrix R ---*/
@@ -2874,8 +3121,13 @@ void CSolver::SetSolution_Gradient_LS(CGeometry *geometry, CConfig *config) {
/*--- Correct the gradient values for any periodic boundaries. ---*/
for (unsigned short iPeriodic = 1; iPeriodic <= config->GetnMarker_Periodic()/2; iPeriodic++) {
- InitiatePeriodicComms(geometry, config, iPeriodic, PERIODIC_SOL_LS);
- CompletePeriodicComms(geometry, config, iPeriodic, PERIODIC_SOL_LS);
+ if (weighted) {
+ InitiatePeriodicComms(geometry, config, iPeriodic, PERIODIC_SOL_LS);
+ CompletePeriodicComms(geometry, config, iPeriodic, PERIODIC_SOL_LS);
+ } else {
+ InitiatePeriodicComms(geometry, config, iPeriodic, PERIODIC_SOL_ULS);
+ CompletePeriodicComms(geometry, config, iPeriodic, PERIODIC_SOL_ULS);
+ }
}
/*--- Second loop over points of the grid to compute final gradient ---*/
@@ -2963,18 +3215,15 @@ void CSolver::SetSolution_Gradient_LS(CGeometry *geometry, CConfig *config) {
for (iVar = 0; iVar < nVar; iVar++) {
for (iDim = 0; iDim < nDim; iDim++) {
- base_nodes->SetGradient(iPoint, iVar, iDim, Cvector[iVar][iDim]);
+ if (reconstruction)
+ base_nodes->SetGradient_Reconstruction(iPoint, iVar, iDim, Cvector[iVar][iDim]);
+ else
+ base_nodes->SetGradient(iPoint, iVar, iDim, Cvector[iVar][iDim]);
}
}
}
- /*--- Deallocate memory ---*/
-
- for (iVar = 0; iVar < nVar; iVar++)
- delete [] Cvector[iVar];
- delete [] Cvector;
-
/*--- Gradient MPI ---*/
InitiateComms(geometry, config, SOLUTION_GRADIENT);
@@ -3330,8 +3579,8 @@ void CSolver::SetSolution_Limiter(CGeometry *geometry, CConfig *config) {
iPoint = geometry->edge[iEdge]->GetNode(0);
jPoint = geometry->edge[iEdge]->GetNode(1);
- Gradient_i = base_nodes->GetGradient(iPoint);
- Gradient_j = base_nodes->GetGradient(jPoint);
+ Gradient_i = base_nodes->GetGradient_Reconstruction(iPoint);
+ Gradient_j = base_nodes->GetGradient_Reconstruction(jPoint);
Coord_i = geometry->node[iPoint]->GetCoord();
Coord_j = geometry->node[jPoint]->GetCoord();
@@ -3447,8 +3696,8 @@ void CSolver::SetSolution_Limiter(CGeometry *geometry, CConfig *config) {
iPoint = geometry->edge[iEdge]->GetNode(0);
jPoint = geometry->edge[iEdge]->GetNode(1);
- Gradient_i = base_nodes->GetGradient(iPoint);
- Gradient_j = base_nodes->GetGradient(jPoint);
+ Gradient_i = base_nodes->GetGradient_Reconstruction(iPoint);
+ Gradient_j = base_nodes->GetGradient_Reconstruction(jPoint);
Coord_i = geometry->node[iPoint]->GetCoord();
Coord_j = geometry->node[jPoint]->GetCoord();
@@ -3540,8 +3789,8 @@ void CSolver::SetSolution_Limiter(CGeometry *geometry, CConfig *config) {
iPoint = geometry->edge[iEdge]->GetNode(0);
jPoint = geometry->edge[iEdge]->GetNode(1);
- Gradient_i = base_nodes->GetGradient(iPoint);
- Gradient_j = base_nodes->GetGradient(jPoint);
+ Gradient_i = base_nodes->GetGradient_Reconstruction(iPoint);
+ Gradient_j = base_nodes->GetGradient_Reconstruction(jPoint);
Coord_i = geometry->node[iPoint]->GetCoord();
Coord_j = geometry->node[jPoint]->GetCoord();
@@ -3612,8 +3861,8 @@ void CSolver::SetSolution_Limiter(CGeometry *geometry, CConfig *config) {
iPoint = geometry->edge[iEdge]->GetNode(0);
jPoint = geometry->edge[iEdge]->GetNode(1);
- Gradient_i = base_nodes->GetGradient(iPoint);
- Gradient_j = base_nodes->GetGradient(jPoint);
+ Gradient_i = base_nodes->GetGradient_Reconstruction(iPoint);
+ Gradient_j = base_nodes->GetGradient_Reconstruction(jPoint);
Coord_i = geometry->node[iPoint]->GetCoord();
Coord_j = geometry->node[jPoint]->GetCoord();
@@ -4723,121 +4972,6 @@ void CSolver::Read_SU2_Restart_Metadata(CGeometry *geometry, CConfig *config, bo
}
-void CSolver::Read_InletFile_ASCII(CGeometry *geometry, CConfig *config, string val_filename) {
-
- ifstream inlet_file;
- string text_line;
- unsigned long iVar, iMarker, iChar, iRow;
- int counter = 0;
- string::size_type position;
-
- /*--- Open the inlet profile file (we have already error checked) ---*/
-
- inlet_file.open(val_filename.data(), ios::in);
-
- /*--- Identify the markers and data set in the inlet profile file ---*/
-
- while (getline (inlet_file, text_line)) {
-
- position = text_line.find ("NMARK=",0);
- if (position != string::npos) {
- text_line.erase (0,6); nMarker_InletFile = atoi(text_line.c_str());
-
- nRow_InletFile = new unsigned long[nMarker_InletFile];
- nRowCum_InletFile = new unsigned long[nMarker_InletFile+1];
- nCol_InletFile = new unsigned long[nMarker_InletFile];
-
- for (iMarker = 0 ; iMarker < nMarker_InletFile; iMarker++) {
-
- getline (inlet_file, text_line);
- text_line.erase (0,11);
- for (iChar = 0; iChar < 20; iChar++) {
- position = text_line.find( " ", 0 ); if (position != string::npos) text_line.erase (position,1);
- position = text_line.find( "\r", 0 ); if (position != string::npos) text_line.erase (position,1);
- position = text_line.find( "\n", 0 ); if (position != string::npos) text_line.erase (position,1);
- }
- Marker_Tags_InletFile.push_back(text_line.c_str());
-
- getline (inlet_file, text_line);
- text_line.erase (0,5); nRow_InletFile[iMarker] = atoi(text_line.c_str());
-
- getline (inlet_file, text_line);
- text_line.erase (0,5); nCol_InletFile[iMarker] = atoi(text_line.c_str());
-
- /*--- Skip the data. This is read in the next loop. ---*/
-
- for (iRow = 0; iRow < nRow_InletFile[iMarker]; iRow++) getline (inlet_file, text_line);
-
- }
- } else {
- SU2_MPI::Error("While opening inlet file, no \"NMARK=\" specification was found", CURRENT_FUNCTION);
- }
- }
-
- inlet_file.close();
-
- /*--- Compute array bounds and offsets. Allocate data structure. ---*/
-
- maxCol_InletFile = 0; nRowCum_InletFile[0] = 0;
- for (iMarker = 0; iMarker < nMarker_InletFile; iMarker++) {
- if (nCol_InletFile[iMarker] > maxCol_InletFile)
- maxCol_InletFile = nCol_InletFile[iMarker];
-
- /*--- Put nRow into cumulative storage format. ---*/
-
- nRowCum_InletFile[iMarker+1] = nRowCum_InletFile[iMarker] + nRow_InletFile[iMarker];
-
- }
-
- Inlet_Data = new passivedouble[nRowCum_InletFile[nMarker_InletFile]*maxCol_InletFile];
-
- for (unsigned long iPoint = 0; iPoint < nRowCum_InletFile[nMarker_InletFile]*maxCol_InletFile; iPoint++)
- Inlet_Data[iPoint] = 0.0;
-
- /*--- Read all lines in the inlet profile file and extract data. ---*/
-
- inlet_file.open(val_filename.data(), ios::in);
-
- counter = 0;
- while (getline (inlet_file, text_line)) {
-
- position = text_line.find ("NMARK=",0);
- if (position != string::npos) {
-
- for (iMarker = 0; iMarker < nMarker_InletFile; iMarker++) {
-
- /*--- Skip the tag, nRow, and nCol lines. ---*/
-
- getline (inlet_file, text_line);
- getline (inlet_file, text_line);
- getline (inlet_file, text_line);
-
- /*--- Now read the data for each row and store. ---*/
-
- for (iRow = 0; iRow < nRow_InletFile[iMarker]; iRow++) {
-
- getline (inlet_file, text_line);
-
- istringstream point_line(text_line);
-
- /*--- Store the values (starting with node coordinates) --*/
-
- for (iVar = 0; iVar < nCol_InletFile[iMarker]; iVar++)
- point_line >> Inlet_Data[counter*maxCol_InletFile + iVar];
-
- /*--- Increment our local row counter. ---*/
-
- counter++;
-
- }
- }
- }
- }
-
- inlet_file.close();
-
-}
-
void CSolver::LoadInletProfile(CGeometry **geometry,
CSolver ***solver,
CConfig *config,
@@ -4871,11 +5005,37 @@ void CSolver::LoadInletProfile(CGeometry **geometry,
string profile_filename = config->GetInlet_FileName();
ifstream inlet_file;
- su2double *Inlet_Values = NULL;
- su2double *Inlet_Fine = NULL;
su2double *Normal = new su2double[nDim];
unsigned long Marker_Counter = 0;
+
+ bool turbulent = (config->GetKind_Solver() == RANS ||
+ config->GetKind_Solver() == INC_RANS ||
+ config->GetKind_Solver() == ADJ_RANS ||
+ config->GetKind_Solver() == DISC_ADJ_RANS ||
+ config->GetKind_Solver() == DISC_ADJ_INC_RANS);
+
+ unsigned short nVar_Turb = 0;
+ if (turbulent)
+ switch (config->GetKind_Turb_Model()) {
+ case SA: case SA_NEG: case SA_E: case SA_COMP: case SA_E_COMP:
+ nVar_Turb = 1;
+ break;
+ case SST: case SST_SUST:
+ nVar_Turb = 2;
+ break;
+ default:
+ SU2_MPI::Error("Specified turbulence model unavailable or none selected", CURRENT_FUNCTION);
+ break;
+ }
+
+ /*--- Count the number of columns that we have for this flow case,
+ excluding the coordinates. Here, we have 2 entries for the total
+ conditions or mass flow, another nDim for the direction vector, and
+ finally entries for the number of turbulence variables. This is only
+ necessary in case we are writing a template profile file. ---*/
+
+ unsigned short nCol_InletFile = 2 + nDim + nVar_Turb;
/*--- Multizone problems require the number of the zone to be appended. ---*/
@@ -4887,30 +5047,14 @@ void CSolver::LoadInletProfile(CGeometry **geometry,
if (dual_time || time_stepping)
profile_filename = config->GetUnsteady_FileName(profile_filename, val_iter, ".dat");
- /*--- Open the file and check for problems. If a file can not be found,
- then a warning will be printed, but the calculation will continue
- using the uniform inlet values. A template inlet file will be written
- at a later point using COutput. ---*/
-
- inlet_file.open(profile_filename.data(), ios::in);
-
- if (!inlet_file.fail()) {
-
- /*--- Close the file and start the loading. ---*/
-
- inlet_file.close();
-
/*--- Read the profile data from an ASCII file. ---*/
- Read_InletFile_ASCII(geometry[MESH_0], config, profile_filename);
+ CMarkerProfileReaderFVM profileReader(geometry[MESH_0], config, profile_filename, KIND_MARKER, nCol_InletFile);
/*--- Load data from the restart into correct containers. ---*/
Marker_Counter = 0;
-
- Inlet_Values = new su2double[maxCol_InletFile];
- Inlet_Fine = new su2double[maxCol_InletFile];
-
+
unsigned short global_failure = 0, local_failure = 0;
ostringstream error_msg;
@@ -4923,16 +5067,24 @@ void CSolver::LoadInletProfile(CGeometry **geometry,
Marker_Tag = config->GetMarker_All_TagBound(iMarker);
- for (jMarker = 0; jMarker < nMarker_InletFile; jMarker++) {
+ for (jMarker = 0; jMarker < profileReader.GetNumberOfProfiles(); jMarker++) {
/*--- If we have found the matching marker string, continue. ---*/
- if (Marker_Tags_InletFile[jMarker] == Marker_Tag) {
+ if (profileReader.GetTagForProfile(jMarker) == Marker_Tag) {
/*--- Increment our counter for marker matches. ---*/
Marker_Counter++;
+ /*--- Get data for this profile. ---*/
+
+ vector Inlet_Data = profileReader.GetDataForProfile(jMarker);
+
+ unsigned short nColumns = profileReader.GetNumberOfColumnsInProfile(jMarker);
+
+ vector Inlet_Values(nColumns);
+
/*--- Loop through the nodes on this marker. ---*/
for (iVertex = 0; iVertex < geometry[MESH_0]->nVertex[iMarker]; iVertex++) {
@@ -4943,11 +5095,11 @@ void CSolver::LoadInletProfile(CGeometry **geometry,
/*--- Find the distance to the closest point in our inlet profile data. ---*/
- for (iRow = nRowCum_InletFile[jMarker]; iRow < nRowCum_InletFile[jMarker+1]; iRow++) {
+ for (iRow = 0; iRow < profileReader.GetNumberOfRowsInProfile(jMarker); iRow++) {
/*--- Get the coords for this data point. ---*/
- index = iRow*maxCol_InletFile;
+ index = iRow*nColumns;
dist = 0.0;
for (unsigned short iDim = 0; iDim < nDim; iDim++)
@@ -4958,7 +5110,7 @@ void CSolver::LoadInletProfile(CGeometry **geometry,
if (dist < min_dist) {
min_dist = dist;
- for (iVar = 0; iVar < maxCol_InletFile; iVar++)
+ for (iVar = 0; iVar < nColumns; iVar++)
Inlet_Values[iVar] = Inlet_Data[index+iVar];
}
@@ -4970,7 +5122,7 @@ void CSolver::LoadInletProfile(CGeometry **geometry,
if (min_dist < tolerance) {
- solver[MESH_0][KIND_SOLVER]->SetInletAtVertex(Inlet_Values, iMarker, iVertex);
+ solver[MESH_0][KIND_SOLVER]->SetInletAtVertex(Inlet_Values.data(), iMarker, iVertex);
} else {
@@ -5018,6 +5170,17 @@ void CSolver::LoadInletProfile(CGeometry **geometry,
Marker_Tag = config->GetMarker_All_TagBound(iMarker);
+ /* Check the number of columns and allocate temp array. */
+
+ unsigned short nColumns;
+ for (jMarker = 0; jMarker < profileReader.GetNumberOfProfiles(); jMarker++) {
+ if (profileReader.GetTagForProfile(jMarker) == Marker_Tag) {
+ nColumns = profileReader.GetNumberOfColumnsInProfile(jMarker);
+ }
+ }
+ vector Inlet_Values(nColumns);
+ vector Inlet_Fine(nColumns);
+
/*--- Loop through the nodes on this marker. ---*/
for (iVertex = 0; iVertex < geometry[iMesh]->nVertex[iMarker]; iVertex++) {
@@ -5032,7 +5195,7 @@ void CSolver::LoadInletProfile(CGeometry **geometry,
/*--- Reset the values for the coarse point. ---*/
- for (iVar = 0; iVar < maxCol_InletFile; iVar++) Inlet_Values[iVar] = 0.0;
+ for (iVar = 0; iVar < nColumns; iVar++) Inlet_Values[iVar] = 0.0;
/*-- Loop through the children and extract the inlet values
from those nodes that lie on the boundary as well as their
@@ -5043,59 +5206,22 @@ void CSolver::LoadInletProfile(CGeometry **geometry,
for (iChildren = 0; iChildren < geometry[iMesh]->node[iPoint]->GetnChildren_CV(); iChildren++) {
Point_Fine = geometry[iMesh]->node[iPoint]->GetChildren_CV(iChildren);
- for (iVar = 0; iVar < maxCol_InletFile; iVar++) Inlet_Fine[iVar] = 0.0;
- Area_Children = solver[iMesh-1][KIND_SOLVER]->GetInletAtVertex(Inlet_Fine, Point_Fine, KIND_MARKER, Marker_Tag, geometry[iMesh-1], config);
- for (iVar = 0; iVar < maxCol_InletFile; iVar++) {
+ for (iVar = 0; iVar < nColumns; iVar++) Inlet_Fine[iVar] = 0.0;
+ Area_Children = solver[iMesh-1][KIND_SOLVER]->GetInletAtVertex(Inlet_Fine.data(), Point_Fine, KIND_MARKER, Marker_Tag, geometry[iMesh-1], config);
+ for (iVar = 0; iVar < nColumns; iVar++) {
Inlet_Values[iVar] += Inlet_Fine[iVar]*Area_Children/Area_Parent;
}
}
/*--- Set the boundary area-averaged inlet values for the coarse point. ---*/
- solver[iMesh][KIND_SOLVER]->SetInletAtVertex(Inlet_Values, iMarker, iVertex);
+ solver[iMesh][KIND_SOLVER]->SetInletAtVertex(Inlet_Values.data(), iMarker, iVertex);
}
}
}
}
-
- /*--- Delete the class memory that is used to load the inlets. ---*/
-
- Marker_Tags_InletFile.clear();
-
- if (nRowCum_InletFile != NULL) {delete [] nRowCum_InletFile; nRowCum_InletFile = NULL;}
- if (nRow_InletFile != NULL) {delete [] nRow_InletFile; nRow_InletFile = NULL;}
- if (nCol_InletFile != NULL) {delete [] nCol_InletFile; nCol_InletFile = NULL;}
- if (Inlet_Data != NULL) {delete [] Inlet_Data; Inlet_Data = NULL;}
-
- } else {
-
- if (rank == MASTER_NODE) {
- cout << endl;
- cout << "WARNING: Could not find the input file for the inlet profile." << endl;
- cout << "Looked for: " << profile_filename << "." << endl;
- cout << "A template inlet profile file will be written, and the " << endl;
- cout << "calculation will continue with uniform inlets." << endl << endl;
- }
-
- /*--- Set the bit to write a template inlet profile file. ---*/
-
- config->SetWrt_InletFile(true);
-
- /*--- Set the mean flow inlets to uniform. ---*/
-
- for (iMesh = 0; iMesh <= config->GetnMGLevels(); iMesh++) {
- for (iMarker = 0; iMarker < config->GetnMarker_All(); iMarker++) {
- solver[iMesh][KIND_SOLVER]->SetUniformInlet(config, iMarker);
- }
- }
-
- }
-
- /*--- Deallocated local data. ---*/
-
- if (Inlet_Values != NULL) delete [] Inlet_Values;
- if (Inlet_Fine != NULL) delete [] Inlet_Fine;
+
delete [] Normal;
}
diff --git a/SU2_CFD/src/variables/CAdjEulerVariable.cpp b/SU2_CFD/src/variables/CAdjEulerVariable.cpp
index 40d97ee9e04d..7db9f862862b 100644
--- a/SU2_CFD/src/variables/CAdjEulerVariable.cpp
+++ b/SU2_CFD/src/variables/CAdjEulerVariable.cpp
@@ -37,9 +37,9 @@
#include "../../include/variables/CAdjEulerVariable.hpp"
-
CAdjEulerVariable::CAdjEulerVariable(su2double psirho, const su2double *phi, su2double psie, unsigned long npoint, unsigned long ndim,
- unsigned long nvar, CConfig *config) : CVariable(npoint, ndim, nvar, config) {
+ unsigned long nvar, CConfig *config) : CVariable(npoint, ndim, nvar, config),
+ Gradient_Reconstruction(config->GetReconstructionGradientRequired() ? Gradient_Aux : Gradient) {
bool dual_time = (config->GetTime_Marching() == DT_STEPPING_1ST) ||
(config->GetTime_Marching() == DT_STEPPING_2ND);
@@ -58,7 +58,11 @@ CAdjEulerVariable::CAdjEulerVariable(su2double psirho, const su2double *phi, su2
Gradient.resize(nPoint,nVar,nDim,0.0);
- if (config->GetKind_Gradient_Method() == WEIGHTED_LEAST_SQUARES) {
+ if (config->GetReconstructionGradientRequired()) {
+ Gradient_Aux.resize(nPoint,nVar,nDim,0.0);
+ }
+
+ if (config->GetLeastSquaresRequired()) {
Rmatrix.resize(nPoint,nDim,nDim,0.0);
}
@@ -106,7 +110,11 @@ CAdjEulerVariable::CAdjEulerVariable(su2double psirho, const su2double *phi, su2
Set_BGSSolution_k();
Sensor.resize(nPoint);
-
+
+ /* Non-physical point (first-order) initialization. */
+ Non_Physical.resize(nPoint) = false;
+ Non_Physical_Counter.resize(nPoint) = 0;
+
}
bool CAdjEulerVariable::SetPrimVar(unsigned long iPoint, su2double SharpEdge_Distance, bool check, CConfig *config) {
diff --git a/SU2_CFD/src/variables/CEulerVariable.cpp b/SU2_CFD/src/variables/CEulerVariable.cpp
index 639a4b9f0802..59e25056ba9f 100644
--- a/SU2_CFD/src/variables/CEulerVariable.cpp
+++ b/SU2_CFD/src/variables/CEulerVariable.cpp
@@ -39,7 +39,8 @@
CEulerVariable::CEulerVariable(su2double density, const su2double *velocity, su2double energy, unsigned long npoint,
- unsigned long ndim, unsigned long nvar, CConfig *config) : CVariable(npoint, ndim, nvar, config) {
+ unsigned long ndim, unsigned long nvar, CConfig *config) : CVariable(npoint, ndim, nvar, config),
+ Gradient_Reconstruction(config->GetReconstructionGradientRequired() ? Gradient_Aux : Gradient_Primitive) {
bool dual_time = (config->GetTime_Marching() == DT_STEPPING_1ST) ||
(config->GetTime_Marching() == DT_STEPPING_2ND);
@@ -126,7 +127,11 @@ CEulerVariable::CEulerVariable(su2double density, const su2double *velocity, su2
Gradient_Primitive.resize(nPoint,nPrimVarGrad,nDim,0.0);
- if (config->GetKind_Gradient_Method() == WEIGHTED_LEAST_SQUARES) {
+ if (config->GetReconstructionGradientRequired()) {
+ Gradient_Aux.resize(nPoint,nPrimVarGrad,nDim,0.0);
+ }
+
+ if (config->GetLeastSquaresRequired()) {
Rmatrix.resize(nPoint,nDim,nDim,0.0);
}
@@ -139,6 +144,14 @@ CEulerVariable::CEulerVariable(su2double density, const su2double *velocity, su2
Lambda.resize(nPoint) = su2double(0.0);
Sensor.resize(nPoint) = su2double(0.0);
+ /* Under-relaxation parameter. */
+ UnderRelaxation.resize(nPoint) = su2double(1.0);
+ LocalCFL.resize(nPoint) = su2double(0.0);
+
+ /* Non-physical point (first-order) initialization. */
+ Non_Physical.resize(nPoint) = false;
+ Non_Physical_Counter.resize(nPoint) = 0;
+
}
void CEulerVariable::SetGradient_PrimitiveZero() {
diff --git a/SU2_CFD/src/variables/CHeatFVMVariable.cpp b/SU2_CFD/src/variables/CHeatFVMVariable.cpp
index 067e46c22097..03d6cb6153cb 100644
--- a/SU2_CFD/src/variables/CHeatFVMVariable.cpp
+++ b/SU2_CFD/src/variables/CHeatFVMVariable.cpp
@@ -39,7 +39,7 @@
CHeatFVMVariable::CHeatFVMVariable(su2double heat, unsigned long npoint, unsigned long ndim, unsigned long nvar, CConfig *config)
- : CVariable(npoint, ndim, nvar, config) {
+ : CVariable(npoint, ndim, nvar, config), Gradient_Reconstruction(config->GetReconstructionGradientRequired() ? Gradient_Aux : Gradient) {
bool low_fidelity = false;
bool dual_time = ((config->GetTime_Marching() == DT_STEPPING_1ST) ||
@@ -72,8 +72,12 @@ CHeatFVMVariable::CHeatFVMVariable(su2double heat, unsigned long npoint, unsigne
/*--- Gradient related fields ---*/
Gradient.resize(nPoint,nVar,nDim,0.0);
-
- if (config->GetKind_Gradient_Method() == WEIGHTED_LEAST_SQUARES) {
+
+ if (config->GetReconstructionGradientRequired()) {
+ Gradient_Aux.resize(nPoint,nVar,nDim,0.0);
+ }
+
+ if (config->GetLeastSquaresRequired()) {
Rmatrix.resize(nPoint,nDim,nDim,0.0);
}
diff --git a/SU2_CFD/src/variables/CIncEulerVariable.cpp b/SU2_CFD/src/variables/CIncEulerVariable.cpp
index 1ef1113d6576..9329c9530ce0 100644
--- a/SU2_CFD/src/variables/CIncEulerVariable.cpp
+++ b/SU2_CFD/src/variables/CIncEulerVariable.cpp
@@ -39,7 +39,8 @@
CIncEulerVariable::CIncEulerVariable(su2double pressure, const su2double *velocity, su2double temperature, unsigned long npoint,
- unsigned long ndim, unsigned long nvar, CConfig *config) : CVariable(npoint, ndim, nvar, config) {
+ unsigned long ndim, unsigned long nvar, CConfig *config) : CVariable(npoint, ndim, nvar, config),
+ Gradient_Reconstruction(config->GetReconstructionGradientRequired() ? Gradient_Aux : Gradient_Primitive) {
bool dual_time = (config->GetTime_Marching() == DT_STEPPING_1ST) ||
(config->GetTime_Marching() == DT_STEPPING_2ND);
@@ -106,12 +107,16 @@ CIncEulerVariable::CIncEulerVariable(su2double pressure, const su2double *veloci
Gradient_Primitive.resize(nPoint,nPrimVarGrad,nDim,0.0);
- if (config->GetKind_Gradient_Method() == WEIGHTED_LEAST_SQUARES) {
+ if (config->GetReconstructionGradientRequired()) {
+ Gradient_Aux.resize(nPoint,nPrimVarGrad,nDim,0.0);
+ }
+
+ if (config->GetLeastSquaresRequired()) {
Rmatrix.resize(nPoint,nDim,nDim,0.0);
}
-
+
/*--- If axisymmetric and viscous, we need an auxiliary gradient. ---*/
-
+
if (axisymmetric && viscous) Grad_AuxVar.resize(nPoint,nDim);
if (config->GetMultizone_Problem())
@@ -124,6 +129,14 @@ CIncEulerVariable::CIncEulerVariable(su2double pressure, const su2double *veloci
Lambda.resize(nPoint) = su2double(0.0);
Sensor.resize(nPoint) = su2double(0.0);
+ /* Under-relaxation parameter. */
+ UnderRelaxation.resize(nPoint) = su2double(1.0);
+ LocalCFL.resize(nPoint) = su2double(0.0);
+
+ /* Non-physical point (first-order) initialization. */
+ Non_Physical.resize(nPoint) = false;
+ Non_Physical_Counter.resize(nPoint) = 0;
+
}
void CIncEulerVariable::SetGradient_PrimitiveZero() {
diff --git a/SU2_CFD/src/variables/CTurbVariable.cpp b/SU2_CFD/src/variables/CTurbVariable.cpp
index adf0c328b6ba..523b6c26766c 100644
--- a/SU2_CFD/src/variables/CTurbVariable.cpp
+++ b/SU2_CFD/src/variables/CTurbVariable.cpp
@@ -39,7 +39,7 @@
CTurbVariable::CTurbVariable(unsigned long npoint, unsigned long ndim, unsigned long nvar, CConfig *config)
- : CVariable(npoint, ndim, nvar, config) {
+ : CVariable(npoint, ndim, nvar, config), Gradient_Reconstruction(config->GetReconstructionGradientRequired() ? Gradient_Aux : Gradient) {
/*--- Allocate space for the harmonic balance source terms ---*/
@@ -51,7 +51,11 @@ CTurbVariable::CTurbVariable(unsigned long npoint, unsigned long ndim, unsigned
Gradient.resize(nPoint,nVar,nDim,0.0);
- if (config->GetKind_Gradient_Method() == WEIGHTED_LEAST_SQUARES) {
+ if (config->GetReconstructionGradientRequired()) {
+ Gradient_Aux.resize(nPoint,nVar,nDim,0.0);
+ }
+
+ if (config->GetLeastSquaresRequired()) {
Rmatrix.resize(nPoint,nDim,nDim,0.0);
}
@@ -63,4 +67,9 @@ CTurbVariable::CTurbVariable(unsigned long npoint, unsigned long ndim, unsigned
Solution_Min.resize(nPoint,nVar) = su2double(0.0);
Delta_Time.resize(nPoint) = su2double(0.0);
+
+ /* Under-relaxation parameter. */
+ UnderRelaxation.resize(nPoint) = su2double(1.0);
+ LocalCFL.resize(nPoint) = su2double(0.0);
+
}
diff --git a/SU2_CFD/src/variables/CVariable.cpp b/SU2_CFD/src/variables/CVariable.cpp
index 3eaceba471b0..3de4574d331e 100644
--- a/SU2_CFD/src/variables/CVariable.cpp
+++ b/SU2_CFD/src/variables/CVariable.cpp
@@ -51,6 +51,7 @@ CVariable::CVariable(unsigned long npoint, unsigned long nvar, CConfig *config)
if (config->GetMultizone_Problem())
Solution_BGS_k.resize(nPoint,nVar) = su2double(0.0);
+
}
CVariable::CVariable(unsigned long npoint, unsigned long ndim, unsigned long nvar, CConfig *config) {
@@ -78,8 +79,6 @@ CVariable::CVariable(unsigned long npoint, unsigned long ndim, unsigned long nva
Solution_Adj_Old.resize(nPoint,nVar);
}
- Non_Physical.resize(nPoint) = false;
-
if(config->GetMultizone_Problem() && config->GetAD_Mode()) {
AD_InputIndex.resize(nPoint,nVar) = -1;
AD_OutputIndex.resize(nPoint,nVar) = -1;
diff --git a/SU2_DEF/src/meson.build b/SU2_DEF/src/meson.build
index de64bb1c555f..065973d9db59 100644
--- a/SU2_DEF/src/meson.build
+++ b/SU2_DEF/src/meson.build
@@ -2,6 +2,7 @@ su2_def_src = ['SU2_DEF.cpp']
if get_option('enable-normal')
su2_cfd_obj = su2_cfd.extract_objects(['solver_structure.cpp',
+ 'CMarkerProfileReaderFVM.cpp',
'output/COutput.cpp',
'output/CMeshOutput.cpp',
'output/output_structure_legacy.cpp',
diff --git a/SU2_DOT/src/meson.build b/SU2_DOT/src/meson.build
index 50396bb79251..f476c01ee859 100644
--- a/SU2_DOT/src/meson.build
+++ b/SU2_DOT/src/meson.build
@@ -1,6 +1,7 @@
su2_dot_src = ['SU2_DOT.cpp']
if get_option('enable-normal')
su2_cfd_obj = su2_cfd.extract_objects(['solver_structure.cpp',
+ 'CMarkerProfileReaderFVM.cpp',
'output/COutput.cpp',
'output/output_structure_legacy.cpp',
'output/CBaselineOutput.cpp',
@@ -33,6 +34,7 @@ endif
if get_option('enable-autodiff')
su2_dot_src_ad = ['SU2_DOT.cpp']
su2_cfd_obj_ad = su2_cfd_ad.extract_objects(['solver_structure.cpp',
+ 'CMarkerProfileReaderFVM.cpp',
'output/COutput.cpp',
'output/output_structure_legacy.cpp',
'output/CBaselineOutput.cpp',
diff --git a/SU2_IDE/Xcode/SU2_CFD.xcodeproj/project.pbxproj b/SU2_IDE/Xcode/SU2_CFD.xcodeproj/project.pbxproj
index 3e94d826140d..486b9b3f40a9 100644
--- a/SU2_IDE/Xcode/SU2_CFD.xcodeproj/project.pbxproj
+++ b/SU2_IDE/Xcode/SU2_CFD.xcodeproj/project.pbxproj
@@ -127,13 +127,11 @@
E9225F761FCBC36D002F3682 /* solver_adjoint_elasticity.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E9225F741FCBC36D002F3682 /* solver_adjoint_elasticity.cpp */; };
E941BB8E1B71D0D0005C6C06 /* solver_adjoint_discrete.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E941BB8D1B71D0D0005C6C06 /* solver_adjoint_discrete.cpp */; };
E941BB941B71D124005C6C06 /* mpi_structure.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E941BB911B71D124005C6C06 /* mpi_structure.cpp */; };
+ E967669F237365CA009FBEE1 /* CMarkerProfileReaderFVM.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E967669E237365CA009FBEE1 /* CMarkerProfileReaderFVM.cpp */; };
E96FAF102189FE9C0046BF5D /* blas_structure.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E96FAF0F2189FE9C0046BF5D /* blas_structure.cpp */; };
E96FAF142189FECA0046BF5D /* graph_coloring_structure.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E96FAF112189FECA0046BF5D /* graph_coloring_structure.cpp */; };
E96FAF152189FECA0046BF5D /* fem_gauss_jacobi_quadrature.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E96FAF122189FECA0046BF5D /* fem_gauss_jacobi_quadrature.cpp */; };
E96FAF162189FECA0046BF5D /* fem_cgns_elements.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E96FAF132189FECA0046BF5D /* fem_cgns_elements.cpp */; };
- E97429B0231F1577006DA2D3 /* CMeshSolver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E97429AE231F1576006DA2D3 /* CMeshSolver.cpp */; };
- E97429B1231F1577006DA2D3 /* CDiscAdjMeshSolver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E97429AF231F1577006DA2D3 /* CDiscAdjMeshSolver.cpp */; };
- E97429BF231F1614006DA2D3 /* CMeshElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E97429B8231F1613006DA2D3 /* CMeshElement.cpp */; };
E9C8307F2061E60E004417A9 /* fem_geometry_structure.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E9C830752061E60E004417A9 /* fem_geometry_structure.cpp */; };
E9C830802061E60E004417A9 /* fem_integration_rules.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E9C830762061E60E004417A9 /* fem_integration_rules.cpp */; };
E9C830812061E60E004417A9 /* fem_standard_element.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E9C830772061E60E004417A9 /* fem_standard_element.cpp */; };
@@ -416,6 +414,8 @@
E941BBA31B71D1AB005C6C06 /* primitive_structure.inl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; lineEnding = 0; path = primitive_structure.inl; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
E941BBA51B71D1AB005C6C06 /* mpi_structure.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; lineEnding = 0; name = mpi_structure.hpp; path = ../../Common/include/mpi_structure.hpp; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
E941BBA61B71D1AB005C6C06 /* mpi_structure.inl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; lineEnding = 0; name = mpi_structure.inl; path = ../../Common/include/mpi_structure.inl; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
+ E967669E237365CA009FBEE1 /* CMarkerProfileReaderFVM.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CMarkerProfileReaderFVM.cpp; path = ../../SU2_CFD/src/CMarkerProfileReaderFVM.cpp; sourceTree = ""; };
+ E96766A0237365E1009FBEE1 /* CMarkerProfileReaderFVM.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = CMarkerProfileReaderFVM.hpp; path = ../../SU2_CFD/include/CMarkerProfileReaderFVM.hpp; sourceTree = ""; };
E96FAF0F2189FE9C0046BF5D /* blas_structure.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = blas_structure.cpp; path = ../../Common/src/blas_structure.cpp; sourceTree = ""; };
E96FAF112189FECA0046BF5D /* graph_coloring_structure.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = graph_coloring_structure.cpp; path = ../../Common/src/graph_coloring_structure.cpp; sourceTree = ""; };
E96FAF122189FECA0046BF5D /* fem_gauss_jacobi_quadrature.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = fem_gauss_jacobi_quadrature.cpp; path = ../../Common/src/fem_gauss_jacobi_quadrature.cpp; sourceTree = ""; };
@@ -425,9 +425,6 @@
E96FAF1B2189FF620046BF5D /* fem_gauss_jacobi_quadrature.inl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = fem_gauss_jacobi_quadrature.inl; path = ../../Common/include/fem_gauss_jacobi_quadrature.inl; sourceTree = ""; };
E96FAF1C2189FF620046BF5D /* fem_cgns_elements.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = fem_cgns_elements.hpp; path = ../../Common/include/fem_cgns_elements.hpp; sourceTree = ""; };
E96FAF1D2189FF620046BF5D /* fem_gauss_jacobi_quadrature.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = fem_gauss_jacobi_quadrature.hpp; path = ../../Common/include/fem_gauss_jacobi_quadrature.hpp; sourceTree = ""; };
- E97429AE231F1576006DA2D3 /* CMeshSolver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CMeshSolver.cpp; path = ../../SU2_CFD/src/solvers/CMeshSolver.cpp; sourceTree = ""; };
- E97429AF231F1577006DA2D3 /* CDiscAdjMeshSolver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CDiscAdjMeshSolver.cpp; path = ../../SU2_CFD/src/solvers/CDiscAdjMeshSolver.cpp; sourceTree = ""; };
- E97429B8231F1613006DA2D3 /* CMeshElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CMeshElement.cpp; path = ../../SU2_CFD/src/variables/CMeshElement.cpp; sourceTree = ""; };
E97B6C8117F941800008255B /* config_template.cfg */ = {isa = PBXFileReference; lastKnownFileType = text; name = config_template.cfg; path = ../../config_template.cfg; sourceTree = ""; };
E9C2835022A701B5007B4E59 /* CMMSNSTwoHalfSpheresSolution.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = CMMSNSTwoHalfSpheresSolution.hpp; path = ../../Common/include/toolboxes/MMS/CMMSNSTwoHalfSpheresSolution.hpp; sourceTree = ""; };
E9C2835122A701B5007B4E59 /* CMMSNSTwoHalfCirclesSolution.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = CMMSNSTwoHalfCirclesSolution.hpp; path = ../../Common/include/toolboxes/MMS/CMMSNSTwoHalfCirclesSolution.hpp; sourceTree = ""; };
@@ -526,6 +523,7 @@
052D517F17A21FAC003BE8B2 /* Solver */ = {
isa = PBXGroup;
children = (
+ E967669E237365CA009FBEE1 /* CMarkerProfileReaderFVM.cpp */,
E9D6EE662317B80600618E36 /* CDiscAdjMeshSolver.cpp */,
E9D6EE652317B80500618E36 /* CMeshSolver.cpp */,
E941BB8D1B71D0D0005C6C06 /* solver_adjoint_discrete.cpp */,
@@ -640,6 +638,7 @@
0541ABE51370DC5E002D668B /* Include */ = {
isa = PBXGroup;
children = (
+ E96766A0237365E1009FBEE1 /* CMarkerProfileReaderFVM.hpp */,
E9D85B4D1C3F1BE00077122F /* ad_structure.hpp */,
E9FDF6EC1D2DD0860066E49C /* adt_structure.hpp */,
E96FAF1A2189FF620046BF5D /* blas_structure.hpp */,
@@ -778,7 +777,6 @@
0541ABE41370DC56002D668B /* InLine */,
0541ABE51370DC5E002D668B /* Include */,
1AB674ADFE9D54B511CA2CBB /* Products */,
- 403426B0235F8376005B5215 /* Recovered References */,
);
name = SU2_CFD;
sourceTree = "";
@@ -824,16 +822,6 @@
name = Products;
sourceTree = "";
};
- 403426B0235F8376005B5215 /* Recovered References */ = {
- isa = PBXGroup;
- children = (
- E97429AE231F1576006DA2D3 /* CMeshSolver.cpp */,
- E97429B8231F1613006DA2D3 /* CMeshElement.cpp */,
- E97429AF231F1577006DA2D3 /* CDiscAdjMeshSolver.cpp */,
- );
- name = "Recovered References";
- sourceTree = "";
- };
403426D3235F857D005B5215 /* Output */ = {
isa = PBXGroup;
children = (
@@ -1187,7 +1175,6 @@
4040B25F235FBEFD00843C83 /* CDisplacementsInterface.cpp in Sources */,
E9D6EE572316522800618E36 /* (null) in Sources */,
05F1089B1978D2AE00F2F288 /* fluid_model_ppr.cpp in Sources */,
- E97429B0231F1577006DA2D3 /* CMeshSolver.cpp in Sources */,
E941BB8E1B71D0D0005C6C06 /* solver_adjoint_discrete.cpp in Sources */,
05E6DC0517EB62A100FA1F7E /* iteration_structure.cpp in Sources */,
403426CC235F83B2005B5215 /* CFlowCompFEMOutput.cpp in Sources */,
@@ -1200,6 +1187,7 @@
05F108A41978D2F200F2F288 /* transport_model.cpp in Sources */,
E9D6EE682317B80600618E36 /* CDiscAdjMeshSolver.cpp in Sources */,
4040B282235FBFF200843C83 /* CParaviewFileWriter.cpp in Sources */,
+ E967669F237365CA009FBEE1 /* CMarkerProfileReaderFVM.cpp in Sources */,
E9FDF6EA1D2DD0560066E49C /* adt_structure.cpp in Sources */,
05E6DC0E17EB62A100FA1F7E /* numerics_direct_heat.cpp in Sources */,
E90B500422DFDFE4000ED392 /* CTurbVariable.cpp in Sources */,
@@ -1266,7 +1254,6 @@
E90B4FFD22DFDFE4000ED392 /* CDiscAdjFEAVariable.cpp in Sources */,
05E6DC2A17EB62A100FA1F7E /* solver_direct_transition.cpp in Sources */,
E90B4FF822DFDFE4000ED392 /* CVariable.cpp in Sources */,
- E97429BF231F1614006DA2D3 /* CMeshElement.cpp in Sources */,
4040B262235FBEFD00843C83 /* CMixingPlaneInterface.cpp in Sources */,
E90B4FE122DFDF94000ED392 /* CMMSIncEulerSolution.cpp in Sources */,
E9F130CC1D513DA300EC8963 /* numerics_direct_mean_inc.cpp in Sources */,
@@ -1294,7 +1281,6 @@
E90B4FFB22DFDFE4000ED392 /* CAdjNSVariable.cpp in Sources */,
403426C7235F83B2005B5215 /* CMeshOutput.cpp in Sources */,
E90B500F22DFE043000ED392 /* CSysVector.cpp in Sources */,
- E97429B1231F1577006DA2D3 /* CDiscAdjMeshSolver.cpp in Sources */,
E90B4FDA22DFDF94000ED392 /* CNSUnitQuadSolution.cpp in Sources */,
E9C830802061E60E004417A9 /* fem_integration_rules.cpp in Sources */,
E90B501222DFE043000ED392 /* CSysSolve.cpp in Sources */,
diff --git a/SU2_SOL/src/meson.build b/SU2_SOL/src/meson.build
index 4549eac3e034..2eef5a2f9a87 100644
--- a/SU2_SOL/src/meson.build
+++ b/SU2_SOL/src/meson.build
@@ -1,6 +1,7 @@
su2_sol_src = ['SU2_SOL.cpp']
if get_option('enable-normal')
su2_cfd_obj = su2_cfd.extract_objects(['solver_structure.cpp',
+ 'CMarkerProfileReaderFVM.cpp',
'output/COutput.cpp',
'output/output_structure_legacy.cpp',
'output/CBaselineOutput.cpp',
diff --git a/TestCases/cont_adj_euler/naca0012/of_grad_cd.dat.ref b/TestCases/cont_adj_euler/naca0012/of_grad_cd.dat.ref
index 51834640461c..37151f9b51b8 100644
--- a/TestCases/cont_adj_euler/naca0012/of_grad_cd.dat.ref
+++ b/TestCases/cont_adj_euler/naca0012/of_grad_cd.dat.ref
@@ -1,39 +1,39 @@
VARIABLES="VARIABLE" , "GRADIENT" , "FINDIFF_STEP"
- 0 , 0.00547874 , 0.0001
- 1 , 0.0243474 , 0.0001
- 2 , 0.0300065 , 0.0001
- 3 , 0.0234715 , 0.0001
- 4 , 0.00345121 , 0.0001
- 5 , -0.0307434 , 0.0001
- 6 , -0.0774773 , 0.0001
- 7 , -0.13197 , 0.0001
- 8 , -0.186782 , 0.0001
- 9 , -0.233914 , 0.0001
- 10 , -0.268098 , 0.0001
- 11 , -0.289809 , 0.0001
- 12 , -0.305806 , 0.0001
- 13 , -0.325957 , 0.0001
- 14 , -0.358284 , 0.0001
- 15 , -0.407284 , 0.0001
- 16 , -0.479307 , 0.0001
- 17 , -0.595933 , 0.0001
- 18 , -0.850309 , 0.0001
- 19 , 0.566108 , 0.0001
- 20 , 1.14466 , 0.0001
- 21 , 1.50253 , 0.0001
- 22 , 1.62876 , 0.0001
+ 0 , 0.00535089 , 0.0001
+ 1 , 0.0242911 , 0.0001
+ 2 , 0.0299764 , 0.0001
+ 3 , 0.0234387 , 0.0001
+ 4 , 0.00340296 , 0.0001
+ 5 , -0.0308074 , 0.0001
+ 6 , -0.0775488 , 0.0001
+ 7 , -0.132036 , 0.0001
+ 8 , -0.186829 , 0.0001
+ 9 , -0.23393 , 0.0001
+ 10 , -0.268075 , 0.0001
+ 11 , -0.28975 , 0.0001
+ 12 , -0.305723 , 0.0001
+ 13 , -0.325869 , 0.0001
+ 14 , -0.358213 , 0.0001
+ 15 , -0.407235 , 0.0001
+ 16 , -0.479256 , 0.0001
+ 17 , -0.595829 , 0.0001
+ 18 , -0.849999 , 0.0001
+ 19 , 0.56594 , 0.0001
+ 20 , 1.14452 , 0.0001
+ 21 , 1.50242 , 0.0001
+ 22 , 1.6287 , 0.0001
23 , 1.54945 , 0.0001
- 24 , 1.31552 , 0.0001
- 25 , 0.989768 , 0.0001
- 26 , 0.634351 , 0.0001
- 27 , 0.301435 , 0.0001
- 28 , 0.0285559 , 0.0001
- 29 , -0.160999 , 0.0001
- 30 , -0.254739 , 0.0001
- 31 , -0.248341 , 0.0001
- 32 , -0.148559 , 0.0001
- 33 , 0.0172426 , 0.0001
- 34 , 0.196759 , 0.0001
- 35 , 0.341483 , 0.0001
- 36 , 0.467392 , 0.0001
- 37 , 0.683048 , 0.0001
+ 24 , 1.3156 , 0.0001
+ 25 , 0.989938 , 0.0001
+ 26 , 0.634635 , 0.0001
+ 27 , 0.301857 , 0.0001
+ 28 , 0.0291461 , 0.0001
+ 29 , -0.160219 , 0.0001
+ 30 , -0.253768 , 0.0001
+ 31 , -0.247224 , 0.0001
+ 32 , -0.147422 , 0.0001
+ 33 , 0.0181747 , 0.0001
+ 34 , 0.197239 , 0.0001
+ 35 , 0.341459 , 0.0001
+ 36 , 0.467151 , 0.0001
+ 37 , 0.682813 , 0.0001
diff --git a/TestCases/cont_adj_euler/naca0012/of_grad_cd_disc.dat.ref b/TestCases/cont_adj_euler/naca0012/of_grad_cd_disc.dat.ref
index 210df4b67cbd..abde9ba2e9d0 100644
--- a/TestCases/cont_adj_euler/naca0012/of_grad_cd_disc.dat.ref
+++ b/TestCases/cont_adj_euler/naca0012/of_grad_cd_disc.dat.ref
@@ -1,39 +1,39 @@
VARIABLES="VARIABLE" , "GRADIENT" , "FINDIFF_STEP"
- 0 , -1501.32 , 0.001
- 1 , -8853.97 , 0.001
- 2 , -13557.1 , 0.001
- 3 , -14434.8 , 0.001
- 4 , -12487.9 , 0.001
- 5 , -9091.29 , 0.001
- 6 , -5397.59 , 0.001
- 7 , -2149.2 , 0.001
- 8 , 309.712 , 0.001
- 9 , 1914.46 , 0.001
- 10 , 2719.69 , 0.001
- 11 , 2757.37 , 0.001
- 12 , 1963.39 , 0.001
- 13 , 201.471 , 0.001
- 14 , -2599.03 , 0.001
- 15 , -6126.72 , 0.001
- 16 , -9129.12 , 0.001
- 17 , -9984.02 , 0.001
- 18 , -18443.1 , 0.001
- 19 , -9934.24 , 0.001
- 20 , -20497.1 , 0.001
- 21 , -22358.1 , 0.001
- 22 , -21058.4 , 0.001
- 23 , -20260.3 , 0.001
- 24 , -21304.1 , 0.001
- 25 , -23739.6 , 0.001
- 26 , -26013.5 , 0.001
- 27 , -26125.3 , 0.001
- 28 , -22227.0 , 0.001
- 29 , -13248.5 , 0.001
- 30 , 328.328 , 0.001
- 31 , 15562.7 , 0.001
- 32 , 26605.3 , 0.001
- 33 , 26411.8 , 0.001
- 34 , 12479.9 , 0.001
- 35 , -7567.83 , 0.001
- 36 , -23250.2 , 0.001
- 37 , -23417.7 , 0.001
+ 0 , -3104.84 , 0.001
+ 1 , -12744.7 , 0.001
+ 2 , -17542.4 , 0.001
+ 3 , -18273.9 , 0.001
+ 4 , -16704.4 , 0.001
+ 5 , -14262.7 , 0.001
+ 6 , -11843.3 , 0.001
+ 7 , -9867.41 , 0.001
+ 8 , -8421.39 , 0.001
+ 9 , -7414.08 , 0.001
+ 10 , -6719.69 , 0.001
+ 11 , -6278.28 , 0.001
+ 12 , -6128.23 , 0.001
+ 13 , -6361.53 , 0.001
+ 14 , -7022.63 , 0.001
+ 15 , -8027.63 , 0.001
+ 16 , -9421.03 , 0.001
+ 17 , -12856.8 , 0.001
+ 18 , -21811.8 , 0.001
+ 19 , -10009.3 , 0.001
+ 20 , -22064.5 , 0.001
+ 21 , -21920.4 , 0.001
+ 22 , -18454.6 , 0.001
+ 23 , -15764.5 , 0.001
+ 24 , -14944.7 , 0.001
+ 25 , -15338.8 , 0.001
+ 26 , -15441.1 , 0.001
+ 27 , -13583.4 , 0.001
+ 28 , -8500.83 , 0.001
+ 29 , 127.183 , 0.001
+ 30 , 11095.3 , 0.001
+ 31 , 21150.1 , 0.001
+ 32 , 25103.9 , 0.001
+ 33 , 17923.5 , 0.001
+ 34 , -74.0778 , 0.001
+ 35 , -18598.2 , 0.001
+ 36 , -23657.5 , 0.001
+ 37 , -16337.7 , 0.001
diff --git a/TestCases/cont_adj_euler/naca0012/of_grad_directdiff.dat.ref b/TestCases/cont_adj_euler/naca0012/of_grad_directdiff.dat.ref
index ae821034f0f1..1c0e0f22f813 100644
--- a/TestCases/cont_adj_euler/naca0012/of_grad_directdiff.dat.ref
+++ b/TestCases/cont_adj_euler/naca0012/of_grad_directdiff.dat.ref
@@ -1,4 +1,4 @@
VARIABLES="VARIABLE" , "DRAG" , "EFFICIENCY" , "FORCE_X" , "FORCE_Y" , "FORCE_Z" , "LIFT" , "MOMENT_X" , "MOMENT_Y" , "MOMENT_Z" , "SIDEFORCE"
- 0 , 0.2372492479 , -114.3125628 , 0.2709181595 , -1.540436284 , 0.0 , -1.54597975 , 0.0 , 0.0 , 1.213847013 , 0.0
- 1 , 0.4025511296 , -185.8275927 , 0.45451385 , -2.377026434 , 0.0 , -2.386375933 , 0.0 , 0.0 , 1.049077447 , 0.0
- 2 , 0.5395721612 , -245.7671599 , 0.6071179277 , -3.089692602 , 0.0 , -3.102201546 , 0.0 , 0.0 , 0.6299667538 , 0.0
+ 0 , 0.2285012284 , -106.6962871 , 0.2620099206 , -1.533188961 , 0.0 , -1.53853982 , 0.0 , 0.0 , 1.203388761 , 0.0
+ 1 , 0.3866276739 , -174.5390955 , 0.439411593 , -2.414835143 , 0.0 , -2.423846191 , 0.0 , 0.0 , 1.053071502 , 0.0
+ 2 , 0.5178161379 , -230.224511 , 0.5861998797 , -3.128333793 , 0.0 , -3.140377217 , 0.0 , 0.0 , 0.6530524517 , 0.0
diff --git a/TestCases/cont_adj_euler/wedge/inv_wedge_ROE.cfg b/TestCases/cont_adj_euler/wedge/inv_wedge_ROE.cfg
index 23cbb3d1bfe3..ae62af171467 100644
--- a/TestCases/cont_adj_euler/wedge/inv_wedge_ROE.cfg
+++ b/TestCases/cont_adj_euler/wedge/inv_wedge_ROE.cfg
@@ -91,7 +91,7 @@ NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES
CFL_NUMBER= 1.0
%
% Adaptive CFL number (NO, YES)
-CFL_ADAPT= YES
+CFL_ADAPT= NO
%
% Parameters of the adaptive CFL number (factor down, factor up, CFL min value,
% CFL max value )
diff --git a/TestCases/cont_adj_euler/wedge/inv_wedge_ROE_multiobj.cfg b/TestCases/cont_adj_euler/wedge/inv_wedge_ROE_multiobj.cfg
index 573411c0d1dc..7e17d81c60a3 100644
--- a/TestCases/cont_adj_euler/wedge/inv_wedge_ROE_multiobj.cfg
+++ b/TestCases/cont_adj_euler/wedge/inv_wedge_ROE_multiobj.cfg
@@ -91,7 +91,7 @@ NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES
CFL_NUMBER= 1.0
%
% Adaptive CFL number (NO, YES)
-CFL_ADAPT= YES
+CFL_ADAPT= NO
%
% Parameters of the adaptive CFL number (factor down, factor up, CFL min value,
% CFL max value )
diff --git a/TestCases/cont_adj_euler/wedge/of_grad_combo.dat.ref b/TestCases/cont_adj_euler/wedge/of_grad_combo.dat.ref
index a82dace8db71..0d54e740402b 100644
--- a/TestCases/cont_adj_euler/wedge/of_grad_combo.dat.ref
+++ b/TestCases/cont_adj_euler/wedge/of_grad_combo.dat.ref
@@ -1,5 +1,5 @@
VARIABLES="VARIABLE" , "GRADIENT" , "FINDIFF_STEP"
- 0 , 0.00767938 , 0.0001
- 1 , 0.00499129 , 0.0001
- 2 , 0.00249092 , 0.0001
- 3 , 0.000902095 , 0.0001
+ 0 , 0.00766235 , 0.0001
+ 1 , 0.00499567 , 0.0001
+ 2 , 0.00249665 , 0.0001
+ 3 , 0.000904607 , 0.0001
diff --git a/TestCases/disc_adj_euler/arina2k/Arina2KRS.cfg b/TestCases/disc_adj_euler/arina2k/Arina2KRS.cfg
index 86cb24314f10..38c0323a7cf8 100644
--- a/TestCases/disc_adj_euler/arina2k/Arina2KRS.cfg
+++ b/TestCases/disc_adj_euler/arina2k/Arina2KRS.cfg
@@ -340,7 +340,6 @@ ENTROPY_FIX_COEFF= 0.0
TIME_DISCRE_FLOW= EULER_IMPLICIT
%
% Relaxation coefficient
-RELAXATION_FACTOR_FLOW= 0.95
% ---------------- ADJOINT-FLOW NUMERICAL METHOD DEFINITION -------------------%
diff --git a/TestCases/disc_adj_euler/cylinder3D/inv_cylinder3D.cfg b/TestCases/disc_adj_euler/cylinder3D/inv_cylinder3D.cfg
index 05a1a67ecb19..09c25f03699c 100644
--- a/TestCases/disc_adj_euler/cylinder3D/inv_cylinder3D.cfg
+++ b/TestCases/disc_adj_euler/cylinder3D/inv_cylinder3D.cfg
@@ -225,7 +225,6 @@ CONV_NUM_METHOD_FLOW= JST
TIME_DISCRE_FLOW= EULER_IMPLICIT
%
% Relaxation coefficient
-RELAXATION_FACTOR_FLOW= 0.95
% ---------------- ADJOINT-FLOW NUMERICAL METHOD DEFINITION -------------------%
%
diff --git a/TestCases/disc_adj_heat/disc_adj_heat.cfg b/TestCases/disc_adj_heat/disc_adj_heat.cfg
index 68210556cab9..4c98403b7232 100644
--- a/TestCases/disc_adj_heat/disc_adj_heat.cfg
+++ b/TestCases/disc_adj_heat/disc_adj_heat.cfg
@@ -116,7 +116,6 @@ JST_SENSOR_COEFF= ( 0.5, 0.05 )
TIME_DISCRE_FLOW= EULER_IMPLICIT
-RELAXATION_FACTOR_FLOW= 1.0
% -------------------- TURBULENT NUMERICAL METHOD DEFINITION ------------------%
@@ -128,7 +127,6 @@ TIME_DISCRE_TURB= EULER_IMPLICIT
CFL_REDUCTION_TURB= 1.0
-RELAXATION_FACTOR_TURB= 1.0
% -------------------- HEAT NUMERICAL METHOD DEFINITION -----------------------%
diff --git a/TestCases/disc_adj_rans/naca0012/turb_NACA0012_sa.cfg b/TestCases/disc_adj_rans/naca0012/turb_NACA0012_sa.cfg
index d05aeb17308c..29580ac333b4 100644
--- a/TestCases/disc_adj_rans/naca0012/turb_NACA0012_sa.cfg
+++ b/TestCases/disc_adj_rans/naca0012/turb_NACA0012_sa.cfg
@@ -19,20 +19,13 @@
SOLVER= RANS
%
% Specify turbulent model (NONE, SA, SA_NEG, SST)
-KIND_TURB_MODEL= SA
+KIND_TURB_MODEL= SA_NEG
%
% Mathematical problem (DIRECT, CONTINUOUS_ADJOINT)
MATH_PROBLEM= DISCRETE_ADJOINT
%
% Restart solution (NO, YES)
RESTART_SOL= NO
-%
-% Write binary restart files (YES, NO)
-WRT_BINARY_RESTART= NO
-%
-% Read binary restart files (YES, NO)
-READ_BINARY_RESTART= NO
-%
% -------------------- COMPRESSIBLE FREE-STREAM DEFINITION --------------------%
%
@@ -253,5 +246,5 @@ WRT_SOL_FREQ= 1000
WRT_CON_FREQ= 1
%
% Screen output
-SCREEN_OUTPUT = (INNER_ITER, RMS_ADJ_DENSITY, RMS_ADJ_NU_TILDE, SENS_PRESS, SENS_AOA)
+SCREEN_OUTPUT = (INNER_ITER, RMS_ADJ_DENSITY, RMS_ADJ_NU_TILDE, SENS_PRESS, SENS_AOA RMS_DENSITY RMS_NU_TILDE LIFT DRAG)
diff --git a/TestCases/disc_adj_rans/naca0012/turb_NACA0012_sst.cfg b/TestCases/disc_adj_rans/naca0012/turb_NACA0012_sst.cfg
index 0ec948c08c28..0abf1b412fb4 100644
--- a/TestCases/disc_adj_rans/naca0012/turb_NACA0012_sst.cfg
+++ b/TestCases/disc_adj_rans/naca0012/turb_NACA0012_sst.cfg
@@ -26,13 +26,6 @@ MATH_PROBLEM= DISCRETE_ADJOINT
%
% Restart solution (NO, YES)
RESTART_SOL= NO
-%
-% Write binary restart files (YES, NO)
-WRT_BINARY_RESTART= NO
-%
-% Read binary restart files (YES, NO)
-READ_BINARY_RESTART= NO
-%
% -------------------- COMPRESSIBLE FREE-STREAM DEFINITION --------------------%
%
@@ -252,5 +245,5 @@ WRT_SOL_FREQ= 1000
WRT_CON_FREQ= 1
%
% Screen output
-SCREEN_OUTPUT = (INNER_ITER, RMS_ADJ_DENSITY, RMS_ADJ_TKE, SENS_PRESS, SENS_AOA)
+SCREEN_OUTPUT = (INNER_ITER, RMS_ADJ_DENSITY, RMS_ADJ_TKE, SENS_PRESS, SENS_AOA RMS_DENSITY RMS_TKE LIFT DRAG)
diff --git a/TestCases/disc_adj_turbomachinery/transonic_stator_2D/transonic_stator.cfg b/TestCases/disc_adj_turbomachinery/transonic_stator_2D/transonic_stator.cfg
index 59ee7816f8f7..b78895338f5f 100644
--- a/TestCases/disc_adj_turbomachinery/transonic_stator_2D/transonic_stator.cfg
+++ b/TestCases/disc_adj_turbomachinery/transonic_stator_2D/transonic_stator.cfg
@@ -259,7 +259,6 @@ JST_SENSOR_COEFF= ( 0.5, 0.02 )
TIME_DISCRE_FLOW= EULER_IMPLICIT
%
% Relaxation coefficient
-RELAXATION_FACTOR_FLOW= 1.0
%
%
% -------------------- TURBULENT NUMERICAL METHOD DEFINITION ------------------%
@@ -281,7 +280,6 @@ TIME_DISCRE_TURB= EULER_IMPLICIT
CFL_REDUCTION_TURB= 0.1
%
% Relaxation coefficient
-RELAXATION_FACTOR_TURB= 1.0
%
%
% ----------------------- DESIGN VARIABLE PARAMETERS --------------------------%
diff --git a/TestCases/moving_wall/spinning_cylinder/spinning_cylinder.cfg b/TestCases/moving_wall/spinning_cylinder/spinning_cylinder.cfg
index 98f66ba40237..5b1ab1b6e590 100644
--- a/TestCases/moving_wall/spinning_cylinder/spinning_cylinder.cfg
+++ b/TestCases/moving_wall/spinning_cylinder/spinning_cylinder.cfg
@@ -173,7 +173,7 @@ CONV_NUM_METHOD_FLOW= ROE
MUSCL_FLOW= YES
%
% Slope limiter (VENKATAKRISHNAN, MINMOD)
-SLOPE_LIMITER_FLOW= VENKATAKRISHNAN
+SLOPE_LIMITER_FLOW= NONE
%
% 2nd and 4th order artificial dissipation coefficients
JST_SENSOR_COEFF= ( 0.5, 0.02 )
diff --git a/TestCases/multiple_ffd/naca0012/of_grad_cd.dat.ref b/TestCases/multiple_ffd/naca0012/of_grad_cd.dat.ref
index f8a53f45e461..a1f7b64fddb2 100644
--- a/TestCases/multiple_ffd/naca0012/of_grad_cd.dat.ref
+++ b/TestCases/multiple_ffd/naca0012/of_grad_cd.dat.ref
@@ -1,3 +1,3 @@
VARIABLES="VARIABLE" , "GRADIENT" , "FINDIFF_STEP"
- 0 , 0.0681378 , 0.001
- 1 , -0.124933 , 0.001
+ 0 , 0.0597229 , 0.001
+ 1 , -0.108655 , 0.001
diff --git a/TestCases/multiple_ffd/naca0012/of_grad_directdiff.dat.ref b/TestCases/multiple_ffd/naca0012/of_grad_directdiff.dat.ref
index 9b26b8580cf2..e279f1f88b94 100644
--- a/TestCases/multiple_ffd/naca0012/of_grad_directdiff.dat.ref
+++ b/TestCases/multiple_ffd/naca0012/of_grad_directdiff.dat.ref
@@ -1,3 +1,3 @@
VARIABLES="VARIABLE" , "DRAG" , "EFFICIENCY" , "FORCE_X" , "FORCE_Y" , "FORCE_Z" , "LIFT" , "MOMENT_X" , "MOMENT_Y" , "MOMENT_Z" , "SIDEFORCE"
- 0 , 0.06235436973 , -0.3961427924 , 0.05921156151 , 0.1447130695 , 0.0 , 0.1433869383 , 0.0 , 0.0 , 0.002242588997 , 0.0
- 1 , -0.07730334353 , 10.18344094 , -0.08433952825 , 0.3216204983 , 0.0 , 0.3233838184 , 0.0 , 0.0 , -0.01225607819 , 0.0
+ 0 , 0.05698141666 , -0.4016762951 , 0.05429379682 , 0.1237934687 , 0.0 , 0.1225795963 , 0.0 , 0.0 , 0.009159910311 , 0.0
+ 1 , -0.08029896733 , 8.980081481 , -0.08626576809 , 0.2725786469 , 0.0 , 0.2743956584 , 0.0 , 0.0 , 0.008211157534 , 0.0
diff --git a/TestCases/optimization_euler/multiobjective_wedge/inv_wedge_ROE_2surf_1obj.cfg b/TestCases/optimization_euler/multiobjective_wedge/inv_wedge_ROE_2surf_1obj.cfg
index 5176193823c9..3166e54b05d3 100644
--- a/TestCases/optimization_euler/multiobjective_wedge/inv_wedge_ROE_2surf_1obj.cfg
+++ b/TestCases/optimization_euler/multiobjective_wedge/inv_wedge_ROE_2surf_1obj.cfg
@@ -87,7 +87,7 @@ NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES
CFL_NUMBER= 1.0
%
% Adaptive CFL number (NO, YES)
-CFL_ADAPT= YES
+CFL_ADAPT= NO
%
% Parameters of the adaptive CFL number (factor down, factor up, CFL min value,
% CFL max value )
diff --git a/TestCases/optimization_euler/multiobjective_wedge/inv_wedge_ROE_multiobj_1surf.cfg b/TestCases/optimization_euler/multiobjective_wedge/inv_wedge_ROE_multiobj_1surf.cfg
index e35c3b48dde7..cf8abbe8785e 100644
--- a/TestCases/optimization_euler/multiobjective_wedge/inv_wedge_ROE_multiobj_1surf.cfg
+++ b/TestCases/optimization_euler/multiobjective_wedge/inv_wedge_ROE_multiobj_1surf.cfg
@@ -88,7 +88,7 @@ NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES
CFL_NUMBER= 1.0
%
% Adaptive CFL number (NO, YES)
-CFL_ADAPT= YES
+CFL_ADAPT= NO
%
% Parameters of the adaptive CFL number (factor down, factor up, CFL min value,
% CFL max value )
diff --git a/TestCases/parallel_regression.py b/TestCases/parallel_regression.py
index d57391263820..cc7e6a16a7d4 100644
--- a/TestCases/parallel_regression.py
+++ b/TestCases/parallel_regression.py
@@ -68,7 +68,7 @@ def main():
naca0012.cfg_dir = "euler/naca0012"
naca0012.cfg_file = "inv_NACA0012_Roe.cfg"
naca0012.test_iter = 20
- naca0012.test_vals = [-4.052370, -3.563380, 0.336120, 0.021570] #last 4 columns
+ naca0012.test_vals = [-4.056135, -3.565160, 0.336703, 0.021541] #last 4 columns
naca0012.su2_exec = "parallel_computation.py -f"
naca0012.timeout = 1600
naca0012.tol = 0.00001
@@ -90,7 +90,7 @@ def main():
oneram6.cfg_dir = "euler/oneram6"
oneram6.cfg_file = "inv_ONERAM6.cfg"
oneram6.test_iter = 10
- oneram6.test_vals = [-7.079068, -6.542899, 0.282322, 0.011804] #last 4 columns
+ oneram6.test_vals = [-10.208444, -9.625586, 0.281704, 0.011821] #last 4 columns
oneram6.su2_exec = "parallel_computation.py -f"
oneram6.timeout = 3200
oneram6.tol = 0.00001
@@ -101,7 +101,7 @@ def main():
fixedCL_naca0012.cfg_dir = "fixed_cl/naca0012"
fixedCL_naca0012.cfg_file = "inv_NACA0012.cfg"
fixedCL_naca0012.test_iter = 10
- fixedCL_naca0012.test_vals = [-12.175228, -6.778440, 0.300000, 0.019470] #last 4 columns
+ fixedCL_naca0012.test_vals = [-12.137680, -6.705671, 0.300000, 0.019470] #last 4 columns
fixedCL_naca0012.su2_exec = "parallel_computation.py -f"
fixedCL_naca0012.timeout = 1600
fixedCL_naca0012.tol = 0.00001
@@ -113,7 +113,7 @@ def main():
polar_naca0012.cfg_file = "inv_NACA0012.cfg"
polar_naca0012.polar = True
polar_naca0012.test_iter = 10
- polar_naca0012.test_vals = [-1.293870, 4.141024, -0.002288, 0.008868] #last 4 columns
+ polar_naca0012.test_vals = [-1.216242, 4.253547, 0.001423, 0.015977] #last 4 columns
polar_naca0012.su2_exec = "compute_polar.py -i 11"
polar_naca0012.timeout = 1600
polar_naca0012.tol = 0.00001
@@ -124,7 +124,7 @@ def main():
bluntbody.cfg_dir = "euler/bluntbody"
bluntbody.cfg_file = "blunt.cfg"
bluntbody.test_iter = 20
- bluntbody.test_vals = [0.553700, 6.926057, -0.000000, 1.792561] #last 4 columns
+ bluntbody.test_vals = [0.540009, 6.916653, 0.000000, 1.868976] #last 4 columns
bluntbody.su2_exec = "parallel_computation.py -f"
bluntbody.timeout = 1600
bluntbody.tol = 0.00001
@@ -198,7 +198,7 @@ def main():
rae2822_sa.cfg_dir = "rans/rae2822"
rae2822_sa.cfg_file = "turb_SA_RAE2822.cfg"
rae2822_sa.test_iter = 20
- rae2822_sa.test_vals = [-1.999739, -5.231505, 0.826880, 0.052973] #last 4 columns
+ rae2822_sa.test_vals = [-2.013881, -5.271311, 0.814981, 0.061858] #last 4 columns
rae2822_sa.su2_exec = "parallel_computation.py -f"
rae2822_sa.timeout = 1600
rae2822_sa.tol = 0.00001
@@ -209,7 +209,7 @@ def main():
rae2822_sst.cfg_dir = "rans/rae2822"
rae2822_sst.cfg_file = "turb_SST_RAE2822.cfg"
rae2822_sst.test_iter = 20
- rae2822_sst.test_vals = [-0.510806, 4.916635, 0.827705, 0.053331] #last 4 columns
+ rae2822_sst.test_vals = [-0.510623, 4.874845, 0.817046, 0.062059] #last 4 columns
rae2822_sst.su2_exec = "parallel_computation.py -f"
rae2822_sst.timeout = 1600
rae2822_sst.tol = 0.00001
@@ -220,7 +220,7 @@ def main():
rae2822_sst_sust.cfg_dir = "rans/rae2822"
rae2822_sst_sust.cfg_file = "turb_SST_SUST_RAE2822.cfg"
rae2822_sst_sust.test_iter = 20
- rae2822_sst_sust.test_vals = [-2.407053, 4.916635, 0.827705, 0.053331] #last 4 columns
+ rae2822_sst_sust.test_vals = [-2.427686, 4.874845, 0.817046, 0.062059] #last 4 columns
rae2822_sst_sust.su2_exec = "parallel_computation.py -f"
rae2822_sst_sust.timeout = 1600
rae2822_sst_sust.tol = 0.00001
@@ -242,7 +242,7 @@ def main():
turb_oneram6.cfg_dir = "rans/oneram6"
turb_oneram6.cfg_file = "turb_ONERAM6.cfg"
turb_oneram6.test_iter = 10
- turb_oneram6.test_vals = [-2.327430, -6.564331, 0.230257, 0.155839] #last 4 columns
+ turb_oneram6.test_vals = [-2.372511, -6.579340, 0.229864, 0.147639] #last 4 columns
turb_oneram6.su2_exec = "parallel_computation.py -f"
turb_oneram6.timeout = 3200
turb_oneram6.tol = 0.00001
@@ -253,29 +253,18 @@ def main():
turb_naca0012_sa.cfg_dir = "rans/naca0012"
turb_naca0012_sa.cfg_file = "turb_NACA0012_sa.cfg"
turb_naca0012_sa.test_iter = 10
- turb_naca0012_sa.test_vals = [-11.981164, -9.145363, 1.070528, 0.019417] #last 4 columns
+ turb_naca0012_sa.test_vals = [-12.078407, -16.147828, 1.064326, 0.019770] #last 4 columns
turb_naca0012_sa.su2_exec = "parallel_computation.py -f"
turb_naca0012_sa.timeout = 3200
turb_naca0012_sa.tol = 0.00001
test_list.append(turb_naca0012_sa)
-
- # NACA0012 (SA, FUN3D results for finest grid: CL=1.0983, CD=0.01242) with binary restart
- turb_naca0012_sa_bin = TestCase('turb_naca0012_sa_bin')
- turb_naca0012_sa_bin.cfg_dir = "rans/naca0012"
- turb_naca0012_sa_bin.cfg_file = "turb_NACA0012_sa_binary.cfg"
- turb_naca0012_sa_bin.test_iter = 10
- turb_naca0012_sa_bin.test_vals = [-11.981288, -9.145363, 1.070528, 0.019417] #last 4 columns
- turb_naca0012_sa_bin.su2_exec = "parallel_computation.py -f"
- turb_naca0012_sa_bin.timeout = 3200
- turb_naca0012_sa_bin.tol = 0.00001
- test_list.append(turb_naca0012_sa_bin)
# NACA0012 (SST, FUN3D finest grid results: CL=1.0840, CD=0.01253)
turb_naca0012_sst = TestCase('turb_naca0012_sst')
turb_naca0012_sst.cfg_dir = "rans/naca0012"
turb_naca0012_sst.cfg_file = "turb_NACA0012_sst.cfg"
turb_naca0012_sst.test_iter = 10
- turb_naca0012_sst.test_vals = [-12.454442, -6.574917, 1.059622, 0.019138] #last 4 columns
+ turb_naca0012_sst.test_vals = [-15.274205, -6.250384, 1.049989, 0.019166] #last 4 columns
turb_naca0012_sst.su2_exec = "parallel_computation.py -f"
turb_naca0012_sst.timeout = 3200
turb_naca0012_sst.tol = 0.00001
@@ -286,7 +275,7 @@ def main():
turb_naca0012_sst_sust.cfg_dir = "rans/naca0012"
turb_naca0012_sst_sust.cfg_file = "turb_NACA0012_sst_sust.cfg"
turb_naca0012_sst_sust.test_iter = 10
- turb_naca0012_sst_sust.test_vals = [-13.280836, -5.645158, 1.022304, 0.019539] #last 4 columns
+ turb_naca0012_sst_sust.test_vals = [-14.851291, -5.980663, 1.005228, 0.019014] #last 4 columns
turb_naca0012_sst_sust.su2_exec = "parallel_computation.py -f"
turb_naca0012_sst_sust.timeout = 3200
turb_naca0012_sst_sust.tol = 0.00001
@@ -297,7 +286,7 @@ def main():
propeller.cfg_dir = "rans/propeller"
propeller.cfg_file = "propeller.cfg"
propeller.test_iter = 10
- propeller.test_vals = [-3.378876, -8.396837, 0.000047, 0.055591] #last 4 columns
+ propeller.test_vals = [-3.389575, -8.409529, 0.000048, 0.056329] #last 4 columns
propeller.su2_exec = "parallel_computation.py -f"
propeller.timeout = 3200
propeller.tol = 0.00001
@@ -313,7 +302,7 @@ def main():
turb_naca0012_sst_restart_mg.cfg_file = "turb_NACA0012_sst_multigrid_restart.cfg"
turb_naca0012_sst_restart_mg.test_iter = 20
turb_naca0012_sst_restart_mg.ntest_vals = 5
- turb_naca0012_sst_restart_mg.test_vals = [-6.437400, -4.558626, 1.231779, -0.007820, 0.081480] #last 5 columns
+ turb_naca0012_sst_restart_mg.test_vals = [-7.826679, -8.082385, -3.174847, -0.000015, 0.081277] #last 5 columns
turb_naca0012_sst_restart_mg.su2_exec = "parallel_computation.py -f"
turb_naca0012_sst_restart_mg.timeout = 3200
turb_naca0012_sst_restart_mg.tol = 0.000001
@@ -413,7 +402,7 @@ def main():
inc_turb_naca0012_sst_sust.cfg_dir = "incomp_rans/naca0012"
inc_turb_naca0012_sst_sust.cfg_file = "naca0012_SST_SUST.cfg"
inc_turb_naca0012_sst_sust.test_iter = 20
- inc_turb_naca0012_sst_sust.test_vals = [-7.277551, 0.147212, -0.000000, 0.311977] #last 4 columns
+ inc_turb_naca0012_sst_sust.test_vals = [-7.276357, 0.146097, -0.000000, 0.312019] #last 4 columns
inc_turb_naca0012_sst_sust.su2_exec = "parallel_computation.py -f"
inc_turb_naca0012_sst_sust.timeout = 1600
inc_turb_naca0012_sst_sust.tol = 0.00001
@@ -515,7 +504,7 @@ def main():
schubauer_klebanoff_transition.cfg_dir = "transition/Schubauer_Klebanoff"
schubauer_klebanoff_transition.cfg_file = "transitional_BC_model_ConfigFile.cfg"
schubauer_klebanoff_transition.test_iter = 10
- schubauer_klebanoff_transition.test_vals = [-7.994738, -14.278082, 0.000046, 0.007987] #last 4 columns
+ schubauer_klebanoff_transition.test_vals = [-7.994738, -14.268367, 0.000046, 0.007987] #last 4 columns
schubauer_klebanoff_transition.su2_exec = "parallel_computation.py -f"
schubauer_klebanoff_transition.timeout = 1600
schubauer_klebanoff_transition.tol = 0.00001
@@ -552,7 +541,7 @@ def main():
contadj_wedge.cfg_dir = "cont_adj_euler/wedge"
contadj_wedge.cfg_file = "inv_wedge_ROE.cfg"
contadj_wedge.test_iter = 10
- contadj_wedge.test_vals = [2.856008, -2.767216, 1.0029e+06, 7.0328e-14] #last 4 columns
+ contadj_wedge.test_vals = [2.872691, -2.755572, 853010.000000, 0.000000] #last 4 columns
contadj_wedge.su2_exec = "parallel_computation.py -f"
contadj_wedge.timeout = 1600
contadj_wedge.tol = 0.00001
@@ -563,7 +552,7 @@ def main():
contadj_fixed_CL_naca0012.cfg_dir = "fixed_cl/naca0012"
contadj_fixed_CL_naca0012.cfg_file = "inv_NACA0012_ContAdj.cfg"
contadj_fixed_CL_naca0012.test_iter = 100
- contadj_fixed_CL_naca0012.test_vals = [0.319630, -5.191448, 0.361280, 0.000084] #last 4 columns
+ contadj_fixed_CL_naca0012.test_vals = [0.317289, -5.193066, 0.360470, 0.000069] #last 4 columns
contadj_fixed_CL_naca0012.su2_exec = "parallel_computation.py -f"
contadj_fixed_CL_naca0012.timeout = 1600
contadj_fixed_CL_naca0012.tol = 0.00001
@@ -652,7 +641,7 @@ def main():
turb_naca0012_1c.cfg_dir = "rans_uq/naca0012"
turb_naca0012_1c.cfg_file = "turb_NACA0012_uq_1c.cfg"
turb_naca0012_1c.test_iter = 10
- turb_naca0012_1c.test_vals = [-4.947380, 1.257714, 5.477923, 1.995089] #last 4 columns
+ turb_naca0012_1c.test_vals = [-4.906256, 1.337943, 6.052217, 2.395627] #last 4 columns
turb_naca0012_1c.su2_exec = "parallel_computation.py -f"
turb_naca0012_1c.timeout = 1600
turb_naca0012_1c.tol = 0.00001
@@ -663,7 +652,7 @@ def main():
turb_naca0012_2c.cfg_dir = "rans_uq/naca0012"
turb_naca0012_2c.cfg_file = "turb_NACA0012_uq_2c.cfg"
turb_naca0012_2c.test_iter = 10
- turb_naca0012_2c.test_vals = [-5.348057, 1.132068, 5.213200, 1.842256] #last 4 columns
+ turb_naca0012_2c.test_vals = [-5.230215, 1.262233, 6.052131, 2.395642] #last 4 columns
turb_naca0012_2c.su2_exec = "parallel_computation.py -f"
turb_naca0012_2c.timeout = 1600
turb_naca0012_2c.tol = 0.00001
@@ -674,7 +663,7 @@ def main():
turb_naca0012_3c.cfg_dir = "rans_uq/naca0012"
turb_naca0012_3c.cfg_file = "turb_NACA0012_uq_3c.cfg"
turb_naca0012_3c.test_iter = 10
- turb_naca0012_3c.test_vals = [-5.422180, 1.098616, 5.101282, 1.780416] #last 4 columns
+ turb_naca0012_3c.test_vals = [-5.277132, 1.246269, 6.052474, 2.395999] #last 4 columns
turb_naca0012_3c.su2_exec = "parallel_computation.py -f"
turb_naca0012_3c.timeout = 1600
turb_naca0012_3c.tol = 0.00001
@@ -685,7 +674,7 @@ def main():
turb_naca0012_p1c1.cfg_dir = "rans_uq/naca0012"
turb_naca0012_p1c1.cfg_file = "turb_NACA0012_uq_p1c1.cfg"
turb_naca0012_p1c1.test_iter = 10
- turb_naca0012_p1c1.test_vals = [-5.025765, 1.280442, 5.928243, 2.285755] #last 4 columns
+ turb_naca0012_p1c1.test_vals = [-5.007909, 1.310935, 6.054741, 2.397402] #last 4 columns
turb_naca0012_p1c1.su2_exec = "parallel_computation.py -f"
turb_naca0012_p1c1.timeout = 1600
turb_naca0012_p1c1.tol = 0.00001
@@ -696,7 +685,7 @@ def main():
turb_naca0012_p1c2.cfg_dir = "rans_uq/naca0012"
turb_naca0012_p1c2.cfg_file = "turb_NACA0012_uq_p1c2.cfg"
turb_naca0012_p1c2.test_iter = 10
- turb_naca0012_p1c2.test_vals = [-5.359000, 1.152959, 5.569891, 2.048355] #last 4 columns
+ turb_naca0012_p1c2.test_vals = [-5.264043, 1.251313, 6.055013, 2.397532] #last 4 columns
turb_naca0012_p1c2.su2_exec = "parallel_computation.py -f"
turb_naca0012_p1c2.timeout = 1600
turb_naca0012_p1c2.tol = 0.00001
@@ -711,7 +700,7 @@ def main():
harmonic_balance.cfg_dir = "harmonic_balance"
harmonic_balance.cfg_file = "HB.cfg"
harmonic_balance.test_iter = 25
- harmonic_balance.test_vals = [-1.592454, 3.916019, -0.001014, 0.096794] #last 4 columns
+ harmonic_balance.test_vals = [-1.589862, 3.922099, -0.001443, 0.099456] #last 4 columns
harmonic_balance.su2_exec = "parallel_computation.py -f"
harmonic_balance.timeout = 1600
harmonic_balance.tol = 0.00001
@@ -723,7 +712,7 @@ def main():
hb_rans_preconditioning.cfg_dir = "harmonic_balance/hb_rans_preconditioning"
hb_rans_preconditioning.cfg_file = "davis.cfg"
hb_rans_preconditioning.test_iter = 25
- hb_rans_preconditioning.test_vals = [-1.900984, -5.880441, 0.007759, 0.125931] #last 4 columns
+ hb_rans_preconditioning.test_vals = [-1.909596, -5.954720, 0.007773, 0.131219] #last 4 columns
hb_rans_preconditioning.su2_exec = "parallel_computation.py -f"
hb_rans_preconditioning.timeout = 1600
hb_rans_preconditioning.tol = 0.00001
@@ -750,7 +739,7 @@ def main():
spinning_cylinder.cfg_dir = "moving_wall/spinning_cylinder"
spinning_cylinder.cfg_file = "spinning_cylinder.cfg"
spinning_cylinder.test_iter = 25
- spinning_cylinder.test_vals = [-7.696962, -2.251552, 1.542932, 1.564127] #last 4 columns
+ spinning_cylinder.test_vals = [-7.857785, -2.425289, 1.554359, 1.531183] #last 4 columns
spinning_cylinder.su2_exec = "parallel_computation.py -f"
spinning_cylinder.timeout = 1600
spinning_cylinder.tol = 0.00001
@@ -765,7 +754,7 @@ def main():
square_cylinder.cfg_dir = "unsteady/square_cylinder"
square_cylinder.cfg_file = "turb_square.cfg"
square_cylinder.test_iter = 3
- square_cylinder.test_vals = [-1.164008, 0.077263, 1.398549, 2.197049] #last 4 columns
+ square_cylinder.test_vals = [-1.162621, 0.066395, 1.399789, 2.220408] #last 4 columns
square_cylinder.su2_exec = "parallel_computation.py -f"
square_cylinder.timeout = 1600
square_cylinder.tol = 0.00001
@@ -777,7 +766,7 @@ def main():
sine_gust.cfg_dir = "gust"
sine_gust.cfg_file = "inv_gust_NACA0012.cfg"
sine_gust.test_iter = 5
- sine_gust.test_vals = [-1.977545, 3.481778, -0.001297, -0.005845] #last 4 columns
+ sine_gust.test_vals = [-1.977545, 3.481778, -0.001525, -0.007375] #last 4 columns
sine_gust.su2_exec = "parallel_computation.py -f"
sine_gust.timeout = 1600
sine_gust.tol = 0.00001
@@ -789,7 +778,7 @@ def main():
aeroelastic.cfg_dir = "aeroelastic"
aeroelastic.cfg_file = "aeroelastic_NACA64A010.cfg"
aeroelastic.test_iter = 2
- aeroelastic.test_vals = [0.081587, 0.033262, -0.001666, -0.000155] #last 4 columns
+ aeroelastic.test_vals = [0.081326, 0.033214, -0.001666, -0.000155] #last 4 columns
aeroelastic.su2_exec = "parallel_computation.py -f"
aeroelastic.timeout = 1600
aeroelastic.tol = 0.00001
@@ -829,7 +818,7 @@ def main():
edge_VW.cfg_dir = "nicf/edge"
edge_VW.cfg_file = "edge_VW.cfg"
edge_VW.test_iter = 100
- edge_VW.test_vals = [-5.192690, 0.944311, -0.000009, 0.000000] #last 4 columns
+ edge_VW.test_vals = [-5.203154, 0.933157, -0.000009, 0.000000] #last 4 columns
edge_VW.su2_exec = "parallel_computation.py -f"
edge_VW.timeout = 1600
edge_VW.tol = 0.00001
@@ -840,7 +829,7 @@ def main():
edge_PPR.cfg_dir = "nicf/edge"
edge_PPR.cfg_file = "edge_PPR.cfg"
edge_PPR.test_iter = 100
- edge_PPR.test_vals = [-5.387574, 0.753373, -0.000035, 0.000000] #last 4 columns
+ edge_PPR.test_vals = [-5.385223, 0.755862, -0.000035, 0.000000] #last 4 columns
edge_PPR.su2_exec = "parallel_computation.py -f"
edge_PPR.timeout = 1600
edge_PPR.tol = 0.00001
@@ -855,7 +844,7 @@ def main():
Jones_tc.cfg_dir = "turbomachinery/APU_turbocharger"
Jones_tc.cfg_file = "Jones.cfg"
Jones_tc.test_iter = 5
- Jones_tc.test_vals = [-5.301576, 0.418692, 78.467450, 0.990201] #last 4 columns
+ Jones_tc.test_vals = [-5.316335, 0.355081, 44.772280, 2.269966] #last 4 columns
Jones_tc.su2_exec = "parallel_computation.py -f"
Jones_tc.timeout = 1600
Jones_tc.new_output = False
@@ -867,7 +856,7 @@ def main():
Jones_tc_rst.cfg_dir = "turbomachinery/APU_turbocharger"
Jones_tc_rst.cfg_file = "Jones_rst.cfg"
Jones_tc_rst.test_iter = 5
- Jones_tc_rst.test_vals = [-4.344743, -1.553291, 82.250600, 2.791916] #last 4 columns
+ Jones_tc_rst.test_vals = [-3.034157, 0.013763, 82.263700, 2.792251] #last 4 columns
Jones_tc_rst.su2_exec = "parallel_computation.py -f"
Jones_tc_rst.timeout = 1600
Jones_tc_rst.new_output = False
@@ -879,7 +868,7 @@ def main():
axial_stage2D.cfg_dir = "turbomachinery/axial_stage_2D"
axial_stage2D.cfg_file = "Axial_stage2D.cfg"
axial_stage2D.test_iter = 20
- axial_stage2D.test_vals = [-1.790261, 5.696650, 73.362820, 0.904306] #last 4 columns
+ axial_stage2D.test_vals = [-1.933241, 5.310060, 73.357650, 1.841414] #last 4 columns
axial_stage2D.su2_exec = "parallel_computation.py -f"
axial_stage2D.timeout = 1600
axial_stage2D.new_output = False
@@ -891,7 +880,7 @@ def main():
transonic_stator.cfg_dir = "turbomachinery/transonic_stator_2D"
transonic_stator.cfg_file = "transonic_stator.cfg"
transonic_stator.test_iter = 20
- transonic_stator.test_vals = [-1.198895, 6.148362, 96.766820, 0.063115] #last 4 columns
+ transonic_stator.test_vals = [-0.574121, 5.820564, 96.994080, 0.062865] #last 4 columns
transonic_stator.su2_exec = "parallel_computation.py -f"
transonic_stator.timeout = 1600
transonic_stator.new_output = False
@@ -903,7 +892,7 @@ def main():
transonic_stator_rst.cfg_dir = "turbomachinery/transonic_stator_2D"
transonic_stator_rst.cfg_file = "transonic_stator_rst.cfg"
transonic_stator_rst.test_iter = 20
- transonic_stator_rst.test_vals = [-8.248805, -2.976199, 5.285722, 0.003100] #last 4 columns
+ transonic_stator_rst.test_vals = [-2.125313, 3.014645, 5.300089, 0.003103] #last 4 columns
transonic_stator_rst.su2_exec = "parallel_computation.py -f"
transonic_stator_rst.timeout = 1600
transonic_stator_rst.new_output = False
@@ -932,7 +921,7 @@ def main():
channel_2D.cfg_dir = "sliding_interface/channel_2D"
channel_2D.cfg_file = "channel_2D_WA.cfg"
channel_2D.test_iter = 2
- channel_2D.test_vals = [2.000000, 0.000000, 0.399698, 0.351908, 0.405704] #last 4 columns
+ channel_2D.test_vals = [2.000000, 0.000000, 0.398126, 0.353070, 0.405696] #last 4 columns
channel_2D.su2_exec = "parallel_computation.py -f"
channel_2D.timeout = 100
channel_2D.tol = 0.00001
@@ -945,7 +934,7 @@ def main():
channel_3D.cfg_dir = "sliding_interface/channel_3D"
channel_3D.cfg_file = "channel_3D_WA.cfg"
channel_3D.test_iter = 2
- channel_3D.test_vals = [2.000000, 0.000000, 0.624073, 0.502950, 0.417050] #last 4 columns
+ channel_3D.test_vals = [2.000000, 0.000000, 0.620109, 0.505162, 0.415445] #last 4 columns
channel_3D.su2_exec = "parallel_computation.py -f"
channel_3D.timeout = 1600
channel_3D.tol = 0.00001
@@ -958,7 +947,7 @@ def main():
pipe.cfg_dir = "sliding_interface/pipe"
pipe.cfg_file = "pipe_NN.cfg"
pipe.test_iter = 2
- pipe.test_vals = [0.117226, 0.491935, 0.676389, 0.974442, 1.024041] #last 4 columns
+ pipe.test_vals = [0.150025, 0.491954, 0.677756, 0.963980, 1.006936] #last 4 columns
pipe.su2_exec = "parallel_computation.py -f"
pipe.timeout = 1600
pipe.tol = 0.00001
@@ -971,7 +960,7 @@ def main():
rotating_cylinders.cfg_dir = "sliding_interface/rotating_cylinders"
rotating_cylinders.cfg_file = "rot_cylinders_WA.cfg"
rotating_cylinders.test_iter = 3
- rotating_cylinders.test_vals = [3.000000, 0.000000, 0.754346, 1.111512, 1.194307] #last 4 columns
+ rotating_cylinders.test_vals = [3.000000, 0.000000, 0.777044, 1.134689, 1.224326] #last 4 columns
rotating_cylinders.su2_exec = "parallel_computation.py -f"
rotating_cylinders.timeout = 1600
rotating_cylinders.tol = 0.00001
@@ -984,7 +973,7 @@ def main():
supersonic_vortex_shedding.cfg_dir = "sliding_interface/supersonic_vortex_shedding"
supersonic_vortex_shedding.cfg_file = "sup_vor_shed_WA.cfg"
supersonic_vortex_shedding.test_iter = 5
- supersonic_vortex_shedding.test_vals = [5.000000, 0.000000, 1.220915, 1.568306] #last 4 columns
+ supersonic_vortex_shedding.test_vals = [5.000000, 0.000000, 1.244192, 1.644524] #last 4 columns
supersonic_vortex_shedding.su2_exec = "parallel_computation.py -f"
supersonic_vortex_shedding.timeout = 1600
supersonic_vortex_shedding.tol = 0.00001
@@ -997,7 +986,7 @@ def main():
bars_SST_2D.cfg_dir = "sliding_interface/bars_SST_2D"
bars_SST_2D.cfg_file = "bars.cfg"
bars_SST_2D.test_iter = 13
- bars_SST_2D.test_vals = [13.000000, -0.719501, -1.608959] #last 4 columns
+ bars_SST_2D.test_vals = [13.000000, -0.590195, -1.955385] #last 4 columns
bars_SST_2D.su2_exec = "SU2_CFD"
bars_SST_2D.timeout = 1600
bars_SST_2D.tol = 0.00001
@@ -1073,7 +1062,7 @@ def main():
stat_fsi.cfg_dir = "fea_fsi/stat_fsi"
stat_fsi.cfg_file = "config.cfg"
stat_fsi.test_iter = 7
- stat_fsi.test_vals = [-3.312222, -4.959311, 0.000000, 46.000000] #last 5 columns
+ stat_fsi.test_vals = [-3.313322, -4.963786, 0.000000, 46.000000] #last 5 columns
stat_fsi.su2_exec = "mpirun -n 2 SU2_CFD"
stat_fsi.multizone = True
stat_fsi.timeout = 1600
@@ -1130,7 +1119,7 @@ def main():
pywrapper_naca0012.cfg_dir = "euler/naca0012"
pywrapper_naca0012.cfg_file = "inv_NACA0012_Roe.cfg"
pywrapper_naca0012.test_iter = 100
- pywrapper_naca0012.test_vals = [-7.123252, -6.535236, 0.333431, 0.021236] #last 4 columns
+ pywrapper_naca0012.test_vals = [-7.306809, -6.740117, 0.333437, 0.021233] #last 4 columns
pywrapper_naca0012.su2_exec = "mpirun -np 2 SU2_CFD.py --parallel -f"
pywrapper_naca0012.timeout = 1600
pywrapper_naca0012.tol = 0.00001
@@ -1141,7 +1130,7 @@ def main():
pywrapper_turb_naca0012_sst.cfg_dir = "rans/naca0012"
pywrapper_turb_naca0012_sst.cfg_file = "turb_NACA0012_sst.cfg"
pywrapper_turb_naca0012_sst.test_iter = 10
- pywrapper_turb_naca0012_sst.test_vals = [-12.454442, -6.574917, 1.059622, 0.019138] #last 4 columns
+ pywrapper_turb_naca0012_sst.test_vals = [-15.274205, -6.250384, 1.049989, 0.019166] #last 4 columns
pywrapper_turb_naca0012_sst.su2_exec = "mpirun -np 2 SU2_CFD.py --parallel -f"
pywrapper_turb_naca0012_sst.timeout = 3200
pywrapper_turb_naca0012_sst.tol = 0.00001
@@ -1152,7 +1141,7 @@ def main():
pywrapper_square_cylinder.cfg_dir = "unsteady/square_cylinder"
pywrapper_square_cylinder.cfg_file = "turb_square.cfg"
pywrapper_square_cylinder.test_iter = 3
- pywrapper_square_cylinder.test_vals = [-1.164008, 0.077263, 1.398549, 2.197049] #last 4 columns
+ pywrapper_square_cylinder.test_vals = [-1.162621, 0.066395, 1.399789, 2.220408] #last 4 columns
pywrapper_square_cylinder.su2_exec = "mpirun -np 2 SU2_CFD.py --parallel -f"
pywrapper_square_cylinder.timeout = 1600
pywrapper_square_cylinder.tol = 0.00001
@@ -1164,7 +1153,7 @@ def main():
pywrapper_aeroelastic.cfg_dir = "aeroelastic"
pywrapper_aeroelastic.cfg_file = "aeroelastic_NACA64A010.cfg"
pywrapper_aeroelastic.test_iter = 2
- pywrapper_aeroelastic.test_vals = [0.081587, 0.033262, -0.001667, -0.000155] #last 4 columns
+ pywrapper_aeroelastic.test_vals = [0.081326, 0.033214, -0.001666, -0.000155] #last 4 columns
pywrapper_aeroelastic.su2_exec = "mpirun -np 2 SU2_CFD.py --parallel -f"
pywrapper_aeroelastic.timeout = 1600
pywrapper_aeroelastic.tol = 0.00001
@@ -1189,7 +1178,7 @@ def main():
pywrapper_unsteadyCHT.cfg_dir = "py_wrapper/flatPlate_unsteady_CHT"
pywrapper_unsteadyCHT.cfg_file = "unsteady_CHT_FlatPlate_Conf.cfg"
pywrapper_unsteadyCHT.test_iter = 5
- pywrapper_unsteadyCHT.test_vals = [-1.598116, 2.263342, -0.000029, 0.145689] #last 4 columns
+ pywrapper_unsteadyCHT.test_vals = [-1.614167, 2.245730, -0.000767, 0.175598] #last 4 columns
pywrapper_unsteadyCHT.su2_exec = "mpirun -np 2 python launch_unsteady_CHT_FlatPlate.py --parallel -f"
pywrapper_unsteadyCHT.timeout = 1600
pywrapper_unsteadyCHT.tol = 0.00001
@@ -1202,7 +1191,7 @@ def main():
pywrapper_rigidMotion.cfg_dir = "py_wrapper/flatPlate_rigidMotion"
pywrapper_rigidMotion.cfg_file = "flatPlate_rigidMotion_Conf.cfg"
pywrapper_rigidMotion.test_iter = 5
- pywrapper_rigidMotion.test_vals = [-1.598116, 2.259706, -0.040258, 0.143960] #last 4 columns
+ pywrapper_rigidMotion.test_vals = [-1.614165, 2.242648, -0.037218, 0.173751] #last 4 columns
pywrapper_rigidMotion.su2_exec = "mpirun -np 2 python launch_flatPlate_rigidMotion.py --parallel -f"
pywrapper_rigidMotion.timeout = 1600
pywrapper_rigidMotion.tol = 0.00001
@@ -1218,7 +1207,7 @@ def main():
tutorial_inv_bump.cfg_dir = "../Tutorials/Inviscid_Bump"
tutorial_inv_bump.cfg_file = "inv_channel.cfg"
tutorial_inv_bump.test_iter = 0
- tutorial_inv_bump.test_vals = [-1.437425, 4.075857, -0.134610, 0.083745] #last 4 columns
+ tutorial_inv_bump.test_vals = [-1.437425, 4.075857, 0.003000, 0.012720] #last 4 columns
tutorial_inv_bump.su2_exec = "mpirun -np 2 SU2_CFD"
tutorial_inv_bump.timeout = 1600
tutorial_inv_bump.tol = 0.00001
@@ -1230,7 +1219,7 @@ def main():
tutorial_inv_wedge.cfg_dir = "../Tutorials/Inviscid_Wedge"
tutorial_inv_wedge.cfg_file = "inv_wedge_HLLC.cfg"
tutorial_inv_wedge.test_iter = 0
- tutorial_inv_wedge.test_vals = [-0.481460, 5.253008, -0.266096, 0.046783] #last 4 columns
+ tutorial_inv_wedge.test_vals = [-0.481460, 5.253008, -0.292159, 0.052922] #last 4 columns
tutorial_inv_wedge.su2_exec = "mpirun -np 2 SU2_CFD"
tutorial_inv_wedge.timeout = 1600
tutorial_inv_wedge.tol = 0.00001
@@ -1242,7 +1231,7 @@ def main():
tutorial_inv_onera.cfg_dir = "../Tutorials/Inviscid_ONERAM6"
tutorial_inv_onera.cfg_file = "inv_ONERAM6.cfg"
tutorial_inv_onera.test_iter = 0
- tutorial_inv_onera.test_vals = [-5.204928, -4.597762, 0.256216, 0.122658] #last 4 columns
+ tutorial_inv_onera.test_vals = [-5.204928, -4.597762, 0.247124, 0.085734] #last 4 columns
tutorial_inv_onera.su2_exec = "mpirun -np 2 SU2_CFD"
tutorial_inv_onera.timeout = 1600
tutorial_inv_onera.tol = 0.00001
@@ -1254,7 +1243,7 @@ def main():
tutorial_lam_cylinder.cfg_dir = "../Tutorials/Laminar_Cylinder"
tutorial_lam_cylinder.cfg_file = "lam_cylinder.cfg"
tutorial_lam_cylinder.test_iter = 0
- tutorial_lam_cylinder.test_vals = [-6.162141, -0.699617, -0.119017, 60.376542] #last 4 columns
+ tutorial_lam_cylinder.test_vals = [-6.162141, -0.699617, 0.186570, 69.267308] #last 4 columns
tutorial_lam_cylinder.su2_exec = "mpirun -np 2 SU2_CFD"
tutorial_lam_cylinder.timeout = 1600
tutorial_lam_cylinder.tol = 0.00001
@@ -1266,7 +1255,7 @@ def main():
tutorial_lam_flatplate.cfg_dir = "../Tutorials/Laminar_Flat_Plate"
tutorial_lam_flatplate.cfg_file = "lam_flatplate.cfg"
tutorial_lam_flatplate.test_iter = 0
- tutorial_lam_flatplate.test_vals = [-2.821818, 2.657591, -0.683968, 0.028634] #last 4 columns
+ tutorial_lam_flatplate.test_vals = [-2.821818, 2.657591, -0.400044, 0.029413] #last 4 columns
tutorial_lam_flatplate.su2_exec = "mpirun -np 2 SU2_CFD"
tutorial_lam_flatplate.timeout = 1600
tutorial_lam_flatplate.tol = 0.00001
@@ -1278,7 +1267,7 @@ def main():
tutorial_turb_flatplate.cfg_dir = "../Tutorials/Turbulent_Flat_Plate"
tutorial_turb_flatplate.cfg_file = "turb_SA_flatplate.cfg"
tutorial_turb_flatplate.test_iter = 0
- tutorial_turb_flatplate.test_vals = [-2.258584, -4.899474, -0.753783, 0.200410] #last 4 columns
+ tutorial_turb_flatplate.test_vals = [-2.258584, -4.899502, -0.429387, 0.201236] #last 4 columns
tutorial_turb_flatplate.su2_exec = "mpirun -np 2 SU2_CFD"
tutorial_turb_flatplate.timeout = 1600
tutorial_turb_flatplate.tol = 0.00001
@@ -1302,7 +1291,7 @@ def main():
tutorial_turb_oneram6.cfg_dir = "../Tutorials/Turbulent_ONERAM6"
tutorial_turb_oneram6.cfg_file = "turb_ONERAM6.cfg"
tutorial_turb_oneram6.test_iter = 0
- tutorial_turb_oneram6.test_vals = [-4.499497, -11.518421, 0.391293, 0.343702] #last 4 columns
+ tutorial_turb_oneram6.test_vals = [-4.499497, -11.473637, 0.332666, 0.098280] #last 4 columns
tutorial_turb_oneram6.su2_exec = "mpirun -np 2 SU2_CFD"
tutorial_turb_oneram6.timeout = 1600
tutorial_turb_oneram6.tol = 0.00001
@@ -1313,7 +1302,7 @@ def main():
tutorial_design_inv_naca0012.cfg_dir = "../Tutorials/Inviscid_2D_Unconstrained_NACA0012"
tutorial_design_inv_naca0012.cfg_file = "inv_NACA0012_basic.cfg"
tutorial_design_inv_naca0012.test_iter = 0
- tutorial_design_inv_naca0012.test_vals = [-3.585391, -2.989014, 0.086210, 0.174381] #last 4 columns
+ tutorial_design_inv_naca0012.test_vals = [-3.585391, -2.989014, 0.134515, 0.208523] #last 4 columns
tutorial_design_inv_naca0012.su2_exec = "mpirun -np 2 SU2_CFD"
tutorial_design_inv_naca0012.timeout = 1600
tutorial_design_inv_naca0012.tol = 0.00001
@@ -1325,7 +1314,7 @@ def main():
tutorial_design_turb_rae2822.cfg_dir = "../Tutorials/Turbulent_2D_Constrained_RAE2822"
tutorial_design_turb_rae2822.cfg_file = "turb_SA_RAE2822.cfg"
tutorial_design_turb_rae2822.test_iter = 0
- tutorial_design_turb_rae2822.test_vals = [-1.700114, -4.931291, 0.293884, 0.331019] #last 4 columns
+ tutorial_design_turb_rae2822.test_vals = [-1.700114, -4.941261, 0.218432, 0.190639] #last 4 columns
tutorial_design_turb_rae2822.su2_exec = "mpirun -np 2 SU2_CFD"
tutorial_design_turb_rae2822.timeout = 1600
tutorial_design_turb_rae2822.tol = 0.00001
diff --git a/TestCases/parallel_regression_AD.py b/TestCases/parallel_regression_AD.py
index 983e8a7be924..4d74dcfc317a 100644
--- a/TestCases/parallel_regression_AD.py
+++ b/TestCases/parallel_regression_AD.py
@@ -57,7 +57,7 @@ def main():
discadj_naca0012.cfg_dir = "cont_adj_euler/naca0012"
discadj_naca0012.cfg_file = "inv_NACA0012_discadj.cfg"
discadj_naca0012.test_iter = 100
- discadj_naca0012.test_vals = [-3.610567, -9.034912, -0.000000, 0.005621] #last 4 columns
+ discadj_naca0012.test_vals = [-3.559002, -8.926022, -0.000000, 0.005588] #last 4 columns
discadj_naca0012.su2_exec = "parallel_computation.py -f"
discadj_naca0012.timeout = 1600
discadj_naca0012.tol = 0.00001
@@ -68,7 +68,7 @@ def main():
discadj_cylinder3D.cfg_dir = "disc_adj_euler/cylinder3D"
discadj_cylinder3D.cfg_file = "inv_cylinder3D.cfg"
discadj_cylinder3D.test_iter = 5
- discadj_cylinder3D.test_vals = [-3.757340, -3.857847, 0.000000, 0.000000] #last 4 columns
+ discadj_cylinder3D.test_vals = [-3.724803, -3.838647, 0.000000, 0.000000] #last 4 columns
discadj_cylinder3D.su2_exec = "parallel_computation.py -f"
discadj_cylinder3D.timeout = 1600
discadj_cylinder3D.tol = 0.00001
@@ -79,7 +79,7 @@ def main():
discadj_arina2k.cfg_dir = "disc_adj_euler/arina2k"
discadj_arina2k.cfg_file = "Arina2KRS.cfg"
discadj_arina2k.test_iter = 20
- discadj_arina2k.test_vals = [2.275220, 1.750269, 47258.000000, 0.000000] #last 4 columns
+ discadj_arina2k.test_vals = [2.438813, 1.976484, 47258.000000, 0.000000] #last 4 columns
discadj_arina2k.su2_exec = "parallel_computation.py -f"
discadj_arina2k.timeout = 8400
discadj_arina2k.tol = 0.00001
@@ -94,7 +94,7 @@ def main():
discadj_rans_naca0012_sa.cfg_dir = "disc_adj_rans/naca0012"
discadj_rans_naca0012_sa.cfg_file = "turb_NACA0012_sa.cfg"
discadj_rans_naca0012_sa.test_iter = 10
- discadj_rans_naca0012_sa.test_vals = [-1.751966, 0.485697, 0.183154, -0.000018] #last 4 columns
+ discadj_rans_naca0012_sa.test_vals = [-2.230578, 0.678810, 0.181780, -0.000018] #last 4 columns
discadj_rans_naca0012_sa.su2_exec = "parallel_computation.py -f"
discadj_rans_naca0012_sa.timeout = 1600
discadj_rans_naca0012_sa.tol = 0.00001
@@ -105,7 +105,7 @@ def main():
discadj_rans_naca0012_sst.cfg_dir = "disc_adj_rans/naca0012"
discadj_rans_naca0012_sst.cfg_file = "turb_NACA0012_sst.cfg"
discadj_rans_naca0012_sst.test_iter = 10
- discadj_rans_naca0012_sst.test_vals = [-1.654042, -0.500944, 0.154703, -0.000022] #last 4 columns
+ discadj_rans_naca0012_sst.test_vals = [-2.223209, -0.496681, 0.154390, -0.000022] #last 4 columns
discadj_rans_naca0012_sst.su2_exec = "parallel_computation.py -f"
discadj_rans_naca0012_sst.timeout = 1600
discadj_rans_naca0012_sst.tol = 0.00001
@@ -161,7 +161,7 @@ def main():
discadj_incomp_turb_NACA0012_sst.cfg_dir = "disc_adj_incomp_rans/naca0012"
discadj_incomp_turb_NACA0012_sst.cfg_file = "turb_naca0012_sst.cfg"
discadj_incomp_turb_NACA0012_sst.test_iter = 10
- discadj_incomp_turb_NACA0012_sst.test_vals = [-3.845805, -2.415680, -8.430441, 0.000000] #last 4 columns
+ discadj_incomp_turb_NACA0012_sst.test_vals = [-3.845625, -2.413047, -8.419973, 0.000000] #last 4 columns
discadj_incomp_turb_NACA0012_sst.su2_exec = "parallel_computation.py -f"
discadj_incomp_turb_NACA0012_sst.timeout = 1600
discadj_incomp_turb_NACA0012_sst.tol = 0.00001
@@ -208,7 +208,7 @@ def main():
discadj_pitchingNACA0012.cfg_dir = "disc_adj_euler/naca0012_pitching"
discadj_pitchingNACA0012.cfg_file = "inv_NACA0012_pitching.cfg"
discadj_pitchingNACA0012.test_iter = 4
- discadj_pitchingNACA0012.test_vals = [-1.167347, -1.635137, -0.020862, 0.000050] #last 4 columns
+ discadj_pitchingNACA0012.test_vals = [-1.091129, -1.545863, -0.037418, 0.000108] #last 4 columns
discadj_pitchingNACA0012.su2_exec = "parallel_computation.py -f"
discadj_pitchingNACA0012.timeout = 1600
discadj_pitchingNACA0012.tol = 0.00001
@@ -224,7 +224,7 @@ def main():
discadj_trans_stator.cfg_dir = "disc_adj_turbomachinery/transonic_stator_2D"
discadj_trans_stator.cfg_file = "transonic_stator.cfg"
discadj_trans_stator.test_iter = 79
- discadj_trans_stator.test_vals = [79.000000,-1.923936, -2.119783] #last 4 columns
+ discadj_trans_stator.test_vals = [79.000000, -1.927296, -1.401205] #last 4 columns
discadj_trans_stator.su2_exec = "parallel_computation.py -f"
discadj_trans_stator.timeout = 1600
discadj_trans_stator.tol = 0.00001
@@ -254,7 +254,7 @@ def main():
discadj_heat.cfg_dir = "disc_adj_heat"
discadj_heat.cfg_file = "disc_adj_heat.cfg"
discadj_heat.test_iter = 10
- discadj_heat.test_vals = [-2.281765, 0.706785, -0.743990, -6.866000] #last 4 columns
+ discadj_heat.test_vals = [-2.281765, 0.706808, -0.743990, -6.866000] #last 4 columns
discadj_heat.su2_exec = "parallel_computation.py -f"
discadj_heat.timeout = 1600
discadj_heat.tol = 0.00001
@@ -280,7 +280,7 @@ def main():
discadj_fsi2.cfg_dir = "disc_adj_fsi/Airfoil_2d"
discadj_fsi2.cfg_file = "config.cfg"
discadj_fsi2.test_iter = 8
- discadj_fsi2.test_vals = [-5.207224, -2.5436e-13] #last 2 columns
+ discadj_fsi2.test_vals = [-5.070991, -2.5239e-13] #last 2 columns
discadj_fsi2.su2_exec = "mpirun -n 2 SU2_CFD_AD"
discadj_fsi2.timeout = 1600
discadj_fsi2.tol = 1e-16
diff --git a/TestCases/py_wrapper/flatPlate_rigidMotion/flatPlate_rigidMotion_Conf.cfg b/TestCases/py_wrapper/flatPlate_rigidMotion/flatPlate_rigidMotion_Conf.cfg
index 83f4dd45cef0..b9fd4a1d51ca 100644
--- a/TestCases/py_wrapper/flatPlate_rigidMotion/flatPlate_rigidMotion_Conf.cfg
+++ b/TestCases/py_wrapper/flatPlate_rigidMotion/flatPlate_rigidMotion_Conf.cfg
@@ -398,7 +398,6 @@ CONV_NUM_METHOD_FLOW= JST
TIME_DISCRE_FLOW= EULER_IMPLICIT
%
% Relaxation coefficient
-RELAXATION_FACTOR_FLOW= 0.95
% -------------------- TURBULENT NUMERICAL METHOD DEFINITION ------------------%
%
@@ -412,7 +411,6 @@ TIME_DISCRE_TURB= EULER_IMPLICIT
CFL_REDUCTION_TURB= 1.0
%
% Relaxation coefficient
-RELAXATION_FACTOR_TURB= 0.95
% ------------------------ GRID DEFORMATION PARAMETERS ------------------------%
%
diff --git a/TestCases/py_wrapper/flatPlate_unsteady_CHT/unsteady_CHT_FlatPlate_Conf.cfg b/TestCases/py_wrapper/flatPlate_unsteady_CHT/unsteady_CHT_FlatPlate_Conf.cfg
index 8025ea88e0aa..ad620d0275fc 100644
--- a/TestCases/py_wrapper/flatPlate_unsteady_CHT/unsteady_CHT_FlatPlate_Conf.cfg
+++ b/TestCases/py_wrapper/flatPlate_unsteady_CHT/unsteady_CHT_FlatPlate_Conf.cfg
@@ -378,7 +378,6 @@ CONV_NUM_METHOD_FLOW= JST
TIME_DISCRE_FLOW= EULER_IMPLICIT
%
% Relaxation coefficient
-RELAXATION_FACTOR_FLOW= 0.95
% -------------------- TURBULENT NUMERICAL METHOD DEFINITION ------------------%
%
@@ -392,7 +391,6 @@ TIME_DISCRE_TURB= EULER_IMPLICIT
CFL_REDUCTION_TURB= 1.0
%
% Relaxation coefficient
-RELAXATION_FACTOR_TURB= 0.95
% ------------------------ GRID DEFORMATION PARAMETERS ------------------------%
%
diff --git a/TestCases/rans/naca0012/turb_NACA0012_sa.cfg b/TestCases/rans/naca0012/turb_NACA0012_sa.cfg
index 9c53745856f6..b00a8d509366 100644
--- a/TestCases/rans/naca0012/turb_NACA0012_sa.cfg
+++ b/TestCases/rans/naca0012/turb_NACA0012_sa.cfg
@@ -18,7 +18,7 @@
SOLVER= RANS
%
% Specify turbulent model (NONE, SA, SA_NEG, SST)
-KIND_TURB_MODEL= SA
+KIND_TURB_MODEL= SA_NEG
%
% Mathematical problem (DIRECT, CONTINUOUS_ADJOINT)
MATH_PROBLEM= DIRECT
@@ -26,13 +26,6 @@ MATH_PROBLEM= DIRECT
% Restart solution (NO, YES)
RESTART_SOL= YES
%
-% Write binary restart files (YES, NO)
-WRT_BINARY_RESTART= NO
-%
-% Read binary restart files (YES, NO)
-READ_BINARY_RESTART= NO
-%
-%
% New singlezone driver
SINGLEZONE_DRIVER= YES
@@ -88,9 +81,10 @@ MARKER_MONITORING= ( airfoil )
%
% Numerical method for spatial gradients (GREEN_GAUSS, WEIGHTED_LEAST_SQUARES)
NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES
+NUM_METHOD_GRAD_RECON= LEAST_SQUARES
%
% Courant-Friedrichs-Lewy condition of the finest grid
-CFL_NUMBER= 10.0
+CFL_NUMBER= 1000.0
%
% Max Delta time
MAX_DELTA_TIME= 1E10
@@ -119,13 +113,13 @@ LIMITER_ITER= 99999
LINEAR_SOLVER= FGMRES
%
% Preconditioner of the Krylov linear solver (ILU, LU_SGS, LINELET, JACOBI)
-LINEAR_SOLVER_PREC= LU_SGS
+LINEAR_SOLVER_PREC= ILU
%
% Minimum error of the linear solver for implicit formulations
LINEAR_SOLVER_ERROR= 1E-10
%
% Max number of iterations of the linear solver for the implicit formulation
-LINEAR_SOLVER_ITER= 5
+LINEAR_SOLVER_ITER= 20
% -------------------------- MULTIGRID PARAMETERS -----------------------------%
%
@@ -157,7 +151,7 @@ CONV_NUM_METHOD_FLOW= ROE
MUSCL_FLOW= YES
%
% Slope limiter (VENKATAKRISHNAN, MINMOD)
-SLOPE_LIMITER_FLOW= VENKATAKRISHNAN
+SLOPE_LIMITER_FLOW= NONE
%
% 2nd and 4th order artificial dissipation coefficients
JST_SENSOR_COEFF= ( 0.5, 0.02 )
@@ -190,7 +184,6 @@ CFL_REDUCTION_TURB= 1.0
%
CONV_CRITERIA= RESIDUAL
%
-%
% Min value of the residual (log10 of the residual)
CONV_RESIDUAL_MINVAL= -12
%
@@ -202,7 +195,6 @@ CONV_CAUCHY_ELEMS= 100
%
% Epsilon to control the series convergence
CONV_CAUCHY_EPS= 1E-6
-%
% ------------------------- INPUT/OUTPUT INFORMATION --------------------------%
%
@@ -256,4 +248,3 @@ WRT_CON_FREQ= 1
%
% Screen output fields
SCREEN_OUTPUT=(INNER_ITER, RMS_DENSITY, RMS_NU_TILDE, LIFT, DRAG)
-
diff --git a/TestCases/rans/naca0012/turb_NACA0012_sst.cfg b/TestCases/rans/naca0012/turb_NACA0012_sst.cfg
index bfa4a67aa2ce..bf09e392fef2 100644
--- a/TestCases/rans/naca0012/turb_NACA0012_sst.cfg
+++ b/TestCases/rans/naca0012/turb_NACA0012_sst.cfg
@@ -32,7 +32,6 @@ WRT_BINARY_RESTART= NO
% Read binary restart files (YES, NO)
READ_BINARY_RESTART= NO
%
-%
% New singlezone driver
SINGLEZONE_DRIVER= YES
@@ -88,9 +87,10 @@ MARKER_MONITORING= ( airfoil )
%
% Numerical method for spatial gradients (GREEN_GAUSS, WEIGHTED_LEAST_SQUARES)
NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES
+NUM_METHOD_GRAD_RECON= LEAST_SQUARES
%
% Courant-Friedrichs-Lewy condition of the finest grid
-CFL_NUMBER= 10.0
+CFL_NUMBER= 1000.0
%
% Max Delta time
MAX_DELTA_TIME= 1E10
@@ -119,13 +119,13 @@ LIMITER_ITER= 99999
LINEAR_SOLVER= FGMRES
%
% Preconditioner of the Krylov linear solver (ILU, LU_SGS, LINELET, JACOBI)
-LINEAR_SOLVER_PREC= LU_SGS
+LINEAR_SOLVER_PREC= ILU
%
% Minimum error of the linear solver for implicit formulations
LINEAR_SOLVER_ERROR= 1E-10
%
% Max number of iterations of the linear solver for the implicit formulation
-LINEAR_SOLVER_ITER= 2
+LINEAR_SOLVER_ITER= 20
% -------------------------- MULTIGRID PARAMETERS -----------------------------%
%
@@ -157,7 +157,7 @@ CONV_NUM_METHOD_FLOW= ROE
MUSCL_FLOW= YES
%
% Slope limiter (VENKATAKRISHNAN, MINMOD)
-SLOPE_LIMITER_FLOW= VENKATAKRISHNAN
+SLOPE_LIMITER_FLOW= NONE
%
% 2nd and 4th order artificial dissipation coefficients
JST_SENSOR_COEFF= ( 0.5, 0.02 )
@@ -175,7 +175,7 @@ CONV_NUM_METHOD_TURB= SCALAR_UPWIND
MUSCL_TURB= NO
%
% Slope limiter (VENKATAKRISHNAN, MINMOD)
-SLOPE_LIMITER_TURB= VENKATAKRISHNAN
+SLOPE_LIMITER_TURB= NONE
%
% Time discretization (EULER_IMPLICIT)
TIME_DISCRE_TURB= EULER_IMPLICIT
@@ -189,7 +189,6 @@ CFL_REDUCTION_TURB= 1.0
%
CONV_CRITERIA= RESIDUAL
%
-%
% Min value of the residual (log10 of the residual)
CONV_RESIDUAL_MINVAL= -12
%
@@ -255,4 +254,4 @@ WRT_CON_FREQ= 1
%
% Screen output fields
SCREEN_OUTPUT= (INNER_ITER, RMS_DENSITY, RMS_TKE, RMS_DISSIPATION, LIFT, DRAG)
-
+OUTPUT_FILES= (RESTART_ASCII, PARAVIEW, SURFACE_PARAVIEW)
diff --git a/TestCases/rans/naca0012/turb_NACA0012_sst_sust.cfg b/TestCases/rans/naca0012/turb_NACA0012_sst_sust.cfg
index 11c5fc777071..768eb80fd690 100644
--- a/TestCases/rans/naca0012/turb_NACA0012_sst_sust.cfg
+++ b/TestCases/rans/naca0012/turb_NACA0012_sst_sust.cfg
@@ -91,9 +91,10 @@ MARKER_MONITORING= ( airfoil )
%
% Numerical method for spatial gradients (GREEN_GAUSS, WEIGHTED_LEAST_SQUARES)
NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES
+NUM_METHOD_GRAD_RECON= LEAST_SQUARES
%
% Courant-Friedrichs-Lewy condition of the finest grid
-CFL_NUMBER= 10.0
+CFL_NUMBER= 1000.0
%
% Max Delta time
MAX_DELTA_TIME= 1E10
@@ -122,13 +123,13 @@ LIMITER_ITER= 99999
LINEAR_SOLVER= FGMRES
%
% Preconditioner of the Krylov linear solver (ILU, LU_SGS, LINELET, JACOBI)
-LINEAR_SOLVER_PREC= LU_SGS
+LINEAR_SOLVER_PREC= ILU
%
% Minimum error of the linear solver for implicit formulations
LINEAR_SOLVER_ERROR= 1E-10
%
% Max number of iterations of the linear solver for the implicit formulation
-LINEAR_SOLVER_ITER= 2
+LINEAR_SOLVER_ITER= 20
% -------------------------- MULTIGRID PARAMETERS -----------------------------%
%
@@ -160,7 +161,7 @@ CONV_NUM_METHOD_FLOW= ROE
MUSCL_FLOW= YES
%
% Slope limiter (VENKATAKRISHNAN, MINMOD)
-SLOPE_LIMITER_FLOW= VENKATAKRISHNAN
+SLOPE_LIMITER_FLOW= NONE
%
% 2nd and 4th order artificial dissipation coefficients
JST_SENSOR_COEFF= ( 0.5, 0.02 )
@@ -178,7 +179,7 @@ CONV_NUM_METHOD_TURB= SCALAR_UPWIND
MUSCL_TURB= NO
%
% Slope limiter (VENKATAKRISHNAN, MINMOD)
-SLOPE_LIMITER_TURB= VENKATAKRISHNAN
+SLOPE_LIMITER_TURB= NONE
%
% Time discretization (EULER_IMPLICIT)
TIME_DISCRE_TURB= EULER_IMPLICIT
@@ -192,7 +193,6 @@ CFL_REDUCTION_TURB= 1.0
%
CONV_CRITERIA= RESIDUAL
%
-%
% Min value of the residual (log10 of the residual)
CONV_RESIDUAL_MINVAL= -12
%
@@ -258,4 +258,4 @@ WRT_CON_FREQ= 1
%
% Screen output fields
SCREEN_OUTPUT= (INNER_ITER, RMS_DENSITY, RMS_TKE, RMS_DISSIPATION, LIFT, DRAG)
-
+OUTPUT_FILES= (RESTART_ASCII, PARAVIEW, SURFACE_PARAVIEW)
diff --git a/TestCases/rans/propeller/propeller.cfg b/TestCases/rans/propeller/propeller.cfg
index aecb8e74d91c..d01ca9513424 100644
--- a/TestCases/rans/propeller/propeller.cfg
+++ b/TestCases/rans/propeller/propeller.cfg
@@ -182,7 +182,6 @@ SLOPE_LIMITER_FLOW= VENKATAKRISHNAN
TIME_DISCRE_FLOW= EULER_IMPLICIT
%
% Relaxation coefficient
-RELAXATION_FACTOR_FLOW= 0.9
% -------------------- TURBULENT NUMERICAL METHOD DEFINITION ------------------%
%
@@ -200,12 +199,11 @@ SLOPE_LIMITER_TURB= VENKATAKRISHNAN
TIME_DISCRE_TURB= EULER_IMPLICIT
%
% Relaxation coefficient
-RELAXATION_FACTOR_TURB= 0.9
% --------------------------- CONVERGENCE PARAMETERS --------------------------%
%
% Number of total iterations
-ITER= 15
+ITER= 9999
%
% Convergence criteria (CAUCHY, RESIDUAL)
%
diff --git a/TestCases/serial_regression.py b/TestCases/serial_regression.py
index 69b18f5b6a43..b81e999a598b 100644
--- a/TestCases/serial_regression.py
+++ b/TestCases/serial_regression.py
@@ -67,7 +67,7 @@ def main():
naca0012.cfg_dir = "euler/naca0012"
naca0012.cfg_file = "inv_NACA0012_Roe.cfg"
naca0012.test_iter = 20
- naca0012.test_vals = [-4.021036, -3.511771, 0.339316, 0.022257] #last 4 columns
+ naca0012.test_vals = [-4.024286, -3.515166, 0.339392, 0.022217] #last 4 columns
naca0012.su2_exec = "SU2_CFD"
naca0012.timeout = 1600
naca0012.new_output= True
@@ -91,7 +91,7 @@ def main():
oneram6.cfg_dir = "euler/oneram6"
oneram6.cfg_file = "inv_ONERAM6.cfg"
oneram6.test_iter = 10
- oneram6.test_vals = [-7.077986, -6.539796, 0.282344, 0.011807] #last 4 columns
+ oneram6.test_vals = [-10.200724, -9.619291, 0.281704, 0.011821] #last 4 columns
oneram6.su2_exec = "SU2_CFD"
oneram6.timeout = 9600
oneram6.new_output = True
@@ -103,7 +103,7 @@ def main():
fixedCL_naca0012.cfg_dir = "fixed_cl/naca0012"
fixedCL_naca0012.cfg_file = "inv_NACA0012.cfg"
fixedCL_naca0012.test_iter = 10
- fixedCL_naca0012.test_vals = [-12.181731, -6.784160, 0.300000, 0.019470] #last 4 columns
+ fixedCL_naca0012.test_vals = [-12.129591, -6.702940, 0.300000, 0.019470] #last 4 columns
fixedCL_naca0012.su2_exec = "SU2_CFD"
fixedCL_naca0012.new_output = True
fixedCL_naca0012.timeout = 1600
@@ -117,7 +117,7 @@ def main():
polar_naca0012.polar = True
polar_naca0012.new_output= True
polar_naca0012.test_iter = 10
- polar_naca0012.test_vals = [-1.308958, 4.123692, 0.011587, 0.009698] #last 4 columns
+ polar_naca0012.test_vals = [-1.244014, 4.220468, 0.016275, 0.015988] #last 4 columns
polar_naca0012.su2_exec = "compute_polar.py -n 1 -i 11"
polar_naca0012.timeout = 1600
polar_naca0012.tol = 0.00001
@@ -129,7 +129,7 @@ def main():
bluntbody.cfg_file = "blunt.cfg"
bluntbody.new_output = True
bluntbody.test_iter = 20
- bluntbody.test_vals = [0.553700, 6.926057, -0.000000, 1.792561] #last 4 columns
+ bluntbody.test_vals = [0.540009, 6.916653, -0.000000, 1.868975] #last 4 columns
bluntbody.su2_exec = "SU2_CFD"
bluntbody.timeout = 1600
bluntbody.tol = 0.00001
@@ -208,7 +208,7 @@ def main():
rae2822_sa.cfg_dir = "rans/rae2822"
rae2822_sa.cfg_file = "turb_SA_RAE2822.cfg"
rae2822_sa.test_iter = 20
- rae2822_sa.test_vals = [-2.000469, -5.228296, 0.820188, 0.052004] #last 4 columns
+ rae2822_sa.test_vals = [-2.021218, -5.268447, 0.807465, 0.060897] #last 4 columns
rae2822_sa.su2_exec = "SU2_CFD"
rae2822_sa.timeout = 1600
rae2822_sa.new_output = True
@@ -220,7 +220,7 @@ def main():
rae2822_sst.cfg_dir = "rans/rae2822"
rae2822_sst.cfg_file = "turb_SST_RAE2822.cfg"
rae2822_sst.test_iter = 20
- rae2822_sst.test_vals = [-0.510826, 4.909241, 0.825023, 0.052675] #last 4 columns
+ rae2822_sst.test_vals = [-0.510641, 4.874876, 0.813353, 0.061455] #last 4 columns
rae2822_sst.su2_exec = "SU2_CFD"
rae2822_sst.new_output = True
rae2822_sst.timeout = 1600
@@ -232,7 +232,7 @@ def main():
rae2822_sst_sust.cfg_dir = "rans/rae2822"
rae2822_sst_sust.cfg_file = "turb_SST_SUST_RAE2822.cfg"
rae2822_sst_sust.test_iter = 20
- rae2822_sst_sust.test_vals = [-2.401009, 4.909241, 0.825023, 0.052675] #last 4 columns
+ rae2822_sst_sust.test_vals = [-2.427577, 4.874876, 0.813353, 0.061455] #last 4 columns
rae2822_sst_sust.su2_exec = "SU2_CFD"
rae2822_sst_sust.timeout = 1600
rae2822_sst_sust.tol = 0.00001
@@ -255,7 +255,7 @@ def main():
turb_oneram6.cfg_dir = "rans/oneram6"
turb_oneram6.cfg_file = "turb_ONERAM6.cfg"
turb_oneram6.test_iter = 10
- turb_oneram6.test_vals = [-2.327431, -6.564331, 0.230257, 0.155839]#last 4 columns
+ turb_oneram6.test_vals = [-2.372511, -6.579339, 0.229864, 0.147639]#last 4 columns
turb_oneram6.su2_exec = "SU2_CFD"
turb_oneram6.new_output = True
turb_oneram6.timeout = 3200
@@ -267,31 +267,19 @@ def main():
turb_naca0012_sa.cfg_dir = "rans/naca0012"
turb_naca0012_sa.cfg_file = "turb_NACA0012_sa.cfg"
turb_naca0012_sa.test_iter = 10
- turb_naca0012_sa.test_vals = [-11.981166, -9.145363, 1.070528, 0.019417] #last 4 columns
+ turb_naca0012_sa.test_vals = [-12.075873, -16.146770, 1.064326, 0.019770] #last 4 columns
turb_naca0012_sa.su2_exec = "SU2_CFD"
turb_naca0012_sa.new_output = True
turb_naca0012_sa.timeout = 3200
turb_naca0012_sa.tol = 0.00001
test_list.append(turb_naca0012_sa)
-
- # NACA0012 (SA, FUN3D results for finest grid: CL=1.0983, CD=0.01242) with binary restart
- turb_naca0012_sa_bin = TestCase('turb_naca0012_sa_bin')
- turb_naca0012_sa_bin.cfg_dir = "rans/naca0012"
- turb_naca0012_sa_bin.cfg_file = "turb_NACA0012_sa_binary.cfg"
- turb_naca0012_sa_bin.test_iter = 10
- turb_naca0012_sa_bin.test_vals = [-11.981289, -9.145363, 1.070528, 0.019417] #last 4 columns
- turb_naca0012_sa_bin.su2_exec = "SU2_CFD"
- turb_naca0012_sa_bin.new_output = True
- turb_naca0012_sa_bin.timeout = 3200
- turb_naca0012_sa_bin.tol = 0.00001
- test_list.append(turb_naca0012_sa_bin)
# NACA0012 (SST, FUN3D results for finest grid: CL=1.0840, CD=0.01253)
turb_naca0012_sst = TestCase('turb_naca0012_sst')
turb_naca0012_sst.cfg_dir = "rans/naca0012"
turb_naca0012_sst.cfg_file = "turb_NACA0012_sst.cfg"
turb_naca0012_sst.test_iter = 10
- turb_naca0012_sst.test_vals = [-12.454420, -6.572026, 1.059622, 0.019138] #last 4 columns
+ turb_naca0012_sst.test_vals = [-15.274504, -6.250399, 1.049989, 0.019166] #last 4 columns
turb_naca0012_sst.su2_exec = "SU2_CFD"
turb_naca0012_sst.new_output = True
turb_naca0012_sst.timeout = 3200
@@ -303,24 +291,24 @@ def main():
turb_naca0012_sst_sust.cfg_dir = "rans/naca0012"
turb_naca0012_sst_sust.cfg_file = "turb_NACA0012_sst_sust.cfg"
turb_naca0012_sst_sust.test_iter = 10
- turb_naca0012_sst_sust.test_vals = [-13.280975, -5.646508, 1.022304, 0.019539] #last 4 columns
+ turb_naca0012_sst_sust.test_vals = [-14.851294, -5.980664, 1.005228, 0.019014] #last 4 columns
turb_naca0012_sst_sust.su2_exec = "SU2_CFD"
turb_naca0012_sst_sust.timeout = 3200
turb_naca0012_sst_sust.tol = 0.00001
test_list.append(turb_naca0012_sst_sust)
-
# PROPELLER
propeller = TestCase('propeller')
propeller.cfg_dir = "rans/propeller"
propeller.cfg_file = "propeller.cfg"
propeller.test_iter = 10
- propeller.test_vals = [-3.378876, -8.396837, 0.000047, 0.055591] #last 4 columns
+ propeller.test_vals = [-3.389575, -8.409529, 0.000048, 0.056329] #last 4 columns
propeller.su2_exec = "SU2_CFD"
propeller.new_output = True
propeller.timeout = 3200
propeller.tol = 0.00001
test_list.append(propeller)
+
#################################
## Compressible RANS Restart ###
#################################
@@ -331,7 +319,7 @@ def main():
turb_naca0012_sst_restart_mg.cfg_file = "turb_NACA0012_sst_multigrid_restart.cfg"
turb_naca0012_sst_restart_mg.test_iter = 50
turb_naca0012_sst_restart_mg.ntest_vals = 5
- turb_naca0012_sst_restart_mg.test_vals = [-6.459444, -4.595710, 1.201844, -0.007146, 0.080517] #last 5 columns
+ turb_naca0012_sst_restart_mg.test_vals = [-7.708053, -8.082473, -3.175091, -0.000015, 0.081277] #last 5 columns
turb_naca0012_sst_restart_mg.su2_exec = "SU2_CFD"
turb_naca0012_sst_restart_mg.new_output = True
turb_naca0012_sst_restart_mg.timeout = 3200
@@ -438,7 +426,7 @@ def main():
inc_turb_naca0012_sst_sust.cfg_dir = "incomp_rans/naca0012"
inc_turb_naca0012_sst_sust.cfg_file = "naca0012_SST_SUST.cfg"
inc_turb_naca0012_sst_sust.test_iter = 20
- inc_turb_naca0012_sst_sust.test_vals = [-7.277591, 0.146922, 0.000021, 0.311963] #last 4 columns
+ inc_turb_naca0012_sst_sust.test_vals = [-7.276170, 0.145809, 0.000021, 0.312006] #last 4 columns
inc_turb_naca0012_sst_sust.su2_exec = "SU2_CFD"
inc_turb_naca0012_sst_sust.timeout = 1600
inc_turb_naca0012_sst_sust.tol = 0.00001
@@ -549,7 +537,7 @@ def main():
schubauer_klebanoff_transition.cfg_file = "transitional_BC_model_ConfigFile.cfg"
schubauer_klebanoff_transition.test_iter = 10
schubauer_klebanoff_transition.new_output = True
- schubauer_klebanoff_transition.test_vals = [-8.029756, -14.278066, 0.000053, 0.007986] #last 4 columns
+ schubauer_klebanoff_transition.test_vals = [-8.029756, -14.268351, 0.000053, 0.007986] #last 4 columns
schubauer_klebanoff_transition.su2_exec = "SU2_CFD"
schubauer_klebanoff_transition.timeout = 1600
schubauer_klebanoff_transition.tol = 0.00001
@@ -588,7 +576,7 @@ def main():
contadj_wedge.cfg_dir = "cont_adj_euler/wedge"
contadj_wedge.cfg_file = "inv_wedge_ROE.cfg"
contadj_wedge.test_iter = 10
- contadj_wedge.test_vals = [2.856008, -2.767216, 1.0029e+06, 1.3024e-13] #last 4 columns
+ contadj_wedge.test_vals = [2.872691, -2.755572, 853000.000000, 0.000000] #last 4 columns
contadj_wedge.su2_exec = "SU2_CFD"
contadj_wedge.new_output = True
contadj_wedge.timeout = 1600
@@ -600,7 +588,7 @@ def main():
contadj_fixedCL_naca0012.cfg_dir = "fixed_cl/naca0012"
contadj_fixedCL_naca0012.cfg_file = "inv_NACA0012_ContAdj.cfg"
contadj_fixedCL_naca0012.test_iter = 100
- contadj_fixedCL_naca0012.test_vals = [0.294602, -5.201081, 3.6098e-01, -1.3983e-05] #last 4 columns
+ contadj_fixedCL_naca0012.test_vals = [0.293257, -5.201691, 0.360610, -0.000021] #last 4 columns
contadj_fixedCL_naca0012.su2_exec = "SU2_CFD"
contadj_fixedCL_naca0012.new_output= True
contadj_fixedCL_naca0012.timeout = 1600
@@ -696,7 +684,7 @@ def main():
turb_naca0012_1c.cfg_dir = "rans_uq/naca0012"
turb_naca0012_1c.cfg_file = "turb_NACA0012_uq_1c.cfg"
turb_naca0012_1c.test_iter = 10
- turb_naca0012_1c.test_vals = [-4.946093, 1.262346, 5.578729, 2.059523] #last 4 columns
+ turb_naca0012_1c.test_vals = [-4.906675, 1.337889, 6.085815, 2.413950] #last 4 columns
turb_naca0012_1c.su2_exec = "SU2_CFD"
turb_naca0012_1c.new_output = True
turb_naca0012_1c.timeout = 1600
@@ -708,7 +696,7 @@ def main():
turb_naca0012_2c.cfg_dir = "rans_uq/naca0012"
turb_naca0012_2c.cfg_file = "turb_NACA0012_uq_2c.cfg"
turb_naca0012_2c.test_iter = 10
- turb_naca0012_2c.test_vals = [-5.343130, 1.137800, 5.337441, 1.919677] #last 4 columns
+ turb_naca0012_2c.test_vals = [-5.230275, 1.262205, 6.085899, 2.413590] #last 4 columns
turb_naca0012_2c.su2_exec = "SU2_CFD"
turb_naca0012_2c.new_output = True
turb_naca0012_2c.timeout = 1600
@@ -720,7 +708,7 @@ def main():
turb_naca0012_3c.cfg_dir = "rans_uq/naca0012"
turb_naca0012_3c.cfg_file = "turb_NACA0012_uq_3c.cfg"
turb_naca0012_3c.test_iter = 10
- turb_naca0012_3c.test_vals = [-5.421229, 1.099570, 5.184366, 1.835606] #last 4 columns
+ turb_naca0012_3c.test_vals = [-5.277131, 1.246268, 6.086537, 2.413873] #last 4 columns
turb_naca0012_3c.su2_exec = "SU2_CFD"
turb_naca0012_3c.new_output = True
turb_naca0012_3c.timeout = 1600
@@ -732,7 +720,7 @@ def main():
turb_naca0012_p1c1.cfg_dir = "rans_uq/naca0012"
turb_naca0012_p1c1.cfg_file = "turb_NACA0012_uq_p1c1.cfg"
turb_naca0012_p1c1.test_iter = 10
- turb_naca0012_p1c1.test_vals = [-5.021820, 1.281103, 5.960923, 2.302704] #last 4 columns
+ turb_naca0012_p1c1.test_vals = [-5.002978, 1.312367, 6.085205, 2.413463] #last 4 columns
turb_naca0012_p1c1.su2_exec = "SU2_CFD"
turb_naca0012_p1c1.new_output = True
turb_naca0012_p1c1.timeout = 1600
@@ -744,7 +732,7 @@ def main():
turb_naca0012_p1c2.cfg_dir = "rans_uq/naca0012"
turb_naca0012_p1c2.cfg_file = "turb_NACA0012_uq_p1c2.cfg"
turb_naca0012_p1c2.test_iter = 10
- turb_naca0012_p1c2.test_vals = [-5.356937, 1.155037, 5.636379, 2.088827] #last 4 columns
+ turb_naca0012_p1c2.test_vals = [-5.263968, 1.251341, 6.085723, 2.413449] #last 4 columns
turb_naca0012_p1c2.su2_exec = "SU2_CFD"
turb_naca0012_p1c2.new_output = True
turb_naca0012_p1c2.timeout = 1600
@@ -760,7 +748,7 @@ def main():
harmonic_balance.cfg_dir = "harmonic_balance"
harmonic_balance.cfg_file = "HB.cfg"
harmonic_balance.test_iter = 25
- harmonic_balance.test_vals = [-1.592454, 3.916019, -0.001014, 0.096794] #last 4 columns
+ harmonic_balance.test_vals = [-1.589862, 3.922099, -0.001443, 0.099456] #last 4 columns
harmonic_balance.su2_exec = "SU2_CFD"
harmonic_balance.new_output = False
harmonic_balance.timeout = 1600
@@ -772,7 +760,7 @@ def main():
hb_rans_preconditioning.cfg_dir = "harmonic_balance/hb_rans_preconditioning"
hb_rans_preconditioning.cfg_file = "davis.cfg"
hb_rans_preconditioning.test_iter = 25
- hb_rans_preconditioning.test_vals = [-1.900982, -5.880438, 0.007758, 0.125934] #last 4 columns
+ hb_rans_preconditioning.test_vals = [-1.909598, -5.954721, 0.007773, 0.131219] #last 4 columns
hb_rans_preconditioning.su2_exec = "SU2_CFD"
hb_rans_preconditioning.new_output= False
hb_rans_preconditioning.timeout = 1600
@@ -800,7 +788,7 @@ def main():
spinning_cylinder.cfg_dir = "moving_wall/spinning_cylinder"
spinning_cylinder.cfg_file = "spinning_cylinder.cfg"
spinning_cylinder.test_iter = 25
- spinning_cylinder.test_vals = [-7.719673, -2.279643, 1.721389, 1.710467] #last 4 columns
+ spinning_cylinder.test_vals = [-7.889994, -2.469385, 1.708162, 1.670039] #last 4 columns
spinning_cylinder.su2_exec = "SU2_CFD"
spinning_cylinder.new_output = True
spinning_cylinder.timeout = 1600
@@ -816,7 +804,7 @@ def main():
square_cylinder.cfg_dir = "unsteady/square_cylinder"
square_cylinder.cfg_file = "turb_square.cfg"
square_cylinder.test_iter = 3
- square_cylinder.test_vals = [-1.163944, 0.077283, 1.398548, 2.197047] #last 4 columns
+ square_cylinder.test_vals = [-1.162581, 0.066412, 1.399788, 2.220411] #last 4 columns
square_cylinder.su2_exec = "SU2_CFD"
square_cylinder.timeout = 1600
square_cylinder.tol = 0.00001
@@ -829,7 +817,7 @@ def main():
sine_gust.cfg_dir = "gust"
sine_gust.cfg_file = "inv_gust_NACA0012.cfg"
sine_gust.test_iter = 5
- sine_gust.test_vals = [-1.977545, 3.481778, 0.001295, -0.003793] #last 4 columns
+ sine_gust.test_vals = [-1.977545, 3.481778, -0.001572, -0.007286] #last 4 columns
sine_gust.su2_exec = "SU2_CFD"
sine_gust.timeout = 1600
sine_gust.tol = 0.00001
@@ -842,7 +830,7 @@ def main():
aeroelastic.cfg_dir = "aeroelastic"
aeroelastic.cfg_file = "aeroelastic_NACA64A010.cfg"
aeroelastic.test_iter = 2
- aeroelastic.test_vals = [0.080202, 0.033233, -0.001666, -0.000155] #last 4 columns
+ aeroelastic.test_vals = [0.079371, 0.033176, -0.001665, -0.000156] #last 4 columns
aeroelastic.su2_exec = "SU2_CFD"
aeroelastic.timeout = 1600
aeroelastic.tol = 0.00001
@@ -884,7 +872,7 @@ def main():
ls89_sa.cfg_dir = "nicf/LS89"
ls89_sa.cfg_file = "turb_SA_PR.cfg"
ls89_sa.test_iter = 20
- ls89_sa.test_vals = [-5.046850, -13.386345, 0.174911, 0.430700] #last 4 columns
+ ls89_sa.test_vals = [-5.060859, -13.398192, 0.174451, 0.429491] #last 4 columns
ls89_sa.su2_exec = "SU2_CFD"
ls89_sa.new_output= True
ls89_sa.timeout = 1600
@@ -896,7 +884,7 @@ def main():
edge_VW.cfg_dir = "nicf/edge"
edge_VW.cfg_file = "edge_VW.cfg"
edge_VW.test_iter = 20
- edge_VW.test_vals = [-0.711006, 5.491025, -0.000971, 0.000000] #last 4 columns
+ edge_VW.test_vals = [-0.711552, 5.490479, -0.000975, 0.000000] #last 4 columns
edge_VW.su2_exec = "SU2_CFD"
edge_VW.new_output = True
edge_VW.timeout = 1600
@@ -908,7 +896,7 @@ def main():
edge_PPR.cfg_dir = "nicf/edge"
edge_PPR.cfg_file = "edge_PPR.cfg"
edge_PPR.test_iter = 20
- edge_PPR.test_vals = [-1.671554, 4.521719, 0.001027, 0.000000] #last 4 columns
+ edge_PPR.test_vals = [-1.670439, 4.522842, 0.001027, 0.000000] #last 4 columns
edge_PPR.su2_exec = "SU2_CFD"
edge_PPR.new_output = True
edge_PPR.timeout = 1600
@@ -925,7 +913,7 @@ def main():
Jones_tc.cfg_dir = "turbomachinery/APU_turbocharger"
Jones_tc.cfg_file = "Jones.cfg"
Jones_tc.test_iter = 5
- Jones_tc.test_vals = [-5.301588, 0.418684, 78.467650, 0.990182] #last 4 columns
+ Jones_tc.test_vals = [-5.316334, 0.355080, 44.772250, 2.269935] #last 4 columns
Jones_tc.su2_exec = "SU2_CFD"
Jones_tc.new_output = False
Jones_tc.timeout = 1600
@@ -937,7 +925,7 @@ def main():
Jones_tc_rst.cfg_dir = "turbomachinery/APU_turbocharger"
Jones_tc_rst.cfg_file = "Jones_rst.cfg"
Jones_tc_rst.test_iter = 5
- Jones_tc_rst.test_vals = [-4.344742, -1.553279, 82.250600, 2.791916] #last 4 columns
+ Jones_tc_rst.test_vals = [-3.034158, 0.013762, 82.263710, 2.792251] #last 4 columns
Jones_tc_rst.su2_exec = "SU2_CFD"
Jones_tc_rst.new_output = False
Jones_tc_rst.timeout = 1600
@@ -949,7 +937,7 @@ def main():
axial_stage2D.cfg_dir = "turbomachinery/axial_stage_2D"
axial_stage2D.cfg_file = "Axial_stage2D.cfg"
axial_stage2D.test_iter = 20
- axial_stage2D.test_vals = [-1.790262, 5.696645, 73.362820, 0.904310] #last 4 columns
+ axial_stage2D.test_vals = [-1.933250, 5.305273, 73.357650, 1.841297] #last 4 columns
axial_stage2D.su2_exec = "SU2_CFD"
axial_stage2D.new_output = False
axial_stage2D.timeout = 1600
@@ -961,7 +949,7 @@ def main():
transonic_stator.cfg_dir = "turbomachinery/transonic_stator_2D"
transonic_stator.cfg_file = "transonic_stator.cfg"
transonic_stator.test_iter = 20
- transonic_stator.test_vals = [-1.201657, 6.150672, 96.239670, 0.062740] #last 4 columns
+ transonic_stator.test_vals = [-0.560481, 5.828675, 96.593740, 0.062507] #last 4 columns
transonic_stator.su2_exec = "SU2_CFD"
transonic_stator.new_output = False
transonic_stator.timeout = 1600
@@ -973,7 +961,7 @@ def main():
transonic_stator_rst.cfg_dir = "turbomachinery/transonic_stator_2D"
transonic_stator_rst.cfg_file = "transonic_stator_rst.cfg"
transonic_stator_rst.test_iter = 20
- transonic_stator_rst.test_vals = [-8.248816, -2.976167, 5.285722, 0.003100] #last 4 columns
+ transonic_stator_rst.test_vals = [-2.127925, 2.936696, 5.298641, 0.003102] #last 4 columns
transonic_stator_rst.su2_exec = "SU2_CFD"
transonic_stator_rst.new_output = False
transonic_stator_rst.timeout = 1600
@@ -1003,7 +991,7 @@ def main():
channel_2D.cfg_dir = "sliding_interface/channel_2D"
channel_2D.cfg_file = "channel_2D_WA.cfg"
channel_2D.test_iter = 2
- channel_2D.test_vals = [2.000000, 0.000000, 0.399677, 0.351915, 0.405680] #last 4 columns
+ channel_2D.test_vals = [2.000000, 0.000000, 0.397956, 0.353078, 0.405707] #last 4 columns
channel_2D.su2_exec = "SU2_CFD"
channel_2D.timeout = 100
channel_2D.tol = 0.00001
@@ -1016,7 +1004,7 @@ def main():
channel_3D.cfg_dir = "sliding_interface/channel_3D"
channel_3D.cfg_file = "channel_3D_WA.cfg"
channel_3D.test_iter = 1
- channel_3D.test_vals = [1.000000, 0.000000, 0.671143, 0.781742, 0.712844] #last 5 columns
+ channel_3D.test_vals = [1.000000, 0.000000, 0.661392, 0.769773, 0.696154] #last 5 columns
channel_3D.su2_exec = "SU2_CFD"
channel_3D.timeout = 1600
channel_3D.tol = 0.00001
@@ -1029,7 +1017,7 @@ def main():
pipe.cfg_dir = "sliding_interface/pipe"
pipe.cfg_file = "pipe_NN.cfg"
pipe.test_iter = 2
- pipe.test_vals = [0.491948, 0.676394, 0.974444, 1.024041] #last 4 columns
+ pipe.test_vals = [0.491954, 0.677756, 0.963981, 1.006936] #last 4 columns
pipe.su2_exec = "SU2_CFD"
pipe.timeout = 1600
pipe.tol = 0.00001
@@ -1042,7 +1030,7 @@ def main():
rotating_cylinders.cfg_dir = "sliding_interface/rotating_cylinders"
rotating_cylinders.cfg_file = "rot_cylinders_WA.cfg"
rotating_cylinders.test_iter = 3
- rotating_cylinders.test_vals = [3.000000, 0.000000, 0.754350, 1.111514, 1.194297] #last 4 columns
+ rotating_cylinders.test_vals = [3.000000, 0.000000, 0.777044, 1.134679, 1.224316] #last 4 columns
rotating_cylinders.su2_exec = "SU2_CFD"
rotating_cylinders.timeout = 1600
rotating_cylinders.tol = 0.00001
@@ -1055,7 +1043,7 @@ def main():
supersonic_vortex_shedding.cfg_dir = "sliding_interface/supersonic_vortex_shedding"
supersonic_vortex_shedding.cfg_file = "sup_vor_shed_WA.cfg"
supersonic_vortex_shedding.test_iter = 5
- supersonic_vortex_shedding.test_vals = [5.000000, 0.000000, 1.220867, 1.568306] #last 4 columns
+ supersonic_vortex_shedding.test_vals = [5.000000, 0.000000, 1.240131, 1.645383] #last 4 columns
supersonic_vortex_shedding.su2_exec = "SU2_CFD"
supersonic_vortex_shedding.timeout = 1600
supersonic_vortex_shedding.tol = 0.00001
@@ -1068,7 +1056,7 @@ def main():
bars_SST_2D.cfg_dir = "sliding_interface/bars_SST_2D"
bars_SST_2D.cfg_file = "bars.cfg"
bars_SST_2D.test_iter = 13
- bars_SST_2D.test_vals = [13.000000, -0.719501, -1.608959] #last 3 columns
+ bars_SST_2D.test_vals = [13.000000, -0.590195, -1.955385] #last 3 columns
bars_SST_2D.su2_exec = "SU2_CFD"
bars_SST_2D.timeout = 1600
bars_SST_2D.tol = 0.00001
@@ -1157,7 +1145,7 @@ def main():
stat_fsi.cfg_dir = "fea_fsi/stat_fsi"
stat_fsi.cfg_file = "config.cfg"
stat_fsi.test_iter = 7
- stat_fsi.test_vals = [-3.322483, -4.978664, 0.000000, 47.000000] #last 5 columns
+ stat_fsi.test_vals = [-3.323551, -4.982863, 0.000000, 47.000000] #last 5 columns
stat_fsi.su2_exec = "SU2_CFD"
stat_fsi.timeout = 1600
stat_fsi.multizone = True
@@ -1194,7 +1182,7 @@ def main():
airfoilRBF.cfg_dir = "fea_fsi/Airfoil_RBF"
airfoilRBF.cfg_file = "config.cfg"
airfoilRBF.test_iter = 1
- airfoilRBF.test_vals = [1.0, -2.979045, -4.882900]
+ airfoilRBF.test_vals = [1.000000, -2.980686, -4.866015]
airfoilRBF.su2_exec = "SU2_CFD"
airfoilRBF.timeout = 1600
airfoilRBF.multizone = True
@@ -1556,7 +1544,7 @@ def main():
opt_multiobj1surf_py.cfg_dir = "optimization_euler/multiobjective_wedge"
opt_multiobj1surf_py.cfg_file = "inv_wedge_ROE_multiobj_1surf.cfg"
opt_multiobj1surf_py.test_iter = 1
- opt_multiobj1surf_py.test_vals = [1.000000, 1.000000, 30.371350, 2.226610] #last 4 columns
+ opt_multiobj1surf_py.test_vals = [1.000000, 1.000000, 30.428280, 2.039416] #last 4 columns
opt_multiobj1surf_py.su2_exec = "shape_optimization.py -g CONTINUOUS_ADJOINT -f"
opt_multiobj1surf_py.timeout = 1600
opt_multiobj1surf_py.tol = 0.00001
@@ -1568,7 +1556,7 @@ def main():
opt_2surf1obj_py.cfg_dir = "optimization_euler/multiobjective_wedge"
opt_2surf1obj_py.cfg_file = "inv_wedge_ROE_2surf_1obj.cfg"
opt_2surf1obj_py.test_iter = 1
- opt_2surf1obj_py.test_vals = [1.000000, 1.000000, 2.005700, 0.000203] #last 4 columns
+ opt_2surf1obj_py.test_vals = [1.000000, 1.000000, 2.005694, 0.000185] #last 4 columns
opt_2surf1obj_py.su2_exec = "shape_optimization.py -g CONTINUOUS_ADJOINT -f"
opt_2surf1obj_py.timeout = 1600
opt_2surf1obj_py.tol = 0.00001
@@ -1584,7 +1572,7 @@ def main():
pywrapper_naca0012.cfg_dir = "euler/naca0012"
pywrapper_naca0012.cfg_file = "inv_NACA0012_Roe.cfg"
pywrapper_naca0012.test_iter = 20
- pywrapper_naca0012.test_vals = [-4.021036, -3.511771, 0.339316, 0.022257] #last 4 columns
+ pywrapper_naca0012.test_vals = [-4.024286, -3.515166, 0.339392, 0.022217] #last 4 columns
pywrapper_naca0012.su2_exec = "SU2_CFD.py -f"
pywrapper_naca0012.new_output = True
pywrapper_naca0012.timeout = 1600
@@ -1597,7 +1585,7 @@ def main():
pywrapper_turb_naca0012_sst.cfg_dir = "rans/naca0012"
pywrapper_turb_naca0012_sst.cfg_file = "turb_NACA0012_sst.cfg"
pywrapper_turb_naca0012_sst.test_iter = 10
- pywrapper_turb_naca0012_sst.test_vals = [-12.454420, -6.572026, 1.059622, 0.019138] #last 4 columns
+ pywrapper_turb_naca0012_sst.test_vals = [-15.274504, -6.250399, 1.049989, 0.019166] #last 4 columns
pywrapper_turb_naca0012_sst.su2_exec = "SU2_CFD.py -f"
pywrapper_turb_naca0012_sst.new_output = True
pywrapper_turb_naca0012_sst.timeout = 3200
@@ -1610,7 +1598,7 @@ def main():
pywrapper_square_cylinder.cfg_dir = "unsteady/square_cylinder"
pywrapper_square_cylinder.cfg_file = "turb_square.cfg"
pywrapper_square_cylinder.test_iter = 3
- pywrapper_square_cylinder.test_vals = [-1.163944, 0.077283, 1.398548, 2.197047] #last 4 columns
+ pywrapper_square_cylinder.test_vals = [-1.162581, 0.066412, 1.399788, 2.220411] #last 4 columns
pywrapper_square_cylinder.su2_exec = "SU2_CFD.py -f"
pywrapper_square_cylinder.timeout = 1600
pywrapper_square_cylinder.tol = 0.00001
@@ -1623,7 +1611,7 @@ def main():
pywrapper_aeroelastic.cfg_dir = "aeroelastic"
pywrapper_aeroelastic.cfg_file = "aeroelastic_NACA64A010.cfg"
pywrapper_aeroelastic.test_iter = 2
- pywrapper_aeroelastic.test_vals = [0.080202, 0.033233, -0.001666, -0.000155] #last 4 columns
+ pywrapper_aeroelastic.test_vals = [0.079371, 0.033176, -0.001665, -0.000156] #last 4 columns
pywrapper_aeroelastic.su2_exec = "SU2_CFD.py -f"
pywrapper_aeroelastic.new_output = True
pywrapper_aeroelastic.timeout = 1600
@@ -1652,7 +1640,7 @@ def main():
pywrapper_unsteadyCHT.cfg_dir = "py_wrapper/flatPlate_unsteady_CHT"
pywrapper_unsteadyCHT.cfg_file = "unsteady_CHT_FlatPlate_Conf.cfg"
pywrapper_unsteadyCHT.test_iter = 5
- pywrapper_unsteadyCHT.test_vals = [-1.598116, 2.263309, 0.001077, 0.145818] #last 4 columns
+ pywrapper_unsteadyCHT.test_vals = [-1.614167, 2.245717, 0.000766, 0.175707] #last 4 columns
pywrapper_unsteadyCHT.su2_exec = "python launch_unsteady_CHT_FlatPlate.py -f"
pywrapper_unsteadyCHT.timeout = 1600
pywrapper_unsteadyCHT.new_output = True
@@ -1666,7 +1654,7 @@ def main():
pywrapper_rigidMotion.cfg_dir = "py_wrapper/flatPlate_rigidMotion"
pywrapper_rigidMotion.cfg_file = "flatPlate_rigidMotion_Conf.cfg"
pywrapper_rigidMotion.test_iter = 5
- pywrapper_rigidMotion.test_vals = [-1.598116, 2.259671, -0.040632, 0.144135] #last 4 columns
+ pywrapper_rigidMotion.test_vals = [-1.614167, 2.242633, -0.037878, 0.173901] #last 4 columns
pywrapper_rigidMotion.su2_exec = "python launch_flatPlate_rigidMotion.py -f"
pywrapper_rigidMotion.new_output = True
pywrapper_rigidMotion.timeout = 1600
diff --git a/TestCases/serial_regression_AD.py b/TestCases/serial_regression_AD.py
index 63d1394abd05..0f97ac751161 100644
--- a/TestCases/serial_regression_AD.py
+++ b/TestCases/serial_regression_AD.py
@@ -57,7 +57,7 @@ def main():
discadj_naca0012.cfg_dir = "cont_adj_euler/naca0012"
discadj_naca0012.cfg_file = "inv_NACA0012_discadj.cfg"
discadj_naca0012.test_iter = 100
- discadj_naca0012.test_vals = [-3.610567, -9.034912, -0.000000, 0.005621] #last 4 columns
+ discadj_naca0012.test_vals = [-3.559002, -8.926022, -0.000000, 0.005588] #last 4 columns
discadj_naca0012.su2_exec = "SU2_CFD_AD"
discadj_naca0012.timeout = 1600
discadj_naca0012.tol = 0.00001
@@ -68,7 +68,7 @@ def main():
discadj_cylinder3D.cfg_dir = "disc_adj_euler/cylinder3D"
discadj_cylinder3D.cfg_file = "inv_cylinder3D.cfg"
discadj_cylinder3D.test_iter = 5
- discadj_cylinder3D.test_vals = [-3.758796, -3.863529, -0.000000, 0.000000] #last 4 columns
+ discadj_cylinder3D.test_vals = [-3.728728, -3.844274, -0.000000, 0.000000] #last 4 columns
discadj_cylinder3D.su2_exec = "SU2_CFD_AD"
discadj_cylinder3D.timeout = 1600
discadj_cylinder3D.tol = 0.00001
@@ -79,7 +79,7 @@ def main():
discadj_arina2k.cfg_dir = "disc_adj_euler/arina2k"
discadj_arina2k.cfg_file = "Arina2KRS.cfg"
discadj_arina2k.test_iter = 20
- discadj_arina2k.test_vals = [2.244006, 1.701303, 47250.000000, 0.000000]#last 4 columns
+ discadj_arina2k.test_vals = [2.416934, 1.944441, 47250.000000, 0.000000]#last 4 columns
discadj_arina2k.su2_exec = "SU2_CFD_AD"
discadj_arina2k.timeout = 8400
discadj_arina2k.tol = 0.00001
@@ -94,7 +94,7 @@ def main():
discadj_rans_naca0012_sa.cfg_dir = "disc_adj_rans/naca0012"
discadj_rans_naca0012_sa.cfg_file = "turb_NACA0012_sa.cfg"
discadj_rans_naca0012_sa.test_iter = 10
- discadj_rans_naca0012_sa.test_vals = [-1.751962, 0.485751, 0.182121, -0.000018] #last 4 columns
+ discadj_rans_naca0012_sa.test_vals = [-2.230561, 0.678834, 0.180740, -0.000018] #last 4 columns
discadj_rans_naca0012_sa.su2_exec = "SU2_CFD_AD"
discadj_rans_naca0012_sa.timeout = 1600
discadj_rans_naca0012_sa.tol = 0.00001
@@ -105,7 +105,7 @@ def main():
discadj_rans_naca0012_sst.cfg_dir = "disc_adj_rans/naca0012"
discadj_rans_naca0012_sst.cfg_file = "turb_NACA0012_sst.cfg"
discadj_rans_naca0012_sst.test_iter = 10
- discadj_rans_naca0012_sst.test_vals = [-1.654903, -0.491485, 0.109160, 0.000011] #last 4 columns
+ discadj_rans_naca0012_sst.test_vals = [-2.216474, -0.485913, 0.109490, 0.000011] #last 4 columns
discadj_rans_naca0012_sst.su2_exec = "SU2_CFD_AD"
discadj_rans_naca0012_sst.timeout = 1600
discadj_rans_naca0012_sst.tol = 0.00001
@@ -161,7 +161,7 @@ def main():
discadj_incomp_turb_NACA0012_sst.cfg_dir = "disc_adj_incomp_rans/naca0012"
discadj_incomp_turb_NACA0012_sst.cfg_file = "turb_naca0012_sst.cfg"
discadj_incomp_turb_NACA0012_sst.test_iter = 10
- discadj_incomp_turb_NACA0012_sst.test_vals = [-3.845759, -2.416670, -8.430657, 0.000000] #last 4 columns
+ discadj_incomp_turb_NACA0012_sst.test_vals = [-3.845578, -2.414024, -8.420179, 0.000000] #last 4 columns
discadj_incomp_turb_NACA0012_sst.su2_exec = "SU2_CFD_AD"
discadj_incomp_turb_NACA0012_sst.timeout = 1600
discadj_incomp_turb_NACA0012_sst.tol = 0.00001
@@ -208,7 +208,7 @@ def main():
discadj_pitchingNACA0012.cfg_dir = "disc_adj_euler/naca0012_pitching"
discadj_pitchingNACA0012.cfg_file = "inv_NACA0012_pitching.cfg"
discadj_pitchingNACA0012.test_iter = 4
- discadj_pitchingNACA0012.test_vals = [-1.170348, -1.639086, -0.020749, 0.000040] #last 4 columns
+ discadj_pitchingNACA0012.test_vals = [-1.091207, -1.553655, -0.037855, 0.000088] #last 4 columns
discadj_pitchingNACA0012.su2_exec = "SU2_CFD_AD"
discadj_pitchingNACA0012.timeout = 1600
discadj_pitchingNACA0012.tol = 0.00001
@@ -239,7 +239,7 @@ def main():
discadj_heat.cfg_dir = "disc_adj_heat"
discadj_heat.cfg_file = "disc_adj_heat.cfg"
discadj_heat.test_iter = 10
- discadj_heat.test_vals = [-2.271573, 0.671194, -3.172000, -8.231600] #last 4 columns
+ discadj_heat.test_vals = [-2.271573, 0.671242, -3.172000, -8.231600] #last 4 columns
discadj_heat.su2_exec = "SU2_CFD_AD"
discadj_heat.timeout = 1600
discadj_heat.tol = 0.00001
diff --git a/TestCases/sliding_interface/channel_2D/channel_2D_NN.cfg b/TestCases/sliding_interface/channel_2D/channel_2D_NN.cfg
index 0c11516ed457..9e79e979cd6c 100644
--- a/TestCases/sliding_interface/channel_2D/channel_2D_NN.cfg
+++ b/TestCases/sliding_interface/channel_2D/channel_2D_NN.cfg
@@ -175,7 +175,6 @@ SLOPE_LIMITER_FLOW= VENKATAKRISHNAN
TIME_DISCRE_FLOW= EULER_IMPLICIT
%
% Relaxation coefficient
-RELAXATION_FACTOR_FLOW= 1.0
%
%
% --------------------------- CONVERGENCE PARAMETERS --------------------------%
diff --git a/TestCases/sliding_interface/channel_2D/channel_2D_WA.cfg b/TestCases/sliding_interface/channel_2D/channel_2D_WA.cfg
index 16930aa9718e..eebace601a1c 100644
--- a/TestCases/sliding_interface/channel_2D/channel_2D_WA.cfg
+++ b/TestCases/sliding_interface/channel_2D/channel_2D_WA.cfg
@@ -174,7 +174,6 @@ SLOPE_LIMITER_FLOW= VENKATAKRISHNAN
TIME_DISCRE_FLOW= EULER_IMPLICIT
%
% Relaxation coefficient
-RELAXATION_FACTOR_FLOW= 1.0
%
%
% --------------------------- CONVERGENCE PARAMETERS --------------------------%
diff --git a/TestCases/sliding_interface/channel_3D/channel_3D_NN.cfg b/TestCases/sliding_interface/channel_3D/channel_3D_NN.cfg
index bde13568ebb9..64c16fb1d48b 100644
--- a/TestCases/sliding_interface/channel_3D/channel_3D_NN.cfg
+++ b/TestCases/sliding_interface/channel_3D/channel_3D_NN.cfg
@@ -176,7 +176,6 @@ SLOPE_LIMITER_FLOW= VENKATAKRISHNAN
TIME_DISCRE_FLOW= EULER_IMPLICIT
%
% Relaxation coefficient
-RELAXATION_FACTOR_FLOW= 1.0
%
%
% --------------------------- CONVERGENCE PARAMETERS --------------------------%
diff --git a/TestCases/sliding_interface/channel_3D/channel_3D_WA.cfg b/TestCases/sliding_interface/channel_3D/channel_3D_WA.cfg
index 85f5d747e11d..0bf0094fb7e1 100644
--- a/TestCases/sliding_interface/channel_3D/channel_3D_WA.cfg
+++ b/TestCases/sliding_interface/channel_3D/channel_3D_WA.cfg
@@ -174,7 +174,6 @@ SLOPE_LIMITER_FLOW= VENKATAKRISHNAN
TIME_DISCRE_FLOW= EULER_IMPLICIT
%
% Relaxation coefficient
-RELAXATION_FACTOR_FLOW= 1.0
%
%
% --------------------------- CONVERGENCE PARAMETERS --------------------------%
diff --git a/TestCases/sliding_interface/pipe/pipe_NN.cfg b/TestCases/sliding_interface/pipe/pipe_NN.cfg
index f4e5a9dc1a3b..030545723345 100644
--- a/TestCases/sliding_interface/pipe/pipe_NN.cfg
+++ b/TestCases/sliding_interface/pipe/pipe_NN.cfg
@@ -181,7 +181,6 @@ SLOPE_LIMITER_FLOW= NONE
TIME_DISCRE_FLOW= EULER_IMPLICIT
%
% Relaxation coefficient
-RELAXATION_FACTOR_FLOW= 1.0
%
%
% --------------------------- CONVERGENCE PARAMETERS --------------------------%
diff --git a/TestCases/sliding_interface/pipe/pipe_WA.cfg b/TestCases/sliding_interface/pipe/pipe_WA.cfg
index 276de07977c5..d3426972777f 100644
--- a/TestCases/sliding_interface/pipe/pipe_WA.cfg
+++ b/TestCases/sliding_interface/pipe/pipe_WA.cfg
@@ -180,7 +180,6 @@ SLOPE_LIMITER_FLOW= NONE
TIME_DISCRE_FLOW= EULER_IMPLICIT
%
% Relaxation coefficient
-RELAXATION_FACTOR_FLOW= 1.0
%
%
% --------------------------- CONVERGENCE PARAMETERS --------------------------%
diff --git a/TestCases/sliding_interface/rotating_cylinders/rot_cylinders_NN.cfg b/TestCases/sliding_interface/rotating_cylinders/rot_cylinders_NN.cfg
index 0c2a4dda36a8..f0905c16e3f9 100644
--- a/TestCases/sliding_interface/rotating_cylinders/rot_cylinders_NN.cfg
+++ b/TestCases/sliding_interface/rotating_cylinders/rot_cylinders_NN.cfg
@@ -179,7 +179,6 @@ SLOPE_LIMITER_FLOW= VENKATAKRISHNAN
TIME_DISCRE_FLOW= EULER_IMPLICIT
%
% Relaxation coefficient
-RELAXATION_FACTOR_FLOW= 1.0
%
%
% --------------------------- CONVERGENCE PARAMETERS --------------------------%
diff --git a/TestCases/sliding_interface/rotating_cylinders/rot_cylinders_WA.cfg b/TestCases/sliding_interface/rotating_cylinders/rot_cylinders_WA.cfg
index 9911c580bb90..9803529ee86e 100644
--- a/TestCases/sliding_interface/rotating_cylinders/rot_cylinders_WA.cfg
+++ b/TestCases/sliding_interface/rotating_cylinders/rot_cylinders_WA.cfg
@@ -182,7 +182,6 @@ SLOPE_LIMITER_FLOW= VENKATAKRISHNAN
TIME_DISCRE_FLOW= EULER_IMPLICIT
%
% Relaxation coefficient
-RELAXATION_FACTOR_FLOW= 1.0
%
%
% --------------------------- CONVERGENCE PARAMETERS --------------------------%
diff --git a/TestCases/sliding_interface/single_stage/single_stage_NN.cfg b/TestCases/sliding_interface/single_stage/single_stage_NN.cfg
index 14a23937bf7d..e8bc15224ebd 100644
--- a/TestCases/sliding_interface/single_stage/single_stage_NN.cfg
+++ b/TestCases/sliding_interface/single_stage/single_stage_NN.cfg
@@ -197,7 +197,6 @@ SLOPE_LIMITER_FLOW= NONE
TIME_DISCRE_FLOW= EULER_IMPLICIT
%
% Relaxation coefficient
-RELAXATION_FACTOR_FLOW= 1.0
%
%
%
@@ -221,7 +220,6 @@ TIME_DISCRE_TURB= EULER_IMPLICIT
CFL_REDUCTION_TURB= 0.01
%
% Relaxation coefficient
-RELAXATION_FACTOR_TURB= 1.0
%
%
%
diff --git a/TestCases/sliding_interface/single_stage/single_stage_WA.cfg b/TestCases/sliding_interface/single_stage/single_stage_WA.cfg
index e231aa261af1..69d11c02dfdf 100644
--- a/TestCases/sliding_interface/single_stage/single_stage_WA.cfg
+++ b/TestCases/sliding_interface/single_stage/single_stage_WA.cfg
@@ -195,7 +195,6 @@ SLOPE_LIMITER_FLOW= NONE
TIME_DISCRE_FLOW= EULER_IMPLICIT
%
% Relaxation coefficient
-RELAXATION_FACTOR_FLOW= 1.0
%
%
%
@@ -219,7 +218,6 @@ TIME_DISCRE_TURB= EULER_IMPLICIT
CFL_REDUCTION_TURB= 0.01
%
% Relaxation coefficient
-RELAXATION_FACTOR_TURB= 1.0
%
%
%
diff --git a/TestCases/sliding_interface/supersonic_vortex_shedding/sup_vor_shed_NN.cfg b/TestCases/sliding_interface/supersonic_vortex_shedding/sup_vor_shed_NN.cfg
index 296594694862..cefa2217b64b 100644
--- a/TestCases/sliding_interface/supersonic_vortex_shedding/sup_vor_shed_NN.cfg
+++ b/TestCases/sliding_interface/supersonic_vortex_shedding/sup_vor_shed_NN.cfg
@@ -182,7 +182,6 @@ SLOPE_LIMITER_FLOW= VENKATAKRISHNAN
TIME_DISCRE_FLOW= EULER_IMPLICIT
%
% Relaxation coefficient
-RELAXATION_FACTOR_FLOW= 1.0
%
%
% --------------------------- CONVERGENCE PARAMETERS --------------------------%
diff --git a/TestCases/sliding_interface/supersonic_vortex_shedding/sup_vor_shed_WA.cfg b/TestCases/sliding_interface/supersonic_vortex_shedding/sup_vor_shed_WA.cfg
index 8ee81a64d3c7..0d3c1a121c32 100644
--- a/TestCases/sliding_interface/supersonic_vortex_shedding/sup_vor_shed_WA.cfg
+++ b/TestCases/sliding_interface/supersonic_vortex_shedding/sup_vor_shed_WA.cfg
@@ -182,7 +182,6 @@ SLOPE_LIMITER_FLOW= VENKATAKRISHNAN
TIME_DISCRE_FLOW= EULER_IMPLICIT
%
% Relaxation coefficient
-RELAXATION_FACTOR_FLOW= 1.0
%
%
% --------------------------- CONVERGENCE PARAMETERS --------------------------%
diff --git a/TestCases/sliding_interface/uniform_flow/uniform_NN.cfg b/TestCases/sliding_interface/uniform_flow/uniform_NN.cfg
index b32195abce41..9e7cef652fa6 100644
--- a/TestCases/sliding_interface/uniform_flow/uniform_NN.cfg
+++ b/TestCases/sliding_interface/uniform_flow/uniform_NN.cfg
@@ -178,7 +178,6 @@ SLOPE_LIMITER_FLOW= NONE
TIME_DISCRE_FLOW= EULER_IMPLICIT
%
% Relaxation coefficient
-RELAXATION_FACTOR_FLOW= 1.0
%
%
%
diff --git a/TestCases/sliding_interface/uniform_flow/uniform_WA.cfg b/TestCases/sliding_interface/uniform_flow/uniform_WA.cfg
index 961758c2d7ab..9c1ed17b5f31 100644
--- a/TestCases/sliding_interface/uniform_flow/uniform_WA.cfg
+++ b/TestCases/sliding_interface/uniform_flow/uniform_WA.cfg
@@ -178,7 +178,6 @@ SLOPE_LIMITER_FLOW= NONE
TIME_DISCRE_FLOW= EULER_IMPLICIT
%
% Relaxation coefficient
-RELAXATION_FACTOR_FLOW= 1.0
%
%
%
diff --git a/TestCases/turbomachinery/APU_turbocharger/Jones.cfg b/TestCases/turbomachinery/APU_turbocharger/Jones.cfg
index 1362b58f30f2..505c5c95c7a8 100755
--- a/TestCases/turbomachinery/APU_turbocharger/Jones.cfg
+++ b/TestCases/turbomachinery/APU_turbocharger/Jones.cfg
@@ -246,7 +246,6 @@ JST_SENSOR_COEFF= ( 0.5, 0.02 )
TIME_DISCRE_FLOW= EULER_IMPLICIT
%
% Relaxation coefficient
-RELAXATION_FACTOR_FLOW= 0.95
%
ENTROPY_FIX_COEFF= 0.001
%
@@ -270,7 +269,6 @@ TIME_DISCRE_TURB= EULER_IMPLICIT
CFL_REDUCTION_TURB= 0.5
%
% Relaxation coefficient
-RELAXATION_FACTOR_TURB= 0.95
%
%
% --------------------------- CONVERGENCE PARAMETERS --------------------------%
diff --git a/TestCases/turbomachinery/APU_turbocharger/Jones_rst.cfg b/TestCases/turbomachinery/APU_turbocharger/Jones_rst.cfg
index f16bd867d18b..16d17b0e0b93 100755
--- a/TestCases/turbomachinery/APU_turbocharger/Jones_rst.cfg
+++ b/TestCases/turbomachinery/APU_turbocharger/Jones_rst.cfg
@@ -251,7 +251,6 @@ JST_SENSOR_COEFF= ( 0.5, 0.02 )
TIME_DISCRE_FLOW= EULER_IMPLICIT
%
% Relaxation coefficient
-RELAXATION_FACTOR_FLOW= 0.95
%
ENTROPY_FIX_COEFF= 0.001
%
@@ -275,7 +274,6 @@ TIME_DISCRE_TURB= EULER_IMPLICIT
CFL_REDUCTION_TURB= 0.5
%
% Relaxation coefficient
-RELAXATION_FACTOR_TURB= 0.95
%
%
% --------------------------- CONVERGENCE PARAMETERS --------------------------%
diff --git a/TestCases/turbomachinery/axial_stage_2D/Axial_stage2D.cfg b/TestCases/turbomachinery/axial_stage_2D/Axial_stage2D.cfg
index a868f32f19e6..dc86b6875204 100755
--- a/TestCases/turbomachinery/axial_stage_2D/Axial_stage2D.cfg
+++ b/TestCases/turbomachinery/axial_stage_2D/Axial_stage2D.cfg
@@ -242,7 +242,6 @@ JST_SENSOR_COEFF= ( 0.5, 0.02 )
TIME_DISCRE_FLOW= EULER_IMPLICIT
%
% Relaxation coefficient
-RELAXATION_FACTOR_FLOW= 1.0
%
%
% -------------------- TURBULENT NUMERICAL METHOD DEFINITION ------------------%
@@ -264,7 +263,6 @@ TIME_DISCRE_TURB= EULER_IMPLICIT
CFL_REDUCTION_TURB= 0.5
%
% Relaxation coefficient
-RELAXATION_FACTOR_TURB= 0.95
%
%
% --------------------------- CONVERGENCE PARAMETERS --------------------------%
diff --git a/TestCases/turbomachinery/centrifugal_blade/centrifugal_blade.cfg b/TestCases/turbomachinery/centrifugal_blade/centrifugal_blade.cfg
index 74d9c8dfc22f..ce87e1e5f692 100755
--- a/TestCases/turbomachinery/centrifugal_blade/centrifugal_blade.cfg
+++ b/TestCases/turbomachinery/centrifugal_blade/centrifugal_blade.cfg
@@ -275,7 +275,6 @@ SLOPE_LIMITER_FLOW= VENKATAKRISHNAN
TIME_DISCRE_FLOW= EULER_IMPLICIT
%
% Relaxation coefficient
-RELAXATION_FACTOR_FLOW= 1.0
%
%
%
@@ -299,7 +298,6 @@ TIME_DISCRE_TURB= EULER_IMPLICIT
CFL_REDUCTION_TURB= 0.01
%
% Relaxation coefficient
-RELAXATION_FACTOR_TURB= 1.0
%
%
%
diff --git a/TestCases/turbomachinery/centrifugal_stage/centrifugal_stage.cfg b/TestCases/turbomachinery/centrifugal_stage/centrifugal_stage.cfg
index 757be80790e9..e650e733a9f1 100755
--- a/TestCases/turbomachinery/centrifugal_stage/centrifugal_stage.cfg
+++ b/TestCases/turbomachinery/centrifugal_stage/centrifugal_stage.cfg
@@ -283,7 +283,6 @@ SLOPE_LIMITER_FLOW= VENKATAKRISHNAN
TIME_DISCRE_FLOW= EULER_IMPLICIT
%
% Relaxation coefficient
-RELAXATION_FACTOR_FLOW= 1.0
%
%
%
@@ -307,7 +306,6 @@ TIME_DISCRE_TURB= EULER_IMPLICIT
CFL_REDUCTION_TURB= 0.01
%
% Relaxation coefficient
-RELAXATION_FACTOR_TURB= 1.0
%
%
%
diff --git a/TestCases/turbomachinery/transonic_stator_2D/transonic_stator.cfg b/TestCases/turbomachinery/transonic_stator_2D/transonic_stator.cfg
index 73a7326e7bbd..dc3a5cbd334b 100644
--- a/TestCases/turbomachinery/transonic_stator_2D/transonic_stator.cfg
+++ b/TestCases/turbomachinery/transonic_stator_2D/transonic_stator.cfg
@@ -250,7 +250,6 @@ JST_SENSOR_COEFF= ( 0.5, 0.02 )
TIME_DISCRE_FLOW= EULER_IMPLICIT
%
% Relaxation coefficient
-RELAXATION_FACTOR_FLOW= 1.0
%
%
% -------------------- TURBULENT NUMERICAL METHOD DEFINITION ------------------%
@@ -272,7 +271,6 @@ TIME_DISCRE_TURB= EULER_IMPLICIT
CFL_REDUCTION_TURB= 0.1
%
% Relaxation coefficient
-RELAXATION_FACTOR_TURB= 1.0
%
%
% --------------------------- CONVERGENCE PARAMETERS --------------------------%
diff --git a/TestCases/turbomachinery/transonic_stator_2D/transonic_stator_rst.cfg b/TestCases/turbomachinery/transonic_stator_2D/transonic_stator_rst.cfg
index 329a81058e2e..d8d209589124 100644
--- a/TestCases/turbomachinery/transonic_stator_2D/transonic_stator_rst.cfg
+++ b/TestCases/turbomachinery/transonic_stator_2D/transonic_stator_rst.cfg
@@ -255,7 +255,6 @@ JST_SENSOR_COEFF= ( 0.5, 0.02 )
TIME_DISCRE_FLOW= EULER_IMPLICIT
%
% Relaxation coefficient
-RELAXATION_FACTOR_FLOW= 1.0
%
%
% -------------------- TURBULENT NUMERICAL METHOD DEFINITION ------------------%
@@ -277,7 +276,6 @@ TIME_DISCRE_TURB= EULER_IMPLICIT
CFL_REDUCTION_TURB= 0.1
%
% Relaxation coefficient
-RELAXATION_FACTOR_TURB= 1.0
%
%
% --------------------------- CONVERGENCE PARAMETERS --------------------------%
diff --git a/config_template.cfg b/config_template.cfg
index 01e151eb2722..85ee569a39a3 100644
--- a/config_template.cfg
+++ b/config_template.cfg
@@ -761,7 +761,7 @@ CFL_ADAPT= NO
%
% Parameters of the adaptive CFL number (factor down, factor up, CFL min value,
% CFL max value )
-CFL_ADAPT_PARAM= ( 1.5, 0.5, 1.25, 50.0 )
+CFL_ADAPT_PARAM= ( 0.1, 2.0, 10.0, 1e10 )
%
% Maximum Delta Time in local time stepping simulations
MAX_DELTA_TIME= 1E6
@@ -927,13 +927,10 @@ ENTROPY_FIX_COEFF= 0.0
%
% Higher values than 1 (3 to 4) make the global Jacobian of central schemes (compressible flow
% only) more diagonal dominant (but mathematically incorrect) so that higher CFL can be used.
-CENTRAL_JACOBIAN_FIX_FACTOR= 1.0
+CENTRAL_JACOBIAN_FIX_FACTOR= 4.0
%
% Time discretization (RUNGE-KUTTA_EXPLICIT, EULER_IMPLICIT, EULER_EXPLICIT)
TIME_DISCRE_FLOW= EULER_IMPLICIT
-%
-% Relaxation coefficient
-RELAXATION_FACTOR_FLOW= 0.95
% ------------------- FEM FLOW NUMERICAL METHOD DEFINITION --------------------%
%
@@ -990,9 +987,6 @@ TIME_DISCRE_TURB= EULER_IMPLICIT
%
% Reduction factor of the CFL coefficient in the turbulence problem
CFL_REDUCTION_TURB= 1.0
-%
-% Relaxation coefficient
-RELAXATION_FACTOR_TURB= 0.95
% --------------------- HEAT NUMERICAL METHOD DEFINITION ----------------------%
%