European Space Agency

European Space Agency

Royal Belgian Institute for Aeronomy

Royal Belgian Institute for Aeronomy

../_images/whiteSpace.png

uf423 - Runge Kutta step

subroutine  uf423(scale, rc, pb, palt, ifail)
Parameters:
  • scale [real8,in]

  • rc [real8,in/out]

  • pb [real8,out]

  • palt [real8,out]

  • ifail [integer4,out] :: error flag (see Diagnostics)

Description

The subroutine uf423() carries out a Runge-Kutta step along a magnetic field line. The initial conditions and results of the Runge-Kutta step are stored in the common block uc170. The index kgp of this common block defines the starting point. The step size is proportional to the radius of curvature rc and to the scale factor scale, with a possible correction to comply with a minimum and maximum value. The arguments prop, stpmin and stepx of the common block uc190 define the factor of proportionality, the minimum and the maximum of the step size, respectively.

Note that the argument rc is re-evaluated for the next step.

The subroutine uses the Gill’s method to apply a fourth-order Runge-Kutta step. When the subroutine returns the error flag ifail equal to -42305 or -42306, it has correctly applied the Runge-Kutta step, but possible causes of uncertainties have been detected.

The table below indicates in which way the arguments of the common block uc170 are used.

Note

Note that when the subroutines succeeds, the index kgp is increased by 1.

mele(kgp).beg.coord

input

geographic location of the starting point

mele(kgp).beg.b

input

magnetic vector at the starting point

mele(kgp).arcl

input

arc length to the starting point

mele(kgp).beg.rcurv

output

Radius of curvature at the starting point

mele(kgp).rkstp

output

intermediate points of Runge-Kutta step

mele(kgp+1).beg.coord

output

geographic location of the next point

mele(kgp+1).beg.b

output

magnetic vector at the next point

mele(kgp+1).arcl

output

arc length to the next point

References

  • Davis, P.J. and Polonsky, I.,Numerical interpolation, differentiation and integration, in Handbook of Mathematical Functions, edited by Abramowitz, M. and Stegun, I.A., 875

  • Gill, S., A process for the step-by-step integration of differential equations in an automatic digital computing machine, Proceedings of the Cambridge philosophical society 47 (1951) 96-108

History

  • The error codes -42304 to -42306 are not generated in version 2.02 ans earlier.

Diagnostics

  • -42301, no more place in the common block uc170

  • -42302, too small value of the scale argument

  • -42303, too large value of the scale argument

  • -42304, uncertainties on the magnetic field vector evaluation (see error flag -53004 of subroutine um530())

  • -42305, uncertainties on the magnetic field vector evaluation (see error flag -53002 or -53003 of subroutine um530())

  • -42306, uncertainties on the validity of the Runge Kunta step

Common Blocks

Dependencies

Called by

Calls

See also

None

Reported Bugs

None

Examples

None


UNILIB/tags/v3.02