Skip to content
Snippets Groups Projects
Verified Commit 6ffc8e41 authored by Paul Dechamps's avatar Paul Dechamps :speech_balloon:
Browse files

(fix) Fixed bug for case no transition and update high lift validation case

parent 2f90efb0
No related branches found
No related tags found
No related merge requests found
Pipeline #52690 failed
...@@ -88,7 +88,10 @@ int Driver::run() ...@@ -88,7 +88,10 @@ int Driver::run()
if (reg->getName() == "wake" || reg->getName() == "fuselage") if (reg->getName() == "wake" || reg->getName() == "fuselage")
reg->setxtr(0.); reg->setxtr(0.);
else if (reg->getName() == "upper" || reg->getName() == "lower") else if (reg->getName() == "upper" || reg->getName() == "lower")
{
reg->transitionNode = reg->nodes.size() - 1;
reg->setxtr(1.); reg->setxtr(1.);
}
else else
throw std::runtime_error("Didn't expect region name: " + reg->getName()); throw std::runtime_error("Didn't expect region name: " + reg->getName());
......
...@@ -72,14 +72,12 @@ def cfgInviscid(nthrds, verb): ...@@ -72,14 +72,12 @@ def cfgInviscid(nthrds, verb):
def cfgBlast(verb): def cfgBlast(verb):
return { return {
'Re' : 3e6, # Freestream Reynolds number 'Re' : 3e6, # Freestream Reynolds number
'Minf' : 0.16, # Freestream Mach number (used for the computation of the time step only) 'CFL0' : 5, # Inital CFL number of the calculation
'CFL0' : 0.1, # Inital CFL number of the calculation 'sections': {'airfoil': [0]},
'Verb': verb, # Verbosity level of the solver
'couplIter': 150, # Maximum number of iterations 'couplIter': 150, # Maximum number of iterations
'couplTol' : 1e-3, # Tolerance of the VII methodology 'couplTol' : 1e-3, # Tolerance of the VII methodology
'iterPrint': 1, # int, number of iterations between outputs 'iterPrint': 1, # int, number of iterations between outputs
'resetInv' : False, # bool, flag to reset the inviscid calculation at every iteration. 'resetInv' : False, # bool, flag to reset the inviscid calculation at every iteration.
'sections' : [0], # List of sections for boundary layer calculation
'xtrF' : [None, None], # Forced transition locations 'xtrF' : [None, None], # Forced transition locations
'interpolator' : 'Matching' # Interpolator for the coupling 'interpolator' : 'Matching' # Interpolator for the coupling
} }
...@@ -115,7 +113,8 @@ def main(): ...@@ -115,7 +113,8 @@ def main():
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}'.format(vcfg['Re']/1e6, isol.getMinf(), isol.getAoA()*180/math.pi, isol.getCl(), vsol.Cdt, vsol.Cdp, vsol.Cdf, isol.getCm())) 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}'.format(vcfg['Re']/1e6, isol.getMinf(), isol.getAoA()*180/math.pi, isol.getCl(), vsol.Cdt, vsol.Cdp, vsol.Cdf, isol.getCm()))
# Write results to file. # Write results to file.
bl_solution = vutils.getSolution(isol.sec, write=False)[0] vutils.save(vsol.bodies[0].sections)
bl_solution = vutils.getSolution(vsol.bodies[0].sections, write=False)[0]
tms['total'].stop() tms['total'].stop()
print(ccolors.ANSI_BLUE + 'PyTiming...' + ccolors.ANSI_RESET) print(ccolors.ANSI_BLUE + 'PyTiming...' + ccolors.ANSI_RESET)
...@@ -127,12 +126,12 @@ def main(): ...@@ -127,12 +126,12 @@ def main():
# Test solution # Test solution
print(ccolors.ANSI_BLUE + 'PyTesting...' + ccolors.ANSI_RESET) print(ccolors.ANSI_BLUE + 'PyTesting...' + ccolors.ANSI_RESET)
tests = CTests() tests = CTests()
tests.add(CTest('Cl', isol.getCl(), 1.634, 5e-2)) tests.add(CTest('Cl', isol.getCl(), 1.743, 5e-2))
tests.add(CTest('Cd wake', vsol.Cdt, 0.0166, 1e-2, forceabs=True)) tests.add(CTest('Cd wake', vsol.Cdt, 0.0111, 1e-2, forceabs=True))
tests.add(CTest('Cd integral', vsol.Cdf + isol.getCd(), 0.0212, 1e-2, forceabs=True)) tests.add(CTest('Cd integral', vsol.Cdf + isol.getCd(), 0.0212, 1e-2, forceabs=True))
tests.add(CTest('Cdf', vsol.Cdf, 0.0043, 1e-3, forceabs=True)) tests.add(CTest('Cdf', vsol.Cdf, 0.0043, 1e-3, forceabs=True))
tests.add(CTest('xtr_top', vsol.getAverageTransition(0), 0.0084, 0.002, forceabs=True)) tests.add(CTest('xtr_top', vsol.bodies[0].getAvgxtr(0), 0.0082, 0.002, forceabs=True))
tests.add(CTest('xtr_bot', vsol.getAverageTransition(1), 1.0, 0.01, forceabs=True)) tests.add(CTest('xtr_bot', vsol.bodies[0].getAvgxtr(1), 1.0, 0.01, forceabs=True))
tests.run() tests.run()
# Plot results # Plot results
......
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