Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

How to write out the namelist yourself.

It is reccomended taht that you have access to JOREK repository. This way, you are sure that you are using the latest version of the code and namelist. Furthermore, it allows you to test for different models easily yourself (the namelists of the models are not exactly identical).

...

===== - Running a simple test case =====

In this tutorial we We will run a very simple test case: a **tearing mode in a large aspect-ratio circular plasma**. You will have to find your own way of how to structure directories for your simulations. For this tutorial we assume you have created the following directory structure with the source code and the ''Makefile.inc'' prepared (e.g., in your Marconi home folder):
<code>
  according to the instructions section 1.2:

Code Block
  2018-04-first-jorek-runs/

...


    jorek.git/                  # the source code

...


    intear_ntor3/               # run directory

To write out the namelist, you need to add right before the endif in line 193 of in models/model199/initialise_parameters.f90 the following three lines:

   open(42, file='out.nml', status='replace', action='write')

   write(42,in1)

   close(42)

Same for the other models although the line number may change. </code>


First, we compile the code with appropriate settings for the test case:<code bash>

Code Block
  cd jorek.git/

...


  ./util/config.sh model=199 n_tor=3 n_period=1 n_plane=4     # run with toroidal mode numbers n=0,1

...


  make clean

...


  make -j 8

...


  make -j 8 jorek2vtk jorek2_postproc


</code>Then, we copy the compiled binaries and the input file for the test case into the run directory (the input file ''intear'' contains the information necessary to run our test case, more information about the namelist input files is given further below):<code bash>

Code Block
  cp jorek_model199 jorek2vtk jorek2_postproc namelist/model199/intear ../intear_ntor3

...


  cd ../intear_ntor3

...


Now, open with your favorite editor the file ''intear'', which contains the description of the test case to be simulated. Many things here will not immediately be self-explanatory of course. The only thing we do now is to change the settings for the time stepping by setting
<code>
  tstep = 3000.
  nstep = 50
</code>

...