FIELD_QUAD_BUMP Function

function FIELD_QUAD_BUMP(THETA, PHI) result(F)

Target field for Part B: an exact axisymmetric "quadrupole" toroidal background plus a broadband toroidal field built from applied to an equator-centered Gaussian bump generating function (see module docstring for the closed-form derivatives and why , not , is needed to force / to vanish exactly at both poles) -- purely toroidal by construction in both pieces.

Returns: The target vector field , complex 3-vector.

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: THETA

Colatitude in radians, .

real(kind=dp), intent(in) :: PHI

Longitude in radians, .

Return Value complex(kind=dp), DIMENSION(3)


Calls

proc~~field_quad_bump~~CallsGraph proc~field_quad_bump FIELD_QUAD_BUMP dcos dcos proc~field_quad_bump->dcos dexp dexp proc~field_quad_bump->dexp dsin dsin proc~field_quad_bump->dsin interface~pvsh_tor PVSH_TOR proc~field_quad_bump->interface~pvsh_tor proc~pvsh_tor_dp PVSH_TOR_DP interface~pvsh_tor->proc~pvsh_tor_dp proc~pvsh_tor_dp->dcos proc~pvsh_tor_dp->dsin interface~assoc_legendre_and_deriv ASSOC_LEGENDRE_AND_DERIV proc~pvsh_tor_dp->interface~assoc_legendre_and_deriv interface~log_fact LOG_FACT proc~pvsh_tor_dp->interface~log_fact proc~assoc_legendre_and_deriv_dp ASSOC_LEGENDRE_AND_DERIV_DP interface~assoc_legendre_and_deriv->proc~assoc_legendre_and_deriv_dp proc~log_fact_dp LOG_FACT_DP interface~log_fact->proc~log_fact_dp proc~assoc_legendre_and_deriv_dp->interface~log_fact

Called by

proc~~field_quad_bump~~CalledByGraph proc~field_quad_bump FIELD_QUAD_BUMP proc~run_part_b~2 RUN_PART_B proc~run_part_b~2->proc~field_quad_bump program~vsh_decomposition_tor VSH_DECOMPOSITION_TOR program~vsh_decomposition_tor->proc~run_part_b~2

Source Code

  FUNCTION FIELD_QUAD_BUMP(THETA, PHI) RESULT(F)
  IMPLICIT NONE
  REAL(KIND=dp), INTENT(IN) :: THETA
  REAL(KIND=dp), INTENT(IN) :: PHI
  COMPLEX(KIND=dp), DIMENSION(3) :: F
  REAL(KIND=dp) :: ENV, SIN2TH, B_THETA, B_PHI
  COMPLEX(KIND=dp), DIMENSION(3) :: QUAD

  QUAD = A_QUAD * PVSH_TOR(2, 0, THETA, PHI)

  ENV = DEXP(-(THETA-0.5d0*pi)**2/(2.d0*SIGMA_B**2))
  SIN2TH = DSIN(THETA)**2
  B_THETA = 0.5d0 * ENV * DSIN(THETA) * DSIN(PHI)
  B_PHI   = ENV * ( -((THETA-0.5d0*pi)/SIGMA_B**2)*SIN2TH + &
                     DSIN(2.d0*THETA) ) * (1.d0 + 0.5d0*DCOS(PHI))

  F(1) = QUAD(1)
  F(2) = QUAD(2) + DCMPLX(B_THETA, 0.d0)
  F(3) = QUAD(3) + DCMPLX(B_PHI, 0.d0)
  END FUNCTION FIELD_QUAD_BUMP