Skip to content
Snippets Groups Projects

Update waves

Merged Boman Romain requested to merge adrien into master
2 files
+ 12
34
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 6
13
@@ -27,19 +27,19 @@ def main():
# define flow variables
alpha = 3*math.pi/180
U_inf = [math.cos(alpha), 0., math.sin(alpha)] # norm should be 1
M_inf = 0.1
M_inf = 0.3
gamma = 1.4
M_crit = 5 # Squared critical Mach number (above which density is modified)
dim = len(U_inf)
# define dimension and mesh size
spn = 2.0 # wing span
spn = 1.0 # wing span
lgt = 3.0 # channel half length
hgt = 3.0 # channel half height
wdt = 3.0 # channel width
S_ref = 1.*spn # reference area
fms = 1.0 # farfield mesh size
nms = 0.1 # nearfield mesh size
nms = 0.02 # nearfield mesh size
# mesh the channel
print ccolors.ANSI_BLUE + 'PyMeshing...' + ccolors.ANSI_RESET
@@ -68,8 +68,7 @@ def main():
tms["B.C."].stop()
# add wake boundary and Kutta conditions
tms["wake BC"].start()
wake = f.Wake(msh, ["wake", "wake_", "field", "teTip"])
pbl.add(wake)
pbl.add(f.Wake(msh, ["wake", "wake_", "field", "teTip"]))
tms["wake BC"].stop()
# add slip condition
tms["boundary"].start()
@@ -88,13 +87,6 @@ def main():
tms["solver"].stop()
solver.save(0)
# TEMP compute largest error in Wake boundary condition
errWak = 0.
for n in wake.nodMap:
errCur = solver.Cp[n.row] - solver.Cp[wake.nodMap[n].row]
if (abs(errCur) > errWak):
errWak = abs(errCur)
# display timers
tms["total"].stop()
print ccolors.ANSI_BLUE + 'PyTiming...' + ccolors.ANSI_RESET
@@ -107,7 +99,8 @@ def main():
# check results
print ccolors.ANSI_BLUE + 'PyTesting...' + ccolors.ANSI_RESET
tests = CTests()
tests.add(CTest('Wake/Kutta B.C. max error', errWak, 0., 1e-1))
tests.add(CTest('CL', solver.Cl, 0.135, 5e-2))
tests.add(CTest('CD', solver.Cd, 0.0062, 1e-2))
tests.run()
# eof
Loading