Skip to content

Commit

Permalink
Merge pull request #1422 from su2code/feature_NEMO_implicit_viscous
Browse files Browse the repository at this point in the history
Implementation of Implicit for viscous NEMO problems
  • Loading branch information
WallyMaier authored Nov 9, 2021
2 parents 641d254 + 01103cb commit ccc1c6e
Show file tree
Hide file tree
Showing 19 changed files with 506 additions and 441 deletions.
2 changes: 1 addition & 1 deletion Common/include/geometry/CGeometry.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class CGeometry {
vector<vector<su2double> > FaceArea_plane; /*!< \brief Vector containing area/volume associated with new points appearing on a single plane */
vector<vector<unsigned long> > Plane_points; /*!< \brief Vector containing points appearing on a single plane */

vector<su2double> XCoordList; /*!< \brief Vector containing points appearing on a single plane */
vector<su2double> XCoordList; /*!< \brief Vector containing points appearing on a single plane */

#if defined(HAVE_MPI) && defined(HAVE_PARMETIS)
vector<vector<unsigned long> > adj_nodes; /*!< \brief Vector of vectors holding each node's adjacency during preparation for ParMETIS. */
Expand Down
4 changes: 2 additions & 2 deletions Common/src/CConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6474,8 +6474,8 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) {
break;
case EULER_IMPLICIT:
cout << "Euler implicit method for the flow equations." << endl;
if (Kind_Solver == NEMO_NAVIER_STOKES)
SU2_MPI::Error("Implicit time scheme is not working with NEMO for viscous problems. Use EULER_EXPLICIT.", CURRENT_FUNCTION);
if (Kind_FluidModel == MUTATIONPP)
SU2_MPI::Error("Implicit time scheme is not yet implemented with Mutation++. Use EULER_EXPLICIT.", CURRENT_FUNCTION);
switch (Kind_Linear_Solver) {
case BCGSTAB:
case FGMRES:
Expand Down
2 changes: 1 addition & 1 deletion Common/src/geometry/elements/CTETRA1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ CTETRA1::CTETRA1() : CElementWithKnownSizes<NGAUSS,NNODE,NDIM>() {

val_Ni = Xi; GaussPoint[iGauss].SetNi(val_Ni,0);
val_Ni = Eta; GaussPoint[iGauss].SetNi(val_Ni,1);
val_Ni = 1.0-Xi-Eta-Zeta; GaussPoint[iGauss].SetNi(val_Ni,2);
val_Ni = 1.0-Xi-Eta-Zeta; GaussPoint[iGauss].SetNi(val_Ni,2);
val_Ni = Zeta; GaussPoint[iGauss].SetNi(val_Ni,3);

/*--- dN/d xi, dN/d eta, dN/d zeta ---*/
Expand Down
314 changes: 296 additions & 18 deletions SU2_CFD/include/numerics/NEMO/CNEMONumerics.hpp

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions SU2_CFD/include/numerics/NEMO/NEMO_diffusion.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
*/
class CAvgGrad_NEMO : public CNEMONumerics {
private:
unsigned short iVar; /*!< \brief Iterators in dimension an variable. */

su2double *Mean_PrimVar, /*!< \brief Mean primitive variables. */
*Mean_U,
**Mean_GU,
Expand Down Expand Up @@ -102,7 +102,7 @@ class CAvgGradCorrected_NEMO : public CNEMONumerics {
**Mean_GradPrimVar, /*!< \brief Mean value of the gradient. */
*Mean_Eve, /*!< \brief Mean value of eve. */
*Mean_Cvve, /*!< \brief Mean value of cvve. */
*Edge_Vector, /*!< \brief Vector from point i to point j. */
Edge_Vector[MAXNDIM]={0.0}, /*!< \brief Vector from point i to point j. */
*Proj_Mean_GradPrimVar_Edge, /*!< \brief Inner product of the Mean gradient and the edge vector. */
*Mean_Diffusion_Coeff, /*!< \brief Mean value of the species diffusion coefficient. */
Mean_Laminar_Viscosity, /*!< \brief Mean value of the viscosity. */
Expand Down
3 changes: 1 addition & 2 deletions SU2_CFD/src/fluid/CNEMOGas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,13 @@ su2double CNEMOGas::ComputeGamma(){

/*--- Extract Values ---*/
rhoCvtr = ComputerhoCvtr();
rhoCvve = ComputerhoCvve();

/*--- Gamma Computation ---*/
su2double rhoR = 0.0;
for(iSpecies = 0; iSpecies < nSpecies; iSpecies++)
rhoR += rhos[iSpecies]*Ru/MolarMass[iSpecies];

gamma = rhoR/(rhoCvtr+rhoCvve)+1;
gamma = rhoR/rhoCvtr+1;

return gamma;

Expand Down
Loading

0 comments on commit ccc1c6e

Please sign in to comment.