The Code-Bin
Links
Home
Add your code!
All Listings
About
Latest Entry
Featured Scripts
Author's Website
Latest Entries
FFMPEG Thumbnail Scr...
PHP, 0.8KB
Jul. 29, 10:24pm
John
Z80 Assembler, 190 bytes
Feb. 17, 3:36am
John
Z80 Assembler, 176 bytes
Sep. 13, 2:19am
John
Z80 Assembler, 77 bytes
Sep. 13, 2:18am
John
Z80 Assembler, 209 bytes
Sep. 13, 2:17am
rtkjr
Posted by: Jeremy | February 16, 2010 @ 12:18am
PHP Code
[
Download
]
c = 1; t = .12*c; delE = c/n; n = 2; Vinf = 1; (*Place points on airfoil*) Xfoil = Table[(i - .99)*c/n, {i, n}] Yfoil = Table[(t/ 0.2)*(0.2969*Sqrt[Xfoil[[i]]/c] - (0.126*Xfoil[[i]])/c - 0.3516*(Xfoil[[i]]/c)^2 + 0.2843*(Xfoil[[i]]/c)^3 - 0.1015*(Xfoil[[i]]/c)^4), {i, n}]; Ej = Table[(i - .5)*delE, {i, n}]; amatrix = Table[Table[(Yfoil[[i]]*delE)/((Xfoil[[i]] - Ej[[j]])^2 + Yfoil[[i]]^2), {i, n}], {j, n}]; xmatrix = LinearSolve[amatrix, (Yfoil*Vinf)]; psi = Vinf*y - Sum[((y*delE)*xmatrix[[j]])/((x - Ej[[j]])^2 + y^2), {j, 1, n}]; vi = D[psi, y] ; vj = D[-psi, x]; vxi = Table[[vi /. {x -> Xfoil[i], y -> Yfoil[i]}], {i, n}]; vyi = Table[[vj /. {x -> Xfoil[i], y -> Yfoil[i]}], {i, n}];
Syntax Highlighting
[
Open in new window
]
Author Comments
none
Rating
4.57 / 8
69 Votes
http://codebin.yi.org/507
page generated in 0.00 seconds