Skip to content

Commit

Permalink
update file regression
Browse files Browse the repository at this point in the history
  • Loading branch information
pcarruscag committed Dec 16, 2024
1 parent 82ac791 commit d476c8b
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 61 deletions.
9 changes: 3 additions & 6 deletions SU2_CFD/include/solvers/CFVMFlowSolverBase.inl
Original file line number Diff line number Diff line change
Expand Up @@ -2357,8 +2357,6 @@ void CFVMFlowSolverBase<V, FlowRegime>::Friction_Forces(const CGeometry* geometr
const su2double *Coord = nullptr, *Coord_Normal = nullptr, *Normal = nullptr;
const su2double minYPlus = config->GetwallModel_MinYPlus();

string Marker_Tag, Monitoring_Tag;

const su2double Alpha = config->GetAoA() * PI_NUMBER / 180.0;
const su2double Beta = config->GetAoS() * PI_NUMBER / 180.0;
const su2double RefLength = config->GetRefLength();
Expand Down Expand Up @@ -2394,8 +2392,8 @@ void CFVMFlowSolverBase<V, FlowRegime>::Friction_Forces(const CGeometry* geometr

for (iMarker = 0; iMarker < nMarker; iMarker++) {

Marker_Tag = config->GetMarker_All_TagBound(iMarker);
if (!config->GetViscous_Wall(iMarker)) continue;
const auto Marker_Tag = config->GetMarker_All_TagBound(iMarker);

const bool py_custom = config->GetMarker_All_PyCustom(iMarker);

Expand All @@ -2404,7 +2402,7 @@ void CFVMFlowSolverBase<V, FlowRegime>::Friction_Forces(const CGeometry* geometr
const auto Monitoring = config->GetMarker_All_Monitoring(iMarker);
if (Monitoring == YES) {
for (iMarker_Monitoring = 0; iMarker_Monitoring < config->GetnMarker_Monitoring(); iMarker_Monitoring++) {
Monitoring_Tag = config->GetMarker_Monitoring_TagBound(iMarker_Monitoring);
const auto Monitoring_Tag = config->GetMarker_Monitoring_TagBound(iMarker_Monitoring);
if (Marker_Tag == Monitoring_Tag) Origin = config->GetRefOriginMoment(iMarker_Monitoring);
}
}
Expand Down Expand Up @@ -2677,8 +2675,7 @@ void CFVMFlowSolverBase<V, FlowRegime>::Friction_Forces(const CGeometry* geometr
/*--- Compute the coefficients per surface ---*/

for (iMarker_Monitoring = 0; iMarker_Monitoring < config->GetnMarker_Monitoring(); iMarker_Monitoring++) {
Monitoring_Tag = config->GetMarker_Monitoring_TagBound(iMarker_Monitoring);
Marker_Tag = config->GetMarker_All_TagBound(iMarker);
const auto Monitoring_Tag = config->GetMarker_Monitoring_TagBound(iMarker_Monitoring);
if (Marker_Tag == Monitoring_Tag) {
SurfaceViscCoeff.CL[iMarker_Monitoring] += ViscCoeff.CL[iMarker];
SurfaceViscCoeff.CD[iMarker_Monitoring] += ViscCoeff.CD[iMarker];
Expand Down
11 changes: 6 additions & 5 deletions SU2_CFD/src/solvers/CIncNSSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,6 @@ void CIncNSSolver::BC_Wall_Generic(const CGeometry *geometry, const CConfig *con
/*--- Variables for streamwise periodicity ---*/
const bool streamwise_periodic = (config->GetKind_Streamwise_Periodic() != ENUM_STREAMWISE_PERIODIC::NONE);
const bool streamwise_periodic_temperature = config->GetStreamwise_Periodic_Temperature();
su2double Cp, thermal_conductivity, dot_product, scalar_factor;

/*--- Identify the boundary by string name ---*/

Expand Down Expand Up @@ -434,15 +433,17 @@ void CIncNSSolver::BC_Wall_Generic(const CGeometry *geometry, const CConfig *con
/*--- With streamwise periodic flow and heatflux walls an additional term is introduced in the boundary formulation ---*/
if (streamwise_periodic && streamwise_periodic_temperature) {

Cp = nodes->GetSpecificHeatCp(iPoint);
thermal_conductivity = nodes->GetThermalConductivity(iPoint);
const su2double Cp = nodes->GetSpecificHeatCp(iPoint);
const su2double thermal_conductivity = nodes->GetThermalConductivity(iPoint);

/*--- Scalar factor of the residual contribution ---*/
const su2double norm2_translation = GeometryToolbox::SquaredNorm(nDim, config->GetPeriodic_Translation(0));
scalar_factor = SPvals.Streamwise_Periodic_IntegratedHeatFlow*thermal_conductivity / (SPvals.Streamwise_Periodic_MassFlow * Cp * norm2_translation);
const su2double scalar_factor =
SPvals.Streamwise_Periodic_IntegratedHeatFlow*thermal_conductivity /
(SPvals.Streamwise_Periodic_MassFlow * Cp * norm2_translation);

/*--- Dot product ---*/
dot_product = GeometryToolbox::DotProduct(nDim, config->GetPeriodic_Translation(0), Normal);
const su2double dot_product = GeometryToolbox::DotProduct(nDim, config->GetPeriodic_Translation(0), Normal);

LinSysRes(iPoint, nDim+1) += scalar_factor*dot_product;
} // if streamwise_periodic
Expand Down
100 changes: 50 additions & 50 deletions TestCases/radiation/p1adjoint/of_grad_cd.csv.ref
Original file line number Diff line number Diff line change
@@ -1,51 +1,51 @@
"VARIABLE" , "GRADIENT" , "FINDIFF_STEP"
0 , -0.000954218 , 0.001
1 , -0.00432384 , 0.001
2 , -0.0111485 , 0.001
3 , -0.0214656 , 0.001
4 , -0.0344212 , 0.001
5 , -0.0490221 , 0.001
6 , -0.0643278 , 0.001
7 , -0.0792041 , 0.001
8 , -0.0924318 , 0.001
9 , -0.103025 , 0.001
10 , -0.110239 , 0.001
11 , -0.113383 , 0.001
12 , -0.111898 , 0.001
13 , -0.105745 , 0.001
14 , -0.0956773 , 0.001
15 , -0.0830288 , 0.001
16 , -0.069201 , 0.001
17 , -0.0553022 , 0.001
18 , -0.0421316 , 0.001
19 , -0.0303252 , 0.001
20 , -0.0203976 , 0.001
21 , -0.0126387 , 0.001
22 , -0.00701749 , 0.001
23 , -0.0032361 , 0.001
24 , -0.000955756 , 0.001
25 , 0.00128953 , 0.001
26 , 0.00518424 , 0.001
27 , 0.0125712 , 0.001
28 , 0.0234942 , 0.001
29 , 0.0370801 , 0.001
30 , 0.052231 , 0.001
31 , 0.06787 , 0.001
32 , 0.0827503 , 0.001
33 , 0.0955927 , 0.001
34 , 0.105415 , 0.001
35 , 0.11154 , 0.001
36 , 0.113399 , 0.001
37 , 0.110583 , 0.001
38 , 0.103215 , 0.001
39 , 0.0921957 , 0.001
40 , 0.0789703 , 0.001
41 , 0.0650043 , 0.001
42 , 0.0514107 , 0.001
43 , 0.0389322 , 0.001
44 , 0.0280921 , 0.001
45 , 0.0192441 , 0.001
46 , 0.0124768 , 0.001
47 , 0.00752972 , 0.001
48 , 0.00391057 , 0.001
49 , 0.00131276 , 0.001
0 , -0.000958205 , 0.001
1 , -0.00432733 , 0.001
2 , -0.0111443 , 0.001
3 , -0.0214515 , 0.001
4 , -0.0343997 , 0.001
5 , -0.0489968 , 0.001
6 , -0.0643023 , 0.001
7 , -0.0791818 , 0.001
8 , -0.092416 , 0.001
9 , -0.103017 , 0.001
10 , -0.11024 , 0.001
11 , -0.113392 , 0.001
12 , -0.111913 , 0.001
13 , -0.105766 , 0.001
14 , -0.0957015 , 0.001
15 , -0.0830517 , 0.001
16 , -0.0692182 , 0.001
17 , -0.0553101 , 0.001
18 , -0.042129 , 0.001
19 , -0.0303137 , 0.001
20 , -0.0203813 , 0.001
21 , -0.0126226 , 0.001
22 , -0.00700441 , 0.001
23 , -0.00322726 , 0.001
24 , -0.000951904 , 0.001
25 , 0.00128803 , 0.001
26 , 0.0051774 , 0.001
27 , 0.0125547 , 0.001
28 , 0.0234674 , 0.001
29 , 0.0370465 , 0.001
30 , 0.0521956 , 0.001
31 , 0.0678379 , 0.001
32 , 0.0827257 , 0.001
33 , 0.0955787 , 0.001
34 , 0.105412 , 0.001
35 , 0.111548 , 0.001
36 , 0.113415 , 0.001
37 , 0.110605 , 0.001
38 , 0.103242 , 0.001
39 , 0.0922244 , 0.001
40 , 0.0789963 , 0.001
41 , 0.0650234 , 0.001
42 , 0.0514199 , 0.001
43 , 0.0389312 , 0.001
44 , 0.0280831 , 0.001
45 , 0.0192316 , 0.001
46 , 0.0124655 , 0.001
47 , 0.00752232 , 0.001
48 , 0.0039072 , 0.001
49 , 0.00131195 , 0.001

0 comments on commit d476c8b

Please sign in to comment.