Skip to content

calc_bgreens.m

Basic Information

  SYNTAX: [Br,Bz,dBrdr,dBrdz,dBzdr,dBzdz] = calc_bgreens(ra,rb,za,zb,k,Ek,Kk)

  PURPOSE:  Calculate Br, Bz green functions with the option of using already
  computed elliptic integrals.
    [Kk,Ek]=ellipke(m)
       k=sqrt(m);
  where
    m=((rb+ra).^2 - (rb-ra).^2)./((rb+ra).^2 + (za-zb).^2);

  INPUT:
    ra = radius of source element (m)
    rb = radius of measurement point (m)
    za = z position of source element (m)
    zb = z position of measurement point (m)
    k = parameter that is argument to elliptic integrals (optional)
    Ek = calculated value of elliptic integral E(k) (optional)
    Kk = calculated value of elliptic integral K(k)  (optional)
   All inputs must be same size (scalars, vectors, or matrices).
   If k,Ek,Kk not specified, they are computed here.

  OUTPUT:
    Br = radial field at measurement point due to current in filament
        at source location
    Bz = vertical field at measurement point due to current in filament
        at source location
       dBrdr = derivative of Br w.r.t. rb at measurement point
       dBrdz = derivative of Br w.r.t. zb at measurement point
       dBzdr = derivative of Bz w.r.t. rb at measurement point
       dBzdz = derivative of Bz w.r.t. zb at measurement point

  RESTRICTIONS: This is a "filament-to-filament" calculation and is not correct
  for distributed current sources.  The filament calculation is singular for
  "point b" equal to "point a".

Dependencies