Skip to content

Commit 916219d

Browse files
authored
Merge pull request #1004 from su2code/fix_gridvel
Adds Grid Velocity Term in the Euler/Symmetry BC
2 parents 626be8f + bd46eb5 commit 916219d

File tree

7 files changed

+34
-27
lines changed

7 files changed

+34
-27
lines changed

SU2_CFD/src/solvers/CEulerSolver.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828

2929
#include "../../include/solvers/CEulerSolver.hpp"
3030
#include "../../include/variables/CNSVariable.hpp"
31+
#include "../../../Common/include/toolboxes/geometry_toolbox.hpp"
3132
#include "../../../Common/include/toolboxes/printing_toolbox.hpp"
3233
#include "../../include/gradients/computeGradientsGreenGauss.hpp"
3334
#include "../../include/gradients/computeGradientsLeastSquares.hpp"
@@ -6841,6 +6842,11 @@ void CEulerSolver::BC_Sym_Plane(CGeometry *geometry,
68416842
velocity in normal direction: v_r = v - 2 (v*n)n ---*/
68426843
ProjVelocity_i = nodes->GetProjVel(iPoint,UnitNormal);
68436844

6845+
/*--- Adjustment to v.n due to grid movement. ---*/
6846+
if (dynamic_grid) {
6847+
ProjVelocity_i -= GeometryToolbox::DotProduct(nDim, geometry->nodes->GetGridVel(iPoint), UnitNormal);
6848+
}
6849+
68446850
for (iDim = 0; iDim < nDim; iDim++)
68456851
V_reflected[iDim+1] = nodes->GetVelocity(iPoint,iDim) - 2.0 * ProjVelocity_i*UnitNormal[iDim];
68466852

TestCases/hybrid_regression.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ def main():
276276
harmonic_balance.cfg_dir = "harmonic_balance"
277277
harmonic_balance.cfg_file = "HB.cfg"
278278
harmonic_balance.test_iter = 25
279-
harmonic_balance.test_vals = [-1.589863, 3.922098, -0.001443, 0.099457]
279+
harmonic_balance.test_vals = [-1.589755, 3.922207, 0.006725, 0.099455]
280280
harmonic_balance.new_output = False
281281
test_list.append(harmonic_balance)
282282

@@ -327,7 +327,7 @@ def main():
327327
sine_gust.cfg_dir = "gust"
328328
sine_gust.cfg_file = "inv_gust_NACA0012.cfg"
329329
sine_gust.test_iter = 5
330-
sine_gust.test_vals = [-1.977545, 3.481778, -0.001667, -0.007429]
330+
sine_gust.test_vals = [-1.977520, 3.481804, -0.012404, -0.007452]
331331
sine_gust.unsteady = True
332332
test_list.append(sine_gust)
333333

@@ -336,7 +336,7 @@ def main():
336336
aeroelastic.cfg_dir = "aeroelastic"
337337
aeroelastic.cfg_file = "aeroelastic_NACA64A010.cfg"
338338
aeroelastic.test_iter = 2
339-
aeroelastic.test_vals = [0.079009, 0.033187, -0.001665, -0.000156]
339+
aeroelastic.test_vals = [0.074525, 0.033127, -0.001650, -0.000127]
340340
aeroelastic.unsteady = True
341341
test_list.append(aeroelastic)
342342

@@ -467,7 +467,7 @@ def main():
467467
rotating_cylinders.cfg_dir = "sliding_interface/rotating_cylinders"
468468
rotating_cylinders.cfg_file = "rot_cylinders_WA.cfg"
469469
rotating_cylinders.test_iter = 3
470-
rotating_cylinders.test_vals = [3.000000, 0.000000, 0.777267, 1.134746, 1.224125]
470+
rotating_cylinders.test_vals = [3.000000, 0.000000, 0.777567, 1.134807, 1.224136]
471471
rotating_cylinders.unsteady = True
472472
rotating_cylinders.multizone = True
473473
test_list.append(rotating_cylinders)

TestCases/parallel_regression.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,7 @@ def main():
690690
harmonic_balance.cfg_dir = "harmonic_balance"
691691
harmonic_balance.cfg_file = "HB.cfg"
692692
harmonic_balance.test_iter = 25
693-
harmonic_balance.test_vals = [-1.589862, 3.922099, -0.001443, 0.099456] #last 4 columns
693+
harmonic_balance.test_vals = [-1.589755, 3.922208, 0.006724, 0.099454] #last 4 columns
694694
harmonic_balance.su2_exec = "parallel_computation.py -f"
695695
harmonic_balance.timeout = 1600
696696
harmonic_balance.tol = 0.00001
@@ -756,7 +756,7 @@ def main():
756756
sine_gust.cfg_dir = "gust"
757757
sine_gust.cfg_file = "inv_gust_NACA0012.cfg"
758758
sine_gust.test_iter = 5
759-
sine_gust.test_vals = [-1.977545, 3.481778, -0.001525, -0.007375] #last 4 columns
759+
sine_gust.test_vals = [-1.977520, 3.481804, -0.012343, -0.007390] #last 4 columns
760760
sine_gust.su2_exec = "parallel_computation.py -f"
761761
sine_gust.timeout = 1600
762762
sine_gust.tol = 0.00001
@@ -768,7 +768,7 @@ def main():
768768
aeroelastic.cfg_dir = "aeroelastic"
769769
aeroelastic.cfg_file = "aeroelastic_NACA64A010.cfg"
770770
aeroelastic.test_iter = 2
771-
aeroelastic.test_vals = [0.081326, 0.033214, -0.001666, -0.000155] #last 4 columns
771+
aeroelastic.test_vals = [0.076842, 0.033154, -0.001650, -0.000127] #last 4 columns
772772
aeroelastic.su2_exec = "parallel_computation.py -f"
773773
aeroelastic.timeout = 1600
774774
aeroelastic.tol = 0.00001
@@ -950,7 +950,7 @@ def main():
950950
rotating_cylinders.cfg_dir = "sliding_interface/rotating_cylinders"
951951
rotating_cylinders.cfg_file = "rot_cylinders_WA.cfg"
952952
rotating_cylinders.test_iter = 3
953-
rotating_cylinders.test_vals = [3.000000, 0.000000, 0.777274, 1.134742, 1.224125] #last 4 columns
953+
rotating_cylinders.test_vals = [3.000000, 0.000000, 0.777575, 1.134804, 1.224136] #last 4 columns
954954
rotating_cylinders.su2_exec = "parallel_computation.py -f"
955955
rotating_cylinders.timeout = 1600
956956
rotating_cylinders.tol = 0.00001
@@ -1184,7 +1184,7 @@ def main():
11841184
pywrapper_aeroelastic.cfg_dir = "aeroelastic"
11851185
pywrapper_aeroelastic.cfg_file = "aeroelastic_NACA64A010.cfg"
11861186
pywrapper_aeroelastic.test_iter = 2
1187-
pywrapper_aeroelastic.test_vals = [0.081326, 0.033214, -0.001666, -0.000155] #last 4 columns
1187+
pywrapper_aeroelastic.test_vals = [0.076842, 0.033154, -0.001650, -0.000127] #last 4 columns
11881188
pywrapper_aeroelastic.su2_exec = "mpirun -np 2 SU2_CFD.py --parallel -f"
11891189
pywrapper_aeroelastic.timeout = 1600
11901190
pywrapper_aeroelastic.tol = 0.00001

TestCases/parallel_regression_AD.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ def main():
230230
discadj_pitchingNACA0012.cfg_dir = "disc_adj_euler/naca0012_pitching"
231231
discadj_pitchingNACA0012.cfg_file = "inv_NACA0012_pitching.cfg"
232232
discadj_pitchingNACA0012.test_iter = 4
233-
discadj_pitchingNACA0012.test_vals = [-1.236430, -1.654332, -0.007426, 0.000013] #last 4 columns
233+
discadj_pitchingNACA0012.test_vals = [-1.225570, -1.643131, -0.007597, 0.000013] #last 4 columns
234234
discadj_pitchingNACA0012.su2_exec = "parallel_computation.py -f"
235235
discadj_pitchingNACA0012.timeout = 1600
236236
discadj_pitchingNACA0012.tol = 0.00001

TestCases/rotating/caradonna_tung/rot_caradonna_tung.cfg

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
% Case description: Caradonna & Tung rotor in hover (still air) %
55
% Author: Thomas D. Economon %
66
% Institution: Stanford University %
7-
% Date: 2013.09.29 %
7+
% Date: 2020.05.24 %
88
% File Version 7.0.4 "Blackbird" %
99
% %
1010
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -91,39 +91,39 @@ MARKER_MONITORING= ( blade_1, blade_2 )
9191
NUM_METHOD_GRAD= GREEN_GAUSS
9292
%
9393
% Courant-Friedrichs-Lewy condition of the finest grid
94-
CFL_NUMBER= 6.0
94+
CFL_NUMBER= 1e3
9595
%
9696
% Adaptive CFL number (NO, YES)
9797
CFL_ADAPT= NO
9898
%
9999
% Parameters of the adaptive CFL number (factor down, factor up, CFL min value,
100100
% CFL max value )
101-
CFL_ADAPT_PARAM= ( 1.5, 0.5, 1.0, 100.0 )
101+
CFL_ADAPT_PARAM= ( 0.1, 2.0, 15, 1e6 )
102102
%
103103
% Runge-Kutta alpha coefficients
104104
RK_ALPHA_COEFF= ( 0.66667, 0.66667, 1.000000 )
105105
%
106106
% Number of total iterations
107-
EXT_ITER= 99999
107+
ITER= 99999
108108

109109
% ------------------------ LINEAR SOLVER DEFINITION ---------------------------%
110110
%
111111
% Linear solver for implicit formulations (BCGSTAB, FGMRES)
112112
LINEAR_SOLVER= FGMRES
113113
%
114114
% Preconditioner of the Krylov linear solver (JACOBI, LINELET, LU_SGS)
115-
LINEAR_SOLVER_PREC= LU_SGS
115+
LINEAR_SOLVER_PREC= ILU
116116
%
117117
% Minimum error of the linear solver for implicit formulations
118-
LINEAR_SOLVER_ERROR= 1E-4
118+
LINEAR_SOLVER_ERROR= 1E-10
119119
%
120120
% Max number of iterations of the linear solver for the implicit formulation
121-
LINEAR_SOLVER_ITER= 4
121+
LINEAR_SOLVER_ITER= 10
122122

123123
% -------------------------- MULTIGRID PARAMETERS -----------------------------%
124124
%
125125
% Multi-Grid Levels (0 = no multi-grid)
126-
MGLEVEL= 2
126+
MGLEVEL= 3
127127
%
128128
% Multi-grid cycle (V_CYCLE, W_CYCLE, FULLMG_CYCLE)
129129
MGCYCLE= W_CYCLE
@@ -168,7 +168,6 @@ TIME_DISCRE_FLOW= EULER_IMPLICIT
168168
%
169169
CONV_CRITERIA= RESIDUAL
170170
%
171-
%
172171
% Min value of the residual (log10 of the residual)
173172
CONV_RESIDUAL_MINVAL= -12
174173
%
@@ -231,3 +230,5 @@ WRT_SOL_FREQ= 100
231230
%
232231
% Writing convergence history frequency
233232
WRT_CON_FREQ= 1
233+
234+
SCREEN_OUTPUT=(INNER_ITER, WALL_TIME, RMS_DENSITY, LIFT, DRAG, AVG_CFL)

TestCases/serial_regression.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -818,7 +818,7 @@ def main():
818818
harmonic_balance.cfg_dir = "harmonic_balance"
819819
harmonic_balance.cfg_file = "HB.cfg"
820820
harmonic_balance.test_iter = 25
821-
harmonic_balance.test_vals = [-1.589862, 3.922099, -0.001443, 0.099456] #last 4 columns
821+
harmonic_balance.test_vals = [-1.589755, 3.922208, 0.006724, 0.099454] #last 4 columns
822822
harmonic_balance.su2_exec = "SU2_CFD"
823823
harmonic_balance.new_output = False
824824
harmonic_balance.timeout = 1600
@@ -887,7 +887,7 @@ def main():
887887
sine_gust.cfg_dir = "gust"
888888
sine_gust.cfg_file = "inv_gust_NACA0012.cfg"
889889
sine_gust.test_iter = 5
890-
sine_gust.test_vals = [-1.977545, 3.481778, -0.001572, -0.007286] #last 4 columns
890+
sine_gust.test_vals = [-1.977520, 3.481804, -0.012277, -0.007308] #last 4 columns
891891
sine_gust.su2_exec = "SU2_CFD"
892892
sine_gust.timeout = 1600
893893
sine_gust.tol = 0.00001
@@ -900,7 +900,7 @@ def main():
900900
aeroelastic.cfg_dir = "aeroelastic"
901901
aeroelastic.cfg_file = "aeroelastic_NACA64A010.cfg"
902902
aeroelastic.test_iter = 2
903-
aeroelastic.test_vals = [0.079371, 0.033176, -0.001665, -0.000156] #last 4 columns
903+
aeroelastic.test_vals = [0.074885, 0.033116, -0.001650, -0.000127] #last 4 columns
904904
aeroelastic.su2_exec = "SU2_CFD"
905905
aeroelastic.timeout = 1600
906906
aeroelastic.tol = 0.00001
@@ -938,7 +938,7 @@ def main():
938938
unst_deforming_naca0012.cfg_dir = "disc_adj_euler/naca0012_pitching_def"
939939
unst_deforming_naca0012.cfg_file = "inv_NACA0012_pitching_deform.cfg"
940940
unst_deforming_naca0012.test_iter = 5
941-
unst_deforming_naca0012.test_vals = [ -3.669625, -3.818858, -3.729946, -3.155637] #last 4 columns
941+
unst_deforming_naca0012.test_vals = [-3.665128, -3.793593, -3.716506, -3.148308] #last 4 columns
942942
unst_deforming_naca0012.su2_exec = "SU2_CFD"
943943
unst_deforming_naca0012.timeout = 1600
944944
unst_deforming_naca0012.tol = 0.00001
@@ -1120,7 +1120,7 @@ def main():
11201120
rotating_cylinders.cfg_dir = "sliding_interface/rotating_cylinders"
11211121
rotating_cylinders.cfg_file = "rot_cylinders_WA.cfg"
11221122
rotating_cylinders.test_iter = 3
1123-
rotating_cylinders.test_vals = [3.000000, 0.000000, 0.777273, 1.134732, 1.224115] #last 4 columns
1123+
rotating_cylinders.test_vals = [3.000000, 0.000000, 0.777574, 1.134794, 1.224127] #last 4 columns
11241124
rotating_cylinders.su2_exec = "SU2_CFD"
11251125
rotating_cylinders.timeout = 1600
11261126
rotating_cylinders.tol = 0.00001
@@ -1758,7 +1758,7 @@ def main():
17581758
pywrapper_aeroelastic.cfg_dir = "aeroelastic"
17591759
pywrapper_aeroelastic.cfg_file = "aeroelastic_NACA64A010.cfg"
17601760
pywrapper_aeroelastic.test_iter = 2
1761-
pywrapper_aeroelastic.test_vals = [0.079371, 0.033176, -0.001665, -0.000156] #last 4 columns
1761+
pywrapper_aeroelastic.test_vals = [0.074885, 0.033116, -0.001650, -0.000127] #last 4 columns
17621762
pywrapper_aeroelastic.su2_exec = "SU2_CFD.py -f"
17631763
pywrapper_aeroelastic.new_output = True
17641764
pywrapper_aeroelastic.timeout = 1600

TestCases/serial_regression_AD.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ def main():
198198
discadj_pitchingNACA0012.cfg_dir = "disc_adj_euler/naca0012_pitching"
199199
discadj_pitchingNACA0012.cfg_file = "inv_NACA0012_pitching.cfg"
200200
discadj_pitchingNACA0012.test_iter = 4
201-
discadj_pitchingNACA0012.test_vals = [-1.234466, -1.657592, -0.007497, 0.000013] #last 4 columns
201+
discadj_pitchingNACA0012.test_vals = [-1.223509, -1.646090, -0.007671, 0.000013] #last 4 columns
202202
discadj_pitchingNACA0012.su2_exec = "SU2_CFD_AD"
203203
discadj_pitchingNACA0012.timeout = 1600
204204
discadj_pitchingNACA0012.tol = 0.00001
@@ -210,7 +210,7 @@ def main():
210210
unst_deforming_naca0012.cfg_dir = "disc_adj_euler/naca0012_pitching_def"
211211
unst_deforming_naca0012.cfg_file = "inv_NACA0012_pitching_deform_ad.cfg"
212212
unst_deforming_naca0012.test_iter = 4
213-
unst_deforming_naca0012.test_vals = [-1.869488, -1.745821, 1094.3, 0.000006] #last 4 columns
213+
unst_deforming_naca0012.test_vals = [-1.867980, -1.741743, 1090.200000, 0.000006] #last 4 columns
214214
unst_deforming_naca0012.su2_exec = "SU2_CFD_AD"
215215
unst_deforming_naca0012.timeout = 1600
216216
unst_deforming_naca0012.tol = 0.00001

0 commit comments

Comments
 (0)