Skip to content

Commit 808e41c

Browse files
committed
Fix ResRMS output log->log10 ... fml
I spent ~2 days trying to figure why the DA restart were broken for species until I figured out that the output for primal is flawed, and I took the correct log10 for the direct residual printing
1 parent 44076ab commit 808e41c

3 files changed

Lines changed: 9 additions & 8 deletions

File tree

SU2_CFD/src/output/CFlowOutput.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -849,10 +849,10 @@ void CFlowOutput::LoadHistoryData_Scalar(const CConfig* config, const CSolver* c
849849

850850
if (config->GetKind_Species_Model() != SPECIES_MODEL::NONE) {
851851
for (unsigned short iVar = 0; iVar < config->GetnSpecies(); iVar++) {
852-
SetHistoryOutputValue("RMS_SPECIES_" + std::to_string(iVar), log(solver[SPECIES_SOL]->GetRes_RMS(iVar)));
853-
SetHistoryOutputValue("MAX_SPECIES_" + std::to_string(iVar), log(solver[SPECIES_SOL]->GetRes_Max(iVar)));
852+
SetHistoryOutputValue("RMS_SPECIES_" + std::to_string(iVar), log10(solver[SPECIES_SOL]->GetRes_RMS(iVar)));
853+
SetHistoryOutputValue("MAX_SPECIES_" + std::to_string(iVar), log10(solver[SPECIES_SOL]->GetRes_Max(iVar)));
854854
if (multiZone) {
855-
SetHistoryOutputValue("BGS_SPECIES_" + std::to_string(iVar), log(solver[SPECIES_SOL]->GetRes_BGS(iVar)));
855+
SetHistoryOutputValue("BGS_SPECIES_" + std::to_string(iVar), log10(solver[SPECIES_SOL]->GetRes_BGS(iVar)));
856856
}
857857
}
858858

TestCases/species_regression.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def main():
4747
species2_primitiveVenturi.cfg_dir = "species_transport/venturi_primitive_3species"
4848
species2_primitiveVenturi.cfg_file = "species2_primitiveVenturi.cfg"
4949
species2_primitiveVenturi.test_iter = 50
50-
species2_primitiveVenturi.test_vals = [-5.957517, -5.187476, -5.037298, -5.851420, -1.511976, -13.921433, 5, -0.808614, 5 , -2.351161, 5, -0.247992, 0.000140, 0.000140, 0.000000, 0.000000]
50+
species2_primitiveVenturi.test_vals = [-5.957517, -5.187476, -5.037298, -5.851420, -1.511976, -6.046002, 5, -0.808614, 5 , -2.351161, 5, -0.247992, 0.000140, 0.000140, 0.000000, 0.000000]
5151
species2_primitiveVenturi.su2_exec = "mpirun -n 2 SU2_CFD"
5252
species2_primitiveVenturi.timeout = 1600
5353
species2_primitiveVenturi.new_output = True
@@ -59,7 +59,7 @@ def main():
5959
species3_primitiveVenturi.cfg_dir = "species_transport/venturi_primitive_3species"
6060
species3_primitiveVenturi.cfg_file = "species3_primitiveVenturi.cfg"
6161
species3_primitiveVenturi.test_iter = 50
62-
species3_primitiveVenturi.test_vals = [-6.028145, -5.258104, -5.107927, -5.922051, -1.582604, -14.539029, -14.809699, 5, -0.808615, 5, -2.351160, 5, -0.288300, 1.645644, 0.499064, 0.601230, 0.545351]
62+
species3_primitiveVenturi.test_vals = [-6.028145, -5.258104, -5.107927, -5.922051, -1.582604, -6.314220, -6.431771, 5, -0.808615, 5, -2.351160, 5, -0.288300, 1.645644, 0.499064, 0.601230, 0.545351]
6363
species3_primitiveVenturi.su2_exec = "mpirun -n 2 SU2_CFD"
6464
species3_primitiveVenturi.timeout = 1600
6565
species3_primitiveVenturi.new_output = True
@@ -72,7 +72,7 @@ def main():
7272
species3_primitiveVenturi_inletFile.cfg_dir = "species_transport/venturi_primitive_3species"
7373
species3_primitiveVenturi_inletFile.cfg_file = "species3_primitiveVenturi_inletFile.cfg"
7474
species3_primitiveVenturi_inletFile.test_iter = 50
75-
species3_primitiveVenturi_inletFile.test_vals = [-6.028145, -5.258104, -5.107927, -5.922051, -1.582604, -14.539029, -14.809699, 5, -0.808615, 5, -2.351160, 5, -0.288300]
75+
species3_primitiveVenturi_inletFile.test_vals = [-6.028145, -5.258104, -5.107927, -5.922051, -1.582604, -6.314220, -6.431771, 5, -0.808615, 5, -2.351160, 5, -0.288300]
7676
species3_primitiveVenturi_inletFile.su2_exec = "mpirun -n 2 SU2_CFD"
7777
species3_primitiveVenturi_inletFile.timeout = 1600
7878
species3_primitiveVenturi_inletFile.new_output = True
@@ -84,7 +84,7 @@ def main():
8484
species_passive_val.cfg_dir = "species_transport/passive_transport_validation"
8585
species_passive_val.cfg_file = "passive_transport.cfg"
8686
species_passive_val.test_iter = 50
87-
species_passive_val.test_vals = [-16.559189, -16.315116, -16.908670, -10.608115, 10.000000, -4.523292, 7.000000, -5.010406]
87+
species_passive_val.test_vals = [-16.559189, -16.315116, -16.908670, -4.607046, 10.000000, -4.523292, 7.000000, -5.010406]
8888
species_passive_val.su2_exec = "mpirun -n 2 SU2_CFD"
8989
species_passive_val.timeout = 1600
9090
species_passive_val.new_output = True

TestCases/species_transport/venturi_primitive_3species/species3_primitiveVenturi.cfg

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,8 @@ VOLUME_OUTPUT= RESIDUAL, PRIMITIVE
133133
OUTPUT_WRT_FREQ= 1000
134134
%
135135
RESTART_SOL= NO
136+
READ_BINARY_RESTART= NO
137+
RESTART_FILENAME= restart
136138
SOLUTION_FILENAME= solution
137-
RESTART_FILENAME= restart.dat
138139
%
139140
WRT_PERFORMANCE= YES

0 commit comments

Comments
 (0)