Difference between revisions of "General scattering and absorbing media"

From PlanarRad
Jump to navigation Jump to search
 
(7 intermediate revisions by the same user not shown)
Line 14: Line 14:
 
Note the following two caveats:
 
Note the following two caveats:
  
1) The method described below assumes that the interface of the slab, what we might call the air-media interface (assuming what is above the media is air) is completely flat. If it isn't the interface transmission and reflectance function needs to be modified and unfortunatly PlanarRad currently only has methods for doing that that are appropriate for wind-blown water surfaces. If you need additional functionality here then it is worth contacting me.
+
1) The examples below assume that the interface of the slab, what we might call the air-media interface (assuming what is above the media is air) is completely flat. If it isn't the interface transmission and reflectance function needs to be modified and unfortunatly PlanarRad currently only has methods for doing that that are appropriate for wind-blown water surfaces. If you need additional functionality here then it is worth contacting me.
  
 
2) PlanarRad does not have functionality for slabs of infinite depth or thickness. You have to specify a thickness and a reflectance function of whatever is below the slab. However normally this can be solved by setting a sufficiently deep slab that the bottom infleunce is negligible. Checking his can be done by setting the bottom reflectance to zero, and then re-running with a higher bottom reflectance, and veirifying the effect on the output is negligible.
 
2) PlanarRad does not have functionality for slabs of infinite depth or thickness. You have to specify a thickness and a reflectance function of whatever is below the slab. However normally this can be solved by setting a sufficiently deep slab that the bottom infleunce is negligible. Checking his can be done by setting the bottom reflectance to zero, and then re-running with a higher bottom reflectance, and veirifying the effect on the output is negligible.
  
=== Worked example: BRDF of a material with isotropic phase function ===
+
== Worked examples ==
  
This example shows how to model the bidirectional reflectance distribution function (BRDF) of a material for which the extinction and absorption co-efficients are known and we can assume the phase function is isotropic. We are interested in slab of this material that is sufficiently thick that whatever is underneath it has negligible effect on its reflectance, i.e. you can't see through it. In fact we can will work out how thick that needs to be in the analysis.
+
[[BRDF of a material with isotropic phase function]]
  
The example uses the Windows version of PlanarRad. It will involve working with a few text files for which you can use Wordpad. In general Notepad does not work because (I think) it doesn't handle the Unix-style line endings. However I strongly recommend using [http://notepad-plus-plus.org Notepad++]
+
[[Creating a BRDF file and using it as a bottom boundary]]
for working with text files under Windows, and that is what the screenshots here are taken from.
 
 
 
== Step 1 : Set up single band run ==
 
 
 
We will be working with a single wavelength so we need to set up a small band specification file to specify this. Create a text file called 'bands1.bsf', or alternatively edit 'bands17.bsf' that can be found in the 'planarrad_test04' directory. Make it look like this:
 
 
 
 
 
[[File:Notepadpp_bands1_bsf.png]]
 
 
 
 
 
A few notes of explanation:
 
* bs_name - this is what will appear in PlanarRad to refer to this band specification.
 
* bs_code - this will be appended onto the name of some automatically generated files.
 
* band_count - the number of bands.
 
* band_widths_data - a comma separated list of the widths of the bands in nanometeres.
 
* band_centres_data - a comma separated list of the centre wavelengths if the bands in nanometres.
 
* preferred_default - if 'yes' the PlanarRad GUI will offer this band specification as the default.
 
 
 
Create new folder called 'testslab' (or whatever) and save 'bands1.bsf' in it.
 
 
 
[[File:Testslab_dir_bands1_bsf.png]]
 
 
 
 
 
Now run PlanarRad and from the menus choose 'File > Change current working directory' and select the 'testslab' directory that contains the band specification file. You should see that "Bands:" under the 'Model' tab changes to '1 Band (500 nm)'.
 

Latest revision as of 09:35, 2 February 2017

IN PROGRESS


PlanarRad was designed for use with data corresponding to natural water bodies, however it can be used to model the light field or reflectance properties of homegenous 'slabs' of any kind of media, as long as the following inputs are known at the wavelength to be modelled:

  • The extinction coefficient (a.k.a. the attenuation coefficient, c, they are the same thing).
  • The absorption coefficient, a.
  • The phase function, i.e. the angular probability of scattering when it occurs.
  • The refractive index inside and outside the media.

These concepts may be expressed in other ways that contain the required information. For example if you have a volume scattering function (VSF) and single scattering albedo, you can then calculate c, a and the phase function. Depending on the material you might be able to assume an isotropic phase function - that at each scattering event the direction of scattering is equally probable in any direction over the sphere, and that simplifies things.

Note the following two caveats:

1) The examples below assume that the interface of the slab, what we might call the air-media interface (assuming what is above the media is air) is completely flat. If it isn't the interface transmission and reflectance function needs to be modified and unfortunatly PlanarRad currently only has methods for doing that that are appropriate for wind-blown water surfaces. If you need additional functionality here then it is worth contacting me.

2) PlanarRad does not have functionality for slabs of infinite depth or thickness. You have to specify a thickness and a reflectance function of whatever is below the slab. However normally this can be solved by setting a sufficiently deep slab that the bottom infleunce is negligible. Checking his can be done by setting the bottom reflectance to zero, and then re-running with a higher bottom reflectance, and veirifying the effect on the output is negligible.

Worked examples

BRDF of a material with isotropic phase function

Creating a BRDF file and using it as a bottom boundary