Example:
Three-Dimensional Visualization of Data Calculated From Simulation


  We show how to visualize some data calculated from simulation.
In this example, we firstly output the data as a temporary file. Then, we visualize them.
Here, the format of this temporary file is the same with simulation data that we normally use.
With this method, we can use the same programs in making VRML files.

  Simulation data has eight components of variables. These are written as follows:

From these parameters, we can calculate the electric field, E = -VB + J, and the plasma vorticity, = rotV, where J = rotB the current density, and the electric resistivity.

  In this example, we try to visualize E and classified by three directions.
At first, we introduce a rectangular coordinate system (a, b, c) on each of lattice points, where a = JB/|JB|, b = B/|B| and c = ab.
Then, we calculate 6 parameters written below:


  Thus we try to visualize these characteristic parameters and these computations are done with Fortran 90 programs.

<==making temporary file==>
main program: main.f90
subroutine package: subs.f90
setting file:constants.f90

 1. f90 -O constants.f90 subs.f90 main.f90 -Mdir
 2. a.out : temporary file is written

Input variable(constants.f90):
  readname: input filename
  writename: output filename
  delta: mesh size[Re]
  eta: resistivity
  mx/my/mz: data number without edge points of the x/y/z direction,
            so (mx+2)/(my+2)/(mz+2) is the size of array.
<==making VRML file==>
main program: zvrmpx.f
subroutine package: zvrsub.f

 1. frt -c -O zvrsub.f
 2. frt -O zvrmpx.f zvrsub.o
 3. a.out : VRML file (fort.10) is written

Main using subroutine ( refer to 3-1 ): pixel1(nx,ny,xb,yb,xl,yl,ipx0,ico,icc,zcc,vmin,vmax,tra,u)

Input variable(zvrmpx.f):
  NX/NY/NZ: data number of the x/y/z direction
  tra: transparency of pixel images
  ipnzx/ipnyz/ipnxy: Number of zx/yz/xy planes
  myouso: choice of visualizing parameter
    (1 : Ea  2 : Eb  3 : Ecvb  4 : Ecj  5 : omega parallel  6 : omega perpendicular)

Example : eb1.gif (made from eb1.wrl)
Synthesis image with multiple planes in three directions

Example 2 : eb2.gif (made from eb.wrl)
Synthesis of eb1.wrl and magnetic field lines ( refer to 3-2 )

return to file list (English)
return to file list (Japanese)