AnalyticCosh Subroutine

public subroutine AnalyticCosh(x, t, c, cimag, gradc, crr, crz, czz, rho)

Arguments

Type IntentOptional Attributes Name
real(kind=8), intent(in) :: x(2)
real(kind=8), intent(in) :: t(2)
real(kind=8), intent(out) :: c
real(kind=8), intent(out) :: cimag
real(kind=8), intent(out) :: gradc(2)
real(kind=8), intent(out) :: crr
real(kind=8), intent(out) :: crz
real(kind=8), intent(out) :: czz
real(kind=8), intent(out) :: rho

Source Code

  SUBROUTINE AnalyticCosh( x, t, c, cimag, gradc, crr, crz, czz, rho )

    REAL (KIND=8), INTENT( IN  ) :: x( 2 )
    REAL (KIND=8), INTENT( IN  ) :: t( 2 )   ! ray tangent; for edge cases of updating segments
    REAL (KIND=8), INTENT( OUT ) :: c, cimag, gradc( 2 ), crr, crz, czz, rho
    REAL (KIND=8)                :: cr, cz, A, B, D, z

    iSegz = 1
    rho   = 1.0

    D = 3000.0
    z = x( 2 )

    A = 1500.0
    B = 0.0003
    D = 1500.0

    c   =         A * COSH( B * ( Z - D ) )
    cz  =     B * A * SINH( B * ( Z - D ) )
    czz = B * B * A * COSH( B * ( Z - D ) )

    cimag = 0.

    cr = 0.0
    gradc = [ cr, cz ]
    crz = 0.0
    crr = 0.0

    RETURN
  END SUBROUTINE AnalyticCosh