Skip to content

Commit e12db69

Browse files
authored
Merge pull request #2060 from j-signorelli/develop
Add local timestep + CFL as volume output
2 parents 6891b44 + 5b1bc07 commit e12db69

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

AUTHORS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ Jessie Lauzon
9292
João Loureiro
9393
Johannes Blühdorn
9494
JonathanSmith1936
95+
Joseph Signorelli
9596
Josy P. Pullockara
9697
Kedar Naik
9798
Kürşat Yurt

SU2_CFD/src/output/CFlowOutput.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1451,6 +1451,15 @@ void CFlowOutput::SetVolumeOutputFieldsScalarMisc(const CConfig* config) {
14511451
}
14521452
AddVolumeOutput("Q_CRITERION", "Q_Criterion", "VORTEX_IDENTIFICATION", "Value of the Q-Criterion");
14531453
}
1454+
1455+
// Timestep info
1456+
AddVolumeOutput("DELTA_TIME", "Delta_Time", "TIMESTEP", "Value of the local timestep for the flow variables");
1457+
AddVolumeOutput("CFL", "CFL", "TIMESTEP", "Value of the local CFL for the flow variables");
1458+
if (config->GetKind_Turb_Model() != TURB_MODEL::NONE)
1459+
{
1460+
AddVolumeOutput("TURB_DELTA_TIME", "Turb_Delta_Time", "TIMESTEP", "Value of the local timestep for the turbulence variables");
1461+
AddVolumeOutput("TURB_CFL", "Turb_CFL", "TIMESTEP", "Value of the local CFL for the turbulence variables");
1462+
}
14541463
}
14551464

14561465
void CFlowOutput::LoadVolumeDataScalar(const CConfig* config, const CSolver* const* solver, const CGeometry* geometry,
@@ -1462,6 +1471,9 @@ void CFlowOutput::LoadVolumeDataScalar(const CConfig* config, const CSolver* con
14621471
const auto* Node_Trans = (config->GetKind_Trans_Model() != TURB_TRANS_MODEL::NONE) ? trans_solver->GetNodes() : nullptr;
14631472
const auto* Node_Geo = geometry->nodes;
14641473

1474+
SetVolumeOutputValue("DELTA_TIME", iPoint, Node_Flow->GetDelta_Time(iPoint));
1475+
SetVolumeOutputValue("CFL", iPoint, Node_Flow->GetLocalCFL(iPoint));
1476+
14651477
if (config->GetViscous()) {
14661478
if (nDim == 3){
14671479
SetVolumeOutputValue("VORTICITY_X", iPoint, Node_Flow->GetVorticity(iPoint)[0]);
@@ -1501,6 +1513,8 @@ void CFlowOutput::LoadVolumeDataScalar(const CConfig* config, const CSolver* con
15011513
/*--- If we got here a turbulence model is being used, therefore there is eddy viscosity. ---*/
15021514
if (config->GetKind_Turb_Model() != TURB_MODEL::NONE) {
15031515
SetVolumeOutputValue("EDDY_VISCOSITY", iPoint, Node_Flow->GetEddyViscosity(iPoint));
1516+
SetVolumeOutputValue("TURB_DELTA_TIME", iPoint, Node_Turb->GetDelta_Time(iPoint));
1517+
SetVolumeOutputValue("TURB_CFL", iPoint, Node_Turb->GetLocalCFL(iPoint));
15041518
}
15051519

15061520
if (config->GetSAParsedOptions().bc) {

0 commit comments

Comments
 (0)