Explanation of 3D MHD Code 2003.11.04 by Tatsuki Ogino mearthd2 in MPI, which is used by the PRIMEPOWER HPC2500 3-dimensional MHD simulation code of whole magnetosphere by using the modified leap-frog method (complete 3D MHD code), which is used by the PRIMEPOWER HPC2500. mpiex24aa1.sh : Execution shell mpiex24aa2.sh : Execution shell using soft barrier of (-Lb 0 -lb 0) pexec24a1.out : Output result using 24 cpus progmpi24.f : (nx,ny,nz)=(250,158,158) Test program usinf small array progmpiy24.f : (nx,ny,nz)=(500,318,318) Test program progmpiz24.f : (nx,ny,nz)=(500,318,318) Stop of communication readme : Compile and execution readme1.txt : Explanation of 3D MHD code ----------------------------------------------------------------------- progmpiy24.f parameter (npe=24) : number of cpu All number of cpus needs to be changed including subroutines. Number of cpus can be changed together from npe=24 to npe=32 by vi editor. parameter (nx=500,ny=318,nz=318,nxp=150) ¡¡npe=24 : number of cpu (nx,ny,nz)=(500,318,318) : grid number without boundary nxp=150 : parameter to determine earth position last=8 : number of time steps iiq0=1 : a unit of modified leap-frog scheme iip0= 1 : adjust upstream boundary condition iis0= 2 : sampling step of data thx= 2.0844451 : parameter to adjust time step (xl,yl,zl)=(150.3,90.3,90.3)Re : length in each direction hx=xl/float(nx+1)=0.3Re : grid interval in x direction hy=yl/float(ny+1)=0.3Re : grid interval in y direction hz=zl/float(nz+1)=0.3Re : grid interval in z direction t=0.5*hx*thx : time interval x=0.5*hx*float(2*i-nx2-1+2*nxp) : x position versus grid number y=0.5*hy*float(2*j-3) : y position versus grid number z=0.5*hz*float(2*k-3) : z position versus grid number where nx2=nx+2, ny2=ny+2 and nz2=nz+2 ro01=5.0E-4 (5/cc) : mass density of solar wind pr01=3.56E-8 : pressure of solar wind vsw=0.044 (300km/s) : speed of solar wind bis=CP(11)=1.5E-4 (5nT) : amplitude of IMF eatt : resistivity rmuu : viscosity eud0 : friction or collision term 4-dimensional array variable f(i,j,k,m) i=[1,nx2], j=[1,ny2], k=[1,nz2], m=[1,nb] nb=8 m=1 : rho, plasma density m=2 : Vx m=3 : Vy m=4 : Vz m=5 : P, plasma pressure m=6 : Bx m=7 : By m=8 : Bz ----------------------------------------------------------------------- pexec24a1.out : Output file using 24 cpus (nx,ny,nz)=(500,318,318) 1 8 500 318 318 2 1.068e+09 0.00000 9.92992 9.95051 9.92992 4 1.068e+09 9.95051 19.90325 19.91234 9.95274 6 1.068e+09 19.91234 29.86222 29.87142 9.94988 8 1.068e+09 29.87142 39.82384 39.83285 9.95242 The above table shows that it takes t=9.92992 - 9.95242 sec in the right column to proceed two time steps by using 3D MHD code (progmpiy24.f). -----------------------------------------------------------------------