14. 円筒座標系3次元ベクトルデータを用いた3次元流線図



ソースプログラム(Fortran 90,自動倍精度利用)
!********************************************* ! 3D Graphic Sample No. 9 * ! 3D Flow Lines using Cylindrical Data * !********************************************* program gsample14 implicit none real, parameter :: pi = 3.141592653589793 integer, parameter :: ifmax = 31, itmax= 10, imax = 20, jmax = 50 integer, parameter :: nmax0 = 5000 real xx(nmax0),yy(nmax0),zz(nmax0) real br(0:imax,0:jmax),bt(0:imax,0:jmax),bz(0:imax,0:jmax) real f(0:imax,0:jmax),om,r,z,dr,dz real rmin,rmax,ymin,ymax,zmin,zmax integer i,j,nmax rmax = 0.25*imax rmin = -rmax ymax = rmax ymin = -ymax zmin = 0 zmax = 10 om = -5 call fr_ginit call fr_opencanvas(1,'gsample14',101) call fr_project(5.0,1) call fr_angle3d(30.0,-60.0) call fr_aspect3d(1.0,1.0,1.0,0) call fr_frame3d(rmin,rmax,ymin,ymax,zmin,zmax,3) call fr_xyzname('x-ax','y-ax','z-ax') dr = rmax/imax dz = (zmax-zmin)/jmax do j = 0, jmax z = dz*j+zmin do i = 0, imax r = dr*i f(i,j) = exp(-0.3*((r-2)**2+(z-zmax/2)**2)) br(i,j) = 0 bt(i,j) = r*om*f(i,j) bz(i,j) = 1 enddo enddo call fr_setgeometry(2) dr = rmax/(itmax+1) do i = 1, itmax r = dr*i xx(1) = r yy(1) = 0 zz(1) = zmin+0.1 nmax = nmax0 call fr_flow3dline(xx,yy,zz,nmax,br,bt,bz,imax+1,1,jmax+1,5,1.d-7,3) enddo call fr_set3dbox(0.0,rmax,ymin,ymax,zmin,zmax,0) call fr_contour3d(f,imax+1,1,jmax+1,0.0,20,-2,0) call fr_set3dbox(0.0,-rmax,ymin,ymax,zmin,zmax,0) call fr_contour3d(f,imax+1,1,jmax+1,0.0,20,-3,0) call fr_clip3d(rmin,rmax,0.0,ymax,zmin,zmax,-2) do i = 1, itmax r = dr*i xx(1) = r yy(1) = 0 zz(1) = zmin+0.1 nmax = nmax0 call fr_flow3dline(xx,yy,zz,nmax,br,bt,bz,imax+1,1,jmax+1,5,1.d-7,3) enddo call fr_gend end program gsample14


Copyright (C) Toshihiro Taguchi, Setsunan University, 2000-2012 All rights reserved.