phim_func Subroutine

private subroutine phim_func(z, L, phim, phim_i)

Arguments

Type IntentOptional Attributes Name
real, intent(in) :: z
real, intent(in) :: L
real, intent(out) :: phim
real, intent(out) :: phim_i

Called by

proc~~phim_func~~CalledByGraph proc~phim_func phim_func proc~u_profile_val_func u_profile_val_func proc~u_profile_val_func->proc~phim_func

Source Code

    subroutine phim_func(z,L,phim,phim_i)

        implicit none

        real, intent(in) :: z,L
        real, intent(out) :: phim,phim_i
        real a,b,p,pi
        parameter (a=16.,b=5.,p=-0.25,pi=3.141592653589793)
        real eps

        eps=z/L

        if (eps.ge.0) then
            phim=1.+b*eps
            phim_i=-b*eps
        else
            phim=exp(p*log((1.-a*eps)))
            phim_i=2.*log((1.+1./phim)/2.)+log((1.+1./(phim*phim))/2.)-2.*atan(1./phim)+pi/2.
        endif

    end subroutine phim_func