Valiation Delta Wing NASA experiment for different leading edge radii

Delta Wing - VORTEX AND BOUNDAYR LAYER INTERACTION----Investigation also performed within NATO VFE 2 project (DLR)

Parameters

alpha = 13.3 Mach = 0.4 Re = 6.0e06

Other parameters may be considered

References

Chu J. and Luckring J. N. (1996). Experimental surface pressure data obtained on 65deg delta wing accorss Reynolds numerb and Mach number ranges. Nasa Technical Memorandum (TM 4645)

References

http://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/19960047655.pdf/
http://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/19960025648.pdf/
http://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/19960020459.pdf/
http://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/19960020435.pdf/

Define case name

This is the solver case to be analysed


In [1]:
case_name = ['Delta_Wing_Large_Radius',
             'delta_sharp']

Define Data Location

For remote data the interaction will use ssh to securely interact with the data
This uses the reverse connection capability in paraview so that the paraview server can be submitted to a job scheduler
Note: The default paraview server connection will use port 11111


In [2]:
remote_data = True

data_dir='/gpfs/cfms/workarea/projects/hyper_flux/delta_wing_high_Re/Delta_Wing_Large_Fine_Mesh'
          

data_host='acimpoeru@login02'

remote_server_auto = True

paraview_cmd='mpiexec /gpfs/thirdparty/zenotech/home/jappa/apps/Paraview/bin/pvserver -rc --client-host=localhost -sp=11115'
if not remote_server_auto:
    paraview_cmd=None

if not remote_data:
    data_host='localhost'
    paraview_cmd=None

Initialise Environment


In [3]:
%pylab inline
from paraview.simple import *

paraview.simple._DisableFirstRenderCameraReset()
import pylab as pl


Populating the interactive namespace from numpy and matplotlib
paraview version 4.1.0

Data Connection

This starts paraview server on remote host and connects


In [4]:
from zutil.post import pvserver_connect
if remote_data:
    pvserver_connect(data_host=data_host,data_dir=data_host,paraview_cmd=paraview_cmd)


[acimpoeru@login02] Executing task 'pvserver'
[acimpoeru@login02] run: sleep 2;mpiexec /gpfs/thirdparty/zenotech/home/jappa/apps/Paraview/bin/pvserver -rc --client-host=localhost -sp=11115&>/dev/null
[acimpoeru@login02] out: 
[acimpoeru@login02] out: 		   _____ ______ __  __  _____ 
[acimpoeru@login02] out: 		  / ____|  ____|  \/  |/ ____|
[acimpoeru@login02] out: 		 | |    | |__  | \  / | (___  
[acimpoeru@login02] out: 		 | |    |  __| | |\/| |\___ \ 
[acimpoeru@login02] out: 		 | |____| |    | |  | |____) |
[acimpoeru@login02] out: 		  \_____|_|    |_|  |_|_____/ 
[acimpoeru@login02] out:                               
[acimpoeru@login02] out:                               
[acimpoeru@login02] out: 
[acimpoeru@login02] out: ++++++++++++++++++++++++++++: System Data :++++++++++++++++++++++++++++
[acimpoeru@login02] out: + Hostname = login02
[acimpoeru@login02] out: + Kernel = 2.6.32-358.el6.x86_64
[acimpoeru@login02] out: + RHEL Release = Red Hat Enterprise Linux Server release 6.4 (Santiago)
[acimpoeru@login02] out: + Uptime = 15:33:22 up 145 days, 3:17, 73 users,
[acimpoeru@login02] out: + CPU = 2x Intel Xeon X5570 @ 2.93GHz
[acimpoeru@login02] out: + Memory = 49415076 kB
[acimpoeru@login02] out: ++++++++++++++++++++++++++++: User Data :++++++++++++++++++++++++++++++
[acimpoeru@login02] out: + Username = acimpoeru
[acimpoeru@login02] out: +++++++++++++++++++++++: Contact Information :+++++++++++++++++++++++++
[acimpoeru@login02] out: + in case of any problems, contact: support@cfms.org.uk
[acimpoeru@login02] out: + for feedback, contact: feedback@cfms.org.uk 
[acimpoeru@login02] out: +++++++++++++++++++++: Maintenance Information :+++++++++++++++++++++++
[acimpoeru@login02] out: + There is no planned maintenance for the cluster
[acimpoeru@login02] out: +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[acimpoeru@login02] out: 
[acimpoeru@login02] out: /bin/bash: line 0: cd: acimpoeru@login02: No such file or directory
[acimpoeru@login02] out: 

Define test conditions


In [12]:
alpha = 13.3 # degrees
reference_area = 594720.0 # inches^2
reference_length = 275.8 # inches, mean chord. 
reference_span = 1156.75 # inches

from IPython.display import HTML
HTML(print_html_parameters(parameters))


Out[12]:
pressure407552.8904
temperature322.0389
Reynolds No6000000.0
Ref length1.0
Speed0.0
Mach No0.4

In [10]:
import zutil
import zutil.post as post
reload(zutil)
reload(post)
from zutil.post import cp_profile_wall_from_file
from zutil.post import cp_profile_wall_from_file_span
def plot_cp_profile(ax,file_root,loc):
    force_data = cp_profile_wall_from_file_span(file_root,
                              [1.0,0.0,0.0],
                              [loc, 0.0 , 0.0],
                              func=plot_array,
                              axis=ax,
                              loc=loc,
                              alpha=alpha)
loop = 0
loop_data = {}
def plot_array(data_array,pts_array,**kwargs):
    global loop, loop_data
    ax = kwargs['axis']
    loc = kwargs['loc']
    #alpha = kwargs['alpha']
    cp_array = data_array.GetPointData()['cp']
    chord_array = data_array.GetPointData()['chord']
    ax.plot(chord_array, cp_array , 'b.',color='k',label='zCFD SST', markersize=20)
    ax.legend(loc = 'upper left',numpoints=1,prop = prop)
    loop_data[loop] = (chord_array,cp_array)
    loop += 1

Comparison Data


In [14]:
# Reproduce plots from delta wing presentation

from collections import OrderedDict
station_values = OrderedDict([("S01" , 0.2), ("S02" , 0.4), ("S03" , 0.6), ("S04" , 0.8),("S05",0.95)])

Experimental data


In [12]:
import zutil
import zutil.post as post
reload(zutil)
reload(post)
from zutil.post import get_csv_data
import os
import glob
from collections import OrderedDict

#"/gpfs/cfms/workarea/projects/hyper_flux/delta_wing_high_Re/results_csv_format/results_delta_wing"


#LARGE RADIUS
cp_l_s02 = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/delta_wing_high_Re/results_csv_format/results_delta_wing/cp02_l.csv",header=True,remote=True,delim=',')
cp_u_s02 = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/delta_wing_high_Re/results_csv_format/results_delta_wing/cp02_u.csv",header=True,remote=True,delim=',')

cp_l_s04 = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/delta_wing_high_Re/results_csv_format/results_delta_wing/cp04_l.csv",header=True,remote=True,delim=',')
cp_u_s04 = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/delta_wing_high_Re/results_csv_format/results_delta_wing/cp04_u.csv",header=True,remote=True,delim=',')


cp_l_s06 = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/delta_wing_high_Re/results_csv_format/results_delta_wing/cp06_l.csv",header=True,remote=True,delim=',')
cp_u_s06 = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/delta_wing_high_Re/results_csv_format/results_delta_wing/cp06_u.csv",header=True,remote=True,delim=',')


cp_l_s08 = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/delta_wing_high_Re/results_csv_format/results_delta_wing/cp08_l.csv",header=True,remote=True,delim=',')
cp_u_s08 = zutil.post.get_csv_data("/gpfs/cfms/workarea/projects/hyper_flux/delta_wing_high_Re/results_csv_format/results_delta_wing/cp08_u.csv",header=True,remote=True,delim=',')



stat = OrderedDict([("S01" ,(0.2,cp_u_s02[0],cp_u_s02[1],cp_l_s02[0],cp_l_s02[1])),
                    ("S02" ,(0.4,cp_u_s04[0],cp_u_s04[1],cp_l_s04[0],cp_l_s04[1])),
                    ("S03" ,(0.6,cp_u_s06[0],cp_u_s06[1],cp_l_s06[0],cp_l_s06[1])),
                    ("S04" ,(0.8,cp_u_s08[0],cp_u_s08[1],cp_l_s08[0],cp_l_s08[1]))
                  ])

Cp Profile


In [15]:
from zutil.post import get_case_root
from zutil.post import get_chord_spanwise
import matplotlib.font_manager as fm
prop=fm.FontProperties(size=20)

fig = pl.figure(figsize=(30, 50),dpi=150, facecolor='w', edgecolor='k')
fig2 = pl.figure(figsize=(30, 50),dpi=150, facecolor='w', edgecolor='k')

plot = 1
for case in case_name:
    case_name = case
    for key in stat:
        
        loc = stat[key][0]
        ax = fig.add_subplot(len(station_values),2,plot)
        ax.set_title('$C_p$ at x/c = '+str(loc), fontsize=40, fontweight='bold')
        ax.grid(True)
        ax.set_xlabel('y/c - Spanwise',fontsize=20, fontweight='bold')
        ax.set_ylabel('$C_p$',fontsize=50, fontweight='bold')
        ax.axis([0.0,1.01,0.5,-3.0])
        plot_cp_profile(ax,get_case_root(case_name,num_procs),loc)
        ax.plot(stat[key][1],stat[key][2],'b.',color='r',label='Experiment', markersize=20)
        ax.plot(stat[key][3],stat[key][4],'b.',color='r', markersize=20)

        ax.legend(loc = 'upper left',numpoints=1,prop = prop)
        plot += 1    
from matplotlib.backends.backend_pdf import PdfPages
pp = PdfPages('Large_delta_cp_profile.pdf')
pp.savefig()
pp.close()
fig.savefig("Large_delta.png")
show()
from IPython.display import FileLink, display 
display(FileLink('Large_delta.png'))


---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-15-fdf81af8cbef> in <module>()
     19         ax.set_ylabel('$C_p$',fontsize=50, fontweight='bold')
     20         ax.axis([0.0,1.01,0.5,-3.0])
---> 21         plot_cp_profile(ax,get_case_root(case_name,num_procs),loc)
     22         ax.plot(stat[key][1],stat[key][2],'b.',color='r',label='Experiment', markersize=20)
     23         ax.plot(stat[key][3],stat[key][4],'b.',color='r', markersize=20)

NameError: name 'num_procs' is not defined
<matplotlib.figure.Figure at 0x1116903d0>

Convergence


In [12]:
from zutil.post import residual_plot, get_case_report
residual_plot(get_case_report(case_name))
show()


Cleaning up


In [13]:
#if remote_data:
#    #print 'Disconnecting from remote paraview server connection'
#    Disconnect()