forked from goriccardo/bem2dlib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wing2d.py
executable file
·37 lines (32 loc) · 911 Bytes
/
wing2d.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/env python
# -*- coding: utf-8 -*-
def main():
from bempy2d import geomwing, geomwing, srfmatbc, bcondvel, solvephi, circlefld, \
calcphifld, fldmatbc, fldmatbcv, calcvelfld, fieldgrid
from numpy import array, zeros, savetxt, eye, linspace
from pylab import plot, show, grid
nelem = 50
chord = 1.5
thickness = 0.3
u = array([-1.,0.])
xysrf = zeros((nelem+1,2))
xnode = geomwing(nelem,chord,thickness)
xysrf[:nelem,:] = xnode[:,:2]
xysrf[nelem,:] = xnode[0,:2]
#print xysrf
plot(xysrf[:,0],xysrf[:,1])
xnode = geomwing(nelem,chord,thickness)
xysrf[:nelem,:] = xnode[:,:2]
xysrf[nelem,:] = xnode[0,:2]
#print xysrf
plot(xysrf[:,0],xysrf[:,1])
#B, C = srfmatbc(xnode)
#print C
#print B
#chisrf = bcondvel(xnode, u)
#phisrf = solvephi(B,C,chisrf,nelem)
#print phisrf
grid()
show()
if( __name__ == '__main__'):
main()