Directory:
    ${PENCIL_HOME}/samples/kin-dynamo
SVN Id:
    $Id$
Maintainer:
    Axel Brandenburg <brandenb/nordita[dot]dk>
Added:
    23-Apr-2004
Status:
    succeeds since 31 Jan 2009 (in this form)
Recommended resolution:
    32x32x32 for eta=0.1 is fine.
    At 16x16x16, eta_crit=0.1814, i.e. Rm_crit=5.514
Comments:
    This is a simulation of a Roberts flow dynamo. For a description
    see Sect. 4.2.2 of Brandenburg & Subramanian (2005).
References:
    Brandenburg, A., & Subramanian, K.: 2005, ``Astrophysical magnetic
    fields and nonlinear dynamo theory,'' Phys. Rep. 417, 1-209
History:
    Until 8-aug-10, we used to have lbidiagonal_derij=F, which means 
    that the much cheaper bi-diagonal scheme (which is the default since
    revision r8029 of 29-aug-2007 was *not* used. This is discussed in 
    detail in the manual on page 127 (formerly page 100), see Fig.20
    (former Fig.15).
Notes:
    To simplify the input of in this sample, the specification of
    the input parameters cdt=0.4, cdtv=0.4, will be dropped in the
    future. The default is cdtv=0.25, so the result would change.

Appendix:
=========
Convergence experience (23-mar-08):

For Roberts flow with positive helicity, 
 8^3, eta1=5.10, lam=-0.0028
      eta1=5.15, lam=+2.76e-5
      eta1=5.149, lam=-2.79e-05
      eta1=5.1495

16^3, eta1=5.60, lam=0.003437430  
      eta1=5.56, lam=0.001851108
      eta1=5.52, lam=0.000238567
      eta1=5.514, lam=-5.2561e-06
      eta1=5.5141, lam=0

32^3, eta1=5.56, lam=0.000912429
      eta1=5.53, lam=0.00033877
      eta1=5.512, lam=-0.000383483
      eta1=5.522, lam=1.7171948e-05
      eta1=5.5216, lam=0
      eta=0.181, lam=8.69488e-05

So the 16^3 run with 6th order derivatives is accurate within 0.14%.
and the 8^3 run is accurate within 6.7%.

8th-order
 8^3, eta1=5.17, lam=+0.0003
      eta1=5.15, lam=-0.0008
      eta1=5.1646, lam=4.66e-07

16^3, eta1=5.52, lam=+6.1e-5
      eta1=5.518, lam=-1.7888447e-05
      eta1=5.5186, lam=6.4607785e-06
      eta1=5.51844, lam=0

32^3, eta1=5.52, lam=-5.6851997e-05
      eta1=5.521, lam=-1.6209860e-05
      eta1=5.5214, lam=0.

So the 16^3 run with 8th order derivatives is accurate to 0.05%.
and the 8^3 run is accurate within 6.5%.

2nd-oder
 8^3, eta1=5.1646, lam=-0.0032828332
      eta1=5.23, lam=0.00018166056
      eta1=5.22797, lam=7.3477581e-05
      eta1=5.22658, lam=1e-17

16^3, eta1=5.5, lam=-0.0007099
      eta1=5.52, lam=0.00010496959
      eta1=5.5174, lam=7e-17

32^3, eta1=5.52, lam=-8.8257953e-05
      eta1=5.54, lam=0.000713429
      eta1=5.522, lam=0

So the 16^3 run with 2nd order derivatives is accurate to 0.07%.
and the 8^3 run is accurate within 5.6%.

10th-order
 8^3, eta1=5.150, lam=-0.00108046 (with default dt=0.215)
      eta1=5.170, lam=-1.13033e-07
                  lam=+2.02479e-09
      eta1=5.171, lam=+5.34595e-05
                  lam=+5.34138e-05

16^3, eta1=5.522, lam=7.01168e-05
      eta1=5.521, lam=3.03772e-05
      eta1=5.520, lam=-9.90466e-06
      eta1=5.52025, lam=-3.77597e-07
      eta1=5.5203, lam=6.19646e-07 (with cdtv=.1)
      eta1=5.5203, lam=1.79842e-06 (with cdtv=.3)

32^3, eta1=5.52, lam=-6.41440e-05 (with default dt=0.017)
      eta1=5.521, lam=-2.47367e-05
      eta1=5.522, lam=1.56453e-05
      eta1=5.5216, lam=0 (interpolated)

10th order, 32^3 (repeated: 14-aug-2016)
  eta1=6.60000  lam=+0.0364076
  eta1=5.60000  lam=+0.0030368
  eta1=5.52200  lam=+0.0000239
  eta1=5.52138  lam=-0.0000083
->     5.52154  (interpolated)

Timing results:
 2nd order derivative: 0.60 us/pt/step
 6th order derivative: 0.77 us/pt/step
 8th order derivative: 0.88 us/pt/step
10th order derivative: 0.97 us/pt/step

Summary:
for 32^3:
10th order: eta1=5.52154
 8th order: eta1=5.5214
 6th order: eta1=5.5216
 2nd order: eta1=5.522

