Air-Water Interaction

LightMC.setwave!Method
setwave!(η::Array{<:Float64,2},ηx::Array{<:Float64,2},ηy::Array{<:Float64,2},rms::Float64,p::Param)

Giving the value to the existed wave surface distribution grid

Arguments

  • η::Array{<:Float64,2}: water surface elevation.
  • ηx::Array{<:Float64,2}: partial derivative of water surface elevation in x direction.
  • ηy::Array{<:Float64,2}: partial derivative of water surface elevation in y direction.
  • rms::Float64: random number.
  • p::Param: simulation parameters.
source

Importing water surface distribution data

LightMC.readdataMethod
readdata(datdir::String,fname::String,n::Tuple{<:Int64,<:Int64},pexy::Tuple{<:Float64,<:Float64})

Reading the wave surface distribution data (surface elevation η and partial derivative of it in x and y ηx and ηy) from the .h5 file, given the directory datdir and the file name fname

source
LightMC.convertwave!Function
convertwave!(η, ηx, ηy, η0, ηx0, ηy0, kbc)

Convert the surface wave geometry η0',ηx0', ηy0' toη', ηx',ηy' with the same size as irradiance field. Can be used for nonperiodic BCkbc=1' (no interpolation) or periodic BCkbc=0' (interpolation using FFT)

source

Refraction

LightMC.phasePetzoldMethod
phasePetzold()

return 2 arrays: ϕps and θps.

When ϕps is the cumulation distribution of scattering angle and θps is the angle between new trajectory and the direction of the photon before scattering corresponding to each ϕps.

source
LightMC.interface!Method
interface!(xpb::Array{<:Float64,2},ypb::Array{<:Float64,2},zpb::Array{<:Float64,2},
                θ::Array{<:Float64,2},ϕ::Array{<:Float64,2},fres::Array{<:Float64,2},
                η::Array{<:Float64,2},ηx::Array{<:Float64,2},ηy::Array{<:Float64,2},p::Param)

Calculate the reflection and refraction of the photon or light ray that transmit from the atmosphere to the water.

Arguments

  • xpb::Array{<:Float64,2}: initial x coordination of the photon.
  • ypb::Array{<:Float64,2}: initial y coordination of the photon.
  • zpb::Array{<:Float64,2}: initial z coordination of the photon.
  • θ::Array{<:Float64,2}: angle of the light ray relative to the z axis: polar angle.
  • ϕ::Array{<:Float64,2}: angle of the light ray relative to the x axis: azimuthal angle.
  • fres::Array{<:Float64,2}: fresnel coefficient or fractional transmission for unpolarized light
  • η::Array{<:Float64,2}: water surface elevation.
  • ηx::Array{<:Float64,2}: partial derivative of water surface elevation in x direction.
  • ηy::Array{<:Float64,2}: partial derivative of water surface elevation in y direction.
  • p::Param: simulation parameters.
source