Skip to content

Commit c16189f

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into remove_old_scripts
2 parents 72ea846 + 0fc0d07 commit c16189f

5 files changed

Lines changed: 18 additions & 5 deletions

File tree

.github/workflows/regression.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ jobs:
128128
uses: docker://ghcr.io/su2code/su2/test-su2:230225-2136
129129
with:
130130
# -t <Tutorials-branch> -c <Testcases-branch>
131-
args: -b ${{github.ref}} -t develop -c py_wrapper_example -s ${{matrix.testscript}}
131+
args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}}
132132
- name: Cleanup
133133
uses: docker://ghcr.io/su2code/su2/test-su2:230225-2136
134134
with:

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) {

TestCases/parallel_regression_AD.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ def main():
520520

521521
# Flow AD Mesh Displacement and Initial Coordinates Sensitivity
522522
pywrapper_wavy_wall_steady = TestCase('pywrapper_wavy_wall_steady')
523-
pywrapper_wavy_wall_steady.cfg_dir = "py_wrapper/disc_adj_flow/mesh_disp_sens"
523+
pywrapper_wavy_wall_steady.cfg_dir = "py_wrapper/wavy_wall"
524524
pywrapper_wavy_wall_steady.cfg_file = "run_steady.py"
525525
pywrapper_wavy_wall_steady.test_iter = 100
526526
pywrapper_wavy_wall_steady.test_vals = [-1.360044, 2.580709, -2.892473]

TestCases/py_wrapper/wavy_wall/run_steady.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ def RunPrimal(channel_width, deform_amplitude):
143143
Returns the objective function.
144144
"""
145145
comm = MPI.COMM_WORLD
146-
rank = comm.Get_rank()
147146

148147
with open('config.cfg', 'w') as f:
149148
f.write(common_settings.replace('__WIDTH__', str(channel_width)) + primal_settings)
@@ -175,7 +174,6 @@ def RunAdjoint(channel_width, deform_amplitude):
175174
Returns the sensitivity of the objective function to the amplitude and width.
176175
"""
177176
comm = MPI.COMM_WORLD
178-
rank = comm.Get_rank()
179177

180178
with open('config_ad.cfg', 'w') as f:
181179
f.write(common_settings.replace('__WIDTH__', str(channel_width)) + adjoint_settings)
@@ -278,7 +276,7 @@ def Deformation(t, amplitude, marker_id, driver, check = False):
278276
def SumSensitivity(t, marker_id, driver):
279277
"""Integrates the sensitivity with respect to the amplitude of the deformation."""
280278
if marker_id < 0:
281-
return
279+
return 0.0
282280
ini_coords = driver.MarkerInitialCoordinates(marker_id)
283281
phase = Phase(t)
284282
sens = 0

0 commit comments

Comments
 (0)