Skip to content
This repository has been archived by the owner on May 11, 2021. It is now read-only.

2D Orszag Tang Vortex

Kengo TOMIDA edited this page Mar 21, 2016 · 15 revisions

Let us move onto multi-dimensional problems. Here we take the Orszag-Tang Vortex as a standard MHD test problem. To run this problem, follow these steps.

1. Configure and build the code

First, move into the code root directory.

> python configure.py --prob orszag_tang -b --flux hlld
Your Athena++ distribution has now been configured with the following options:
  Problem generator:       orszag_tang
  Coordinate system:       cartesian
  Equation of state:       adiabatic
  Riemann solver:          hlld
  Reconstruction method:   plm
  Hydro integrator:        vl2
  Magnetic fields:         ON
  Special relativity:      OFF
  General relativity:      OFF
  Frame transformations:   OFF
  Viscosity:               OFF
  Compiler and flags:      g++  -O3
  Debug flags:             OFF
  Linker flags:
  MPI parallelism:         OFF
  OpenMP parallelism:      OFF
  HDF5 Output:             OFF
  Internal hydro outvars:  0
> make clean
> make

2. Move into a working directory and copy the sample input file

> cd ~/work
> cp ~/athena/inputs/mhd/athinput.orszag_tang .

3. Run the simulation

> ~/athena/bin/athena -i athinput.orszag-tang
RootGrid = 1 x 1 x 1
MeshBlock 0, rank = 0, lx1 = 0, lx2 = 0, lx3 = 0, level = 0
is=2 ie=201 x1min=0 x1max=1
js=2 je=201 x2min=0 x2max=1
ks=0 ke=0 x3min=-0.5 x3max=0.5

Setup complete, entering main loop...

cycle=0 time=0.00000000000000e+00 dt=9.03105842872373e-04
cycle=1 time=9.03105842872373e-04 dt=9.02542136923221e-04
...
cycle=1349 time=1.00000000000000e+00 dt=7.14611252872963e-04

Terminating on time limit
time=1.00000000000000e+00 cycle=1349
tlim=1.00000000000000e+00 nlim=-1

cpu time used  = 9.56800003051758e+01
zone-cycles/cpu_second = 5.63963187500000e+05

When it finishes, the code should have produced a large number of VTK output files.

4. Visualize and analyze the results You can use your favorite visualization software that can read VTK files, but here we explain how to visualize the data using VisIt (2.10). For details, see also Analysis Tools.

4.1. Open the files with VisIt

When launched, VisIt opens two windows, one for control and the other for output. First, clock the Open button on the control window.

Clone this wiki locally