surfaces Module

Contains the routines that handle reflection, and refraction via the Fresnel equations.



Functions

private function fresnel(I, N, n1, n2) result(tir)

calculates the fresnel coefficents

Arguments

Type IntentOptional Attributes Name
type(vector), intent(in) :: I

incident vector

type(vector), intent(in) :: N

Normal vector

real(kind=wp), intent(in) :: n1

reffractive indicies

real(kind=wp), intent(in) :: n2

reffractive indicies

Return Value real(kind=wp)


Subroutines

private subroutine reflect(I, N)

get vector of reflected photon

Arguments

Type IntentOptional Attributes Name
type(vector), intent(inout) :: I

incident vector

type(vector), intent(in) :: N

normal vector

public subroutine reflect_refract(I, N, n1, n2, rflag, Ri)

wrapper routine for fresnel calculation

Arguments

Type IntentOptional Attributes Name
type(vector), intent(inout) :: I

incident vector

type(vector), intent(inout) :: N

normal vector

real(kind=wp), intent(in) :: n1

refractive indices

real(kind=wp), intent(in) :: n2

refractive indices

logical, intent(out) :: rflag

reflection flag

real(kind=wp), intent(out) :: Ri

private subroutine refract(I, N, eta)

get vector of refracted photon

Arguments

Type IntentOptional Attributes Name
type(vector), intent(inout) :: I

incident vector

type(vector), intent(in) :: N

normal vector

real(kind=wp), intent(in) :: eta