Skip to content

Commit 930a25e

Browse files
committed
using the surface averages in a discrete adjoint case
1 parent f9fcdff commit 930a25e

4 files changed

Lines changed: 6 additions & 3 deletions

File tree

Common/include/CConfig.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8658,7 +8658,6 @@ class CConfig {
86588658
unsigned short GetKind_Average(void) const { return Kind_Average; }
86598659

86608660
/*!
8661-
*
86628661
* \brief Get the direct differentation method.
86638662
* \return direct differentiation method.
86648663
*/

SU2_CFD/src/output/CFlowOutput.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -739,8 +739,8 @@ void CFlowOutput::SetAnalyzeSurfaceSpeciesVariance(const CSolver* const*solver,
739739
for (unsigned short iMarker_Analyze = 0; iMarker_Analyze < nMarker_Analyze; iMarker_Analyze++) {
740740
su2double SpeciesVariance = Surface_SpeciesVariance_Total[iMarker_Analyze];
741741
SetHistoryOutputPerSurfaceValue("SURFACE_SPECIES_VARIANCE", SpeciesVariance, iMarker_Analyze);
742+
config->SetSurface_Species_Variance(iMarker_Analyze, SpeciesVariance);
742743
Tot_Surface_SpeciesVariance += SpeciesVariance;
743-
config->SetSurface_Species_Variance(iMarker_Analyze, Tot_Surface_SpeciesVariance);
744744
}
745745
SetHistoryOutputValue("SURFACE_SPECIES_VARIANCE", Tot_Surface_SpeciesVariance);
746746
}

TestCases/species_transport/venturi_primitive_3species/DAspecies3_primitiveVenturi.cfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414
SOLVER= INC_RANS
1515
KIND_TURB_MODEL= SST
1616
%
17+
CUSTOM_OUTPUTS= 'avg_species_0 : AreaAvg{SPECIES[0]}[outlet];\
18+
avg_species_1 : AreaAvg{SPECIES[1]}[outlet];\
19+
var_species : AreaAvg{pow(SPECIES[0] - avg_species_0, 2) +\
20+
pow(SPECIES[1] - avg_species_1, 2)}[outlet]'
21+
CUSTOM_OBJFUNC= 'var_species'
1722
OBJECTIVE_FUNCTION= SURFACE_SPECIES_VARIANCE
1823
OBJECTIVE_WEIGHT= 1.0
1924
%

TestCases/tutorials.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ def main():
9292
species3_primitiveVenturi.test_vals = [-6.074971, -5.306648, -5.150960, -5.959416, -1.625107, -6.343704, -6.460033, 5.000000, -0.808413, 5.000000, -2.325029, 5.000000, -0.274923, 1.646091, 0.499028, 0.601019, 0.546044]
9393
test_list.append(species3_primitiveVenturi)
9494

95-
9695
# 3 species (2 eq) primitive venturi mixing
9796
DAspecies3_primitiveVenturi = TestCase('DAspecies3_primitiveVenturi')
9897
DAspecies3_primitiveVenturi.cfg_dir = "../Tutorials/incompressible_flow/Inc_Species_Transport"

0 commit comments

Comments
 (0)