Absorb {MCBackscattering} | R Documentation |
Absorbtion of Single Photon Energy in Media
Description
This function calculates how photon energy decreases during interaction with media.
Usage
Absorb(myObject)
Arguments
myObject |
The mandatory parameter of this function is the MCBS class created by |
Details
The Absorb
function, alias Absorb.MCBS
, calculates the new energy level after interaction event in the media. If photon energy falls below 0.001, a roulette algorithm makes decision when photon has 10% chance to survive with higher energy and 90% chance to loose all energy. Please keep in mind, that photons start with weight = 1
but the first interaction happens at boundary, where photons enter the media.
Value
The Absorb
function returns an MCBS object as class
. Typically the same object is used in argument and result.
One parameter of a single photon is updated in this procedure:
weight |
photon energy. Its initial value is 1 and decrease according to the albedo. |
Note
Please note that this function is designed to be used in Simulation
function. You may use it separately in case you design your own procedure. In such a case, please note that function Randomize
prepares trajectory data for each photon and iterations are done using move index myObject$midx
. Function Absorb
uses random data in roulette algorithm to make decision about photon survival at low energy level.
See Also
MCBS
for construction of object with initial input parameters.
Simulation
for running the simulation with adjusted parameters.
Chart
for plot of calculated photon flux profile.
Export
for export of photon flux with corresponding radii.
Setup
for initial computation of specular reflection and transport albedo.
Launch
for start position of single photon and initial direction in media.
Bounce
for interaction with surface and computation of photon flux leaving media.
Move
for moving single photon forward.
Scatter
for single photon scattering interaction with media.
Randomize
for adjustment of random trajectory vectors.
Examples
## Apple simulation data according to Qin and Lu (2006).
## DOI: 10.13031/2013.20862
# create object
cfgMedia <- c(0.63,30,0,1.4)
cfgSimulation <- c(1e6,0.05,1e-9,3,0.012)
apple <- MCBS(cfgMedia,cfgSimulation)
apple <- Setup(apple)
apple <- Randomize(apple)
# launch with 10° incident angle and move first photon
apple$idx <- 1
apple <- Launch(apple,10)
# initial weight in media
cat("Photon energy level",apple$weight,"\n")
# first interaction event
apple$midx <- 1
apple <- Absorb(apple)
cat("Photon energy level",apple$weight,"\n")