simulating a jet like feature.... [message #81035] |
Wed, 01 August 2012 10:06 |
K.Chandrashekhar Redd
Messages: 2 Registered: August 2012
|
Junior Member |
|
|
Hi, I would like to simulate a jet. Its nothing but a column in a image to start with. And then I wan the column to move in transverse direction. this is also simple. I have created set of images that move transversely. now I want the jet show kink oscillations. that is instead of simple column like, now I want it to look like sin curve with width. and frequency of which should be changeable. and then this jet moving transversely.
I tried to simulate the above mentioned jet but getting sin like curve on image and with changing frequency is beyond my doing. I am attaching the programme I have written for the same. In the program second part is just observing the transverse motion of the jet with time..
If any of you have done similar thing earlier or have suggestion please write ASAP
thanking you in advance.....
npx=600
npy=300
npt=100
im=fltarr(npx,npy,npt)
for k=0,npy-1 do begin
for j=0,npt-1 do begin
im[149+(k mod 50)-j:179+(k mod 50)-j,k,j]=25.
endfor
endfor
help,im
window,0
!p.multi=[0,1,2]
plot_image,reform(im(*,*,10))
plot_image,reform(im(*,*,99))
!p.multi=0
;SECOND PART
tmp=im[*,*,*]
nf=n_elements(tmp[0,0,*])
x1=50.
x2=200.
y1=100.
y2=100.
dy=abs(y2-y1)
dx=abs(x2-x1)
dd=sqrt(dy^2+dx^2)
;for calculating xt-values
if x1 lt x2 then xx=x1 else xx=x2
if y1 lt y2 then yy=y1 else yy=y2
if abs(x1-x2) lt 75 and abs(y1-y2) lt 75 then np=100 else np=151
x=fltarr(np)
y=fltarr(np)
for i=0,np-1 do begin
x[i]=xx+(abs(x1-x2)/np)*i
y[i]=yy+(abs(y1-y2)/np)*i
endfor
if x1 gt x2 then x=reverse(x)
if y1 gt y2 then y=reverse(y)
xt=fltarr(nf,np)
int=fltarr(np)
for j=0,nf-1 do begin
for k=1,np-2 do begin
int[k]=total(tmp[x[k]-5:x[k]+5,y[k],j],1)
endfor
if y1 gt y2 then int=reverse(int)
xt[j,*]=int
endfor
window,2
plot_image,xt
end
|
|
|