Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tests and fix windows compilation #2165

Merged
merged 1 commit into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions SU2_CFD/src/solvers/CEulerSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4329,7 +4329,7 @@ void CEulerSolver::SetActDisk_BEM_VLAD(CGeometry *geometry, CSolver **solver_con
su2double n, omega, a0, den;
su2double ang_offset = 0.0;

radtodeg = 180.0 / M_PI;
radtodeg = 180.0 / PI_NUMBER;
r_hub = ADBem_HubRadius;
ang_offset = blade_angle - ADBem_Angle75R;

Expand All @@ -4339,7 +4339,7 @@ void CEulerSolver::SetActDisk_BEM_VLAD(CGeometry *geometry, CSolver **solver_con
a0 = sqrt(1.4 * 287 * T);
/*--- Change pitch by ang_offset and calculate delta_r for integration by trapezoidal rule. ---*/
n = RPM / 60.0;
omega = n * 2.0 * M_PI;
omega = n * 2.0 * PI_NUMBER;

for (j = 0; j < NR; j++) {
if (j < 1) {
Expand Down Expand Up @@ -4416,7 +4416,7 @@ void CEulerSolver::SetActDisk_BEM_VLAD(CGeometry *geometry, CSolver **solver_con
c_phi = cos(phi);
t_loss = 1.0;
if (r_dash > 0.90) {
t_loss = (2.0 / M_PI) * acos(exp(-(1.0 * s_prop_nblades * (1 - r_dash) / (r_dash * c_phi))));
t_loss = (2.0 / PI_NUMBER) * acos(exp(-(1.0 * s_prop_nblades * (1 - r_dash) / (r_dash * c_phi))));
}

DtDr[j] = q * s_prop_nblades * sprop_sec_chord[j] * (cl * cos(phi) - cd * sin(phi));
Expand All @@ -4425,7 +4425,7 @@ void CEulerSolver::SetActDisk_BEM_VLAD(CGeometry *geometry, CSolver **solver_con
DtDr[j] *= t_loss;
DqDr *= t_loss;

tem2 = DqDr / (4.0 * M_PI * rad * rad * rad * rho * V * omega);
tem2 = DqDr / (4.0 * PI_NUMBER * rad * rad * rad * rho * V * omega);
bnew = 0.6 * b[j] + 0.4 * tem2;
if (bnew > 0.9) bnew = 0.9;
if (fabs(bnew - b[j]) < 1.0e-5) {
Expand All @@ -4447,11 +4447,11 @@ void CEulerSolver::SetActDisk_BEM_VLAD(CGeometry *geometry, CSolver **solver_con
tem1 = rho * n * n * dia * dia * dia * dia;
tem2 = tem1 * dia;

Torque = 2.0 * M_PI * torque;
dp_av = 2.0 * M_PI * torque;
Torque = 2.0 * PI_NUMBER * torque;
dp_av = 2.0 * PI_NUMBER * torque;

for (j = 0; j < NR; j++) {
DtDr[j] /= (2.0 * M_PI * sprop_sec_r1[j]);
DtDr[j] /= (2.0 * PI_NUMBER * sprop_sec_r1[j]);
Dtorq[j] = Dtorq[j];
}

Expand Down Expand Up @@ -4495,7 +4495,7 @@ void CEulerSolver::SetActDisk_BEM_VLAD(CGeometry *geometry, CSolver **solver_con

ActDisk_DeltaP_r[iMarker][iVertex] = Target_Press_Jump;
ActDisk_Thrust_r[iMarker][iVertex] = dp_at_r;
ActDisk_Torque_r[iMarker][iVertex] = Torque / (2 * M_PI * radius);
ActDisk_Torque_r[iMarker][iVertex] = Torque / (2 * PI_NUMBER * radius);
/*--- Non-dimensionalize the elemental load. ---*/
const su2double dCp_v = Torque * ((Omega_sw * r_tip) / (rho * rps * rps * rps * pow(dia, 5)));
/*--- Force radial load to 0 as there is no information of radial load from BEM. ---*/
Expand Down
2 changes: 1 addition & 1 deletion TestCases/TestCase.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ def run_filediff(self, running_with_tsan=False):
if len(fromlines) != len(tolines):
diff = ["ERROR: Number of lines in " + fromfile + " and " + tofile + " differ."]
passed = False

# Loop through all lines
for i_line in range(0, len(fromlines)):

Expand Down
2 changes: 2 additions & 0 deletions TestCases/hybrid_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -771,6 +771,7 @@ def main():
pywrapper_translating_naca0012.reference_file = "forces_0.csv.ref"
pywrapper_translating_naca0012.reference_file_aarch64 = "forces_0_aarch64.csv.ref"
pywrapper_translating_naca0012.test_file = "forces_0.csv"
pywrapper_translating_naca0012.tol_file_percent = 0.1
pywrapper_translating_naca0012.enabled_on_cpu_arch = ["x86_64"]
pywrapper_translating_naca0012.enabled_with_tsan = False
file_diff_list.append(pywrapper_translating_naca0012)
Expand All @@ -784,6 +785,7 @@ def main():
pywrapper_updated_moving_frame_naca0012.reference_file = "forces_0.csv.ref"
pywrapper_updated_moving_frame_naca0012.reference_file_aarch64 = "forces_0_aarch64.csv.ref"
pywrapper_updated_moving_frame_naca0012.test_file = "forces_0.csv"
pywrapper_updated_moving_frame_naca0012.tol_file_percent = 0.1
pywrapper_updated_moving_frame_naca0012.enabled_on_cpu_arch = ["x86_64"]
pywrapper_updated_moving_frame_naca0012.enabled_with_tsan = False
file_diff_list.append(pywrapper_updated_moving_frame_naca0012)
Expand Down
1 change: 1 addition & 0 deletions TestCases/serial_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -1067,6 +1067,7 @@ def main():
airfoilRBF.cfg_file = "config.cfg"
airfoilRBF.test_iter = 1
airfoilRBF.test_vals = [1.000000, -2.786186, -4.977944]
airfoilRBF.tol = 0.0001
airfoilRBF.multizone = True
test_list.append(airfoilRBF)

Expand Down
Loading