Model Setup
Input Variable
LightMC.writeparams — Functionwriteparams(data::Dict,fname="light.yml"::String)Replace the data in the yml file fname to the new dictionarydata`.
If fname is unspecified, use light.yml as the default file name.
# irradiance
nz = 200
dz = 1
nxe = 512
nye = 512
num = 31
ztop = 10
# photon
nphoton = 100000
kr = 10
nxp = 512
kbc = 0
b = 0.006
nyp = 512
a = 0.007
# wave
pey = 0.07853981633974483
nxeta = 512
nyeta = 512
pex = 0.07853981633974483
data=Dict("irradiance"=>Dict("nxe"=>nxe,"nye"=>nye,"nz"=>nz,"dz"=>dz,"ztop"=>ztop,"num"=>num),
"wave"=>Dict("pex"=>pex,"pey"=>pey,"nxeta"=>nxeta,"nyeta"=>nyeta),
"photon"=>Dict("nxp"=>nxp,"nyp"=>nyp,"nphoton"=>nphoton,"a"=>a,"b"=>b,"kr"=>kr,"kbc"=>kbc))Dict{String, Dict{String}} with 3 entries:
"irradiance" => Dict("nz"=>200, "dz"=>1, "nxe"=>512, "nye"=>512, "num"=>31, "…
"photon" => Dict{String, Real}("nphoton"=>100000, "kr"=>10, "nxp"=>512, "…
"wave" => Dict{String, Real}("pey"=>0.0785398, "nxeta"=>512, "nyeta"=>5…Simulation Parameters
LightMC.readparams — Functionreadparams(fname="light.yml")Read parameters from yml file fname.
If fname is unspecified, use light.yml as the default file name.
LightMC.Param — Typestruct ParamAll the Parameters and their attributes that will be used in the simulation
nx::Int64: nx = nxe+1 , nxe is the number of energy grid that we will calculate for the energy in x directionny::Int64: ny = nye+1 , nye is the number of energy grid that we will calculate for the energy in y directionnxe::Int64: number of energy grid that we will calculate for the energy in x directionnye::Int64: number of energy grid that we will calculate for the energy in y directionnum::Int64: constant always set at 31 based on Measurement from Kirk, 1981 (The number of angle measurement in Kirk paper)nz::Int64: number of the layer beneath the sea surface (in z direction) that we will calculate for the irradiance energyx::Vector{Float64}: array of all the x corrdinationy::Vector{Float64}: array of all the y cooradinationz::Vector{Float64}: array of all the z coordinationpex::Float64: pex is being used in function pdfx or the function to calculate the partial derivative of the surface elevation in x directionpey::Float64: pey is being used in function pdfx or the function to calculate the partial derivative of the surface elevation in y directiondx::Float64: the distance between each grid point in x directiondy::Float64: the distance between each grid point in y directiondz::Float64: height difference between each layer that we calculate for the irradiance energy (nz)ztop::Float64: the maximum height above the water surfacexmin::Float64: minimum x value (always set to 0)xmax::Float64: maximum x value equal to multiplication between total number of grid point (nxe) and the distance between each grid point (dx) in x directionymin::Float64: minimum y value (always set to 0)ymax::Float64: maximum y value equal to multiplication between total number of grid point (nye) and the distance between each grid point (dy) in y directionxl::Float64: difference between the maximum and minimum value in x directionyl::Float64: difference between the maximum and minimum value in y directionnxs::Int64: nxs=nxη+1nys::Int64: nys=nyη+1nxη::Int64: same as nxeta value in the light.yml file: the number of wave grid point in x directionnyη::Int64: same as nyeta value in the light.yml file: the number of wave grid point in y directionnxp::Int64: number of grid in x direction that the photon will be emittednyp::Int64: number of grid in y direction that the photon will be emittednphoton::Int64: number of photon emittedkbc::Int64: setting the mode of boundary condition:kbc=1(no interpolation) or periodic BCkbc=0(interpolation using FFT)a::Float64: absortance coefficientb::Float64: scattering coefficientkr::Float64: the multiple of sphere detector radius to dz (not being used anywhere in the code)ddx::Float64: the distance difference in x direction in which we will emit the photon (total length of physical grid xl devided by total number of photon grid nxp)ddy::Float64: the distance difference in y direction in which we will emit the photon (total length of physical grid yl devided by total number of photon grid nyp)