Skip to content

Commit d940308

Browse files
authored
Merge pull request #1370 from su2code/thermo_init_output
Fixing screen output for thermo-based NS initialization
2 parents f7c0acf + 835b804 commit d940308

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

SU2_CFD/src/solvers/CEulerSolver.cpp

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -898,15 +898,15 @@ void CEulerSolver::SetNondimensionalization(CConfig *config, unsigned short iMes
898898

899899
config->SetMu_ConstantND(config->GetMu_Constant());
900900

901-
/*--- Reynolds based initialization ---*/
901+
/*--- Check if there is mesh motion. If yes, use the Mach
902+
number relative to the body to initialize the flow. ---*/
902903

903-
if (reynolds_init) {
904+
if (dynamic_grid) Velocity_Reynolds = config->GetMach_Motion()*Mach2Vel_FreeStream;
905+
else Velocity_Reynolds = ModVel_FreeStream;
904906

905-
/*--- First, check if there is mesh motion. If yes, use the Mach
906-
number relative to the body to initialize the flow. ---*/
907+
/*--- Reynolds based initialization ---*/
907908

908-
if (dynamic_grid) Velocity_Reynolds = config->GetMach_Motion()*Mach2Vel_FreeStream;
909-
else Velocity_Reynolds = ModVel_FreeStream;
909+
if (reynolds_init) {
910910

911911
/*--- For viscous flows, pressure will be computed from a density
912912
that is found from the Reynolds number. The viscosity is computed
@@ -936,6 +936,9 @@ void CEulerSolver::SetNondimensionalization(CConfig *config, unsigned short iMes
936936
config->SetViscosity_FreeStream(Viscosity_FreeStream);
937937
Energy_FreeStream = auxFluidModel->GetStaticEnergy() + 0.5*ModVel_FreeStream*ModVel_FreeStream;
938938

939+
/*--- Compute Reynolds number ---*/
940+
Reynolds = (Density_FreeStream*Velocity_Reynolds*config->GetLength_Reynolds())/Viscosity_FreeStream;
941+
config->SetReynolds(Reynolds);
939942
}
940943

941944
/*--- Turbulence kinetic energy ---*/

0 commit comments

Comments
 (0)