Skip to content

Commit 388604c

Browse files
auzbaigpcarruscag
andauthored
Radial Equilibrium equation fix for Turbo solver (#1008)
* Radial Equilibrium equation fix for Turbo solver * fixing spelling mistakes * adding Radius1 condition with EPS Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com>
1 parent 4acbdf8 commit 388604c

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

SU2_CFD/src/solvers/CEulerSolver.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7441,7 +7441,7 @@ void CEulerSolver::BC_Riemann(CGeometry *geometry, CSolver **solver_container,
74417441

74427442
case STATIC_PRESSURE:
74437443

7444-
/*--- Retrieve the staic pressure for this boundary. ---*/
7444+
/*--- Retrieve the static pressure for this boundary. ---*/
74457445
Pressure_e = config->GetRiemann_Var1(Marker_Tag);
74467446
Pressure_e /= config->GetPressure_Ref();
74477447
Density_e = Density_i;
@@ -7920,7 +7920,7 @@ void CEulerSolver::BC_TurboRiemann(CGeometry *geometry, CSolver **solver_contain
79207920

79217921
case MIXING_OUT:
79227922

7923-
/*--- Retrieve the staic pressure for this boundary. ---*/
7923+
/*--- Retrieve the static pressure for this boundary. ---*/
79247924
Pressure_e = ExtAveragePressure[val_marker][iSpan];
79257925
Density_e = Density_i;
79267926

@@ -7936,7 +7936,7 @@ void CEulerSolver::BC_TurboRiemann(CGeometry *geometry, CSolver **solver_contain
79367936

79377937
case STATIC_PRESSURE:
79387938

7939-
/*--- Retrieve the staic pressure for this boundary. ---*/
7939+
/*--- Retrieve the static pressure for this boundary. ---*/
79407940
Pressure_e = config->GetRiemann_Var1(Marker_Tag);
79417941
Pressure_e /= config->GetPressure_Ref();
79427942
Density_e = Density_i;
@@ -7954,7 +7954,7 @@ void CEulerSolver::BC_TurboRiemann(CGeometry *geometry, CSolver **solver_contain
79547954

79557955
case RADIAL_EQUILIBRIUM:
79567956

7957-
/*--- Retrieve the staic pressure for this boundary. ---*/
7957+
/*--- Retrieve the static pressure for this boundary. ---*/
79587958
Pressure_e = RadialEquilibriumPressure[val_marker][iSpan];
79597959
Density_e = Density_i;
79607960

@@ -12446,7 +12446,8 @@ void CEulerSolver::TurboAverageProcess(CSolver **solver, CGeometry *geometry, CC
1244612446
Radius2 = geometry->GetTurboRadius(iMarker,iSpan);
1244712447
Radius1 = geometry->GetTurboRadius(iMarker,iSpan-1);
1244812448
Vt2 = AverageTurboVelocity[iMarker][iSpan - 1][1]*AverageTurboVelocity[iMarker][iSpan - 1][1];
12449-
RadialEquilibriumPressure[iMarker][iSpan -1] = RadialEquilibriumPressure[iMarker][iSpan] - AverageDensity[iMarker][iSpan -1]*Vt2/Radius2*(Radius2 - Radius1);
12449+
Radius1 = (Radius1 > EPS)? Radius1 : Radius2;
12450+
RadialEquilibriumPressure[iMarker][iSpan -1] = RadialEquilibriumPressure[iMarker][iSpan] - AverageDensity[iMarker][iSpan -1]*Vt2/Radius1*(Radius2 - Radius1);
1245012451
}
1245112452
}
1245212453
}
@@ -12463,7 +12464,8 @@ void CEulerSolver::TurboAverageProcess(CSolver **solver, CGeometry *geometry, CC
1246312464
Radius2 = geometry->GetTurboRadius(iMarker,iSpan);
1246412465
Radius1 = geometry->GetTurboRadius(iMarker,iSpan-1);
1246512466
Vt2 = AverageTurboVelocity[iMarker][iSpan -1][1]*AverageTurboVelocity[iMarker][iSpan - 1][1];
12466-
RadialEquilibriumPressure[iMarker][iSpan -1] = RadialEquilibriumPressure[iMarker][iSpan] - AverageDensity[iMarker][iSpan -1]*Vt2/Radius2*(Radius2 - Radius1);
12467+
Radius1 = (Radius1 > EPS)? Radius1 : Radius2;
12468+
RadialEquilibriumPressure[iMarker][iSpan -1] = RadialEquilibriumPressure[iMarker][iSpan] - AverageDensity[iMarker][iSpan -1]*Vt2/Radius1*(Radius2 - Radius1);
1246712469
}
1246812470
}
1246912471
}

0 commit comments

Comments
 (0)