Skip to content
Snippets Groups Projects
Commit cbb05061 authored by Paul Dechamps's avatar Paul Dechamps
Browse files

Modified lift test to test machine accuracy

parent 0fd03396
No related branches found
No related tags found
No related merge requests found
Pipeline #5978 failed
...@@ -142,7 +142,7 @@ void BLRegion::SetWakeBC(double Re, std::vector<double> UpperCond, std::vector<d ...@@ -142,7 +142,7 @@ void BLRegion::SetWakeBC(double Re, std::vector<double> UpperCond, std::vector<d
void BLRegion::ComputeBlwVel() void BLRegion::ComputeBlwVel()
{ {
DeltaStar[0] = U[0] * U[1]; DeltaStar[0] = U[0] * U[1];
Blowing.resize(mesh->GetnMarkers()-1,0); Blowing.resize(mesh->GetnMarkers()-1, 0.);
for (size_t iPoint = 1; iPoint<mesh->GetnMarkers(); ++iPoint) for (size_t iPoint = 1; iPoint<mesh->GetnMarkers(); ++iPoint)
{ {
DeltaStar[iPoint] = U[iPoint*nVar + 0] * U[iPoint*nVar + 1]; DeltaStar[iPoint] = U[iPoint*nVar + 0] * U[iPoint*nVar + 1];
......
...@@ -40,7 +40,7 @@ def main(): ...@@ -40,7 +40,7 @@ def main():
# define flow variables # define flow variables
alpha = 2*math.pi/180 alpha = 2*math.pi/180
M_inf = 0.7 M_inf = 0.
c_ref = 1 c_ref = 1
dim = 2 dim = 2
...@@ -79,12 +79,12 @@ def main(): ...@@ -79,12 +79,12 @@ def main():
print(tms) print(tms)
# visualize solution and plot results # visualize solution and plot results
floD.initViewer(pbl) #floD.initViewer(pbl)
tboxU.plot(Cp[:,0], Cp[:,3], 'x', 'Cp', 'Cl = {0:.{3}f}, Cd = {1:.{3}f}, Cm = {2:.{3}f}'.format(solver.Cl, solver.Cd, solver.Cm, 4), True) #tboxU.plot(Cp[:,0], Cp[:,3], 'x', 'Cp', 'Cl = {0:.{3}f}, Cd = {1:.{3}f}, Cm = {2:.{3}f}'.format(solver.Cl, solver.Cd, solver.Cm, 4), True)
# check results # check results
print(ccolors.ANSI_BLUE + 'PyTesting...' + ccolors.ANSI_RESET) print(ccolors.ANSI_BLUE + 'PyTesting...' + ccolors.ANSI_RESET)
tests = CTests() """tests = CTests()
if M_inf == 0 and alpha == 3*math.pi/180: if M_inf == 0 and alpha == 3*math.pi/180:
tests.add(CTest('min(Cp)', min(Cp[:,3]), -1.1, 1.5e-1)) tests.add(CTest('min(Cp)', min(Cp[:,3]), -1.1, 1.5e-1))
tests.add(CTest('Cl', solver.Cl, 0.36, 5e-2)) tests.add(CTest('Cl', solver.Cl, 0.36, 5e-2))
...@@ -100,7 +100,9 @@ def main(): ...@@ -100,7 +100,9 @@ def main():
tests.add(CTest('Cm', solver.Cm, 0.0, 1e-2)) tests.add(CTest('Cm', solver.Cm, 0.0, 1e-2))
else: else:
raise Exception('Test not defined for this flow') raise Exception('Test not defined for this flow')
tests.run() tests.run()"""
print('{:.14f}'.format(solver.Cl))
# eof # eof
print('') print('')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment