-
Notifications
You must be signed in to change notification settings - Fork 10
Simulation physical size limits
Physical limits to the simulation can be set using several variables. These variables are contained within the function mc_func_r6():
If useLimits = 'true'
then, several variables are used to indicate the x, y, and z size limits of the simulation:
xLimMax = 0.61*sizeMult;
xLimMin = -.61*sizeMult;
yLimMax = 0.1905*sizeMult;
yLimMin = -.5842*sizeMult;
zLimMax = receiver_z;
zLimMin = 0;
sizeMult
is a scaling variable if you wish to easily scale the size of the simulation. As of 9/6/11 there's not a good way to control whether is a photon is absorbed at a boundary collision or reflected. The aggregate effect is turned on via the reflection == 1
variable. Photons moving past the boundary are either reflected via Snell's Law and the Fresnell Equations or terminated.
Generally, for simplification and increased simulation time, photons that move past the zLimMin
boundary are terminated.
Below is an example of a photon moving past the yLimMan boundary (the top of the simulation) and being totally internally reflected:
% reflect the light beam by flipping the sign of the mu_y vector
photon(i,5) = -1*photon(i,5);
% New y_pos is Y-Max - (Y_pos - Ymax). Remove the part that "sticks out" of the top of the surface.
photon(i,2) = yLimMax - (photon(i,2) - yLimMax);
The variable wallAbsorption
controls the amount a photon's weight is reduced with colliding with a wall.