From fbb81a4c93a3d65c24fe41e8594026c896b2e305 Mon Sep 17 00:00:00 2001 From: Paul Dechamps <paul.dechamps@uliege.be> Date: Mon, 4 Dec 2023 21:55:52 +0100 Subject: [PATCH] (test) Added 3D test case Added test case on the rae2822 3D finite wing thattests the 3D functionnalities of the code with vtk writing --- blast/models/dart/rae_3.geo | 429 +++++++++++++++++++++++++++++++ blast/models/dart/rae_3_visc.geo | 374 +++++++++++++++++++++++++++ blast/tests/dart/rae2822_3D.py | 178 +++++++++++++ 3 files changed, 981 insertions(+) create mode 100644 blast/models/dart/rae_3.geo create mode 100644 blast/models/dart/rae_3_visc.geo create mode 100644 blast/tests/dart/rae2822_3D.py diff --git a/blast/models/dart/rae_3.geo b/blast/models/dart/rae_3.geo new file mode 100644 index 0000000..512b44f --- /dev/null +++ b/blast/models/dart/rae_3.geo @@ -0,0 +1,429 @@ +/* RAE 2822 rectangular wing */ + +// Parameters +// domain and mesh +DefineConstant[ spn = { 1.0, Name "Wing span" }, + lgt = { 6.0, Name "Channel length" }, + wdt = { 3.0, Name "Channel width" }, + hgt = { 6.0, Name "Channel height" }, + msN = { 0.05, Name "Leading edge mesh size" }, + msF = { 1.0, Name "Farfield mesh size" } ]; + +//// GEOMETRY + + +/// Points + +// Airfoil 1 +Point(1) = {1.000000, 0.0000, 0.000000, msN}; +Point(2) = {0.999398, 0.0000, 0.000128, msN}; +Point(3) = {0.997592, 0.0000, 0.000510, msN}; +Point(4) = {0.994588, 0.0000, 0.001137, msN}; +Point(5) = {0.990393, 0.0000, 0.002001, msN}; +Point(6) = {0.985016, 0.0000, 0.003092, msN}; +Point(7) = {0.978470, 0.0000, 0.004401, msN}; +Point(8) = {0.970772, 0.0000, 0.005915, msN}; +Point(9) = {0.961940, 0.0000, 0.007622, msN}; +Point(10) = {0.951995, 0.0000, 0.009508, msN}; +Point(11) = {0.940961, 0.0000, 0.011562, msN}; +Point(12) = {0.928864, 0.0000, 0.013769, msN}; +Point(13) = {0.915735, 0.0000, 0.016113, msN}; +Point(14) = {0.901604, 0.0000, 0.018580, msN}; +Point(15) = {0.886505, 0.0000, 0.021153, msN}; +Point(16) = {0.870476, 0.0000, 0.023817, msN}; +Point(17) = {0.853553, 0.0000, 0.026554, msN}; +Point(18) = {0.835779, 0.0000, 0.029347, msN}; +Point(19) = {0.817197, 0.0000, 0.032176, msN}; +Point(20) = {0.797850, 0.0000, 0.035017, msN}; +Point(21) = {0.777785, 0.0000, 0.037847, msN}; +Point(22) = {0.757051, 0.0000, 0.040641, msN}; +Point(23) = {0.735698, 0.0000, 0.043377, msN}; +Point(24) = {0.713778, 0.0000, 0.046029, msN}; +Point(25) = {0.691342, 0.0000, 0.048575, msN}; +Point(26) = {0.668445, 0.0000, 0.050993, msN}; +Point(27) = {0.645142, 0.0000, 0.053258, msN}; +Point(28) = {0.621490, 0.0000, 0.055344, msN}; +Point(29) = {0.597545, 0.0000, 0.057218, msN}; +Point(30) = {0.573365, 0.0000, 0.058845, msN}; +Point(31) = {0.549009, 0.0000, 0.060194, msN}; +Point(32) = {0.524534, 0.0000, 0.061254, msN}; +Point(33) = {0.500000, 0.0000, 0.062029, msN}; +Point(34) = {0.475466, 0.0000, 0.062530, msN}; +Point(35) = {0.450991, 0.0000, 0.062774, msN}; +Point(36) = {0.426635, 0.0000, 0.062779, msN}; +Point(37) = {0.402455, 0.0000, 0.062562, msN}; +Point(38) = {0.378510, 0.0000, 0.062133, msN}; +Point(39) = {0.354858, 0.0000, 0.061497, msN}; +Point(40) = {0.331555, 0.0000, 0.060660, msN}; +Point(41) = {0.308658, 0.0000, 0.059629, msN}; +Point(42) = {0.286222, 0.0000, 0.058414, msN}; +Point(43) = {0.264302, 0.0000, 0.057026, msN}; +Point(44) = {0.242949, 0.0000, 0.055470, msN}; +Point(45) = {0.222215, 0.0000, 0.053753, msN}; +Point(46) = {0.202150, 0.0000, 0.051885, msN}; +Point(47) = {0.182803, 0.0000, 0.049874, msN}; +Point(48) = {0.164221, 0.0000, 0.047729, msN}; +Point(49) = {0.146447, 0.0000, 0.045457, msN}; +Point(50) = {0.129524, 0.0000, 0.043071, msN}; +Point(51) = {0.113495, 0.0000, 0.040585, msN}; +Point(52) = {0.098396, 0.0000, 0.038011, msN}; +Point(53) = {0.084265, 0.0000, 0.035360, msN}; +Point(54) = {0.071136, 0.0000, 0.032644, msN}; +Point(55) = {0.059039, 0.0000, 0.029874, msN}; +Point(56) = {0.048005, 0.0000, 0.027062, msN}; +Point(57) = {0.038060, 0.0000, 0.024219, msN}; +Point(58) = {0.029228, 0.0000, 0.021348, msN}; +Point(59) = {0.021530, 0.0000, 0.018441, msN}; +Point(60) = {0.014984, 0.0000, 0.015489, msN}; +Point(61) = {0.009607, 0.0000, 0.012480, msN}; +Point(62) = {0.005412, 0.0000, 0.009416, msN}; +Point(63) = {0.002408, 0.0000, 0.006306, msN}; +Point(64) = {0.000602, 0.0000, 0.003165, msN}; +Point(65) = {0.000000, 0.0000, 0.000000, msN}; +Point(66) = {0.000602, 0.0000, -0.003160, msN}; +Point(67) = {0.002408, 0.0000, -0.006308, msN}; +Point(68) = {0.005412, 0.0000, -0.009443, msN}; +Point(69) = {0.009607, 0.0000, -0.012559, msN}; +Point(70) = {0.014984, 0.0000, -0.015649, msN}; +Point(71) = {0.021530, 0.0000, -0.018707, msN}; +Point(72) = {0.029228, 0.0000, -0.021722, msN}; +Point(73) = {0.038060, 0.0000, -0.024685, msN}; +Point(74) = {0.048005, 0.0000, -0.027586, msN}; +Point(75) = {0.059039, 0.0000, -0.030416, msN}; +Point(76) = {0.071136, 0.0000, -0.033170, msN}; +Point(77) = {0.084265, 0.0000, -0.035843, msN}; +Point(78) = {0.098396, 0.0000, -0.038431, msN}; +Point(79) = {0.113495, 0.0000, -0.040929, msN}; +Point(80) = {0.129524, 0.0000, -0.043326, msN}; +Point(81) = {0.146447, 0.0000, -0.045610, msN}; +Point(82) = {0.164221, 0.0000, -0.047773, msN}; +Point(83) = {0.182803, 0.0000, -0.049805, msN}; +Point(84) = {0.202150, 0.0000, -0.051694, msN}; +Point(85) = {0.222215, 0.0000, -0.053427, msN}; +Point(86) = {0.242949, 0.0000, -0.054994, msN}; +Point(87) = {0.264302, 0.0000, -0.056376, msN}; +Point(88) = {0.286222, 0.0000, -0.057547, msN}; +Point(89) = {0.308658, 0.0000, -0.058459, msN}; +Point(90) = {0.331555, 0.0000, -0.059046, msN}; +Point(91) = {0.354858, 0.0000, -0.059236, msN}; +Point(92) = {0.378510, 0.0000, -0.058974, msN}; +Point(93) = {0.402455, 0.0000, -0.058224, msN}; +Point(94) = {0.426635, 0.0000, -0.056979, msN}; +Point(95) = {0.450991, 0.0000, -0.055257, msN}; +Point(96) = {0.475466, 0.0000, -0.053099, msN}; +Point(97) = {0.500000, 0.0000, -0.050563, msN}; +Point(98) = {0.524534, 0.0000, -0.047719, msN}; +Point(99) = {0.549009, 0.0000, -0.044642, msN}; +Point(100) = {0.573365, 0.0000, -0.041397, msN}; +Point(101) = {0.597545, 0.0000, -0.038043, msN}; +Point(102) = {0.621490, 0.0000, -0.034631, msN}; +Point(103) = {0.645142, 0.0000, -0.031207, msN}; +Point(104) = {0.668445, 0.0000, -0.027814, msN}; +Point(105) = {0.691342, 0.0000, -0.024495, msN}; +Point(106) = {0.713778, 0.0000, -0.021289, msN}; +Point(107) = {0.735698, 0.0000, -0.018232, msN}; +Point(108) = {0.757051, 0.0000, -0.015357, msN}; +Point(109) = {0.777785, 0.0000, -0.012690, msN}; +Point(110) = {0.797850, 0.0000, -0.010244, msN}; +Point(111) = {0.817197, 0.0000, -0.008027, msN}; +Point(112) = {0.835779, 0.0000, -0.006048, msN}; +Point(113) = {0.853553, 0.0000, -0.004314, msN}; +Point(114) = {0.870476, 0.0000, -0.002829, msN}; +Point(115) = {0.886505, 0.0000, -0.001592, msN}; +Point(116) = {0.901604, 0.0000, -0.000600, msN}; +Point(117) = {0.915735, 0.0000, 0.000157, msN}; +Point(118) = {0.928864, 0.0000, 0.000694, msN}; +Point(119) = {0.940961, 0.0000, 0.001033, msN}; +Point(120) = {0.951995, 0.0000, 0.001197, msN}; +Point(121) = {0.961940, 0.0000, 0.001212, msN}; +Point(122) = {0.970772, 0.0000, 0.001112, msN}; +Point(123) = {0.978470, 0.0000, 0.000935, msN}; +Point(124) = {0.985016, 0.0000, 0.000719, msN}; +Point(125) = {0.990393, 0.0000, 0.000497, msN}; +Point(126) = {0.994588, 0.0000, 0.000296, msN}; +Point(127) = {0.997592, 0.0000, 0.000137, msN}; +Point(128) = {0.999398, 0.0000, 0.000035, msN}; + +// Airfoil 2 +Point(301) = {1.000000, spn, 0.000000, msN}; +Point(302) = {0.999398, spn, 0.000128, msN}; +Point(303) = {0.997592, spn, 0.000510, msN}; +Point(304) = {0.994588, spn, 0.001137, msN}; +Point(305) = {0.990393, spn, 0.002001, msN}; +Point(306) = {0.985016, spn, 0.003092, msN}; +Point(307) = {0.978470, spn, 0.004401, msN}; +Point(308) = {0.970772, spn, 0.005915, msN}; +Point(309) = {0.961940, spn, 0.007622, msN}; +Point(310) = {0.951995, spn, 0.009508, msN}; +Point(311) = {0.940961, spn, 0.011562, msN}; +Point(312) = {0.928864, spn, 0.013769, msN}; +Point(313) = {0.915735, spn, 0.016113, msN}; +Point(314) = {0.901604, spn, 0.018580, msN}; +Point(315) = {0.886505, spn, 0.021153, msN}; +Point(316) = {0.870476, spn, 0.023817, msN}; +Point(317) = {0.853553, spn, 0.026554, msN}; +Point(318) = {0.835779, spn, 0.029347, msN}; +Point(319) = {0.817197, spn, 0.032176, msN}; +Point(320) = {0.797850, spn, 0.035017, msN}; +Point(321) = {0.777785, spn, 0.037847, msN}; +Point(322) = {0.757051, spn, 0.040641, msN}; +Point(323) = {0.735698, spn, 0.043377, msN}; +Point(324) = {0.713778, spn, 0.046029, msN}; +Point(325) = {0.691342, spn, 0.048575, msN}; +Point(326) = {0.668445, spn, 0.050993, msN}; +Point(327) = {0.645142, spn, 0.053258, msN}; +Point(328) = {0.621490, spn, 0.055344, msN}; +Point(329) = {0.597545, spn, 0.057218, msN}; +Point(330) = {0.573365, spn, 0.058845, msN}; +Point(331) = {0.549009, spn, 0.060194, msN}; +Point(332) = {0.524534, spn, 0.061254, msN}; +Point(333) = {0.500000, spn, 0.062029, msN}; +Point(334) = {0.475466, spn, 0.062530, msN}; +Point(335) = {0.450991, spn, 0.062774, msN}; +Point(336) = {0.426635, spn, 0.062779, msN}; +Point(337) = {0.402455, spn, 0.062562, msN}; +Point(338) = {0.378510, spn, 0.062133, msN}; +Point(339) = {0.354858, spn, 0.061497, msN}; +Point(340) = {0.331555, spn, 0.060660, msN}; +Point(341) = {0.308658, spn, 0.059629, msN}; +Point(342) = {0.286222, spn, 0.058414, msN}; +Point(343) = {0.264302, spn, 0.057026, msN}; +Point(344) = {0.242949, spn, 0.055470, msN}; +Point(345) = {0.222215, spn, 0.053753, msN}; +Point(346) = {0.202150, spn, 0.051885, msN}; +Point(347) = {0.182803, spn, 0.049874, msN}; +Point(348) = {0.164221, spn, 0.047729, msN}; +Point(349) = {0.146447, spn, 0.045457, msN}; +Point(350) = {0.129524, spn, 0.043071, msN}; +Point(351) = {0.113495, spn, 0.040585, msN}; +Point(352) = {0.098396, spn, 0.038011, msN}; +Point(353) = {0.084265, spn, 0.035360, msN}; +Point(354) = {0.071136, spn, 0.032644, msN}; +Point(355) = {0.059039, spn, 0.029874, msN}; +Point(356) = {0.048005, spn, 0.027062, msN}; +Point(357) = {0.038060, spn, 0.024219, msN}; +Point(358) = {0.029228, spn, 0.021348, msN}; +Point(359) = {0.021530, spn, 0.018441, msN}; +Point(360) = {0.014984, spn, 0.015489, msN}; +Point(361) = {0.009607, spn, 0.012480, msN}; +Point(362) = {0.005412, spn, 0.009416, msN}; +Point(363) = {0.002408, spn, 0.006306, msN}; +Point(364) = {0.000602, spn, 0.003165, msN}; +Point(365) = {0.000000, spn, 0.000000, msN}; +Point(366) = {0.000602, spn, -0.003160, msN}; +Point(367) = {0.002408, spn, -0.006308, msN}; +Point(368) = {0.005412, spn, -0.009443, msN}; +Point(369) = {0.009607, spn, -0.012559, msN}; +Point(370) = {0.014984, spn, -0.015649, msN}; +Point(371) = {0.021530, spn, -0.018707, msN}; +Point(372) = {0.029228, spn, -0.021722, msN}; +Point(373) = {0.038060, spn, -0.024685, msN}; +Point(374) = {0.048005, spn, -0.027586, msN}; +Point(375) = {0.059039, spn, -0.030416, msN}; +Point(376) = {0.071136, spn, -0.033170, msN}; +Point(377) = {0.084265, spn, -0.035843, msN}; +Point(378) = {0.098396, spn, -0.038431, msN}; +Point(379) = {0.113495, spn, -0.040929, msN}; +Point(380) = {0.129524, spn, -0.043326, msN}; +Point(381) = {0.146447, spn, -0.045610, msN}; +Point(382) = {0.164221, spn, -0.047773, msN}; +Point(383) = {0.182803, spn, -0.049805, msN}; +Point(384) = {0.202150, spn, -0.051694, msN}; +Point(385) = {0.222215, spn, -0.053427, msN}; +Point(386) = {0.242949, spn, -0.054994, msN}; +Point(387) = {0.264302, spn, -0.056376, msN}; +Point(388) = {0.286222, spn, -0.057547, msN}; +Point(389) = {0.308658, spn, -0.058459, msN}; +Point(390) = {0.331555, spn, -0.059046, msN}; +Point(391) = {0.354858, spn, -0.059236, msN}; +Point(392) = {0.378510, spn, -0.058974, msN}; +Point(393) = {0.402455, spn, -0.058224, msN}; +Point(394) = {0.426635, spn, -0.056979, msN}; +Point(395) = {0.450991, spn, -0.055257, msN}; +Point(396) = {0.475466, spn, -0.053099, msN}; +Point(397) = {0.500000, spn, -0.050563, msN}; +Point(398) = {0.524534, spn, -0.047719, msN}; +Point(399) = {0.549009, spn, -0.044642, msN}; +Point(400) = {0.573365, spn, -0.041397, msN}; +Point(401) = {0.597545, spn, -0.038043, msN}; +Point(402) = {0.621490, spn, -0.034631, msN}; +Point(403) = {0.645142, spn, -0.031207, msN}; +Point(404) = {0.668445, spn, -0.027814, msN}; +Point(405) = {0.691342, spn, -0.024495, msN}; +Point(406) = {0.713778, spn, -0.021289, msN}; +Point(407) = {0.735698, spn, -0.018232, msN}; +Point(408) = {0.757051, spn, -0.015357, msN}; +Point(409) = {0.777785, spn, -0.012690, msN}; +Point(410) = {0.797850, spn, -0.010244, msN}; +Point(411) = {0.817197, spn, -0.008027, msN}; +Point(412) = {0.835779, spn, -0.006048, msN}; +Point(413) = {0.853553, spn, -0.004314, msN}; +Point(414) = {0.870476, spn, -0.002829, msN}; +Point(415) = {0.886505, spn, -0.001592, msN}; +Point(416) = {0.901604, spn, -0.000600, msN}; +Point(417) = {0.915735, spn, 0.000157, msN}; +Point(418) = {0.928864, spn, 0.000694, msN}; +Point(419) = {0.940961, spn, 0.001033, msN}; +Point(420) = {0.951995, spn, 0.001197, msN}; +Point(421) = {0.961940, spn, 0.001212, msN}; +Point(422) = {0.970772, spn, 0.001112, msN}; +Point(423) = {0.978470, spn, 0.000935, msN}; +Point(424) = {0.985016, spn, 0.000719, msN}; +Point(425) = {0.990393, spn, 0.000497, msN}; +Point(426) = {0.994588, spn, 0.000296, msN}; +Point(427) = {0.997592, spn, 0.000137, msN}; +Point(428) = {0.999398, spn, 0.000035, msN}; + +// Box +Point(10001) = {1+lgt/2, 0, 0, msF}; +Point(10002) = {1+lgt/2, 0, hgt/2, msF}; +Point(10003) = {-lgt/2, 0, hgt/2, msF}; +Point(10004) = {-lgt/2, 0, -hgt/2, msF}; +Point(10005) = {1+lgt/2, 0, -hgt/2, msF}; +Point(10011) = {1+lgt/2, wdt, hgt/2, msF}; +Point(10012) = {-lgt/2, wdt, hgt/2, msF}; +Point(10013) = {-lgt/2, wdt, -hgt/2, msF}; +Point(10014) = {1+lgt/2, wdt, -hgt/2, msF}; + +// Wake +Point(10021) = {1+lgt/2, spn, 0, msF}; + +/// Lines + +// Airfoil 1: +Spline(1) = {1:14}; +Spline(2) = {14:46}; +Spline(3) = {46:65}; +Spline(4) = {65:84}; +Spline(5) = {84:116}; +Spline(6) = {116:128,1}; + +// Airfoil 2: +Spline(7) = {301:314}; +Spline(8) = {314:346}; +Spline(9) = {346:365}; +Spline(10) = {365:384}; +Spline(11) = {384:416}; +Spline(12) = {416:428,301}; + +// Airfoil 1 to airfoil 2: +Line(61) = {1,301}; +Line(62) = {14,314}; +Line(63) = {46,346}; +Line(64) = {65,365}; +Line(65) = {84,384}; +Line(66) = {116,416}; + +// Box +Line(201) = {10001,10002}; +Line(202) = {10002,10003}; +Line(203) = {10003,10004}; +Line(204) = {10004,10005}; +Line(205) = {10005,10001}; +Line(211) = {10011,10012}; +Line(212) = {10012,10013}; +Line(213) = {10013,10014}; +Line(214) = {10014,10011}; +Line(221) = {1, 10001}; +Line(222) = {301, 10021}; +Line(231) = {10002,10011}; +Line(232) = {10003,10012}; +Line(233) = {10004,10013}; +Line(234) = {10005,10014}; + +// Wake +Line(241) = {10001, 10021}; + +/// Line loops & Surfaces + +// Wing 1: +Line Loop(1) = {1,62,-7,-61}; +Line Loop(2) = {2,63,-8,-62}; +Line Loop(3) = {3,64,-9,-63}; +Line Loop(4) = {4,65,-10,-64}; +Line Loop(5) = {5,66,-11,-65}; +Line Loop(6) = {6,61,-12,-66}; +Surface(1) = {-1}; +Surface(2) = {-2}; +Surface(3) = {-3}; +Surface(4) = {-4}; +Surface(5) = {-5}; +Surface(6) = {-6}; + +// Wingtip: +Line Loop(11) = {7:12}; +Plane Surface(11) = {-11}; + +// Symmetry +Line Loop(21) = {201, 202, 203, 204, 205}; +Line Loop(22) = {1, 2, 3, 4, 5, 6}; +Plane Surface(21) = {-21, 22}; + +// Downsteam +Line Loop(31) = {201, 231, -214, -234, 205}; +Plane Surface(31) = {31}; + +// Farfield +Line Loop(41) = {233, -212, -232, 203}; +Plane Surface(41) = {41}; +Line Loop(42) = {204, 234, -213, -233}; +Plane Surface(42) = {42}; +Line Loop(43) = {202, 232, -211, -231}; +Plane Surface(43) = {43}; +Line Loop(44) = {213, 214, 211, 212}; +Plane Surface(44) = {44}; + +// Wake +Line Loop(51) = {221, 241, -222, -61}; +Surface(51) = {51}; + +/// Volume +Surface Loop(1) = {1,2,3,4,5,6,11,21,31,41,42,43,44}; +Volume(1) = {1}; + +/// Embbeded +Line{221} In Surface{21}; +Line{241} In Surface{31}; +Surface{51} In Volume{1}; + +//// MESHING ALGORITHM + +/// 2D: + +///Wing, farfield and symmetry plane: +MeshAlgorithm Surface{1,2,3,4,5,6,11,21,31,41,42,43,44,51} = 5; + +/// 3D: + +Mesh.Algorithm3D = 2; +Mesh.Optimize = 1; +Mesh.Smoothing = 10; +Mesh.SmoothNormals = 1; + + + +//// PHYSICAL GROUPS + +// Trailing edge and wake tip +Physical Line("wakeTip") = {222}; +Physical Line("te") = {61}; + +// Internal Field: +Physical Volume("field") = {1}; + +// Wing: +Physical Surface("wing") = {1,2,3,11}; +Physical Surface("wing_") = {4,5,6}; + +// Symmetry: +Physical Surface("symmetry") = {21}; + +// Downstream: +Physical Surface("downstream") = {31}; + +// Farfield: +Physical Surface("upstream") = {41}; +Physical Surface("farfield") = {42,43,44}; + +// Wake: +Physical Surface("wake") = {51}; diff --git a/blast/models/dart/rae_3_visc.geo b/blast/models/dart/rae_3_visc.geo new file mode 100644 index 0000000..e306126 --- /dev/null +++ b/blast/models/dart/rae_3_visc.geo @@ -0,0 +1,374 @@ +/* RAE 2822 rectangular wing */ + +// Parameters +// domain and mesh +DefineConstant[ spn = { 1.0, Name "Wing span" }, + lgt = { 6.0, Name "Channel length" }, + nLe = { 15, Name "nLe" }, + progLe = { 1.0, Name "progLe" }, + nMid = { 50, Name "nMid" }, + progMid = { 1.0, Name "progMid" }, + nTe = { 5, Name "nTe" }, + progTe = { 1.0, Name "progTe" }, + nSpan = { 50, Name "nSpan" }, + progSpan = { 1.0, Name "progSpan" }, + nWake = { 25, Name "nWake" } + progWake = { 1.0, Name "progWake" } ]; + +//// GEOMETRY + + +/// Points + +// Airfoil 1 +Point(1) = {1.000000, 0.0000, 0.000000}; +Point(2) = {0.999398, 0.0000, 0.000128}; +Point(3) = {0.997592, 0.0000, 0.000510}; +Point(4) = {0.994588, 0.0000, 0.001137}; +Point(5) = {0.990393, 0.0000, 0.002001}; +Point(6) = {0.985016, 0.0000, 0.003092}; +Point(7) = {0.978470, 0.0000, 0.004401}; +Point(8) = {0.970772, 0.0000, 0.005915}; +Point(9) = {0.961940, 0.0000, 0.007622}; +Point(10) = {0.951995, 0.0000, 0.009508}; +Point(11) = {0.940961, 0.0000, 0.011562}; +Point(12) = {0.928864, 0.0000, 0.013769}; +Point(13) = {0.915735, 0.0000, 0.016113}; +Point(14) = {0.901604, 0.0000, 0.018580}; +Point(15) = {0.886505, 0.0000, 0.021153}; +Point(16) = {0.870476, 0.0000, 0.023817}; +Point(17) = {0.853553, 0.0000, 0.026554}; +Point(18) = {0.835779, 0.0000, 0.029347}; +Point(19) = {0.817197, 0.0000, 0.032176}; +Point(20) = {0.797850, 0.0000, 0.035017}; +Point(21) = {0.777785, 0.0000, 0.037847}; +Point(22) = {0.757051, 0.0000, 0.040641}; +Point(23) = {0.735698, 0.0000, 0.043377}; +Point(24) = {0.713778, 0.0000, 0.046029}; +Point(25) = {0.691342, 0.0000, 0.048575}; +Point(26) = {0.668445, 0.0000, 0.050993}; +Point(27) = {0.645142, 0.0000, 0.053258}; +Point(28) = {0.621490, 0.0000, 0.055344}; +Point(29) = {0.597545, 0.0000, 0.057218}; +Point(30) = {0.573365, 0.0000, 0.058845}; +Point(31) = {0.549009, 0.0000, 0.060194}; +Point(32) = {0.524534, 0.0000, 0.061254}; +Point(33) = {0.500000, 0.0000, 0.062029}; +Point(34) = {0.475466, 0.0000, 0.062530}; +Point(35) = {0.450991, 0.0000, 0.062774}; +Point(36) = {0.426635, 0.0000, 0.062779}; +Point(37) = {0.402455, 0.0000, 0.062562}; +Point(38) = {0.378510, 0.0000, 0.062133}; +Point(39) = {0.354858, 0.0000, 0.061497}; +Point(40) = {0.331555, 0.0000, 0.060660}; +Point(41) = {0.308658, 0.0000, 0.059629}; +Point(42) = {0.286222, 0.0000, 0.058414}; +Point(43) = {0.264302, 0.0000, 0.057026}; +Point(44) = {0.242949, 0.0000, 0.055470}; +Point(45) = {0.222215, 0.0000, 0.053753}; +Point(46) = {0.202150, 0.0000, 0.051885}; +Point(47) = {0.182803, 0.0000, 0.049874}; +Point(48) = {0.164221, 0.0000, 0.047729}; +Point(49) = {0.146447, 0.0000, 0.045457}; +Point(50) = {0.129524, 0.0000, 0.043071}; +Point(51) = {0.113495, 0.0000, 0.040585}; +Point(52) = {0.098396, 0.0000, 0.038011}; +Point(53) = {0.084265, 0.0000, 0.035360}; +Point(54) = {0.071136, 0.0000, 0.032644}; +Point(55) = {0.059039, 0.0000, 0.029874}; +Point(56) = {0.048005, 0.0000, 0.027062}; +Point(57) = {0.038060, 0.0000, 0.024219}; +Point(58) = {0.029228, 0.0000, 0.021348}; +Point(59) = {0.021530, 0.0000, 0.018441}; +Point(60) = {0.014984, 0.0000, 0.015489}; +Point(61) = {0.009607, 0.0000, 0.012480}; +Point(62) = {0.005412, 0.0000, 0.009416}; +Point(63) = {0.002408, 0.0000, 0.006306}; +Point(64) = {0.000602, 0.0000, 0.003165}; +Point(65) = {0.000000, 0.0000, 0.000000}; +Point(66) = {0.000602, 0.0000, -0.003160}; +Point(67) = {0.002408, 0.0000, -0.006308}; +Point(68) = {0.005412, 0.0000, -0.009443}; +Point(69) = {0.009607, 0.0000, -0.012559}; +Point(70) = {0.014984, 0.0000, -0.015649}; +Point(71) = {0.021530, 0.0000, -0.018707}; +Point(72) = {0.029228, 0.0000, -0.021722}; +Point(73) = {0.038060, 0.0000, -0.024685}; +Point(74) = {0.048005, 0.0000, -0.027586}; +Point(75) = {0.059039, 0.0000, -0.030416}; +Point(76) = {0.071136, 0.0000, -0.033170}; +Point(77) = {0.084265, 0.0000, -0.035843}; +Point(78) = {0.098396, 0.0000, -0.038431}; +Point(79) = {0.113495, 0.0000, -0.040929}; +Point(80) = {0.129524, 0.0000, -0.043326}; +Point(81) = {0.146447, 0.0000, -0.045610}; +Point(82) = {0.164221, 0.0000, -0.047773}; +Point(83) = {0.182803, 0.0000, -0.049805}; +Point(84) = {0.202150, 0.0000, -0.051694}; +Point(85) = {0.222215, 0.0000, -0.053427}; +Point(86) = {0.242949, 0.0000, -0.054994}; +Point(87) = {0.264302, 0.0000, -0.056376}; +Point(88) = {0.286222, 0.0000, -0.057547}; +Point(89) = {0.308658, 0.0000, -0.058459}; +Point(90) = {0.331555, 0.0000, -0.059046}; +Point(91) = {0.354858, 0.0000, -0.059236}; +Point(92) = {0.378510, 0.0000, -0.058974}; +Point(93) = {0.402455, 0.0000, -0.058224}; +Point(94) = {0.426635, 0.0000, -0.056979}; +Point(95) = {0.450991, 0.0000, -0.055257}; +Point(96) = {0.475466, 0.0000, -0.053099}; +Point(97) = {0.500000, 0.0000, -0.050563}; +Point(98) = {0.524534, 0.0000, -0.047719}; +Point(99) = {0.549009, 0.0000, -0.044642}; +Point(100) = {0.573365, 0.0000, -0.041397}; +Point(101) = {0.597545, 0.0000, -0.038043}; +Point(102) = {0.621490, 0.0000, -0.034631}; +Point(103) = {0.645142, 0.0000, -0.031207}; +Point(104) = {0.668445, 0.0000, -0.027814}; +Point(105) = {0.691342, 0.0000, -0.024495}; +Point(106) = {0.713778, 0.0000, -0.021289}; +Point(107) = {0.735698, 0.0000, -0.018232}; +Point(108) = {0.757051, 0.0000, -0.015357}; +Point(109) = {0.777785, 0.0000, -0.012690}; +Point(110) = {0.797850, 0.0000, -0.010244}; +Point(111) = {0.817197, 0.0000, -0.008027}; +Point(112) = {0.835779, 0.0000, -0.006048}; +Point(113) = {0.853553, 0.0000, -0.004314}; +Point(114) = {0.870476, 0.0000, -0.002829}; +Point(115) = {0.886505, 0.0000, -0.001592}; +Point(116) = {0.901604, 0.0000, -0.000600}; +Point(117) = {0.915735, 0.0000, 0.000157}; +Point(118) = {0.928864, 0.0000, 0.000694}; +Point(119) = {0.940961, 0.0000, 0.001033}; +Point(120) = {0.951995, 0.0000, 0.001197}; +Point(121) = {0.961940, 0.0000, 0.001212}; +Point(122) = {0.970772, 0.0000, 0.001112}; +Point(123) = {0.978470, 0.0000, 0.000935}; +Point(124) = {0.985016, 0.0000, 0.000719}; +Point(125) = {0.990393, 0.0000, 0.000497}; +Point(126) = {0.994588, 0.0000, 0.000296}; +Point(127) = {0.997592, 0.0000, 0.000137}; +Point(128) = {0.999398, 0.0000, 0.000035}; + +// Airfoil 2 +Point(301) = {1.000000, spn, 0.000000}; +Point(302) = {0.999398, spn, 0.000128}; +Point(303) = {0.997592, spn, 0.000510}; +Point(304) = {0.994588, spn, 0.001137}; +Point(305) = {0.990393, spn, 0.002001}; +Point(306) = {0.985016, spn, 0.003092}; +Point(307) = {0.978470, spn, 0.004401}; +Point(308) = {0.970772, spn, 0.005915}; +Point(309) = {0.961940, spn, 0.007622}; +Point(310) = {0.951995, spn, 0.009508}; +Point(311) = {0.940961, spn, 0.011562}; +Point(312) = {0.928864, spn, 0.013769}; +Point(313) = {0.915735, spn, 0.016113}; +Point(314) = {0.901604, spn, 0.018580}; +Point(315) = {0.886505, spn, 0.021153}; +Point(316) = {0.870476, spn, 0.023817}; +Point(317) = {0.853553, spn, 0.026554}; +Point(318) = {0.835779, spn, 0.029347}; +Point(319) = {0.817197, spn, 0.032176}; +Point(320) = {0.797850, spn, 0.035017}; +Point(321) = {0.777785, spn, 0.037847}; +Point(322) = {0.757051, spn, 0.040641}; +Point(323) = {0.735698, spn, 0.043377}; +Point(324) = {0.713778, spn, 0.046029}; +Point(325) = {0.691342, spn, 0.048575}; +Point(326) = {0.668445, spn, 0.050993}; +Point(327) = {0.645142, spn, 0.053258}; +Point(328) = {0.621490, spn, 0.055344}; +Point(329) = {0.597545, spn, 0.057218}; +Point(330) = {0.573365, spn, 0.058845}; +Point(331) = {0.549009, spn, 0.060194}; +Point(332) = {0.524534, spn, 0.061254}; +Point(333) = {0.500000, spn, 0.062029}; +Point(334) = {0.475466, spn, 0.062530}; +Point(335) = {0.450991, spn, 0.062774}; +Point(336) = {0.426635, spn, 0.062779}; +Point(337) = {0.402455, spn, 0.062562}; +Point(338) = {0.378510, spn, 0.062133}; +Point(339) = {0.354858, spn, 0.061497}; +Point(340) = {0.331555, spn, 0.060660}; +Point(341) = {0.308658, spn, 0.059629}; +Point(342) = {0.286222, spn, 0.058414}; +Point(343) = {0.264302, spn, 0.057026}; +Point(344) = {0.242949, spn, 0.055470}; +Point(345) = {0.222215, spn, 0.053753}; +Point(346) = {0.202150, spn, 0.051885}; +Point(347) = {0.182803, spn, 0.049874}; +Point(348) = {0.164221, spn, 0.047729}; +Point(349) = {0.146447, spn, 0.045457}; +Point(350) = {0.129524, spn, 0.043071}; +Point(351) = {0.113495, spn, 0.040585}; +Point(352) = {0.098396, spn, 0.038011}; +Point(353) = {0.084265, spn, 0.035360}; +Point(354) = {0.071136, spn, 0.032644}; +Point(355) = {0.059039, spn, 0.029874}; +Point(356) = {0.048005, spn, 0.027062}; +Point(357) = {0.038060, spn, 0.024219}; +Point(358) = {0.029228, spn, 0.021348}; +Point(359) = {0.021530, spn, 0.018441}; +Point(360) = {0.014984, spn, 0.015489}; +Point(361) = {0.009607, spn, 0.012480}; +Point(362) = {0.005412, spn, 0.009416}; +Point(363) = {0.002408, spn, 0.006306}; +Point(364) = {0.000602, spn, 0.003165}; +Point(365) = {0.000000, spn, 0.000000}; +Point(366) = {0.000602, spn, -0.003160}; +Point(367) = {0.002408, spn, -0.006308}; +Point(368) = {0.005412, spn, -0.009443}; +Point(369) = {0.009607, spn, -0.012559}; +Point(370) = {0.014984, spn, -0.015649}; +Point(371) = {0.021530, spn, -0.018707}; +Point(372) = {0.029228, spn, -0.021722}; +Point(373) = {0.038060, spn, -0.024685}; +Point(374) = {0.048005, spn, -0.027586}; +Point(375) = {0.059039, spn, -0.030416}; +Point(376) = {0.071136, spn, -0.033170}; +Point(377) = {0.084265, spn, -0.035843}; +Point(378) = {0.098396, spn, -0.038431}; +Point(379) = {0.113495, spn, -0.040929}; +Point(380) = {0.129524, spn, -0.043326}; +Point(381) = {0.146447, spn, -0.045610}; +Point(382) = {0.164221, spn, -0.047773}; +Point(383) = {0.182803, spn, -0.049805}; +Point(384) = {0.202150, spn, -0.051694}; +Point(385) = {0.222215, spn, -0.053427}; +Point(386) = {0.242949, spn, -0.054994}; +Point(387) = {0.264302, spn, -0.056376}; +Point(388) = {0.286222, spn, -0.057547}; +Point(389) = {0.308658, spn, -0.058459}; +Point(390) = {0.331555, spn, -0.059046}; +Point(391) = {0.354858, spn, -0.059236}; +Point(392) = {0.378510, spn, -0.058974}; +Point(393) = {0.402455, spn, -0.058224}; +Point(394) = {0.426635, spn, -0.056979}; +Point(395) = {0.450991, spn, -0.055257}; +Point(396) = {0.475466, spn, -0.053099}; +Point(397) = {0.500000, spn, -0.050563}; +Point(398) = {0.524534, spn, -0.047719}; +Point(399) = {0.549009, spn, -0.044642}; +Point(400) = {0.573365, spn, -0.041397}; +Point(401) = {0.597545, spn, -0.038043}; +Point(402) = {0.621490, spn, -0.034631}; +Point(403) = {0.645142, spn, -0.031207}; +Point(404) = {0.668445, spn, -0.027814}; +Point(405) = {0.691342, spn, -0.024495}; +Point(406) = {0.713778, spn, -0.021289}; +Point(407) = {0.735698, spn, -0.018232}; +Point(408) = {0.757051, spn, -0.015357}; +Point(409) = {0.777785, spn, -0.012690}; +Point(410) = {0.797850, spn, -0.010244}; +Point(411) = {0.817197, spn, -0.008027}; +Point(412) = {0.835779, spn, -0.006048}; +Point(413) = {0.853553, spn, -0.004314}; +Point(414) = {0.870476, spn, -0.002829}; +Point(415) = {0.886505, spn, -0.001592}; +Point(416) = {0.901604, spn, -0.000600}; +Point(417) = {0.915735, spn, 0.000157}; +Point(418) = {0.928864, spn, 0.000694}; +Point(419) = {0.940961, spn, 0.001033}; +Point(420) = {0.951995, spn, 0.001197}; +Point(421) = {0.961940, spn, 0.001212}; +Point(422) = {0.970772, spn, 0.001112}; +Point(423) = {0.978470, spn, 0.000935}; +Point(424) = {0.985016, spn, 0.000719}; +Point(425) = {0.990393, spn, 0.000497}; +Point(426) = {0.994588, spn, 0.000296}; +Point(427) = {0.997592, spn, 0.000137}; +Point(428) = {0.999398, spn, 0.000035}; + +// Wake +Point(10001) = {1+lgt/2, 0, 0}; +Point(10021) = {1+lgt/2, spn, 0}; + +/// Lines + +// Airfoil 1: +Spline(1) = {1:14}; +Spline(2) = {14:46}; +Spline(3) = {46:65}; +Spline(4) = {65:84}; +Spline(5) = {84:116}; +Spline(6) = {116:128,1}; + +// Airfoil 2: +Spline(7) = {301:314}; +Spline(8) = {314:346}; +Spline(9) = {346:365}; +Spline(10) = {365:384}; +Spline(11) = {384:416}; +Spline(12) = {416:428,301}; + +// Airfoil 1 to airfoil 2: +Line(61) = {1,301}; +Line(62) = {14,314}; +Line(63) = {46,346}; +Line(64) = {65,365}; +Line(65) = {84,384}; +Line(66) = {116,416}; + +// Box +Line(221) = {1, 10001}; +Line(222) = {301, 10021}; + +// Wake +Line(241) = {10001, 10021}; + +/// Line loops & Surfaces + +// Wing 1: +Line Loop(1) = {1,62,-7,-61}; +Line Loop(2) = {2,63,-8,-62}; +Line Loop(3) = {3,64,-9,-63}; +Line Loop(4) = {4,65,-10,-64}; +Line Loop(5) = {5,66,-11,-65}; +Line Loop(6) = {6,61,-12,-66}; +Surface(1) = {1}; +Surface(2) = {2}; +Surface(3) = {3}; +Surface(4) = {4}; +Surface(5) = {5}; +Surface(6) = {6}; + +// Wake +Line Loop(51) = {221, 241, -222, -61}; +Surface(51) = {51}; + +//// MESHING ALGORITHM + +Transfinite Curve {222, 221} = nWake Using Progression progWake; +Transfinite Curve {64, 63, 65, 62, 62, 66, 61, 241} = nSpan Using Progression progSpan; +Transfinite Curve {-3, 4, 10, -9} = nLe Using Progression progLe; +Transfinite Curve {1, 6, 7, 12} = nTe Using Progression progTe; +Transfinite Curve {2, 5, 11, 8} = nMid Using Progression progMid; +Transfinite Surface {3}; +Transfinite Surface {4}; +Transfinite Surface {2}; +Transfinite Surface {5}; +Transfinite Surface {1}; +Transfinite Surface {6}; +Transfinite Surface {51}; + +Recombine Surface {3}; +Recombine Surface {4}; +Recombine Surface {2}; +Recombine Surface {5}; +Recombine Surface {1}; +Recombine Surface {6}; +Recombine Surface {51}; + +//// PHYSICAL GROUPS + +// Trailing edge and wake tip +Physical Line("wakeTip") = {222}; +Physical Line("te") = {61}; + +// Wing: +Physical Surface("wing") = {1,2,3,11}; +Physical Surface("wing_") = {4,5,6}; + +// Wake: +Physical Surface("wake") = {51}; diff --git a/blast/tests/dart/rae2822_3D.py b/blast/tests/dart/rae2822_3D.py new file mode 100644 index 0000000..3fc0fca --- /dev/null +++ b/blast/tests/dart/rae2822_3D.py @@ -0,0 +1,178 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +# Copyright 2022 University of Liège +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# @author Paul Dechamps +# @date 2022 +# Test the blast implementation. The test case is a compressible attached transitional flow. +# Tested functionalities; +# - Time integration. +# - Two time-marching techniques (agressive and safe). +# - Transition routines. +# - Forced transition. +# - Compressible flow routines. +# - Laminar and turbulent flow. +# +# Untested functionalities. +# - Separation routines. +# - Multiple failure case at one iteration. +# - Response to unconverged inviscid solver. + +# Imports. + +import blast.utils as viscUtils +import numpy as np +import os.path + +from fwk.wutils import parseargs +import fwk +from fwk.testing import * +from fwk.coloring import ccolors + +import math + +def cfgInviscid(nthrds, verb): + # Parameters + return { + # Options + 'scenario' : 'aerodynamic', + 'task' : 'analysis', + 'Threads' : nthrds, # number of threads + 'Verb' : verb, # verbosity + # Model (geometry or mesh) + 'File' : os.path.abspath(os.path.join(os.path.abspath(__file__), '../../../models/dart/rae_3.geo')), # Input file containing the model + 'Pars' : {'spn' : 1.0, 'lgt' : 6.0, 'wdt' : 3.0, 'hgt' : 6.0, 'msN' : 0.02, 'msF' : 1}, # parameters for input file model + 'Dim' : 3, # problem dimension + 'Format' : 'vtk', # save format (vtk or gmsh) + # Markers + 'Fluid' : 'field', # name of physical group containing the fluid + 'Farfield' : ['upstream', 'farfield', 'downstream'], # LIST of names of physical groups containing the farfield boundaries (upstream/downstream should be first/last element) + 'Wings' : ['wing'], # LIST of names of physical groups containing the lifting surface boundary + 'Wakes' : ['wake'], # LIST of names of physical group containing the wake + 'WakeTips' : ['wakeTip'], # LIST of names of physical group containing the edge of the wake + 'Tes' : ['te'], # LIST of names of physical group containing the trailing edge + 'Symmetry': 'symmetry', # name of physical group containing the symmetry BC + 'dbc' : True, + 'Upstream' : 'upstream', + # Freestream + 'M_inf' : 0.8, # freestream Mach number + 'AoA' : 0.0, # freestream angle of attack + # Geometry + 'S_ref' : 1.0, # reference surface length + 'c_ref' : 1.0, # reference chord length + 'x_ref' : 0.0, # reference point for moment computation (x) + 'y_ref' : 0.0, # reference point for moment computation (y) + 'z_ref' : 0.0, # reference point for moment computation (z) + # Numerical + 'LSolver' : 'GMRES', # inner solver (Pardiso, MUMPS or GMRES) + 'G_fill' : 2, # fill-in factor for GMRES preconditioner + 'G_tol' : 1e-5, # tolerance for GMRES + 'G_restart' : 50, # restart for GMRES + 'Rel_tol' : 1e-6, # relative tolerance on solver residual + 'Abs_tol' : 1e-8, # absolute tolerance on solver residual + 'Max_it' : 50 # solver maximum number of iterations + } + +def cfgBlast(verb): + return { + 'Re' : 1e7, # Freestream Reynolds number + 'Minf' : 0.8, # Freestream Mach number (used for the computation of the time step only) + 'CFL0' : 1, # Inital CFL number of the calculation + + 'sections' : np.linspace(0.01, 0.95, 30), + 'writeSections': [0.2, 0.4, 0.6, 0.8, 1.0], + 'Sym':[0.], + 'span':1., + 'interpolator': 'Rbf', + 'rbftype': 'linear', + 'smoothing': 1e-8, + 'degree': 0, + 'neighbors': 10, + 'saveTag': 4, + + 'Verb': verb, # Verbosity level of the solver + 'couplIter': 50, # Maximum number of iterations + 'couplTol' : 5e-2, # Tolerance of the VII methodology + 'iterPrint': 1, # int, number of iterations between outputs + 'resetInv' : False, # bool, flag to reset the inviscid calculation at every iteration. + 'xtrF' : [0., 0.], # Forced transition location + 'nDim' : 3 + } + +def main(): + # Timer. + tms = fwk.Timers() + tms['total'].start() + + args = parseargs() + icfg = cfgInviscid(args.k, args.verb) + vcfg = cfgBlast(args.verb) + + parsViscous = {'spn': icfg['Pars']['spn'], 'lgt': icfg['Pars']['lgt'], + 'nLe': 25, 'nMid': 50, 'nTe': 10, 'nSpan': 60, 'nWake': 25, + 'progLe': 1.1, 'progMid': 1.0, 'progTe': 1.0, 'progSpan': 1.0, 'progWake': 1.15} + + vMeshFile = os.path.abspath(os.path.join(os.path.abspath(__file__), '../../../models/dart/rae_3_visc.geo')) + vMsh = viscUtils.mesh(vMeshFile, parsViscous) + vcfg['vMsh'] = vMsh + + tms['pre'].start() + coupler, iSolverAPI, vSolver = viscUtils.initBlast(icfg, vcfg) + tms['pre'].stop() + + print(ccolors.ANSI_BLUE + 'PySolving...' + ccolors.ANSI_RESET) + tms['solver'].start() + aeroCoeffs = coupler.run() + tms['solver'].stop() + + # Display results. + print(ccolors.ANSI_BLUE + 'PyRes...' + ccolors.ANSI_RESET) + print(' Re M alpha Cl Cd Cd_wake Cdp Cdf Cm') + print('{0:6.1f}e6 {1:8.2f} {2:8.1f} {3:8.4f} {4:8.4f} {5:8.4f} {6:8.4f} {7:8.4f} {8:8.4f}'.format(vcfg['Re']/1e6, iSolverAPI.getMinf(), iSolverAPI.getAoA()*180/math.pi, iSolverAPI.getCl(), vSolver.Cdf + iSolverAPI.getCd(), vSolver.Cdt, vSolver.Cdp, vSolver.Cdf, iSolverAPI.getCm())) + + # Write results to file. + vSolution = viscUtils.getSolution(vSolver) + + # Write results to file. + for iSec in range(len(iSolverAPI.cfg['EffSections'])): + vSolution = viscUtils.getSolution(vSolver, iSec) + viscUtils.write(vSolution, vSolver.getRe(), sfx='slice'+str(iSec)) + vSolution['Cdt_int'] = vSolver.Cdf + iSolverAPI.getCd() + + # Save pressure coefficient + iSolverAPI.save(sfx='_viscous') + tms['total'].stop() + + print(ccolors.ANSI_BLUE + 'PyTiming...' + ccolors.ANSI_RESET) + print('CPU statistics') + print(tms) + print('SOLVERS statistics') + print(coupler.tms) + + # Test solution + print(ccolors.ANSI_BLUE + 'PyTesting...' + ccolors.ANSI_RESET) + tests = CTests() + tests.add(CTest('Cl', iSolverAPI.getCl(), 0.128, 5e-2)) + tests.add(CTest('Cd wake', vSolution['Cdt_int'], 0.0132, 1e-3, forceabs=True)) + tests.add(CTest('Iterations', len(aeroCoeffs), 5, 0, forceabs=True)) + tests.run() + + # eof + print('') + +if __name__ == "__main__": + main() -- GitLab