findY Subroutine

public subroutine findY(tpoint, Ypoint, fl)

Arguments

Type IntentOptional Attributes Name
double precision, intent(in) :: tpoint
double precision, intent(out) :: Ypoint
type(rc_fluid), intent(in) :: fl

Called by

proc~~findy~2~~CalledByGraph proc~findy~2 findY proc~cool_exact~2 cool_exact proc~cool_exact~2->proc~findy~2 proc~getvar_cooling_exact~2 getvar_cooling_exact proc~getvar_cooling_exact~2->proc~findy~2 proc~radiative_cooling_add_source~2 radiative_cooling_add_source proc~radiative_cooling_add_source~2->proc~cool_exact~2

Source Code

    subroutine findY (tpoint,Ypoint,fl)
    !  Fast search option to find correct point in cooling time (TEF)
      

      double precision,intent(IN)   :: tpoint
      double precision, intent(OUT) :: Ypoint
      type(rc_fluid), intent(in) :: fl

      double precision :: lgtp
      double precision :: y_extra,factor
      integer :: jl,jc,jh,i

      lgtp = dlog10(tpoint)
      jl = int((lgtp - fl%lgtcoolmin) / fl%lgstep) + 1
      Ypoint = fl%Yc(jl)+ (tpoint-fl%tcool(jl)) &
                * (fl%Yc(jl+1)-fl%Yc(jl)) &
                / (fl%tcool(jl+1)-fl%tcool(jl))

    end subroutine findY