Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] NEMO - New Symmetry BC #1168

Closed
wants to merge 30 commits into from
Closed
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
3e756c3
merge with latest developments in other NEMO branches
CatarinaGarbacz Jan 12, 2021
22ea138
Changes on SYM_BC. Working with 2D cases
fmpmorgado Jan 13, 2021
5652711
pending merge
CatarinaGarbacz Jan 14, 2021
f7ed768
2D fully working. Missing 3D still
fmpmorgado Jan 15, 2021
cab2b59
fix SU2 INTERP stuff after merge
CatarinaGarbacz Jan 15, 2021
85f1396
Working in 3D, missing comments
fmpmorgado Jan 15, 2021
9fb212c
frozen mixture option also working with mutation++
CatarinaGarbacz Jan 17, 2021
120d6cf
Re-organized code and placed some comments
fmpmorgado Jan 18, 2021
2761f67
Merge branch 'feature_NEMO' into feature_NEMO_Sym_BC
fmpmorgado Jan 18, 2021
eb5b981
Solved conflict issues and misleading comments
fmpmorgado Jan 18, 2021
b86663c
Simplification of if conditions to calculate the used eigenvalue
fmpmorgado Jan 19, 2021
84da6e2
Simplifying conditions in time-step calculation
fmpmorgado Jan 19, 2021
201a869
recovering some forgotten stuff
CatarinaGarbacz Jan 19, 2021
beaaf88
Changing variable type for symmetry vector
fmpmorgado Jan 19, 2021
c9f57a6
Adressing compilation issues in clusters
fmpmorgado Jan 19, 2021
2d6fd11
Merge branch 'feature_NEMO' into feature_NEMO_Sym_BC
fmpmorgado Jan 20, 2021
7f20f86
Removing INTERP to align with develop and feature_NEMO update
fmpmorgado Jan 20, 2021
4650507
Merge branch 'develop' into feature_NEMO_Sym_BC
fmpmorgado Jan 20, 2021
67ed3c2
Adressed problems in regression tests - Residuals were affected if BC…
fmpmorgado Jan 20, 2021
734a874
Update on thermalbath regression test
fmpmorgado Jan 20, 2021
a67e645
Changed vector name and simplified code to not manipulate Volume
fmpmorgado Jan 20, 2021
7d31d0e
Merge branch 'develop' into feature_NEMO_Sym_BC
fmpmorgado Jan 20, 2021
992589d
Changing thermalbath regressin value again
fmpmorgado Jan 20, 2021
0708c1e
Removing code complexity
fmpmorgado Jan 21, 2021
77cabde
Not used Variable
fmpmorgado Jan 21, 2021
de47148
Modified Euler_wall_bc to be the same as in CEulerSolver
fmpmorgado Jan 21, 2021
bd13010
Fixing CIntegration
fmpmorgado Jan 21, 2021
3d96408
Created routine to fix Edge Normals at Symmetry Planes and removed Eu…
fmpmorgado Jan 22, 2021
f8426e5
Addressing PR requested changes and Remove viscous part in Euler wall BC
fmpmorgado Jan 22, 2021
acfec29
Merge branch 'develop' into feature_NEMO_Sym_BC
fmpmorgado Mar 5, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Common/include/option_structure.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ using MapType = CEmptyMap<T,U>;
* \brief Different software components of SU2
*/
enum SU2_COMPONENT {
SU2_CFD = 1, /*!< \brief Running the SU2_CFD software. */
SU2_DEF = 2, /*!< \brief Running the SU2_DEF software. */
SU2_DOT = 3, /*!< \brief Running the SU2_DOT software. */
SU2_MSH = 4, /*!< \brief Running the SU2_MSH software. */
SU2_GEO = 5, /*!< \brief Running the SU2_GEO software. */
SU2_SOL = 6 /*!< \brief Running the SU2_SOL software. */
SU2_CFD = 1, /*!< \brief Running the SU2_CFD software. */
SU2_DEF = 2, /*!< \brief Running the SU2_DEF software. */
SU2_DOT = 3, /*!< \brief Running the SU2_DOT software. */
SU2_MSH = 4, /*!< \brief Running the SU2_MSH software. */
SU2_GEO = 5, /*!< \brief Running the SU2_GEO software. */
pcarruscag marked this conversation as resolved.
Show resolved Hide resolved
SU2_SOL = 6, /*!< \brief Running the SU2_SOL software. */
};

const unsigned int EXIT_DIVERGENCE = 2; /*!< \brief Exit code (divergence). */
Expand Down
18 changes: 7 additions & 11 deletions Common/src/CConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2782,8 +2782,8 @@ void CConfig::SetConfig_Options() {

/* DESCRIPTION: Size of the edge groups colored for thread parallel edge loops (0 forces the reducer strategy). */
addUnsignedLongOption("EDGE_COLORING_GROUP_SIZE", edgeColorGroupSize, 512);
/* END_CONFIG_OPTIONS */

/* END_CONFIG_OPTIONS */
}

void CConfig::SetConfig_Parsing(char case_filename[MAX_STRING_SIZE]) {
Expand Down Expand Up @@ -3058,12 +3058,12 @@ void CConfig::SetHeader(unsigned short val_software) const{
cout << "| / __| | | |_ ) Release 7.1.0 \"Blackbird\" |" << endl;
cout << "| \\__ \\ |_| |/ / |" << endl;
switch (val_software) {
case SU2_CFD: cout << "| |___/\\___//___| Suite (Computational Fluid Dynamics Code) |" << endl; break;
case SU2_DEF: cout << "| |___/\\___//___| Suite (Mesh Deformation Code) |" << endl; break;
case SU2_DOT: cout << "| |___/\\___//___| Suite (Gradient Projection Code) |" << endl; break;
case SU2_MSH: cout << "| |___/\\___//___| Suite (Mesh Adaptation Code) |" << endl; break;
case SU2_GEO: cout << "| |___/\\___//___| Suite (Geometry Definition Code) |" << endl; break;
case SU2_SOL: cout << "| |___/\\___//___| Suite (Solution Exporting Code) |" << endl; break;
case SU2_CFD: cout << "| |___/\\___//___| Suite (Computational Fluid Dynamics Code) |" << endl; break;
case SU2_DEF: cout << "| |___/\\___//___| Suite (Mesh Deformation Code) |" << endl; break;
case SU2_DOT: cout << "| |___/\\___//___| Suite (Gradient Projection Code) |" << endl; break;
case SU2_MSH: cout << "| |___/\\___//___| Suite (Mesh Adaptation Code) |" << endl; break;
pcarruscag marked this conversation as resolved.
Show resolved Hide resolved
case SU2_GEO: cout << "| |___/\\___//___| Suite (Geometry Definition Code) |" << endl; break;
case SU2_SOL: cout << "| |___/\\___//___| Suite (Solution Exporting Code) |" << endl; break;
}

cout << "| |" << endl;
Expand Down Expand Up @@ -3550,10 +3550,6 @@ void CConfig::SetPostprocessing(unsigned short val_software, unsigned short val_
SU2_MPI::Error("ARGON is not working with SU2_NONEQ fluid model!", CURRENT_FUNCTION);
}

if (GetKind_FluidModel() == MUTATIONPP && GetFrozen() == true){
SU2_MPI::Error("The option of FROZEN_MIXTURE is not yet working with Mutation++ support.", CURRENT_FUNCTION);
}

if(GetBoolTurbomachinery()){
nBlades = new su2double[nZone];
FreeStreamTurboNormal= new su2double[3];
Expand Down
2 changes: 1 addition & 1 deletion SU2_CFD/include/solvers/CFVMFlowSolverBase.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ class CFVMFlowSolverBase : public CSolver {
* \param[in] val_marker - Surface marker where the boundary condition is applied.
*/
inline void BC_Euler_Wall(CGeometry* geometry, CSolver** solver_container, CNumerics* conv_numerics,
CNumerics* visc_numerics, CConfig* config, unsigned short val_marker) final {
CNumerics* visc_numerics, CConfig* config, unsigned short val_marker) override {
/*--- Call the equivalent symmetry plane boundary condition. ---*/
BC_Sym_Plane(geometry, solver_container, conv_numerics, visc_numerics, config, val_marker);
}
Expand Down
12 changes: 12 additions & 0 deletions SU2_CFD/include/solvers/CNEMOEulerSolver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,18 @@ class CNEMOEulerSolver : public CFVMFlowSolverBase<CNEMOEulerVariable, COMPRESSI
void BC_Sym_Plane(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics,
CNumerics *visc_numerics, CConfig *config, unsigned short val_marker) final;

/*!
* \brief Impose the Euler boundary condition using the residual.
* \param[in] geometry - Geometrical definition of the problem.
* \param[in] solver_container - Container vector with all the solutions.
* \param[in] conv_numerics - Description of the numerical method for convective terms.
* \param[in] visc_numerics - Description of the numerical method for viscous terms.
* \param[in] config - Definition of the particular problem.
* \param[in] val_marker - Surface marker where the boundary condition is applied.
*/
void BC_Euler_Wall(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics,
CNumerics *visc_numerics, CConfig *config, unsigned short val_marker) final;

/*!
* \brief Impose a subsonic inlet boundary condition.
* \param[in] geometry - Geometrical definition of the problem.
Expand Down
12 changes: 12 additions & 0 deletions SU2_CFD/include/variables/CNEMOEulerVariable.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ class CNEMOEulerVariable : public CVariable {

su2double Tve_Freestream; /*!< \brief Freestream vib-el temperature. */

VectorType symmetry; /*!< \brief Nodes in symmetry planes. */

public:

/*!
Expand Down Expand Up @@ -522,6 +524,16 @@ class CNEMOEulerVariable : public CVariable {
*/
inline su2double GetGamma(unsigned long iPoint) { return Gamma(iPoint); }

/*!
* \brief Retrieves the number of symmetry planes at the specified node.
*/
inline su2double GetSymmetry(unsigned long iPoint) { return symmetry[iPoint]; }

/*!
* \brief Increases the number of symmetry planes at the specified node by one.
*/
inline void SetSymmetry(unsigned long iPoint) {symmetry[iPoint] += 1.0;}

/*---------------------------------------*/
/*--- NEMO indices ---*/
/*---------------------------------------*/
Expand Down
1 change: 1 addition & 0 deletions SU2_CFD/src/fluid/CMutationTCLib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ CMutationTCLib::CMutationTCLib(const CConfig* config, unsigned short val_nDim):
transport_model = "Gupta-Yos";

opt.setStateModel("ChemNonEqTTv");
if (frozen) opt.setMechanism("none");
opt.setViscosityAlgorithm(transport_model);
opt.setThermalConductivityAlgorithm(transport_model);

Expand Down
11 changes: 10 additions & 1 deletion SU2_CFD/src/integration/CIntegration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ void CIntegration::Space_Integration(CGeometry *geometry,
solver_container[MainSolver]->BC_Far_Field(geometry, solver_container, conv_bound_numerics, visc_bound_numerics, config, iMarker);
break;
case SYMMETRY_PLANE:
solver_container[MainSolver]->BC_Sym_Plane(geometry, solver_container, conv_bound_numerics, visc_bound_numerics, config, iMarker);
if (!config->GetNEMOProblem())
solver_container[MainSolver]->BC_Sym_Plane(geometry, solver_container, conv_bound_numerics, visc_bound_numerics, config, iMarker);
break;
case ELECTRODE_BOUNDARY:
solver_container[MainSolver]->BC_Electrode(geometry, solver_container, conv_bound_numerics, config, iMarker);
Expand Down Expand Up @@ -184,6 +185,14 @@ void CIntegration::Space_Integration(CGeometry *geometry,
solver_container[MainSolver]->BC_Periodic(geometry, solver_container, conv_bound_numerics, config);
}

/*--- Placing Symmetry Plane BC last, so we only require to double
the residuals to use a ghost nodes approach. --- */

for (iMarker = 0; iMarker < config->GetnMarker_All(); iMarker++) {
KindBC = config->GetMarker_All_KindBC(iMarker);
if (KindBC == SYMMETRY_PLANE && config->GetNEMOProblem()) solver_container[MainSolver]->BC_Sym_Plane(geometry, solver_container, conv_bound_numerics, visc_bound_numerics, config, iMarker);
}

}

void CIntegration::Time_Integration(CGeometry *geometry, CSolver **solver_container, CConfig *config,
Expand Down
2 changes: 1 addition & 1 deletion SU2_CFD/src/output/CNEMOCompOutput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ void CNEMOCompOutput::LoadVolumeData(CConfig *config, CGeometry *geometry, CSolv

void CNEMOCompOutput::LoadSurfaceData(CConfig *config, CGeometry *geometry, CSolver **solver, unsigned long iPoint, unsigned short iMarker, unsigned long iVertex){

if ((config->GetKind_Solver() == NEMO_NAVIER_STOKES)) {
if ((config->GetKind_Solver() == NEMO_NAVIER_STOKES && config->GetMarker_All_KindBC(iMarker) != EULER && config->GetMarker_All_KindBC(iMarker) != SYMMETRY_PLANE)) {
SetVolumeOutputValue("SKIN_FRICTION-X", iPoint, solver[FLOW_SOL]->GetCSkinFriction(iMarker, iVertex, 0));
pcarruscag marked this conversation as resolved.
Show resolved Hide resolved
SetVolumeOutputValue("SKIN_FRICTION-Y", iPoint, solver[FLOW_SOL]->GetCSkinFriction(iMarker, iVertex, 1));
if (nDim == 3)
Expand Down
Loading