<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>COMSOL Blog &#187; Christopher Boucher</title>
	<atom:link href="http://www.comsol.no/blogs/author/christopher-boucher/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.comsol.no/blogs</link>
	<description></description>
	<lastBuildDate>Thu, 22 Nov 2018 09:33:42 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.9.1</generator>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>	<item>
		<title>How to Perform a STOP Analysis with COMSOL Multiphysics®</title>
		<link>https://www.comsol.no/blogs/how-to-perform-a-stop-analysis-with-comsol-multiphysics/</link>
		<comments>https://www.comsol.no/blogs/how-to-perform-a-stop-analysis-with-comsol-multiphysics/#comments</comments>
		<pubDate>Mon, 05 Nov 2018 13:23:53 +0000</pubDate>
		<dc:creator><![CDATA[Christopher Boucher]]></dc:creator>
				<category><![CDATA[Electrical]]></category>
		<category><![CDATA[Mechanical]]></category>
		<category><![CDATA[Ray Optics]]></category>
		<category><![CDATA[Structural Mechanics & Thermal Stress]]></category>
		<category><![CDATA[Heat Transfer Module]]></category>
		<category><![CDATA[MEMS Module]]></category>
		<category><![CDATA[Ray Optics Module]]></category>
		<category><![CDATA[Structural Mechanics Module]]></category>
		<category><![CDATA[Technical Content]]></category>

		<guid isPermaLink="false">http://com.staging.comsol.com/blogs?p=282771</guid>
		<description><![CDATA[Modern optical systems are often required to operate in harsh environments, including high altitudes, space, underwater, and in laser and nuclear facilities. Such optical systems are subjected to structural loads and extreme temperatures. The most accurate way to fully capture these environmental effects is through numerical simulation via a structural-thermal-optical performance (STOP) analysis. STOP analysis is the quintessential multiphysics problem. In this blog post, we show how to combine structural, thermal, and optical effects using the COMSOL Multiphysics® software. Describing [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Modern optical systems are often required to operate in harsh environments, including high altitudes, space, underwater, and in laser and nuclear facilities. Such optical systems are subjected to structural loads and extreme temperatures. The most accurate way to fully capture these environmental effects is through numerical simulation via a structural-thermal-optical performance (STOP) analysis. STOP analysis is the quintessential multiphysics problem. In this blog post, we show how to combine structural, thermal, and optical effects using the COMSOL Multiphysics® software.</p>
<p><span id="more-282771"></span></p>
<h3>Describing the Model: A Petzval Lens System Example</h3>
<p>In this example, we consider a Petzval lens system inside of a thermovacuum chamber. The vacuum chamber walls are maintained at a very cold temperature (perhaps to mimic the effects of outer space), while the lens system is looking into an adjacent room at a much higher temperature (possibly emulating a laboratory test). An exploded view of the model geometry is shown below.</p>
<p id="petzval">
<p><img src="https://cdn.comsol.com/wordpress/2018/10/petzval-lens-system-exploded-view.png" title="" alt="An image showing an exploded view of a Petzval lens system." width="1000" height="750" class="alignnone size-full wp-image-282791" /><br />
<em>The Petzval lens system, barrel, and enclosing thermal shroud. Incident light enters the system through the outermost vacuum chamber window (1) and then through an additional thermal window (2) inside the chamber before reaching the Petzval lens system. The lens system itself consists of two lens groups (3 and 4) and a field-flattening lens (5). The light is focused onto the focal plane (6). The lens system is supported by a barrel (7), which is completely enclosed within the thermal shroud (8).</em></p>
<p>The ambient surroundings on the other side of the outer vacuum window are a balmy 25°C, while the walls of the thermal shroud are maintained at a brisk -50°C. This fixed temperature might, for example, be maintained by running cold liquid through the shroud, although we will not examine this mechanism in detail and simply treat the walls as a fixed temperature boundary condition. The incoming thermal radiation from the warm ambient surroundings will create a temperature gradient in the lens system and barrel. Intuitively, we might expect the vacuum window to be warmer than the thermal window, which is warmer than lens group 1, and so on, but more quantitative information is needed.</p>
<p>Before we discuss the setup of this model in more detail, let&#8217;s consider the different physical phenomena that are at work inside the thermovacuum chamber.</p>
<h3>Essential Physics of a STOP Analysis</h3>
<p>A STOP model involves a coupling between the following:</p>
<ul>
<li>Temperature calculation, using the <em>Heat Transfer in Solids</em> interface or another heat transfer interface</li>
<li>Structural deformation modeling, using the <em>Solid Mechanics</em> interface or another structural physics interface</li>
<li>Ray tracing, using the <em>Geometrical Optics</em> interface</li>
</ul>
<p>The mechanisms that couple these three branches of physics are summarized in the flowchart below.</p>
<p><img src="https://cdn.comsol.com/wordpress/2018/10/stop-analysis-multiphysics-flowchart.png" title="" alt="A chart showing the different physical phenomena involved in a STOP analysis." width="962" height="686" class="alignnone size-full wp-image-282801" /><br />
<em>Flowchart of the most significant multiphysics phenomena in a STOP analysis.</em></p>
<h4>Thermal Modeling</h4>
<p>The temperature is affected by heat sources and sinks, such as Joule heating or chemical reactions, and by boundary conditions, such as convective or radiative heat exchange with the surroundings.</p>
<p>A special case worth mentioning is the bidirectional (two-way) coupling between ray optics and heat transfer. This arises when a powerful source (from a laser or solar concentrator, for example) undergoes some attenuation in the modeling domain, generating an additional heat source. The example discussed in this blog post is unidirectional: The rays are not powerful enough to generate a significant heat source term through attenuation.</p>
<p>The temperature affects the ray propagation through thermo-optic dispersion, in which the refractive index is a function of temperature. The temperature also indirectly affects the ray paths because thermal stress can cause boundary deformation, as discussed in the next section.</p>
<h4>Structural Modeling</h4>
<p>Usually, STOP analysis requires a calculation of the structural displacement field. Rays can then interact with the deformed geometry, which might cause them to be reflected or refracted in different directions than in the original, undeformed geometry.</p>
<p>The structural displacement is the result of all forces that are applied to the model geometry, which in this case comprises the lens system and the barrel that holds it in place. The geometry may also deform due to thermal stress, as the temperature changes cause it to expand or contract.</p>
<h4>Optical Dispersion Models</h4>
<p>The <em>Geometrical Optics</em> interface is used to trace rays as they reflect and refract across boundaries. The refractive index of each material can be a function of both wavelength and temperature. If the lens system is deformed, rays interact with the deformed geometry. In this way, the ray paths are influenced by both thermal and structural phenomena.</p>
<p>The <em>Medium Properties</em> node for the <em>Geometrical Optics</em> interface can be used to select an optical dispersion model, a set of equations and coefficients that define the refractive index as a function of vacuum wavelength (and possibly temperature).</p>
<p>The following screenshot shows the <em>Equation</em> display for the <em>Sellmeier</em> optical dispersion model. The first five rows of equations define the refractive index as a function of the vacuum wavelength. Here, <em>A</em><sub>1</sub>, <em>B</em><sub>1</sub>, <em>A</em><sub>2</sub>, <em>B</em><sub>2</sub>, <em>A</em><sub>3</sub>, and <em>B</em><sub>3</sub> are the Sellmeier coefficients, which are unique for each type of glass. The last two rows are an additional correction term for the thermo-optic dispersion model. Here, <em>D</em><sub>0</sub>, <em>D</em><sub>1</sub>, <em>D</em><sub>2</sub>, <em>E</em><sub>0</sub>, <em>E</em><sub>1</sub>, and λ<sub>TK</sub> are the thermo-optic dispersion coefficients.</p>
<p><img src="https://cdn.comsol.com/wordpress/2018/10/sellmeier-optical-dispersion-model-equations.png" title="" alt="A screenshot of the COMSOL GUI with equations for the Sellmeier optical dispersion model." width="717" height="529" class="alignnone size-full wp-image-285951" /><br />
<em>Equations for the</em> Sellmeier <em>optical dispersion model.</em></p>
<p>One special alternative is worth pointing out here: The <em>Temperature-dependent Sellmeier</em> dispersion model combines the temperature and wavelength dependence into a single equation. This option is most often used as a cryogenic model where the glasses are subjected to an extremely wide range of temperatures.</p>
<p><img src="https://cdn.comsol.com/wordpress/2018/10/temperature-dependent-sellmeier-coefficients.png" title="" alt="A screenshot showing the temperature-dependent Sellmeier coefficients in COMSOL Multiphysics." width="817" height="494" class="alignnone size-full wp-image-285961" /><br />
<em>Temperature-dependent Sellmeier coefficients that combine temperature and wavelength dependence into a single expression.</em></p>
<p>It is usually recommended to select <em>Get dispersion model from material</em> from the <em>Optical dispersion model</em> list. Then, the optical dispersion model will automatically be detected based on which material properties are defined for each material. With this option, you can create a model with multiple glasses from different manufacturers, even if they use different conventions for the optical dispersion model.</p>
<p><img src="https://cdn.comsol.com/wordpress/2018/10/optical-medium-properties-settings-window.png" title="" alt="A screenshot showing the Settings window for the optical dispersion material properties." width="726" height="494" class="alignnone size-full wp-image-285971" /><br />
<em>Option to automatically detect the correct optical dispersion model based on which material properties are defined.</em></p>
<h3>Revisiting the Petzval Lens System</h3>
<p>Next, let&#8217;s consider the example of a STOP analysis for a <a href="#petzval">Petzval lens system</a> inside a thermovacuum chamber, as described earlier.</p>
<p>The heat transfer is modeled using the <em>Heat Transfer in Solids</em> interface for conduction and the <em>Surface-to-Surface Radiation</em> interface for radiative transport between surfaces or between a surface and the ambient surroundings. Only the outside surface of the vacuum window is exposed to the warm ambient surroundings. To couple the conductive and radiative heat transfer to each other, a dedicated <em>Heat Transfer with Surface-to-Surface Radiation</em> multiphysics coupling node is available, as shown below.</p>
<p><img src="https://cdn.comsol.com/wordpress/2018/10/multiphysics-coupling-heat-transfer-radiation.png" title="" alt="A screenshot of the settings for coupling Heat Transfer in Solids and Surface-to-Surface Radiation." width="753" height="450" class="alignnone size-full wp-image-285981" /><br />
<em>Multiphysics coupling between the</em> Heat Transfer in Solids <em>and</em> Surface-to-Surface Radiation <em>interfaces.</em></p>
<p>The <em>Surface-to-Surface Radiation</em> interface uses the <em>Diffuse Surface</em> boundary condition on all surfaces, including the lenses; thus, the lens system is assumed to be transparent at optical wavelengths but opaque in the infrared.</p>
<p>The temperature distribution within the lens system and barrel is plotted below. The solid magenta lines indicate the temperature at the center of the vacuum window (1), thermal window (2), lens groups (3-4), and field-flattening lens (5). The blue and red dashed lines are the fixed temperature of the chamber walls (6) and the ambient temperature outside of the chamber (7), respectively.</p>
<p><img src="https://cdn.comsol.com/wordpress/2018/10/petzval-lens-system-temperature-plot.png" title="" alt="A graph plotting the temperature for the Petzval lens system." width="1000" height="728" class="alignnone size-full wp-image-282811" /><br />
<em>Plot of temperature along the symmetry axis of the lens system, barrel, and chamber.</em></p>
<p>In this model, the coupling between structural and thermal phenomena is performed by two dedicated multiphysics coupling nodes, as shown below. One of these nodes simply couples the temperature between the two interfaces, and the other specifically adds the thermal stress term to the equations for structural displacement.</p>
<div class="row">
<div class="col-sm-6">
<a href="https://cdn.comsol.com/wordpress/2018/10/thermal-structural-multiphysics-coupling-settings.png" target="_blank"><img src="https://cdn.comsol.com/wordpress/2018/10/thermal-structural-multiphysics-coupling-settings.png" title="Thermal expansion settings" alt="A screenshot showing the settings for coupling thermal expansion and structural displacement." width="753" height="507" class="alignnone size-full wp-image-285991" /></a>
</div>
<div class="col-sm-6">
<a href="https://cdn.comsol.com/wordpress/2018/10/heat-mechanical-interface-coupling-settings.png" target="_blank"><img src="https://cdn.comsol.com/wordpress/2018/10/heat-mechanical-interface-coupling-settings.png" title="Temperature coupling settings" alt="A screenshot of the coupled Heat Transfer in Solids and Solid Mechanics interfaces." width="753" height="385" class="alignnone size-full wp-image-286001" /></a>
</div>
</div>
<p><em>Left: Multiphysics coupling to include thermal expansion when solving for the structural displacement field. Right: Multiphysics coupling between the</em> Heat Transfer in Solids <em>and</em> Solid Mechanics <em>interfaces.</em></p>
<p>To include the thermal expansion when tracing the rays, there is another important step that must be taken. Locate the <em>Ray Tracing</em> study step and make sure that the <em>Include geometric nonlinearity</em> check box is selected. If the check box is not selected, rays will interact with the boundaries of the undeformed geometry, and then the only effect of temperature would be the thermo-optic dispersion model for the refractive index.</p>
<p><img src="https://cdn.comsol.com/wordpress/2018/10/ray-tracing-deformed-geometry-settings.png" title="" alt="A screenshot of the settings for ray tracing in a deformed geometry." width="689" height="490" class="alignnone size-full wp-image-286011" /><br />
<em>The settings to trace rays in the deformed geometry, accounting for structural deformation.</em></p>
<h3>Ray Diagrams for the Petzval Lens System</h3>
<p>Rays are released into the chamber at three different field angles. A ray diagram showing the temperature in a cross section of the lens system and barrel is shown below.</p>
<p><img src="https://cdn.comsol.com/wordpress/2018/10/ray-trajectories-petzval-lens-heated.png" title="" alt="A plot of the ray trajectories in a heated Petzval lens system in COMSOL Multiphysics." width="998" height="517" class="alignnone size-full wp-image-282821" /><br />
<em>Ray trajectories in the heated Petzval lens system are plotted for three different field angles.</em></p>
<p>Spot diagrams in the focal plane are shown below. The most symmetric-looking spot diagram corresponds to the zero field angle, while the most asymmetric spot diagram corresponds to the greatest field angle.</p>
<p><img src="https://cdn.comsol.com/wordpress/2018/10/ray-trajectories-spot-diagrams.png" title="" alt="Side-by-side spot diagrams for different field angles of a Petzval lens system." width="1000" height="412" class="alignnone size-full wp-image-282831" /><br />
<em>Spot diagrams for three field angles, starting from zero (left).</em></p>
<p>For comparison, here are the same spot diagrams when the entire apparatus is kept at room temperature (20°C).</p>
<p><img src="https://cdn.comsol.com/wordpress/2018/10/room-temp-lens-system-spot-diagrams.png" title="" alt="Side-by-side spot diagrams for different field angles of a room-temperature Petzval lens system." width="914" height="411" class="alignnone size-full wp-image-282841" /><br />
<em>Spot diagrams for three field angles when the lens system is at room temperature.</em></p>
<h3>Concluding Thoughts on Performing a STOP Analysis in the COMSOL® Software</h3>
<p>Above, we have demonstrated a STOP analysis of a Petzval lens system enclosed in a cold thermovacuum chamber. A temperature gradient is observed in the lenses because the system is exposed to a much warmer environment outside the vacuum chamber. The cold temperatures significantly increase the root mean square (RMS) spot size.</p>
<p>By the above means of coupling structural, thermal, and optical phenomena in a single model, we&#8217;ve suggested an easy-to-use workflow to set up high-fidelity simulations of optical systems under realistic test and operating conditions.</p>
<p>Try it yourself by clicking the button below. This will take you to the Application Galley, where you can download the tutorial documentation and (with a valid software license) the MPH-file for this example. </p>
<div class="flex-center">
<a href="/model/petzval-lens-stop-analysis-63831" class="btn-solid btn-md btn-red">Get the Tutorial</a>
</div>
<p>To learn more about modeling lenses, read a blog post on <a href="/blogs/how-to-create-complex-lens-geometries-for-ray-optics-simulations/">how to create complex lens geometries</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.comsol.no/blogs/how-to-perform-a-stop-analysis-with-comsol-multiphysics/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ray Optics Simulation of Sagnac Interferometers and Ring Laser Gyros</title>
		<link>https://www.comsol.no/blogs/ray-optics-simulation-of-sagnac-interferometers-and-ring-laser-gyros/</link>
		<comments>https://www.comsol.no/blogs/ray-optics-simulation-of-sagnac-interferometers-and-ring-laser-gyros/#comments</comments>
		<pubDate>Fri, 20 Apr 2018 13:26:23 +0000</pubDate>
		<dc:creator><![CDATA[Christopher Boucher]]></dc:creator>
				<category><![CDATA[Electrical]]></category>
		<category><![CDATA[Mechanical]]></category>
		<category><![CDATA[MEMS & Nanotechnology]]></category>
		<category><![CDATA[Ray Optics]]></category>
		<category><![CDATA[Ray Optics Module]]></category>
		<category><![CDATA[Technical Content]]></category>

		<guid isPermaLink="false">http://com.staging.comsol.com/blogs?p=257121</guid>
		<description><![CDATA[Attitude detection, the measurement of an object&#8217;s orientation and rotation in three-dimensional space, is a crucial element in aircraft and spacecraft navigation. Recently, ring laser gyroscopes and fiber ring gyroscopes have proven to be viable alternatives to traditional mechanical gyros for accurately measuring rotations. The fundamental operating principle of such devices is an optical phenomenon called the Sagnac effect. In this blog post, we&#8217;ll employ ray optics simulation to observe this effect in a basic Sagnac interferometer. Is It Just [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><em>Attitude detection</em>, the measurement of an object&#8217;s orientation and rotation in three-dimensional space, is a crucial element in aircraft and spacecraft navigation. Recently, ring laser gyroscopes and fiber ring gyroscopes have proven to be viable alternatives to traditional mechanical gyros for accurately measuring rotations. The fundamental operating principle of such devices is an optical phenomenon called the <em>Sagnac effect</em>. In this blog post, we&#8217;ll employ ray optics simulation to observe this effect in a basic Sagnac interferometer.</p>
<p><span id="more-257121"></span></p>
<h3>Is It Just Me or Is the Room Spinning?</h3>
<p>One of the basic tasks of any navigation system is to keep track of an object&#8217;s position and orientation, as well as their rates of change. Extreme accuracy may be required, particularly in space travel. For example, a communications satellite can be sensitive to angular velocities as small as one thousandth of a degree per hour.</p>
<p>While this accuracy requirement may seem daunting, this fundamental task of attitude control can be posed as a simple question: <em>How do I determine how fast I&#8217;m spinning, and about what axis?</em></p>
<p>In principle, this task is the same for any observer in any rotating frame of reference &mdash; even a guest in the revolving restaurant shown below.</p>
<p><img src="https://cdn.comsol.com/wordpress/2018/04/revolving-restaurant-ambassador-hotel.jpg" title="" alt="A street-view photo of India's oldest revolving restaurant." width="960" height="720" class="alignnone size-full wp-image-257201" /><br />
<em>A photograph of the revolving restaurant at Ambassador Hotel, the oldest revolving restaurant in India. Image by AryaSnow &mdash; Own work. Licensed under <a href="https://creativecommons.org/licenses/by-sa/4.0/deed.en" target="_blank">CC BY-SA 4.0</a>, via <a href="https://commons.wikimedia.org/wiki/File:Revolving_restaurant_at_Ambassador_Hotel._.jpg" target="_blank">Wikimedia Commons</a>.</em></p>
<p>Suppose you&#8217;re the guest in such a rotating restaurant, trying to determine its angular velocity, Ω (unit: rad/s).</p>
<p><img src="https://cdn.comsol.com/wordpress/2018/04/sketch-figure-in-rotating-restaurant.png" title="" alt="A simple sketch of a stick figure standing in a rotating restaurant." width="902" height="856" class="alignnone size-full wp-image-257211" /></p>
<p>The simplest approach is to look outside. Pick a stationary object, like a building or a tree, and see if its location is changing over time in your field of view.</p>
<p><img src="https://cdn.comsol.com/wordpress/2018/04/figure-stationary-object-outside-rotating-restaurant.png" title="" alt="A simple sketch of a stick figure looking at a stationary object outside a rotating restaurant." width="906" height="845" class="alignnone size-full wp-image-257221" /></p>
<p>The above image shows the position of a tree in the observer&#8217;s field of view (i.e., through the window) at an initial time <em>t</em><sub>1</sub> and a later time <em>t</em><sub>2</sub>. Let θ (unit: rad) be the angle between these two lines of sight. If the tree is very far away compared to the size of the restaurant, you could estimate the angular velocity as</p>
<div class="latex">\Omega \approx \frac{\theta}{t_2-t_1}</div>
<h4>A Similar Situation in Space</h4>
<p>Because space travel is so much more demanding than the restaurant example described above, there are a few caveats to consider. In space, the idea of a &#8220;stationary object&#8221; is a bit tricky. For example, when using a Sun sensor for attitude control of a satellite in a geostationary orbit, you must also account for the relative motion as Earth orbits around the Sun. A star sensor, on the other hand, can be extremely accurate because stars other than the Sun can be considered fixed in space for many purposes, and because a star more closely approximates a point of light rather than a continuous source over some finite angle.</p>
<p>Because of the accuracy requirements of spacecraft attitude detection and control, the finite size of the object being observed must also be considered. For a line of sight to the Sun, for example, you need to know what part of the Sun you&#8217;re looking at. For arbitrary rotation in 3D, at least two objects are needed, because you don&#8217;t always know how the axis of rotation is oriented.</p>
<h4>Obstructing the Field of View</h4>
<p>Next, suppose we&#8217;re back at the restaurant, except that all of the windows are covered. Because your view of the outdoors is blocked, you can&#8217;t rely on any stationary object to get information about your rotating frame of reference.</p>
<p><img src="https://cdn.comsol.com/wordpress/2018/04/rotating-restaurant-without-windows-drawing.png" title="" alt="A simple sketch of a stick figure inside a rotating restaurant without windows." width="939" height="873" class="alignnone size-full wp-image-257231" /></p>
<p>There are several experiments you could perform within your rotating frame of reference to determine its angular velocity. For example, you could put a ball on the floor and see if it rolls, presumably due to a centrifugal force. (This requires that you know where the axis of rotation is &mdash; not always a given in space travel!) Another approach would be to use a <a href="/blogs/modeling-the-dynamics-of-a-gyroscope/">mechanical gyroscope</a>.</p>
<p>A third approach, explained in the following section, is to exploit the unique properties of light; namely, its uniform speed in a vacuum in all frames of reference. When light propagates in a rotating frame of reference, it reveals a phenomenon known as the <a href="https://en.wikipedia.org/wiki/Sagnac_effect" target="_blank">Sagnac effect</a>. A <em><a href="https://en.wikipedia.org/wiki/Ring_laser_gyroscope" target="_blank">ring laser gyroscope</a></em> takes advantage of this effect. Such gyroscopes have become a popular alternative to traditional mechanical gyroscopes, which use rotating masses, because the ring laser gyro has no moving parts, thus reducing the cost of maintenance.</p>
<h3>Explaining the Sagnac Effect</h3>
<p>The easiest way to visualize the Sagnac effect is to consider two counterpropagating light rays &mdash; that is, two rays going in opposite directions &mdash; that are constrained to move in a ring. The ring is rotating counterclockwise with a constant angular velocity Ω. (The SI unit is radians per second, but for inertial navigation systems, we might work in degrees per hour instead.)</p>
<p><script src="https://fast.wistia.com/assets/external/E-v1.js" async></script>
<div class="wistia_embed wistia_async_f3enwcvvnh seo=false wmode=transparent" style="height:400px;position:relative;width:400px">&nbsp;</div>
<p>The two rays are initially released at a point P<sub>0</sub> along the ring. The rays go around the ring at the speed of light in opposite directions, while the release point rotates with the frame of reference. By the time the clockwise ray returns to the release position, it has moved to a new location shown by P<sub>1</sub>, and the distance it has traveled is somewhat less than one full circle. By the time the counterclockwise ray returns to the release position, it has moved to a different location, P<sub>2</sub>, and the distance it has traveled is greater than one full circle.</p>
<p>Of course, the movement shown here is greatly exaggerated. In reality, the displacement of P<sub>1</sub> and P<sub>2</sub> from P<sub>0</sub> (and from each other) might be 10 billion times smaller! Even then, the tiny difference in the distance traveled (and similarly, the transit time) between the two rays is detectable because it&#8217;s accompanied by a phase shift, which produces an interference pattern between the rays. If we let Δ<em>L</em> represent the difference in the distance traveled by the two rays, then</p>
<p id="eq1">
<p class="latex-equation-number">(1)</p>
</p>
<div class="latex">\Delta L = \frac{4 \Omega A}{c_0}</div>
<p>where <em>A</em> is the area of the ring and <em>c</em><sub>0</sub> = 299,792,458 m/s is the speed of light in a vacuum.</p>
<p>As it turns out, Eq. <a href="#eq1">(1)</a> isn&#8217;t just true for circular paths, but for other shapes as well. The optical path difference only depends on the area enclosed by the loop and not by its shape. A more general derivation of Eq. <a href="#eq1">(1)</a> can be accomplished using the principles of general relativity. At its core, the Sagnac effect is a relativistic phenomenon, for which a classical derivation gives the same results to first order. For a more rigorous application of the theory, see Refs. <a href="#ref1">1</a>&ndash;<a href="#ref2">2</a>.</p>
<h3>Demonstrating the Sagnac Effect with Ray Optics Simulation</h3>
<p>In this section, we examine a <a href="/model/sagnac-interferometer-60061">model of a basic Sagnac interferometer</a>. This shares the same fundamental operating principle as the ring laser gyro, but is simpler to set up because we don&#8217;t need to consider the presence of a lasing medium along the beam path. (Besides the intensity gain, such a lasing medium can introduce many other complications, such as dispersive effects, that we can ignore for illustrative purposes.) However, a Sagnac interferometer with a given geometry will introduce the same optical path difference and phase delay as a ring laser gyro with the same arrangement of mirrors, so we can still learn quite a lot from it.</p>
<p>The basic Sagnac interferometer geometry consists of a beam splitter, two mirrors, and an obstruction to absorb the outgoing rays. It is illustrated below.</p>
<p><img src="https://cdn.comsol.com/wordpress/2018/04/sagnac-interferometer-geometry.png" title="" alt="A geometry of a Sagnac interferometer with the obstruction, beam splitter, and mirrors shown." width="1000" height="750" class="alignnone size-full wp-image-257241" /></p>
<p>A few geometry parameters for this model are tabulated below.</p>
<table class="table-blog">
<tr>
<th>
Name
</th>
<th>
Expression
</th>
<th>
Value
</th>
<th>
Description
</th>
</tr>
<tr>
<td>
λ<sub>0</sub>
</td>
<td>
N/A
</td>
<td>
632.8 nm
</td>
<td>
Vacuum wavelength
</td>
</tr>
<tr>
<td>
<em>R</em>
</td>
<td>
N/A
</td>
<td>
10 cm
</td>
<td>
Ring radius
</td>
</tr>
<tr>
<td>
<em>b</em>
</td>
<td>
<img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAAXCAMAAACrkjhLAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TAIi7ZswiRJl3M1Xu3aoRlekjfAAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmAAAAFFSURBVDjLzVRbksQgCAxqwLf3v+36xky2Jn6kapePJEZomgY9jv9okIaJV/AkvExQne/iIb1MUNwJniT0Y5yEavozfBBEs/5NcqO06mTdR+5GUANKZZli2tBVNieb8E6wNhoYRfoNrch3opcpaQRDwUJORTuN8s0J0iqWCa3EoobmHa+z5A94Z9PZuPI6VRedlvpFYF+Ix0A0yLZyqRJGGQoCaq9a5DxrESmDTAnzJ7q2gNUuEuY1iR6km15M0CDQzF8llGlHQuqUogsXgpWXG4i+CALfO90lhJG2zghdJiimIWKdn97EPKK/ltynULgZTUwwhuqZBqeSFd15b8pCoE8h33iUIo2jYRq3uVl6Ih4OXy+gxEDXABSnKw+bRgILSN/xICQPpQShjnE9hOUCMGTRel5HPHbNzusGL11EbeM2yJ/aD5xnCWJFcMnTAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE4LTExLTIyVDAxOjMwOjI4KzAxOjAwryHmjgAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxOC0xMS0yMlQwMTozMDoyOCswMTowMN58XjIAAAAhdEVYdHBzOkhpUmVzQm91bmRpbmdCb3gANDh4MTQrMjgxKzYzOMXGNOoAAAAndEVYdHBzOkxldmVsAEFkb2JlRm9udC0xLjA6IENNTUkxMiAwMDMuMDAyCjEXlrsAAABJdEVYdHBzOlNwb3RDb2xvci0wAC9kZXYvc2htL3pmMi1jYWNoZS83NDYwMTgzYTE3NTRmMTMxMDMxYWY2ZDA2OGI2OTk0YS5kdmkgLW/5L9GjAAAARXRFWHRwczpTcG90Q29sb3ItMQAvZGV2L3NobS96ZjItY2FjaGUvNzQ2MDE4M2ExNzU0ZjEzMTAzMWFmNmQwNjhiNjk5NGEucHMhujX1AAAAAElFTkSuQmCC" />
</td>
<td>
17.3 cm
</td>
<td>
Triangle side length
</td>
</tr>
<tr>
<td>
<em>P</em>
</td>
<td>
<img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEMAAAARCAMAAACxUuG9AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TAGaIVUQzIpm7d6rMEd3uKA3HJAAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmA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VYdHBzOlNwb3RDb2xvci0wAC9kZXYvc2htL3pmMi1jYWNoZS82ODE2ODZiZmQ2N2Y4ZjFkMjE3Y2VmOGIyYmQyMjExZS5kdmkgLW817u59AAAARXRFWHRwczpTcG90Q29sb3ItMQAvZGV2L3NobS96ZjItY2FjaGUvNjgxNjg2YmZkNjdmOGYxZDIxN2NlZjhiMmJkMjIxMWUucHOA6j2mAAAAAElFTkSuQmCC" />
</td>
<td>
130 cm<sup>2</sup>
</td>
<td>
Triangle area
</td>
</tr>
</table>
<p>The geometry is sometimes designed in a square rather than a triangle, with mirrors at three vertices and a beam splitter at the other. Rays are traced through the system with directions indicated by arrows. Because the whole apparatus is rotating counterclockwise, the rays going counterclockwise propagate a slightly longer distance than the rays going clockwise, before reaching the obstruction.</p>
<p>To better visualize this phenomenon, see the two animations below. (Note again that the rotation here is exaggerated by a factor of about ten billion!)</p>
<div class="row">
<div class="col-sm-6">
<p><script src="https://fast.wistia.com/assets/external/E-v1.js" async></script>
<div class="wistia_responsive_padding" style="padding:71.56% 0 0 0;position:relative;">
<div class="wistia_responsive_wrapper" style="height:100%;left:0;position:absolute;top:0;width:100%;">
<div class="wistia_embed wistia_async_l0evs5z4q6 seo=false videoFoam=true wmode=transparent" style="height:100%;position:relative;width:100%">&nbsp;</div>
</div>
</div>
</div>
<div class="col-sm-6">
<p><script src="https://fast.wistia.com/assets/external/E-v1.js" async></script>
<div class="wistia_responsive_padding" style="padding:71.56% 0 0 0;position:relative;">
<div class="wistia_responsive_wrapper" style="height:100%;left:0;position:absolute;top:0;width:100%;">
<div class="wistia_embed wistia_async_0lx6iiiqi7 seo=false videoFoam=true wmode=transparent" style="height:100%;position:relative;width:100%">&nbsp;</div>
</div>
</div>
</div>
</div>
<p>In the left animation, the observer stands in an inertial (nonaccelerating) frame of reference. Thus the rays go along straight paths but they hit the mirrors at different times. In the right animation, the observer is &#8220;riding&#8221; the spacecraft and is thus in a noninertial frame. (Strictly speaking, even in this rotating frame, the counterpropagating rays go at the same speed; the speed of light is the same in any frame of reference!)</p>
<p>For the geometry parameters given above, applying Eq. <a href="#eq1">(1)</a> gives the optical path difference between the counterpropagating rays as about 8 × 10<sup>-16</sup>, or 0.8 femtometers. This is about the radius of a proton; clearly a difficult quantity to measure! Rather than report path length directly, Sagnac interferometers and ring laser gyros usually report the frequency difference or <em>beat frequency</em> Δν, given by</p>
<p id="eq2">
<p class="latex-equation-number">(2)</p>
</p>
<div class="latex">\frac{\Delta \nu}{\nu} = \frac{\Delta L}{L}</div>
<p>where ν (in Hz) is the frequency of the light, and <em>L</em> is the optical path length for light going around the perimeter of the triangle.</p>
<p>Note that <em>L</em> is not necessarily the perimeter of the triangle itself, since there might be a comoving medium such as a lasing medium with n ≠ 1 along the beam path. In this example, we assume the space between the mirrors and beam splitter is a vacuum. The beat frequency is on the order of 1 Hz, which is certainly much easier to measure than a distance equal to the proton radius.</p>
<p>This model uses the <em>Geometrical Optics</em> interface to trace rays through the Sagnac interferometer geometry. The two mirrors are given the dedicated <em>Mirror</em> boundary condition, which causes specular reflection. The beam splitter uses the <em>Material Discontinuity</em> boundary condition with a user-defined reflectance of 0.5, so that both of the counterpropagating beams have the same intensity.</p>
<p>To rotate the apparatus, use the <em>Rotating Domain</em> feature, as shown below.</p>
<p><a href="https://cdn.comsol.com/wordpress/2018/04/rotating-domain-feature-comsol-multiphysics.png" target="_blank"><img src="https://cdn.comsol.com/wordpress/2018/04/rotating-domain-feature-comsol-multiphysics.png" title="Rotating Domain" alt="A screenshot of the COMSOL Multiphysics GUI with the settings for the Rotating Domain feature shown." width="1000" height="747" class="alignnone size-full wp-image-257251" /></a></p>
<p>The resulting plot shows the rays propagating in both directions through the system of mirrors, but because the mirrors move so slowly relative to the speed of light, the two paths are indistinguishable in this image. If we zoomed in by a factor of 10 billion or so, we&#8217;d be able to discern two triangles spaced a tiny distance apart.</p>
<p><img src="https://cdn.comsol.com/wordpress/2018/04/sagnac-effect-ray-optics-simulation.png" title="" alt="A ray optics simulation tracing rays through a Sagnac interferometer." width="1000" height="750" class="alignnone size-full wp-image-257261" /></p>
<p>In the following plot, the beat frequency is given as a function of the angular velocity of the interferometer. As expected from Eqs. <a href="#eq1">(1)</a>&ndash;<a href="#eq2">(2)</a>, this relationship is linear. Some numerical noise is visible in the bottom-left corner of the plot. This is due to numerical precision and is explained in greater detail in the model documentation.</p>
<p><img src="https://cdn.comsol.com/wordpress/2018/04/sagnac-interferometer-beat-frequency-plot.png" title="" alt="A 1D plot of the beat frequency of a Sagnac interferometer." width="1000" height="750" class="alignnone size-full wp-image-257271" /></p>
<h3>Applying Attitude Detection to Aircraft and Spacecraft Navigation</h3>
<p>The Sagnac interferometer described above, along with related devices like ring laser gyros and fiber optic gyros, are examples of inertial navigation systems, which predict an object&#8217;s position and orientation by starting from a known position and then integrating the translational and angular velocity over time. In practice, inertial navigation systems are usually combined with absolute measurements of position and orientation relative to some other object in space. This absolute measurement might be done with an Earth sensor, Sun sensor, or star sensor; with RF beacons at known locations on the earth&#8217;s surface; with measurements of the earth&#8217;s magnetic field; or with any combination of these.</p>
<p>The uncertainty of an inertial navigation system grows over time due to small errors in the measurement of the translational and angular velocity. Periodically taking an absolute measurement using one of the sensors described above resets this uncertainty to a more reasonable value. A prediction of the uncertainty over time might look like the following graph.</p>
<p><img src="https://cdn.comsol.com/wordpress/2018/04/uncertainty-inertial-navigation-over-time.png" title="" alt="A diagram showing the uncertainty of an inertial navigation system over time." width="1009" height="446" class="alignnone size-full wp-image-257281" /></p>
<h3>Conclusions</h3>
<p>We&#8217;ve successfully demonstrated the Sagnac effect in a simple interferometer using ray optics simulation. The resulting beat frequency agrees with the more rigorous theory, which is based on general relativity, as long as the velocity of all of the moving parts is much smaller than the speed of light. The magnitude of the optical path difference due in a Sagnac interferometer or ring laser gyro depends only on the area enclosed by the counterpropagating beams, not on the geometry of the loop.</p>
<h3>Next Step</h3>
<p>Explore the Sagnac interferometer model by clicking the button below. Once in the Application Gallery, you can log into your COMSOL Access account and download the MPH-file (with a valid software license) as well as a tutorial for this model.</p>
<div class="flex-center">
<a href="/model/sagnac-interferometer-60061" class="btn-solid btn-md btn-red">Get the Tutorial Model</a>
</div>
<h3>References</h3>
<ol>
<li id="ref1"> Post, Evert J. &#8220;Sagnac effect&#8221;, <em>Reviews of Modern Physics</em>, 39, no. 2, p. 475, 1967.</li>
<li id="ref2"> Chow, W.W. et al. &#8220;The ring laser gyro&#8221;, <em>Reviews of Modern Physics</em>, 57, no. 1, p. 61, 1985.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>https://www.comsol.no/blogs/ray-optics-simulation-of-sagnac-interferometers-and-ring-laser-gyros/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to Use the New Ray Termination Feature for Geometrical Optics</title>
		<link>https://www.comsol.no/blogs/how-to-use-the-new-ray-termination-feature-for-geometrical-optics/</link>
		<comments>https://www.comsol.no/blogs/how-to-use-the-new-ray-termination-feature-for-geometrical-optics/#comments</comments>
		<pubDate>Tue, 02 May 2017 13:31:27 +0000</pubDate>
		<dc:creator><![CDATA[Christopher Boucher]]></dc:creator>
				<category><![CDATA[Electrical]]></category>
		<category><![CDATA[Ray Optics]]></category>
		<category><![CDATA[Ray Optics Module]]></category>
		<category><![CDATA[Technical Content]]></category>

		<guid isPermaLink="false">http://com.staging.comsol.com/blogs?p=215881</guid>
		<description><![CDATA[The release of version 5.3 of the COMSOL Multiphysics® software includes a new Ray Termination feature to simplify the setup and results analysis for optical simulations with the Ray Optics Module. Use the Ray Termination feature to remove rays that are no longer relevant to the solution, either because they have escaped from the geometry or their intensity is negligibly small. In this blog post, we&#8217;ll learn how to use this feature and see how it simplifies ray optics simulation. [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>The release of version 5.3 of the COMSOL Multiphysics® software includes a new <em>Ray Termination</em> feature to simplify the setup and results analysis for optical simulations with the Ray Optics Module. Use the <em>Ray Termination</em> feature to remove rays that are no longer relevant to the solution, either because they have escaped from the geometry or their intensity is negligibly small. In this blog post, we&#8217;ll learn how to use this feature and see how it simplifies ray optics simulation.</p>
<p><span id="more-215881"></span></p>
<h3>Introducing the <em>Ray Termination</em> Feature, New with Version 5.3</h3>
<p>The goal of ray termination is to discard rays once they&#8217;re no longer useful or relevant to the simulation. By removing rays once they&#8217;ve stopped being useful, we can reduce the amount of redundant information in the ray trajectory plots, making it easier to emphasize the more important details in the model.</p>
<p>The simplest way to terminate rays is to stop them as they exit the geometry. The <em>Ray Termination</em> feature stops the rays by creating a fictitious <em>bounding box</em> around the geometry. The bounding box needn&#8217;t correspond to any actual geometric entity in the model; it can exist in the void domain outside of all geometric entities and doesn&#8217;t require any mesh. In previous versions of COMSOL Multiphysics®, it was instead necessary to create and mesh a number of physical boundaries to block the outgoing rays, or else they would keep propagating until the study was over.</p>
<h3>Criteria for Ray Termination</h3>
<p>Let&#8217;s start with an example of a simple convex lens. Collimated rays are released at a grid of points to the left of the lens. At the lens surfaces, reflected and refracted rays are produced. Suppose we&#8217;re only interested in the focused light and not in the reflected light. Then, we can set up a Ray Termination feature with user-defined bounding box dimensions to stop rays that get reflected at the lens surfaces. The settings for this feature are shown below.</p>
<p><a href="https://cdn.comsol.com/wordpress/2017/05/ray_termination_COMSOL-Multiphysics-5.3.png" target="_blank"><img src="https://cdn.comsol.com/wordpress/2017/05/ray_termination_COMSOL-Multiphysics-5.3.png" title="Ray Termination feature settings" alt="A screenshot of COMSOL Multiphysics version 5.3 showing the settings for the new Ray Termination feature."  width="1000" height="694" class="alignnone size-full wp-image-216101" /></a><br />
<em>Settings window for the</em> Ray Termination <em>feature. User-defined maximum coordinates have been entered for the</em> x<em>- and </em>y<em>-directions.</em></p>
<p>The maximum <em>x</em>-coordinate is much greater in magnitude than the other specified coordinates and significantly greater than the focal length of the lens, so we don&#8217;t have to worry about stopping the rays before they reach a focus. One benefit of using the <em>Ray Termination</em> feature is that we don&#8217;t have to create or mesh a high-aspect-ratio rectangle to stop the rays; they are simply made to stop at a specified location in space, regardless of whether a physical boundary is defined there. The resulting trajectories are shown below, colored according to the logarithm of the ray intensity.</p>
<p><a href="https://cdn.comsol.com/wordpress/2017/05/ray_termination_propagating_rays_screenshot_.png" target="_blank"><img src="https://cdn.comsol.com/wordpress/2017/05/ray_termination_propagating_rays_screenshot_.png" title="Propagating rays" alt="A screenshot of COMSOL Multiphysics version 5.3 with a model of propagating rays." width="1000" height="694" class="alignnone size-full wp-image-216121" /></a><br />
<em>Rays propagating through the lens and getting stopped by the</em> Ray Termination <em>feature. The color expression is proportional to the ray intensity on a logarithmic scale.</em></p>
<p>As shown below, letting the reflected rays continue to propagate can obscure or distract from the relevant physics in the model &mdash; in this case, the focusing of the refracted light by the lens.</p>
<p><img src="https://cdn.comsol.com/wordpress/2017/05/ray_termination_feature_comparison_COMSOL_-software.png" title="" alt="Two models demonstrating the difference between using the Ray Termination feature and not." width="1000" height="825" class="alignnone size-full wp-image-216131" /><br />
<em>Comparison of the ray trajectories when allowing the rays to continue propagating (top) or using the</em> Ray Termination <em>feature (bottom).</em></p>
<p>To better visualize how the rays interact with the bounding box, the following screenshot includes edges drawn on three edges of the box. Incidentally, this reveals yet another benefit of using the <em>Ray Termination</em> feature: rays are free to enter the bounding box and only get terminated as they leave. If the three edges drawn in red were modeled as <em>Wall</em> conditions to stop the outgoing rays, we would need to write logical expressions to prevent the wall condition from being applied to the incident rays, which could become rather complicated.</p>
<p><a href="https://cdn.comsol.com/wordpress/2017/05/ray_termination_simulation.png" target="_blank"><img src="https://cdn.comsol.com/wordpress/2017/05/ray_termination_simulation.png" title="Ray Termination feature" alt="A screenshot of COMSOL Multiphysics version 5.3 showing a model where the Ray Termination feature stops the propagating rays." width="1000" height="694" class="alignnone size-full wp-image-216141" /></a><br />
<em>Rays propagating through the lens and getting stopped by the</em> Ray Termination <em>feature. Three sides of the bounding box are drawn in red.</em></p>
<h3>Example: Czerny-Turner Monochromator</h3>
<p>The <em>Ray Termination</em> feature is now used in the <a href="/model/czerny-turner-monochromator-19061">Czerny-Turner Monochromator tutorial model</a>, available online and in the Application Libraries in the software. I wrote about this example in a previous <a href="/blogs/ray-tracing-in-monochromators-and-spectrometers/">blog post on ray tracing in monochromators and spectrometers</a>.</p>
<p>The model consists of a grating, two mirrors, and a detector arranged in a crossed Czerny-Turner configuration, as illustrated below. The mirrors, grating, and detector are highlighted in yellow and the path of light is shown in red.</p>
<p><img src="https://cdn.comsol.com/wordpress/2017/05/Czerny-Turner-Monochromator-geometry.png" title="" alt="A schematic of the Czerny-Turner Monochromator model's light paths." width="490" height="650" class="alignnone size-full wp-image-216151" /><br />
<em>Light paths in the Czerny-Turner Monochromator tutorial.</em></p>
<p>The numbers denote the different stages of the light path:</p>
<ol>
<li>Incoming rays are released from a slit with a conical distribution based on a user-defined numerical aperture.</li>
<li>The rays are reflected by a collimating mirror. The curvature, position, and orientation of this mirror are such that all reflected rays are parallel to each other.</li>
<li>The reflected rays hit a diffraction grating, producing rays of several different diffraction orders.</li>
<li>The reflected rays of diffraction order 0 are all parallel to each other because their angle of reflection is not wavelength dependent. Thus, there is no separation between different wavelengths of light. These rays are aimed away from the mirrors and ignored in results processing.</li>
<li>However, the rays of diffraction order 1 are reflected in different directions based on free-space wavelength. They are reflected by a focusing mirror.</li>
<li>Light of different colors is focused to different locations on the detector.</li>
</ol>
<p>My previous blog post referred to an older version of the COMSOL® software in which it was necessary to create and mesh the air or vacuum domain surrounding the mirrors and grating. Now, however, rays can propagate in the void region outside the geometry, even though that region is not meshed. Therefore, a more minimalist geometry can be used and it is not necessary to indicate the spatial extents of ray propagation with a large rectangular domain, as illustrated below.</p>
<p><img src="https://cdn.comsol.com/wordpress/2017/05/czerny_turner_geometry1.png" title="" alt="The Czerny-Turner Monochromator tutorial's geometry." width="604" height="750" class="alignnone size-full wp-image-216231" /><br />
<em>Geometry of the Czerny-Turner monochromator in COMSOL Multiphysics version 5.3.</em></p>
<p>In this example, the bounding box dimensions for ray termination are automatically determined from the geometry information. For every geometry, the COMSOL® software automatically computes and records the maximum and minimum coordinates in each direction. Together, these coordinates comprise the smallest possible rectangle (in 2D) or rectangular prism (in 3D) with edges parallel to the coordinate axes such that every geometric entity is completely enclosed. This box is illustrated in blue in the following plot.</p>
<p><img src="https://cdn.comsol.com/wordpress/2017/05/czerny_turner_monochromator-geometry_-multiphysics-model1.png" title="" alt="The Czerny-Turner monochromator geometry with a blue minimum bounding box." width="603" height="750" class="alignnone size-full wp-image-216241" /><br />
<em>Minimum bounding box to enclose the mirrors, grating, and detector.</em></p>
<p>With the <em>Ray Termination</em> feature, it is possible to automatically terminate rays as they exit this bounding box defined by the geometry, ensuring that rays are promptly annihilated if there is no chance they will ever touch another geometric entity in the model. This way, we don&#8217;t need to modify the bounding box dimensions as we adjust the geometry; the box is automatically resized as needed. To avoid terminating rays when they hit a boundary that coincides with the bounding box, the <em>Ray Termination</em> feature actually extends the box by 5% in every direction. So, rays are terminated as they intersect the red rectangle shown in the following plot, not the blue one.</p>
<p><img src="https://cdn.comsol.com/wordpress/2017/05/czerny_turner_geometry_two_bounding_boxes1.png" title="" alt="The Czerny-Turner monochromator geometry with two bounding boxes."  width="603" height="750" class="alignnone size-full wp-image-216251" /><br />
<em>Automatic bounding box used by the</em> Ray Termination <em>feature.</em></p>
<p>When rays are released into the model, they get reflected by the two mirrors and the grating. The rays of diffraction order 0 get reflected by the grating and then escape the geometry. Note that the rays are terminated as they exit the red rectangle, the bounding box with an extra allowance of 5% on either side.</p>
<p><img src="https://cdn.comsol.com/wordpress/2017/05/czerny_turner_ray_propagation1.png" title="" alt="The Czerny-Turner monochromator model with ray propagation." width="603" height="750" class="alignnone size-full wp-image-216261" /><br />
<em>Ray propagation in the Czerny-Turner monochromator. The color expression of the rays roughly corresponds to the actual color of the light.</em></p>
<p>As in the previous example of a convex lens, the rays actually enter the geometry from a point outside the red rectangle but they aren&#8217;t immediately terminated. The bounding box only applies to the rays that are leaving the geometry.</p>
<h3>Stray Light Suppression</h3>
<p>In the earlier example of rays being focused by a convex lens, we used the <em>Ray Termination</em> feature to eliminate the reflected light at the lens surfaces. This reflected light, sometimes called <em>stray light</em>, is typically minimized through the use of antireflective coatings and might not be of great interest for results analysis. When modeling ray propagation through a single lens, it was easy to terminate the stray light based on the allowed spatial extents of ray propagation because it all propagated to the left, whereas the focused light propagated to the right. For more complicated arrangements of lenses and mirrors, we might want to terminate uninteresting light (like stray light) that is in the same part of the modeling domain as interesting light (like the focused beam), which makes spatial termination more difficult to use.</p>
<p><img src="https://cdn.comsol.com/wordpress/2017/05/Stray-and-focused-light-in-an-optical-system.png" title="" alt="An annotated model showing stray and focused light." width="1000" height="749" class="alignnone size-full wp-image-216201" /><br />
<em>Illustration of stray light and focused light as a collimated beam reaches a convex lens.</em></p>
<p>Another factor that can be used to eliminate stray light is its intensity, which is usually quite low compared to the refracted light. When the ray intensity is computed, we can specify a threshold intensity; rays get terminated as their intensity falls below this threshold value. This is illustrated in the following plot. Unlike the first example, in which the end points of the terminated rays formed a flat surface along the edge of the bounding box, here the terminated rays form a curved surface, the set of points where the reflected ray intensity becomes sufficiently small to make the ray disappear.</p>
<p><img src="https://cdn.comsol.com/wordpress/2017/05/ray_termination_intensity_COMSOL_53.png" title="" alt="A COMSOL Multiphysics version 5.3 model of reflected rays." width="1000" height="258" class="alignnone size-full wp-image-216211" /><br />
<em>Reflected rays get terminated when their intensity falls below a threshold.</em></p>
<h3>Intensity-Based Termination and Wavefront Curvature</h3>
<p>In the previous example, we saw that stray light was annihilated but that the focused light was allowed to continue propagating. This is due to a combination of two effects on ray intensity:</p>
<ol>
<li>Convergence or divergence of the propagating electromagnetic waves. Information is stored as the principal radii of curvature of the wavefront associated with each ray.</li>
<li>Discrete reduction in intensity in accordance with the Fresnel equations when rays are reflected and refracted at boundaries.</li>
</ol>
<p>The stray light terminated much earlier than the focused light mainly because it had significantly lower intensity to start with. The intensity of the reflected light was about two orders of magnitude smaller than the intensity of the refracted light. However, if given sufficient time, the refracted light would eventually be terminated as well, due to the way intensity falls off as the wavefront diverges beyond the focus of the lens.</p>
<p>This can be seen more clearly in the following animation. Collimated beams pass through two lenses. The top lens has a focal length of 200 mm and the bottom lens has a focal length of 100 mm. Because the focal length of the second lens is shorter, rays begin to diverge sooner. Thus, these rays terminate sooner compared to rays passing through the lens of greater focal length, even though the initial ray intensity is the same for both beams.</p>
<p><script src="https://fast.wistia.com/assets/external/E-v1.js" async></script>
<div class="wistia_responsive_padding" style="padding:80.63% 0 0 0;position:relative;">
<div class="wistia_responsive_wrapper" style="height:100%;left:0;position:absolute;top:0;width:100%;">
<div class="wistia_embed wistia_async_rjcvf97ckc seo=false videoFoam=true wmode=transparent" style="height:100%;position:relative;width:100%">&nbsp;</div>
</div>
</div>
<h3>Concluding Thoughts on Ray Termination</h3>
<p>The new <em>Ray Termination</em> feature extends the usability of the Ray Optics Module because you can use it to easily discard rays that either have negligibly low intensity or simply won&#8217;t interact with anything for the remainder of the study. Consider using this feature in your existing ray optics models to simplify geometry setup, avoid wasting computational resources on uninteresting or irrelevant rays, and make the most relevant details stand out clearly during postprocessing.</p>
<div class="flex-center">
<a href="/model/czerny-turner-monochromator-19061" class="btn-solid btn-md btn-red">Get the Czerny-Turner Monochromator Tutorial</a>
</div>
<h3>Further Reading</h3>
<ul>
<li>See more updates to the Ray Optics Module on the <a href="/release/5.3/ray-optics-module">5.3 Release Highlights page</a></li>
<li>Read a <a href="/blogs/tag/multiscale-modeling-in-high-frequency-electromagnetics/">blog series on multiscale modeling in high-frequency electromagnetics</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>https://www.comsol.no/blogs/how-to-use-the-new-ray-termination-feature-for-geometrical-optics/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Sampling from Phase Space Distributions in 3D Charged Particle Beams</title>
		<link>https://www.comsol.no/blogs/sampling-from-phase-space-distributions-in-3d-charged-particle-beams/</link>
		<comments>https://www.comsol.no/blogs/sampling-from-phase-space-distributions-in-3d-charged-particle-beams/#comments</comments>
		<pubDate>Thu, 22 Sep 2016 20:59:55 +0000</pubDate>
		<dc:creator><![CDATA[Christopher Boucher]]></dc:creator>
				<category><![CDATA[Electrical]]></category>
		<category><![CDATA[Particle Tracing]]></category>
		<category><![CDATA[Particle Tracing Module]]></category>
		<category><![CDATA[Technical Content]]></category>

		<guid isPermaLink="false">http://com.staging.comsol.com/blogs?p=183871</guid>
		<description><![CDATA[In the previous installment of this series, we explained two concepts needed to model the release and propagation of real-world charged particle beams. We first introduced probability distribution functions in a purely mathematical sense and then discussed a specific type of distribution &#8212; the transverse phase space distribution of a charged particle beam in 2D. Now, let&#8217;s combine what we&#8217;ve learned and find out how to sample the initial positions and velocities of 3D beam particles from this distribution. Reviewing [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>In the previous installment of this series, we explained two concepts needed to model the release and propagation of real-world charged particle beams. We first introduced probability distribution functions in a purely mathematical sense and then discussed a specific type of distribution &mdash; the transverse phase space distribution of a charged particle beam in 2D. Now, let&#8217;s combine what we&#8217;ve learned and find out how to sample the initial positions and velocities of 3D beam particles from this distribution.</p>
<p><span id="more-183871"></span></p>
<h3>Reviewing 2D Phase Space Distributions and Ellipses</h3>
<p>To start, let&#8217;s briefly review phase space distributions and ellipses in 2D, both of which are fully explained in the <a href="https://www.comsol.com/blogs/phase-space-distributions-and-emittance-in-2d-charged-particle-beams/">previous post in the Phase Space Distributions in Beam Physics series</a>. The particles in real-world nonlaminar charged particle beams occupy a region in phase space that is often elliptical in shape. The equation for this phase space ellipse in 2D depends on the beam emittance ε and Twiss parameters,</p>
<p id="eq-1">
<p class="latex-equation-number">(1)</p>
<div class="latex">\gamma x^2 + 2\alpha x x&#039; + \beta x&#039;^2 = \varepsilon</div>
</p>
<p>where <em>x</em> and <em>x&#8217;</em> are the transverse position and inclination angle of the particle, respectively. The Twiss parameters are further related by the Courant-Snyder condition,</p>
<p id="eq-2">
<p class="latex-equation-number">(2)</p>
<div class="latex">\gamma \beta -\alpha^2 = 1</div>
</p>
<p>The actual positions of particles in the ellipse can vary. Two of the most common distributions of phase space density are a uniform density within the ellipse and a Gaussian distribution with a maximum at the ellipse&#8217;s center, both of which are illustrated below. The blue curve in each case is the phase space ellipse described in Eq.<a href="#eq-1">(1)</a>, where ε is the <em>4-rms transverse emittance</em>. For the Gaussian distribution, note that some particles still lie outside the ellipse. Since the Gaussian distribution decreases gradually without reaching exactly zero, there is always a chance that a few particles will lie outside the ellipse, no matter how large it is drawn. When using the 4-rms emittance to define the ellipse in Eq.<a href="#eq-1">(1)</a>, about 86% of the particles lie inside the ellipse.</p>
<p><img src="https://cdn.comsol.com/wordpress/2016/09/Uniform-and-Gaussian-distribution.png" title="" alt="Two images comparing a uniform and Gaussian distribution." width="1000" height="600" class="alignnone size-full wp-image-184011" /><br />
<em>Comparison of a uniform and Gaussian distribution.</em></p>
<p>Let&#8217;s consider a simpler case in which the probability of finding a particle at any point in phase space is constant inside the ellipse and zero outside of it. For this problem, substituting Eq.<a href="#eq-2">(2)</a> into Eq.<a href="#eq-1">(1)</a> and solving for <em>x&#8217;</em> yields</p>
<p id="eq-3">
<p class="latex-equation-number">(3)</p>
<div class="latex">x&#039; = -\frac{\alpha x}{\beta} \pm \frac{\sqrt{\varepsilon \beta -x^2}}{\beta}</div>
</p>
<p>The probability distribution function is then</p>
<p id="eq-4">
<p class="latex-equation-number">(4)</p>
<div class="latex">f(x,x&#039;) = \left\{<br />
\begin{array}{cc}<br />
C &amp; -\frac{\alpha x}{\beta} -\frac{\sqrt{\varepsilon \beta -x^2}}{\beta} \textless x&#039; \textless -\frac{\alpha x}{\beta} + \frac{\sqrt{\varepsilon \beta -x^2}}{\beta}\\<br />
0 &amp; \textrm{otherwise}<br />
\end{array}\right.</div>
</p>
<p>where the constant <em>C</em> depends on the size of the ellipse. The probability <em>g(x)</em> of the particle having a given <em>x</em>-coordinate is</p>
<div class="latex">g(x) = \int_{-\infty}^{\infty} f(x,x&#039;)dx&#039;</div>
<p>Considering the locations where Eq.<a href="#eq-3">(3)</a> can take on real values, we get</p>
<div class="latex">g(x) = \left\{<br />
\begin{array}{cc}<br />
2C \frac{\sqrt{\varepsilon \beta -x^2}}{\beta} &amp; -\sqrt{\varepsilon \beta} \textless x \textless \sqrt{\varepsilon \beta}\\<br />
0 &amp; \textrm{otherwise}<br />
\end{array}\right.</div>
<p>Or, more simply,</p>
<p id="eq-5">
<p class="latex-equation-number">(5)</p>
<div class="latex">g(x) \propto \frac{\sqrt{\varepsilon \beta -x^2}}{\beta}, \qquad -\sqrt{\varepsilon \beta} &lt; x &lt; \sqrt{\varepsilon \beta}</div>
</p>
<p>Suppose we have a population of model particles that we want to sample using the probability distribution function given by Eq.<a href="#eq-4">(4)</a>. More specifically, we&#8217;d like to first sample the initial transverse positions of the particles according to Eq.<a href="#eq-5">(5)</a> and then assign appropriate inclination angles so that the particles lie within the phase space ellipse. One way to accomplish this is to compute a cumulative distribution function starting from Eq.<a href="#eq-5">(5)</a> and then use the <a href="https://www.comsol.com/blogs/sampling-random-numbers-from-probability-distribution-functions/">method of inverse random sampling</a>. Another possible method is using Eq.<a href="#eq-5">(5)</a> to define the density of particles, which we can enter directly into the <em>Inlet</em> and <em>Release</em> features in the particle tracing interfaces. In this case, the normalization is done automatically.</p>
<p><img src="https://cdn.comsol.com/wordpress/2016/09/Particle-inlet-settings.png" title="" alt="Screenshot depicting the particle inlet settings in COMSOL Multiphysics." width="1000" height="822" class="alignnone size-full wp-image-184021" /><br />
<em>Screenshot showing how to input the particle density in the Inlet feature.</em> </p>
<p>Still, the most convenient approach is using the <em>Particle Beam</em> feature available in the <em>Charged Particle Tracing</em> physics interface. The Particle Beam feature automatically distributes the particles in phase space, allowing you to specify the location of the beam center, emittance, and Twiss parameters.</p>
<p><img src="https://cdn.comsol.com/wordpress/2016/09/Particle-beam-settings-946x1024.png" title="" alt="The settings for the Particle Beam feature." width="946" height="1024" class="alignnone size-large wp-image-184031" /><br />
<em>Screenshot showing how to input the particle density in the Particle Beam feature.</em></p>
<h3>Simulating Charged Particle Beams in 3D</h3>
<p>So far, we&#8217;ve only considered charged particle beams as idealized sheet beams where the out-of-plane (<em>y</em>) component of the transverse position and velocity can be ignored. However, real beams propagate in 3D space and only extend a finite distance in both transverse directions. Thus, in order to get a complete picture of a beam, we must consider two orthogonal transverse directions <em>x</em> and <em>y</em> as well as the inclination angles <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHYAAAAXCAMAAADp0UvcAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TACJmM0SIVZl3zKoR3e672Y2DbwAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmAAAAHxSURBVEjH7VXbkuUgCPQCSDTR///bBYzZnElyjjM1tU/LQyoFaDfYonP/7RfNh6m06McfxMMXp5beGtJEEiFQMmBGCIstoUwhl5/CLjMdWbU2zQyoTJswoFUgYWb1bfNwIilZkhaZFREaOLear8306sZw5nw2g6hpVwK36HzrvhnWN/amSwXl3BkFSKsTiLoHataKcfjeMi+MeiL51Uv4GCusBRZqETosGmyBhCqkDrtUIZD6ggh/7WCCDiUc2itsl+dtjIv1MLIbsK1vjkk3TQrmm/hglzOezQ0qLuO1qfU5pntvppgBu+6RsEmsLPLho/EPBsLMW2FnC/wcU+Rmhfiu1wOitGyHwFRqdh+MF3fZelz3u9jhHucoECX3azPqdo1P2TdN3rUOL6or+TlmrLArq4MtLOXbiiZ1R+1A3E5j6iwpOLzWqaD5Mt/QpBTCl5ioNca+BFosel9VWaDVeYUw0ZKm103pBh1hb0eGDhlhIexlpK1WWS2vMaEEuF8HWABjhWCJnIqv+hcTAa1KUMiDdcFvb2VFFUh2L8WNzvv0Jaa+47CKynU0y3PYKYIIabj2V+nDpBoXrO6bMV1i8JMZO/N0xuDkWnSNXDc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" alt="A schematic illustrating a particle beam propagating in 3D space." width="1000" height="750" class="alignnone size-full wp-image-184041" /><br />
<em>Particle beam propagating in 3D space.</em> </p>
<p>The reason why simulating the release of particle beams in 3D is more complicated than in 2D is that the degrees of freedom for the two transverse directions are often coupled in real-world beams. For example, suppose two particles are released at the same transverse position i.e., the same <em>x</em>- and <em>y</em>-coordinates. Let&#8217;s say that one of these particles has a very large inclination angle in the <em>x</em> direction (<em>x&#8217;</em>) and the other particle has a very small inclination angle in the <em>x</em> direction. The particle with the large inclination angle in the <em>x</em> direction is more likely to have a small inclination angle in the <em>y</em> direction and vice versa. Hence, we can&#8217;t just sample from two different distributions for <em>x&#8217;</em> and <em>y&#8217;</em> because the value of each one affects the probability distribution of the other.</p>
<p>To phrase this problem in a more abstract sense: Instead of considering the two transverse directions as separate 2D phase space ellipses, we actually need to think about the transverse particle motion using distributions of phase space in four dimensions! Since we&#8217;re used to seeing objects only in 2D or 3D, distributions with more than three space dimensions are much harder to visualize. </p>
<p>This is where the Particle Beam feature is most useful. It includes settings for sampling the initial particle positions and inclination angles from a variety of built-in 4D transverse phase space distributions. Some common distributions are the Kapchinskij-Vladimirskij (KV) distribution, waterbag distribution, parabolic distribution, and Gaussian distribution. First, let&#8217;s consider the simplest distribution, the KV distribution, and then visualize the other distributions in this group.</p>
<p>Mathematically, the KV distribution considers the beam particles to be uniformly distributed on an infinitesimally thin, 4D hyperellipsoid in phase space. It&#8217;s written as</p>
<div class="latex">\left(\frac{x}{r_x} \right)^2<br />
+\left(\frac{r_x x&#039; -r&#039;_x x}{\varepsilon_x} \right)^2<br />
+\left(\frac{y}{r_y} \right)^2<br />
+\left(\frac{r_y y&#039; -r&#039;_y y}{\varepsilon_y} \right)^2 = 1</div>
<p>where <em>r<sub>x</sub></em> and <em>r<sub>y</sub></em> are the maximum extents of the beam in the <em>x</em> and <em>y</em> directions, <em>ε<sub>x</sub></em> and <em>ε<sub>y</sub></em> are the beam emittances associated with the two transverse directions, and <em>r&#8217;<sub>x</sub></em> and <em>r&#8217;<sub>y</sub></em> are the inclination angles at the edge of the beam envelope.</p>
<p>Because it is more difficult to visualize 4D probability distribution functions than functions of lower dimensions, it is often convenient to visualize the distribution indirectly by plotting its projection onto lower dimensions. An interesting property of the KV distribution is that its projection onto any 2D plane is an ellipse of uniform density. The projections onto six such planes are shown below. The projections of the 4D hyperellipsoid onto the <em>x-x&#8217;</em> and <em>y-y&#8217;</em> planes are tilted because nonzero values have been specified for the Twiss parameter <em>α</em> in each transverse direction.</p>
<p><img src="https://cdn.comsol.com/wordpress/2016/09/KV-distribution-projections.png" title="" alt="The KV distribution projected onto six 2D planes." width="800" height="600" class="alignnone size-full wp-image-184061" /><br />
<em>The KV distribution projected onto six 2D planes.</em> </p>
<p>Compare the distributions shown above to the following alternatives.</p>
<div class="row">
<div class="col-sm-4">
<a href="https://cdn.comsol.com/wordpress/2016/09/Waterbag-projections.png" target="_blank"><img src="https://cdn.comsol.com/wordpress/2016/09/Waterbag-projections.png" title="Waterbag" alt="The waterbag distribution projections." width="380" height="285" class="alignnone size-full wp-image-184131" /></a>
</div>
<p></a></p>
<div class="col-sm-4">
<a href="https://cdn.comsol.com/wordpress/2016/09/Parabolic-projections.png" target="_blank"><img src="https://cdn.comsol.com/wordpress/2016/09/Parabolic-projections.png" title="Parabolic" alt="The parabolic distribution projections." width="380" height="285" class="alignnone size-full wp-image-184071" />
</div>
<p></a></p>
<div class="col-sm-4">
<a href="https://cdn.comsol.com/wordpress/2016/09/Gaussian-projections.png" target="_blank"><img src="https://cdn.comsol.com/wordpress/2016/09/Gaussian-projections.png" title="Gaussian" alt="The Gaussian distribution projections." width="380" height="282" class="alignnone size-full wp-image-184091" /></a>
</div>
</div>
<p><em>The waterbag, parabolic, and Gaussian distributions projected onto six 2D planes.</em></p>
<p>We see that the projection onto any 2D plane forms an ellipse-shaped distribution in all cases, but the ellipses are only uniformly filled in the KV distribution.</p>
<h3>Concluding Thoughts on Modeling Charged Particle Beams</h3>
<p>Even as this blog series on modeling charged particle beams comes to a close, we have only scratched the surface of the intricate and highly technical field of beam physics. While we&#8217;ve discussed transverse phase space distributions in 3D, we haven&#8217;t examined longitudinal emittance or the related phenomenon of bunching. We also haven&#8217;t categorized the phenomena that causes emittance to increase, decrease, or remain constant as the beam propagates. </p>
<p>This series is meant to be an introduction to the way in which random or pseudorandom sampling from probability distribution functions plays an important role in capturing the real-world physics of high-energy ion and electron beams. For a more comprehensive overview of beam physics, references 1-3 provide an excellent starting point. More technical details about each of the 4D transverse phase space distributions described above, including algorithms for sampling pseudorandom numbers from these distributions, can be found in references 4-7. To learn more about how these concepts apply in the COMSOL Multiphysics® software, browse the resources featured below or <a href="https://www.comsol.com/contact">contact us</a> for guidance.</p>
<h3>Other Posts in This Series</h3>
<ol>
<li><a href="/blogs/sampling-random-numbers-from-probability-distribution-functions/">Sampling Random Numbers from Probability Distribution Functions</a></li>
<li><a href="/blogs/phase-space-distributions-and-emittance-in-2d-charged-particle-beams/">Phase Space Distributions and Emittance in 2D Charged Particle Beams</a></li>
</ol>
<h3>References</h3>
<ol>
<li>Humphries, Stanley. <em>Principles of charged particle acceleration</em>. Courier Corporation, 2013.</li>
<li>Humphries, Stanley. <em>Charged particle beams</em>. Courier Corporation, 2013.</li>
<li>Davidson, Ronald C., and Hong Qin. <em>Physics of intense charged particle beams in high energy accelerators</em>. Imperial college press, 2001.</li>
<li>Lund, Steven M., Takashi Kikuchi, and Ronald C. Davidson. &#8220;Generation of initial Vlasov distributions for simulation of charged particle beams with high space-charge intensity.&#8221; <em>Physical Review Special Topics &mdash; Accelerators and Beams</em>, vol. 12, N/A, November 19, 2009, pp. 114801 12, no. UCRL-JRNL-229998 (2007).</li>
<li>Lund, Steven M., Takashi Kikuchi, and Ronald C. Davidson. &#8220;Generation of initial kinetic distributions for simulation of long-pulse charged particle beams with high space-charge intensity.&#8221; <em>Physical Review Special Topics &mdash; Accelerators and Beams</em>, 12, no. 11 (2009): 114801.</li>
<li>Batygin, Y. K. &#8220;Particle distribution generator in 4D phase space.&#8221; <em>Computational Accelerator Physics</em>, vol. 297, no. 1, pp. 419-426. AIP Publishing, 1993.</li>
<li>Batygin, Y. K. &#8220;Particle-in-cell code BEAMPATH for beam dynamics simulations in linear accelerators and beamlines.&#8221; <em>Nuclear Instruments and Methods in Physics Research</em>. Section A: Accelerators, Spectrometers, Detectors and Associated Equipment 539, no. 3 (2005): 455-489.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>https://www.comsol.no/blogs/sampling-from-phase-space-distributions-in-3d-charged-particle-beams/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Phase Space Distributions and Emittance in 2D Charged Particle Beams</title>
		<link>https://www.comsol.no/blogs/phase-space-distributions-and-emittance-in-2d-charged-particle-beams/</link>
		<comments>https://www.comsol.no/blogs/phase-space-distributions-and-emittance-in-2d-charged-particle-beams/#comments</comments>
		<pubDate>Mon, 19 Sep 2016 22:13:16 +0000</pubDate>
		<dc:creator><![CDATA[Christopher Boucher]]></dc:creator>
				<category><![CDATA[Electrical]]></category>
		<category><![CDATA[Particle Tracing]]></category>
		<category><![CDATA[Particle Tracing Module]]></category>
		<category><![CDATA[Technical Content]]></category>

		<guid isPermaLink="false">http://com.staging.comsol.com/blogs?p=182601</guid>
		<description><![CDATA[Previously in our Phase Space Distributions in Beam Physics series, we introduced probability distribution functions (PDFs) and various ways to sample from them in the COMSOL Multiphysics® software. Such knowledge of PDFs is necessary to understand how ion and electron beams propagate within real-world systems. In this installment, we&#8217;ll discuss the concepts of phase space and emittance as they apply to the release of ions or electrons in beams. Ion and Electron Beams A beam of ions or electrons is [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Previously in our Phase Space Distributions in Beam Physics series, we introduced probability distribution functions (PDFs) and various ways to sample from them in the COMSOL Multiphysics® software. Such knowledge of PDFs is necessary to understand how ion and electron beams propagate within real-world systems. In this installment, we&#8217;ll discuss the concepts of <em>phase space</em> and <em>emittance</em> as they apply to the release of ions or electrons in beams.</p>
<p><span id="more-182601"></span></p>
<h3>Ion and Electron Beams</h3>
<p>A <em>beam</em> of ions or electrons is a group of particles with about the same kinetic energy that move in about the same direction. The total kinetic energy of each particle is usually much greater than the particle&#8217;s thermal energy at ordinary temperatures, giving the beam a good degree of directionality.</p>
<p>We&#8217;ll begin by examining a charged particle beam in 2D. Let the positive <em>z</em>-axis denote the direction of beam propagation (the <em>axial</em> direction) and the <em>x</em>-axis denote the direction perpendicular to the direction of propagation (the <em>transverse</em> direction). If this convention seems strange at first, remember that we&#8217;ll eventually discuss beams in 3D, and then it will be convenient to indicate the two transverse directions by <em>x</em> and <em>y</em>.</p>
<p>As mentioned earlier, a beam is characterized by a group of particles that have nearly the same direction and energy &mdash; emphasis on the word &#8220;nearly&#8221;! No real-world beam will have perfectly uniform velocities for all particles. In fact, almost all of the interesting mathematics involved in beam release and propagation relates to the small variations in position and velocity among the beam particles.</p>
<p>We can characterize the shape of a beam by the <em>beam envelope</em>, which indicates the outermost extents of the beam particles and gives us an idea of the beam&#8217;s shape. If the beam has a sharp cutoff &mdash; that is, the number density of particles in the beam abruptly decreases to zero at a well-defined location &mdash; the beam envelope may simply be a curve or surface that encompasses all of the particle trajectories. Very often, though, the density of beam particles decreases gradually out to a very large distance, so that there&#8217;s no clear border where the beam ends and the surrounding empty space begins. In that case, a beam envelope can be defined as the curve or surface that contains a sufficiently high percentage of the beam particles; 95% is quite common. A beam is <em>converging</em> if its envelope becomes smaller as the beam propagates forward; <em>diverging</em> if the beam envelope becomes larger; and at a <em>waist</em> if the beam has just finished converging and is about to start diverging. This is illustrated below.</p>
<p><img src="https://cdn.comsol.com/wordpress/2016/09/Beam-diagram.png" title="" alt="A diagram of a beam." width="505" height="293" class="alignnone size-full wp-image-182921" /></p>
<h3>Comparing Laminar and Nonlaminar Beams</h3>
<p>The next plot shows some representative particle trajectories in a simple 2D beam. For now, space charge effects and external forces are neglected. Coordinate axis labels are shown to indicate the axial and transverse directions. We&#8217;ll treat this as an ideal <em>sheet beam</em> &mdash; that is, the beam extends infinitely in the out-of-plane (<em>y</em>) direction. The lines indicate the paths of beam electrons, with arrows indicating their velocities. The color expression along each line is the change in the <em>x</em>-coordinate, or <em>transverse position</em>, of an electron, also called its <em>transverse displacement</em>.</p>
<p><img src="https://cdn.comsol.com/wordpress/2016/09/2D-coordinates-for-nonlaminar-beam.png" title="" alt="A plot showing the representative particle trajectories for a nonlaminar beam." width="1000" height="333" class="alignnone size-full wp-image-182961" /></p>
<p>Note that the origin has been chosen so that the <em>x</em>-coordinates are measured from the center of the beam. It&#8217;s typically convenient to measure transverse particle positions from a point along the center line or <em>nominal trajectory</em>. The rate of change of the transverse position is the <em>transverse velocity</em> <em>v<sub>x</sub></em>.</p>
<p>In the previous image and the following ones, the transverse displacement and velocity are rather exaggerated so they are easier to see. In practice, they are usually extremely small compared to the displacement and velocity along the beam axis.</p>
<p>The beam shown above is called a <em>laminar beam</em> because it has the following properties:</p>
<ol>
<li>There&#8217;s a one-to-one correspondence between transverse position and velocity. At any transverse position, the beam particles are not crossing paths. The one exception is for converging beams, where all particles will cross at exactly the same point.</li>
<li>The transverse position and velocity are linearly proportional.</li>
</ol>
<p>The latter of these properties is important because it prevents the initial property from being violated later on. See the following diagram of a converging beam in which the transverse position and velocity have a quadratic relationship instead of a linear one. Even though no trajectories are crossing initially (at <em>z = 0</em>), they cross at a later point. At any one of these intersection points, there are multiple transverse velocity values possible for a single transverse position, and thus the first property is violated.</p>
<p><img src="https://cdn.comsol.com/wordpress/2016/09/Converging-nonlaminar-beam.png" title="" alt="A converging nonlaminar beam." width="1000" height="333" class="alignnone size-full wp-image-182991" /></p>
<p>In contrast, for a laminar beam, the particles never cross, unless the beam is converging so that all trajectories cross at a single point, as shown below.</p>
<p><img src="https://cdn.comsol.com/wordpress/2016/09/Converging-laminar-beam.png" title="" alt="Plot showing particles crossing at a single point in a laminar beam." width="1000" height="333" class="alignnone size-full wp-image-182981" /></p>
<p>In practice, there is usually a distribution of transverse velocity values at any transverse position. Particle trajectories are constantly crossing each other. Thus, real-world beams are <em>nonlaminar</em>, and the laminar beam discussed earlier is just an idealization. A more realistic transverse velocity distribution for a nonlaminar beam is illustrated below.</p>
<p><img src="https://cdn.comsol.com/wordpress/2016/09/2D-coordinates-for-nonlaminar-beam1.png" title="" alt="Realistic transverse velocity distribution for a nonlaminar beam." width="1000" height="333" class="alignnone size-full wp-image-183001" /></p>
<p>To better understand the difference between laminar and nonlaminar beams, let&#8217;s look at their <em>phase space distributions</em>. Phase space distributions can take on many forms, but here we&#8217;ll examine the particles as points in a 2D space in which the axes are transverse position and velocity. (We could alternatively use position and momentum as the two axes. This changes the distribution&#8217;s dimensions but doesn&#8217;t fundamentally change its shape.) Plotting these phase space distributions in COMSOL Multiphysics is easy using the <em>Phase Portrait</em> plot type.</p>
<p>First, let&#8217;s examine the phase portrait for a laminar beam. The following plot is taken at a releasing boundary, at the time <em>t = 0</em>.</p>
<p><img src="https://cdn.comsol.com/wordpress/2016/09/Phase-portrait-for-laminar-beam.png" title="" alt="Phase portrait for a laminar beam." width="1000" height="667" class="alignnone size-full wp-image-183011" /></p>
<p>As expected, the points form a straight line that passes through the origin. (Remember that, by definition, the transverse position and velocity in a laminar beam have a linear relationship.) The next plot is a phase portrait for the nonlaminar beam.</p>
<p><img src="https://cdn.comsol.com/wordpress/2016/09/Phase-portrait-for-nonlaminar-beam.png" title="" alt="A phase portrait plot for a nonlaminar beam." width="1000" height="667" class="alignnone size-full wp-image-183021" /></p>
<p>The points no longer lie in a line but instead form a vaguely shaped cloud in phase space centered about the origin. The points seem randomly placed and there isn&#8217;t any obvious relationship between their positions. To get a clearer idea of the phase space distribution, let&#8217;s consider the same beam but with a much larger sample size of 1000 particles.</p>
<p><img src="https://cdn.comsol.com/wordpress/2016/09/Phase-portrait-for-nonlaminar-beam-with-1000-particles.png" title="" alt="Phase portrait plot for a nonlaminar beam with a sample size of 1000 particles." width="1000" height="667" class="alignnone size-full wp-image-183031" /></p>
<p>Now it has become much clearer; the particles form a <em>phase space ellipse</em>. Because the ellipse is thickest at the center, particles positioned closer to the beam axis have a larger velocity spread as compared to particles near the beam envelope&#8217;s edge. Such ellipse-shaped distributions are extremely common in beam physics, although the proportions and orientation of the ellipse and the exact placement of particles relative to it can vary. As was the case when describing the beam envelope, the phase space ellipse may either have a sharp cutoff or gradual decrease in number density. In the latter case, an ellipse can be defined so that it encloses some arbitrary fraction of the beam particles, say 95%.</p>
<p>In practice, most charged particle beams are <em>paraxial</em>, meaning that the transverse velocity components are very small relative to the longitudinal velocity. In the paraxial limit, we can describe each particle by its transverse position <em>x</em> and <em>inclination angle</em> <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHYAAAAXCAMAAADp0UvcAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TACJmM0SIVZl3zKoR3e672Y2DbwAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmAAAAHxSURBVEjH7VXbkuUgCPQCSDTR///bBYzZnElyjjM1tU/LQyoFaDfYonP/7RfNh6m06McfxMMXp5beGtJEEiFQMmBGCIstoUwhl5/CLjMdWbU2zQyoTJswoFUgYWb1bfNwIilZkhaZFREaOLear8306sZw5nw2g6hpVwK36HzrvhnWN/amSwXl3BkFSKsTiLoHataKcfjeMi+MeiL51Uv4GCusBRZqETosGmyBhCqkDrtUIZD6ggh/7WCCDiUc2itsl+dtjIv1MLIbsK1vjkk3TQrmm/hglzOezQ0qLuO1qfU5pntvppgBu+6RsEmsLPLho/EPBsLMW2FnC/wcU+Rmhfiu1wOitGyHwFRqdh+MF3fZelz3u9jhHucoECX3azPqdo1P2TdN3rUOL6or+TlmrLArq4MtLOXbiiZ1R+1A3E5j6iwpOLzWqaD5Mt/QpBTCl5ioNca+BFosel9VWaDVeYUw0ZKm103pBh1hb0eGDhlhIexlpK1WWS2vMaEEuF8HWABjhWCJnIqv+hcTAa1KUMiDdcFvb2VFFUh2L8WNzvv0Jaa+47CKynU0y3PYKYIIabj2V+nDpBoXrO6bMV1i8JMZO/N0xuDkWnSNXDcQP373MSM/kcSJE3E/pyslWte5Z/+84/fSpx6f37ePA+bf2x+xqA2nvqEMhgAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxOC0xMS0yMlQwMTozMDoyOSswMTowMAlW7ToAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTgtMTEtMjJUMDE6MzA6MjkrMDE6MDB4C1WGAAAAIXRFWHRwczpIaVJlc0JvdW5kaW5nQm94ADcxeDE0KzI3MCs2MzbOK9TXAAAAJ3RFWHRwczpMZXZlbABBZG9iZUZvbnQtMS4wOiBDTU1JMTIgMDAzLjAwMgoxF5a7AAAASXRFWHRwczpTcG90Q29sb3ItMAAvZGV2L3NobS96ZjItY2FjaGUvODFjNzg5NTExYjI0ZDA5NzU1NzNmNDkzNTQ3MjBjYjIuZHZpIC1vTg06cwAAAEV0RVh0cHM6U3BvdENvbG9yLTEAL2Rldi9zaG0vemYyLWNhY2hlLzgxYzc4OTUxMWIyNGQwOTc1NTczZjQ5MzU0NzIwY2IyLnBzGsynqQAAAABJRU5ErkJggg==" />. (It&#8217;s fair to call this quantity an angle because <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKcAAAAXCAMAAABZAq+rAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TAGYzdxFEIpnuqlWIzN27Hq7YQAAAAAFiS0dEAIgFHUg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jJUMDE6MzA6MjkrMDE6MDB4C1WGAAAAInRFWHRwczpIaVJlc0JvdW5kaW5nQm94ADEwMHgxNCsyNTUrNjM2SbEgHwAAACd0RVh0cHM6TGV2ZWwAQWRvYmVGb250LTEuMDogQ01NSTEyIDAwMy4wMDIKMReWuwAAAEl0RVh0cHM6U3BvdENvbG9yLTAAL2Rldi9zaG0vemYyLWNhY2hlLzA0NzM2NmM5OGFkYTUzMTU4NjcwNGJhNDdmOTYyZTk4LmR2aSAtb0qtQGwAAABFdEVYdHBzOlNwb3RDb2xvci0xAC9kZXYvc2htL3pmMi1jYWNoZS8wNDczNjZjOThhZGE1MzE1ODY3MDRiYTQ3Zjk2MmU5OC5wc7h3naoAAAAASUVORK5CYII=" /> in the paraxial limit.) The distribution of <em>x</em> and <em>x&#8217;</em> values of particles in the beam is the <em>trace space distribution</em>, and the ellipse that encompasses this distribution is the <em>trace space ellipse</em>.</p>
<h3>Evolution of Phase Space Ellipses</h3>
<p>The ellipse shown in the previous image was approximately symmetric about the <em>x</em>-axis and <em>v<sub>x</sub></em>-axis. However, this isn&#8217;t always the case; as the beam propagates, the ellipse changes shape even in the absence of any forces, simply because the expressions along the two axes are related to each other. Particles with positive transverse velocity (<em>v<sub>x</sub> &gt; 0</em>) will move to the right (the <em>+x</em> direction) in phase space because, by definition, <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGEAAAAXCAMAAAAso9FNAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TACJmiLtVzBEz3ZlEd6rus6rJggAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmAAAAFlSURBVEjH3VTRjoQgDCwUKNIq//+3V0FdwQ3enZt7uEl20zC1pTMAwL+HsR8shs69WfRD+qctwnUtdDT5b5d7A4eXpYgdbacnHfJ1fxg7OqUHDTjTSKRKT7913iD6qrMGILjV8djQjJjTeawrSNDod3O/Hh0BL7gmqN6JfK5lkmnpxobILxxdEVB1tLlvvPCqs/4JFUejVMJ1dGMDnnF0hRlbdetWQ9F5zdDfchhupaNvbWAw2ZRRWhQBcLtQ8WX4TB1dPx9CAlw7xCLAfhvkmJDmnm5ug7xRacvj7jTUc6h1igTzZrjWsz292nDodHaaj2Ll1mhO9MgW95EXDSRT9JwjrZpIkcdRR5dDcPNsBOW1oe6RA0z7LDYxRqeHn8MasC2EST2tkZcbH7xjr02IAM9mUCznoAa0jSz+QoO5dVoTt9Ed32WGu4QRogW1D8c5T944kCSq6PCBgfH78wnMz0v8Fb4AitIK7lPxQW0AAAAldEVYdGRhdGU6Y3JlYXRlADIwMTgtMTEtMjJUMDE6MzA6MzArMDE6MDBQZKh3AAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE4LTExLTIyVDAxOjMwOjMwKzAxOjAwITkQywAAACF0RVh0cHM6SGlSZXNCb3VuZGluZ0JveAA1OHgxNCsyNzYrNjM2vJ6urQAAACd0RVh0cHM6TGV2ZWwAQWRvYmVGb250LTEuMDogQ01NSTEyIDAwMy4wMDIKMReWuwAAAEl0RVh0cHM6U3BvdENvbG9yLTAAL2Rldi9zaG0vemYyLWNhY2hlLzAzZTFhN2IwOWQ2YmRlOTQ5NWM4M2FhYTkyZjQ1MzIyLmR2aSAtb2h3ma8AAABFdEVYdHBzOlNwb3RDb2xvci0xAC9kZXYvc2htL3pmMi1jYWNoZS8wM2UxYTdiMDlkNmJkZTk0OTVjODNhYWE5MmY0NTMyMi5wc/iq9XoAAAAASUVORK5CYII=" />. Similarly, particles with negative transverse velocity will move to the left. The following animation shows the evolution of a phase space ellipse over time for a drifting beam without space charge effects.</p>
<p><script src="https://fast.wistia.com/assets/external/E-v1.js" async></script>
<div class="wistia_embed wistia_async_khojzzyuc0 playerPreference=html5 seo=false wmode=transparent" style="height:333px;position:relative;width:500px">&nbsp;</div>
<p>When the ellipse has reflection symmetry about the <em>x</em>-axis and <em>v<sub>x</sub></em>-axis, we say that it&#8217;s <em>upright</em>. An upright phase space ellipse corresponds to a waist along the beam trajectory.</p>
<h3>Introduction to Beam Emittance</h3>
<p>In beam physics, it&#8217;s often more convenient to work in trace space (the <em>x-x&#8217;</em> plane) than the <em>x-v<sub>x</sub></em> or <em>x-p<sub>x</sub></em> plane. This is partly because the inclination angle <em>x&#8217;</em> is much more useful for visualizing the shape of the beam than the transverse velocity or momentum. A trace space ellipse (an ellipse drawn in the <em>x-x&#8217;</em> plane to encompass the particles in trace space) has the general form</p>
<div class="latex">
\gamma x^2 + 2\alpha x x&#039; + \beta x&#039;^2 = \varepsilon
</div>
<p>where the parameters <em>γ</em>, <em>β</em>, and <em>α</em>, called the <em>Twiss parameters</em> or <em>Courant-Snyder parameters</em>, are not all independent but are instead related by the <em>Courant-Snyder condition</em>,</p>
<p id="equation-1">
<p class="latex-equation-number">(1)</p>
<div class="latex">\gamma \beta -\alpha^2 = 1</div>
</p>
<p>The quantity <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAAAZCAMAAACl4ZgnAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TADOImSIRd0TuVd27ZqrM6iwJ8AAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmAAAAEfSURBVDjLzZRBksQgCEUFQWJa4/1vOyhmerpak1Qli2HhQs2D/yE6918CED09wOHgnCx8HyRFlyIPlKQMLjA5jIgI11noZ5wKWS/rlhmHYl1fV3WD2j1uW6gLl4sVQewSvoJT043XOLQUjV+V+dXkNHBiiOGEw3ohfW+nFf2iliQyZYABw6GcTVN6zfUJI1Q7OO/bVst6MPZcs+o8O/oEYbM1kbQ+9UPTqh/JO3ZL/WbtkDBqCImVYvrcGvdy39G33GI3Sxzr93+VUZlLk/5rlTw+76NsY4p5ynGwgyYjawTKlSfb0Tg22RwUNPQodYtQBPFwrCFHSYnVtZH+YIWqf3D+49sVGKbrpoRTyFkYiOJNTHsMNOT268sPvN/PxA9qTQX7ETdZKQAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxOC0xMS0yMlQwMTozMDozMCswMTowMFBkqHcAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTgtMTEtMjJUMDE6MzA6MzArMDE6MDAhORDLAAAAIXRFWHRwczpIaVJlc0JvdW5kaW5nQm94ADQzeDE1KzI4Mys2MzY+V/rAAAAAJ3RFWHRwczpMZXZlbABBZG9iZUZvbnQtMS4wOiBDTU1JMTIgMDAzLjAwMgoxF5a7AAAASXRFWHRwczpTcG90Q29sb3ItMAAvZGV2L3NobS96ZjItY2FjaGUvYzFkYWRhNmNiYWQwNjdhNmUyOTNiMGJmMWQ5ZDgzNDMuZHZpIC1vyQKS8wAAAEV0RVh0cHM6U3BvdENvbG9yLTEAL2Rldi9zaG0vemYyLWNhY2hlL2MxZGFkYTZjYmFkMDY3YTZlMjkzYjBiZjFkOWQ4MzQzLnBzFh/spgAAAABJRU5ErkJggg==" /> is also called the Courant-Snyder invariant.</p>
<p>Altogether, the parameters <em>γ</em>, <em>β</em>, <em>α</em>, and <em>ε</em> describe the shape, size, and orientation of the trace space ellipse as follows:</p>
<ul>
<li><em>γ</em> is most often written in terms of the other parameters using Eq. <a href="#equation-1">(1)</a>. It describes the proportions of the beam. As <em>γ</em> increases with <em>ε</em> held constant, the beam occupies a smaller region of space (narrower range of <em>x</em> values) but a wider velocity spread (wider range of <em>x&#8217;</em> values).</li>
<li><em>α</em> describes the tilt of the trace space ellipse. For an upright ellipse, this corresponds to a beam waist, <em>α = 0</em>. The beam is converging if <em>α &gt; 0</em> and diverging if <em>α &lt; 0</em>.</li>
<li><em>β</em>, also called the <em>amplitude function</em> or <em>betatron function</em>, describes the proportions of the beam. As <em>β</em> increases with <em>ε</em> held constant, the beam occupies a larger region of space (wider range of <em>x</em> values) but a narrower velocity spread (smaller range of <em>x&#8217;</em> values).</li>
<li><em>ε</em> describes the size of the trace space ellipse. It&#8217;s also called the <em>emittance</em>. Since we&#8217;re talking about the transverse position and momentum, we can be more specific by calling this the <em>transverse emittance</em>.</li>
</ul>
<p>Although beam emittance describes the size of the ellipse, there are several different conventions as to how the emittance and ellipse area are actually related. By one convention, the emittance is the product of the lengths of the semimajor and semiminor axes of the ellipse, with the result that <em>A = 4πε</em>. This is illustrated in the following diagram, which further shows how the Twiss parameters are related to the ellipse proportions and orientation.</p>
<p><img src="https://cdn.comsol.com/wordpress/2016/09/Twiss-parameters.png" title="" alt="Diagram depicting how the Twiss parameters are related to the ellipse proportions and orientation." width="1000" height="741" class="alignnone size-full wp-image-183041" /></p>
<p>It&#8217;s also extremely common to multiply the reported emittance by 4, so that <em>A = πε</em>. In some resources, the division by <em>π</em> is also omitted, so that <em>A = ε</em>. When entering or reading the reported beam emittance, it&#8217;s extremely important to keep track of which convention is used.</p>
<h3>Statistical Interpretations of Emittance</h3>
<p>So far, we&#8217;ve seen that the beam emittance is an indication of the phase space area covered by the beam. However, in addition to this geometric interpretation, it&#8217;s possible to define a statistical interpretation in which the emittance is described in terms of averages over the ensemble of particles.</p>
<p>The <em>root-mean-square emittance</em> (or RMS emittance) can be defined as</p>
<p id="equation-2">
<p class="latex-equation-number">(2)</p>
<div class="latex">\varepsilon = \sqrt{\left\textless\left{(x -(x))}^2\right&gt;<br />
\left\textless\left{(x&#039; -(x&#039;))}^2\right&gt;<br />
- \left\textless\left{(x- (x))\left(x&#039; -(x&#039;))\right&gt;^2}</div>
</p>
<p>where the angle brackets represent arithmetic means, i.e.,</p>
<div class="latex">(x) = \frac{1}{N}\sum_{i=1}^{N} x_i</div>
<p>As in the geometrical definition of emittance, it&#8217;s extremely common to multiply the expression for RMS emittance by 4:</p>
<p id="equation-3">
<p class="latex-equation-number">(3)</p>
<div class="latex">\varepsilon = 4\sqrt{\left\textless\left(x -(x))^2\right&gt;<br />
\left\textless\left(x&#039; -(x&#039;))^2\right&gt;<br />
- \left\textless\left(x- (x))\left(x&#039;-(x&amp;#39)\right)\right&gt;^2}</div>
</p>
<p>In COMSOL Multiphysics, we take extra precautions to ensure that the definition of the emittance is made clear by referring to Eq. <a href="#equation-2">(2)</a> as the <em>1-rms emittance</em> and Eq. <a href="#equation-3">(3)</a> as the <em>4-rms emittance</em>. If the trace space ellipse is positioned so that its center lies at the origin of the <em>x-x&#8217;</em> plane, then <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJ0AAAAXCAMAAAAm071aAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TAGYzdxFEmSKqiFXMu93u++qtYgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmAAAAIrSURBVEjH7ZbJYoUgDEVllkH5/78tSRhEXgXbTRfN4rWi93AJBNi2//htMN49CvkD0VKskftQon+W+geibeOmvqvGeT+EJXLjoGQferZTxCByVjmNXGEV8w7bdsd2+Y7cOBRaDZ8EM4PcReaAUfv0w8CAjYngjuRM+VfkxslZ8OM3bjYDg0hjUiBlOxhTMbk/sC26N+TGoWCfkn1O3A2iExtC6tuw9I+IfDOR2uwbcuNQ7NmntNalNcPwIahnSBY1TURBCPl92CF/trbZWh0T8o2zefpcCrAsXUSOrhXJVYtWgCRqGkVUi1SptIVaIHc+gNGajGdyx0G39Ae2ojQJnMS2Toe9xtaLmqZQI3VrNXSnwZKJ0KZk4z2RO87FHeBONzK+mYCbplCP/J6dHEon/Yg2SwvkO2erNjce5RrjIsoaQ5VZnci448wLJ0O/Mz6T75yLO+E/MMTDzF40uQL2tE3TPtJG3x8qE3Ll5DhqEQFXEkuzmpzL2m3lVkVFQ568SMlEckyj55AHfvZn64RcOeU5LxwuYa/J53SYHPEoumoU5MqAE6xOBzMUYG8L4MYcdUVPyI1TEoytXlkeVLl4zHZjFHUaoaXBnrl2yh3gKR2ZinJhzrqQpuTCoTC0ciQUWUnw9CQjUacxguURq1QLpakcq3aVfOFgfLgF6Ne3gFmU1TYn380ONyg+v0GNosdwZpk8jIvdGvTCFXYQPUapwRXy0NNfvrn/0fgCvAcSskKD0OsAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTgtMTEtMjJUMDE6MzA6MzArMDE6MDBQZKh3AAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE4LTExLTIyVDAxOjMwOjMwKzAxOjAwITkQywAAACF0RVh0cHM6SGlSZXNCb3VuZGluZ0JveAA5NHgxNCsyNTgrNjM20dZFvQAAACZ0RVh0cHM6TGV2ZWwAQWRvYmVGb250LTEuMDogQ01SMTIgMDAzLjAwMgrts95LAAAASXRFWHRwczpTcG90Q29sb3ItMAAvZGV2L3NobS96ZjItY2FjaGUvOTkxNWY0N2I2NGQ5YzE1OTBhYjc3MmQyZTkxNTBkZTkuZHZpIC1vOOUqtgAAAEV0RVh0cHM6U3BvdENvbG9yLTEAL2Rldi9zaG0vemYyLWNhY2hlLzk5MTVmNDdiNjRkOWMxNTkwYWI3NzJkMmU5MTUwZGU5LnBzo8vDSgAAAABJRU5ErkJggg==" /> and Eq. <a href="#equation-2">(2)</a> can be simplified to</p>
<div class="latex">\varepsilon_{1,\textrm{rms}} = \sqrt{(x^2)(x&#039;^2) -(xx&#039;)^2}</div>
<p>where subscripts have been used to indicate more clearly that this is the 1-rms emittance. Similarly, it&#8217;s possible to write statistical definitions of the Twiss parameters (again using the simplifying assumption <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJ0AAAAXCAMAAAAm071aAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TAGYzdxFEmSKqiFXMu93u++qtYgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmAAAAIrSURBVEjH7ZbJYoUgDEVllkH5/78tSRhEXgXbTRfN4rWi93AJBNi2//htMN49CvkD0VKskftQon+W+geibeOmvqvGeT+EJXLjoGQferZTxCByVjmNXGEV8w7bdsd2+Y7cOBRaDZ8EM4PcReaAUfv0w8CAjYngjuRM+VfkxslZ8OM3bjYDg0hjUiBlOxhTMbk/sC26N+TGoWCfkn1O3A2iExtC6tuw9I+IfDOR2uwbcuNQ7NmntNalNcPwIahnSBY1TURBCPl92CF/trbZWh0T8o2zefpcCrAsXUSOrhXJVYtWgCRqGkVUi1SptIVaIHc+gNGajGdyx0G39Ae2ojQJnMS2Toe9xtaLmqZQI3VrNXSnwZKJ0KZk4z2RO87FHeBONzK+mYCbplCP/J6dHEon/Yg2SwvkO2erNjce5RrjIsoaQ5VZnci448wLJ0O/Mz6T75yLO+E/MMTDzF40uQL2tE3TPtJG3x8qE3Ll5DhqEQFXEkuzmpzL2m3lVkVFQ568SMlEckyj55AHfvZn64RcOeU5LxwuYa/J53SYHPEoumoU5MqAE6xOBzMUYG8L4MYcdUVPyI1TEoytXlkeVLl4zHZjFHUaoaXBnrl2yh3gKR2ZinJhzrqQpuTCoTC0ciQUWUnw9CQjUacxguURq1QLpakcq3aVfOFgfLgF6Ne3gFmU1TYn380ONyg+v0GNosdwZpk8jIvdGvTCFXYQPUapwRXy0NNfvrn/0fgCvAcSskKD0OsAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTgtMTEtMjJUMDE6MzA6MzArMDE6MDBQZKh3AAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE4LTExLTIyVDAxOjMwOjMwKzAxOjAwITkQywAAACF0RVh0cHM6SGlSZXNCb3VuZGluZ0JveAA5NHgxNCsyNTgrNjM20dZFvQAAACZ0RVh0cHM6TGV2ZWwAQWRvYmVGb250LTEuMDogQ01SMTIgMDAzLjAwMgrts95LAAAASXRFWHRwczpTcG90Q29sb3ItMAAvZGV2L3NobS96ZjItY2FjaGUvOTkxNWY0N2I2NGQ5YzE1OTBhYjc3MmQyZTkxNTBkZTkuZHZpIC1vOOUqtgAAAEV0RVh0cHM6U3BvdENvbG9yLTEAL2Rldi9zaG0vemYyLWNhY2hlLzk5MTVmNDdiNjRkOWMxNTkwYWI3NzJkMmU5MTUwZGU5LnBzo8vDSgAAAABJRU5ErkJggg==" />):</p>
<div class="latex">\begin{aligned}<br />
\gamma &amp;= \frac{(x&#039;^2)}{\varepsilon_{1,\textrm{rms}}} \\<br />
\beta &amp;= \frac{(x^2)}{\varepsilon_{1,\textrm{rms}}} \\<br />
\alpha &amp;= -\,\frac{(xx&#039;)}{\varepsilon_{1,\textrm{rms}}}<br />
\end{aligned}</div>
<p>From the statistical definitions of the Twiss parameters, it&#8217;s much clearer that <em>α</em> is positive when most of the particles lie in the 2<sup>nd</sup> and 4<sup>th</sup> quadrants of trace space, which means that the beam is converging.</p>
<p>The advantage of the statistical interpretation of beam emittance is that it removes the ambiguity of drawing an ellipse around an arbitrary phase space distribution to find its area. A disadvantage is that if there is no obvious cutoff distance, then a small number of particles a great distance away from the beam center can considerably skew the emittance and Twiss parameters. Sometimes these particles, such as those found at the end of Gaussian &#8220;tails&#8221;, are intentionally excluded from the statistical definition of beam emittance.</p>
<h3>Interpretations of Beam Emittance</h3>
<p>A lower value of the beam emittance is associated with some combination of the following beam properties:</p>
<ul>
<li>Smaller beam size (reduced range of <em>x</em> values)</li>
<li>Smaller velocity spread (reduced range of <em>x&#8217;</em> values)</li>
</ul>
<p>It&#8217;s typically desirable to reduce beam emittance whenever possible. However, most processes tend to either keep the emittance constant or increase it. Several techniques for <em>beam cooling</em>, or emittance reduction, are available, but delving too deeply into beam cooling methods is beyond the scope of this series.</p>
<p>Why are we so concerned with reducing beam emittance? Among other reasons, we must remember that fundamental research in particle physics has driven the development of particle accelerators to a large degree, especially in extremely high-energy applications. To make particles undergo collisions at extremely high energy, it&#8217;s often necessary to make two beams of particles intersect each other, rather than having one beam interact with a stationary target. However, the collision cross section for two intersecting beams is much smaller than the collision cross section for a single beam interacting with a stationary target.</p>
<p>A technical aim of modern accelerators is therefore to fit as many energetic particles into a narrow space as possible to maximize the collision probability. Higher emittance either means that the particles are spread over a large area or that there are big differences among the particle velocities that will cause them to occupy a large area later on. Either one of these outcomes is detrimental to the frequency of collisions between the intersecting beams.</p>
<h3>Extending to the 3D Environment</h3>
<p>So far, we&#8217;ve explored what particle beams are, how to distinguish between laminar and nonlaminar beams, and how the phase space distribution in a nonlaminar beam is tied to the concept of transverse beam emittance. We&#8217;ve learned that real-world beams typically occupy some finite-sized area in phase space or trace space, and that the emittance is a figure-of-merit that is usually proportional in some way to the phase space area. Furthermore, we&#8217;ve seen two different ways to interpret beam emittance: geometrically, as in a phase space area, or statistically, in terms of the averages over beam particles and their inclination angles.</p>
<p>We have, however, only discussed ideal sheet beams in 2D. When extending to 3D, we&#8217;ll have to consider emittance in two orthogonal transverse directions. Real-world beams also have some distribution of velocity in the axial direction, which gives rise to the <em>longitudinal emittance</em>.</p>
<p>Next, we&#8217;ll look at phase space distributions in particle beams in 3D for the first time and learn how to sample from phase space distributions to reproduce some of the phase space ellipses we&#8217;ve seen thus far.</p>
<h3>Other Posts in This Series</h3>
<ol>
<li><a href="/blogs/sampling-random-numbers-from-probability-distribution-functions/">Sampling Random Numbers from Probability Distribution Functions</a></li>
<li><a href="/blogs/sampling-from-phase-space-distributions-in-3d-charged-particle-beams/">Sampling from Phase Space Distributions in 3D Charged Particle Beams</a></li>
</ol>
<h3>References</h3>
<ol>
<li>Humphries, Stanley. <em>Charged Particle Beams</em>. Courier Corporation, 2013.</li>
<li>Davidson, Ronald C., and Hong Qin. <em>Physics of intense charged particle beams in high energy accelerators</em>. Imperial college press, 2001.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>https://www.comsol.no/blogs/phase-space-distributions-and-emittance-in-2d-charged-particle-beams/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sampling Random Numbers from Probability Distribution Functions</title>
		<link>https://www.comsol.no/blogs/sampling-random-numbers-from-probability-distribution-functions/</link>
		<comments>https://www.comsol.no/blogs/sampling-random-numbers-from-probability-distribution-functions/#comments</comments>
		<pubDate>Thu, 15 Sep 2016 22:07:47 +0000</pubDate>
		<dc:creator><![CDATA[Christopher Boucher]]></dc:creator>
				<category><![CDATA[Electrical]]></category>
		<category><![CDATA[Particle Tracing]]></category>
		<category><![CDATA[Particle Tracing Module]]></category>
		<category><![CDATA[Technical Content]]></category>

		<guid isPermaLink="false">http://com.staging.comsol.com/blogs?p=182021</guid>
		<description><![CDATA[In this blog series, we&#8217;ll investigate the simulation of beams of ions or electrons using particle tracking techniques. We&#8217;ll begin by providing some background information on probability distribution functions and the different ways in which you can sample random numbers from them in the COMSOL Multiphysics® software. In later installments, we&#8217;ll show how this underlying mathematics can be used to accurately simulate the propagation of ion and electron beams in real-world systems. The Motivation Behind Utilizing Probability Distribution Functions Energetic [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>In this blog series, we&#8217;ll investigate the simulation of beams of ions or electrons using particle tracking techniques. We&#8217;ll begin by providing some background information on probability distribution functions and the different ways in which you can sample random numbers from them in the COMSOL Multiphysics® software. In later installments, we&#8217;ll show how this underlying mathematics can be used to accurately simulate the propagation of ion and electron beams in real-world systems.</p>
<p><span id="more-182021"></span></p>
<h3>The Motivation Behind Utilizing Probability Distribution Functions</h3>
<p>Energetic beams of ions and electrons are a topic of great interest in the fundamental research of high-energy and nuclear physics. But they are also utilized in a wealth of application areas, including cathode ray tubes, the production of medical isotopes, and nuclear waste treatment. In the accurate computational modeling of beam propagation, the initial values of the particle position and velocity components are of particular importance.</p>
<p>When releasing ions or electrons in a beam for a particle tracing simulation, we&#8217;re often required to sample these particles as discrete points in <em><a href="https://en.wikipedia.org/wiki/Phase_space" target="_blank">phase space</a></em>. However, before we delve too deeply into what phase space is and how ions or electrons fit into it, let&#8217;s learn more about probability distribution functions and how they can be utilized in COMSOL Multiphysics.</p>
<h3>Introduction to Probability Distribution Functions</h3>
<p>Let&#8217;s start with some definitions. A <em>continuous random variable</em> <em>x</em> is a random variable that can take on infinitely many values. For example, suppose that a point <em>x<sub>1</sub></em> is selected at random along a line segment of length <em>L</em>. Then a second point <em>x<sub>2</sub></em> is selected elsewhere along this line. Assuming that these two points are distinct, we can then select a third distinct point <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJEAAAAXCAMAAAA8713UAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TAGYzdxEiRJmIVarMu+7dPppRJAAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmAAAAHbSURBVEjH7VbZdoQgDGUnCA7//7eVsKM1c8a2T82DI0xuvGSFsX/5DeHioQGpxpXmTwkZ+dSCsuMKHO4Z/bG57Smh41AwLHx6SADrP/S9NaSKIzVCd4hI7GQiA/tHblKe1gk05x43EJWhikACL4S/gaIZsb294Qlj6M/EDY7kkvBeym+OxsyMLlVDjb3DEzpcxuI5ddROsMrFJbGE6dL/8uYOc8HoWtXWgrU9d1wsNFN3CMDEWtQwStuNt5gLRteqzeKg6+te4r7nWAhugCjBuGKYHiDZoz7/nM0fJa5nRrwTtWOXEjF3Ua+Z29mtxBXDeez9QKJDX/iUq/kUP7OridHW2jef2qb0Lahmn61fR23AHFtrh1prraia2JWLxd5usYZ7Tm2QT5BeW02Mmd2/+TInDMmoqprUc3KILS8Orh/DF16YC7VDGX9CbkTfxOqfMPeMZlUGJTYhEwslaCIMoTjyEEQwdaAbopVLOGHuGU2qpiZLzg3dlhGlGFIiTV5USEGI96Nd+xlDRm1UTS0AD1ymiKQmIH+lQBNa50l7YvSdBXH84dBZpQmQM1KBM5aaW3q5jXCIJKYgMTZILQOEpUHijXsTf3znY7ak+dPLaKP0U7faH7j7/YV8AT7gDjfelXIdAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE4LTExLTIxVDIzOjUwOjM5KzAxOjAwhbPi8wAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxOC0xMS0yMVQyMzo1MDozOSswMTowMPTuWk8AAAAhdEVYdHBzOkhpUmVzQm91bmRpbmdCb3gAODd4MTQrMjYyKzYzNrf6JMcAAAAndEVYdHBzOkxldmVsAEFkb2JlRm9udC0xLjA6IENNTUkxMiAwMDMuMDAyCjEXlrsAAABJdEVYdHBzOlNwb3RDb2xvci0wAC9kZXYvc2htL3pmMi1jYWNoZS82OTE0N2I2ZTM3YWRiYTFhZDViNzI2MWVjY2Y3Y2M5Ny5kdmkgLW8FiWCUAAAARXRFWHRwczpTcG90Q29sb3ItMQAvZGV2L3NobS96ZjItY2FjaGUvNjkxNDdiNmUzN2FkYmExYWQ1YjcyNjFlY2NmN2NjOTcucHPORuTaAAAAAElFTkSuQmCC" /> that is also on the line, then a fourth point <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJEAAAAXCAMAAAA8713UAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADN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RFWHRwczpTcG90Q29sb3ItMAAvZGV2L3NobS96ZjItY2FjaGUvNzRhZTczNTg2NzJjMDk2NGI3NzI4ZDNkZGQxNzMyMTAuZHZpIC1vw9fPBQAAAEV0RVh0cHM6U3BvdENvbG9yLTEAL2Rldi9zaG0vemYyLWNhY2hlLzc0YWU3MzU4NjcyYzA5NjRiNzcyOGQzZGRkMTczMjEwLnBzivHbpQAAAABJRU5ErkJggg==" />, and so on, and thus infinitely many distinct points can be obtained. This is illustrated below.</p>
<p><img src="https://cdn.comsol.com/wordpress/2016/09/discrete_random_number_line.png" title="" alt="Image depicting distinct points on three lines." width="515" height="198" class="alignnone size-full wp-image-182121" /></p>
<p>As a side note, the other kind of random variable is called a <em>discrete random variable</em> and can only take on specified values. Think about flipping a coin or drawing a card from a deck; the number of outcomes is finite.</p>
<p>A 1D <em>probability distribution function</em> (PDF) or <a href="https://en.wikipedia.org/wiki/Probability_density_function" target="_blank">probability density function</a> <em>f(x)</em> describes the likelihood that the value of the continuous random variable will take on a given value. For example, the probability distribution function</p>
<p id="eq1">
<p class="latex-equation-number">(1)</p>
</p>
<div class="latex">f(x) = \left\{<br />
\begin{array}{cc}<br />
0 &amp; x\leq 0\\<br />
1 &amp; 0\textless x \textless 1\\<br />
0 &amp; 1\leq x<br />
\end{array}<br />
\right.</div>
<p>describes a variable <em>x</em> that has a uniform chance to take on any value in the open interval <em>(0, 1)</em> but has no chance of having any other value. This PDF, a <em>uniform distribution</em>, is plotted below.</p>
<p><img src="https://cdn.comsol.com/wordpress/2016/09/uniform_distribution_comsol.png" title="" alt="Plot depicting a uniform distribution." width="1000" height="750" class="alignnone size-full wp-image-182131" /></p>
<blockquote><p>Probability distribution functions can also be applied for discrete random variables, and even for variables that are continuous over some intervals and discrete elsewhere. An alternative way to interpret such a random variable is to treat it as a continuous random variable for which the PDF includes one or more <a href="https://en.wikipedia.org/wiki/Dirac_delta_function" target="_blank">Dirac delta functions</a>. This blog series will only consider continuous random variables.</p></blockquote>
<p>The PDF is <em>normalized</em> if</p>
<div class="latex">\int_{-\infty}^{\infty} f(x)dx = 1</div>
<p>In other words, the total probability that the variable <em>x</em> takes on a value somewhere in the range <em>(-∞, ∞)</em> is unity.</p>
<p>A <em>cumulative distribution function</em> (CDF) <em>F(x)</em> is the likelihood that the value of the continuous random variable lies in the interval <em>(-∞, x)</em>. The PDF and CDF are related by integration,</p>
<div class="latex">F(x) = \int_{-\infty}^{x} f(x^\prime) dx^\prime</div>
<p>From the above definition, it is clear that if the probability distribution function is normalized, then</p>
<div class="latex">\textrm{lim}_{x \rightarrow \infty} F(x) = 1</div>
<p>The PDF from Eq.<a href="#eq1">(1)</a> and the corresponding CDF are plotted below. It is clear that the PDF, as written, is normalized.</p>
<p><img src="https://cdn.comsol.com/wordpress/2016/09/uniform_cumulative.png" alt="Graph comparing a uniform and uniform, cumulative distribution." width="1000" height="750" class="alignnone size-full wp-image-182141" title="uniform cumulative" /></p>
<h3>Sampling from a 1D Distribution</h3>
<p>Selecting a value at random from a uniform distribution is usually quite easy. In most programming languages, routines to generate uniformly distributed random numbers are readily available. However, suppose that we have a much more arbitrary distribution like the one shown below.</p>
<p><img src="https://cdn.comsol.com/wordpress/2016/09/arbitrary_1d_distribution.png" title="" alt="Graph showing an arbitrary distribution." width="1000" height="750" class="alignnone size-full wp-image-182151" /></p>
<p>The random number takes on values in the interval <em>(0, 1)</em>, and the PDF is normalized because the CDF ends up at 1. However, the distribution is clearly not uniform; for example, the random number is much more likely to be in the range <em>(0.2, 0.3)</em> than the range <em>(0.7, 0.8)</em>. Simply using a built-in routine that samples uniformly distributed random numbers from the interval <em>(0, 1)</em> would not be correct. Therefore, we must consider alternative ways to sample random numbers from this arbitrary-looking PDF.</p>
<p>This brings us to one of the most fundamental methods for sampling values from a probability distribution function, <em><a href="https://en.wikipedia.org/wiki/Inverse_transform_sampling" target="_blank">inverse transform sampling</a></em>. Let <em>U</em> be a uniformly distributed random number between zero and one. (In other words, <em>U</em> follows the distribution function given by Eq.<a href="#eq1">(1)</a>.) Then to sample a random number with a (possibly nonuniform) probability distribution function <em>f(x)</em>, do the following:</p>
<ol>
<li>Normalize the function <em>f(x)</em> if it isn&#8217;t already normalized.</li>
<li>Integrate the normalized PDF <em>f(x)</em> to compute the CDF, <em>F(x)</em>.</li>
<li>Invert the function <em>F(x)</em>. The resulting function is the <em>inverse cumulative distribution function</em> or <em>quantile function</em> <em>F<sup>-1</sup>(x)</em>. Because we&#8217;ve already normalized <em>f(x)</em>, we could also clarify by calling this the <em>inverse normal cumulative distribution function</em>, or simply the inverse normal CDF.</li>
<li>Substitute the value of the uniformly distributed random number <em>U</em> into the inverse normal CDF.</li>
</ol>
<p>To summarize, <em>F<sup>-1</sup>(U)</em> is a random number with a probability distribution function <em>f(x)</em> if <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFcAAAAXCAMAAABJTiMyAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TAGYzdxEiiFVEmcyqu93uY3P2JAAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmAAAAFeSURBVDjL3ZXLtsMgCEV9gaAk/v/fthrT+EjSdHAnl0HTpbCBIyZK/W/T5n7fuuM/YLYc9H742zCy5WFg3tqWHLdrmLYyfIBbrIvFC8nz4AgoNTM2qxLqor7vkikjllxxaNcN2iA7q8mYahLsq/AobztyuQLj4hwGwWTn+kMJStWp7UEZQepjddlfy6/wBVetjbxu5sIyHX0s6RP1nJErn2o+8ra9yTxRgUpzJQ4vuWwnedvhixNWJdVw0xUX965P5SWmanDOXb5yT+UlwWrUc2Gr4lrfDzdWeXV7/Jc6VNUkfuXWI3DYO87ntpTEcZtfe8XlfeCp6ODYdY5Gpju9zRllZWF1eRTtCfcoSAcii26gmDBcP2W3jiw7KMGw7mIgrytX9+NeKND67IWjY3+PoR4EWF2LoDnIs/rZeOTgiQ88QnU2DomZ6zX4kNUr079I7ezB7iFqAP/wHfoLewGMUQm73z9OYgAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxOC0xMS0yMlQwMTozMDozMSswMTowMPYTo8MAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTgtMTEtMjJUMDE6MzA6MzErMDE6MDCHTht/AAAAIXRFWHRwczpIaVJlc0JvdW5kaW5nQm94ADUyeDE0KzI3OSs2MzbU+dEdAAAAJ3RFWHRwczpMZXZlbABBZG9iZUZvbnQtMS4wOiBDTU1JMTIgMDAzLjAwMgoxF5a7AAAASXRFWHRwczpTcG90Q29sb3ItMAAvZGV2L3NobS96ZjItY2FjaGUvNWIwZTA2NjZhYTM5NmQ1ZTZjMmViYjUzNzM0MWNkY2IuZHZpIC1vP1+3cQAAAEV0RVh0cHM6U3BvdENvbG9yLTEAL2Rldi9zaG0vemYyLWNhY2hlLzViMGUwNjY2YWEzOTZkNWU2YzJlYmI1MzczNDFjZGNiLnBzE4bIbAAAAABJRU5ErkJggg==" />. Let&#8217;s look at an example in which this method is used to sample from a nonuniform probability distribution function.</p>
<h3>Example 1: The Rayleigh Distribution</h3>
<p>The <em>Rayleigh distribution</em> appears quite frequently in the equations of rarefied gas dynamics and beam physics. It is given by</p>
<p id="eq2">
<p class="latex-equation-number">(2)</p>
</p>
<div class="latex">f(x) = \left\{<br />
\begin{array}{cc}<br />
0 &amp; x\textless 0 \\<br />
\frac{x}{\sigma^2} \exp\left(-\frac{x^2}{2\sigma^2}\right) &amp; x\geq 0<br />
\end{array}<br />
\right.</div>
<p>where <em>σ</em> is a scale factor yet to be specified. We can verify that the Rayleigh distribution, as written above, is normalized,</p>
<div class="latex">\begin{aligned}<br />
\int_{0}^{\infty} \frac{x}{\sigma^2} \exp\left(-\frac{x^2}{2\sigma^2}\right)dx<br />
&amp;= \lim_{x \rightarrow \infty} \left.-\exp\left(-\frac{x^\prime^2}{2\sigma^2}\right)\right|^x_0\\<br />
&amp;= 1-\lim_{x \rightarrow \infty}\exp\left(-\frac{x^2}{2\sigma^2}\right)\\<br />
&amp;= 1<br />
\end{aligned}</div>
<p>The cumulative distribution function is</p>
<div class="latex">\begin{aligned}<br />
F(x)<br />
&amp;=\int_{0}^{x} \frac{x^\prime}{\sigma^2} \exp\left(-\frac{x^\prime^2}{2\sigma^2}\right)dx^\prime\\<br />
&amp;= \left.-\exp\left(-\frac{x^\prime^2}{2\sigma^2}\right)\right|^x_0\\<br />
&amp;= 1-\exp\left(-\frac{x^2}{2\sigma^2}\right)<br />
\end{aligned}</div>
<p>For <em>σ = 1</em>, the normalized Rayleigh distribution and its cumulative distribution function are plotted below. For larger values of <em>x</em>, it is apparent that the CDF approaches unity.</p>
<p><img src="https://cdn.comsol.com/wordpress/2016/09/rayleigh_cumulative_sigma1.png" title="" alt="Graph plotting a Rayleigh distribution against a Rayleigh, cumulative distribution." width="1000" height="750" class="alignnone size-full wp-image-182161" /></p>
<p>To compute the inverse normal CDF, set <em>y = F(x)</em> and solve for <em>x</em>:</p>
<div class="latex">\begin{aligned}<br />
y &amp;= F(x)\\<br />
y &amp;= 1-\exp\left(-\frac{x^2}{2\sigma^2}\right)\\<br />
\exp\left(-\frac{x^2}{2\sigma^2}\right) &amp;= 1-y\\<br />
-\frac{x^2}{2\sigma^2} &amp;= \log\left(1-y\right)\\<br />
x &amp;= \sigma \sqrt{-2 \log\left(1-y\right)}<br />
\end{aligned}</div>
<p>Now substitute the uniformly distributed random number <em>U</em> for the variable <em>y</em>,</p>
<div class="latex">x = \sigma \sqrt{-2 \log\left(1-U\right)}</div>
<p>Since <em>U</em> is uniformly distributed in the interval <em>(0, 1)</em> and because its value has not yet been determined, we can further simplify this expression by noting that <em>U</em> and <em>1 &#8211; U</em> follow exactly the same probability distribution function. Thus, we arrive at the final expression for the sampled value of <em>x</em>,</p>
<p id="eq3">
<p class="latex-equation-number">(3)</p>
</p>
<div class="latex">x = \sigma \sqrt{-2 \log U}</div>
<p>Next, we&#8217;ll discuss how Eq.<a href="#eq3">(3)</a> can be used in a COMSOL model to sample values from the Rayleigh distribution.</p>
<p>Note that when computing the inverse normal CDF, it is not always possible to do so analytically. There is not always a closed-form analytical solution for the integral of any function, and it is not always possible to write an expression for the inverse of the cumulative distribution function. The Rayleigh distribution has intentionally been used here because its inverse normal CDF can be derived without the need for numerical or approximate methods.</p>
<h3>Random Sampling in COMSOL Multiphysics®</h3>
<p>We can use the results of the above analysis to sample from an arbitrary 1D distribution, such as the Rayleigh distribution, in COMSOL Multiphysics. To begin, let&#8217;s consider the built-in tools for sampling from specific types of distribution.</p>
<p>There are several ways to define pseudorandom numbers (we&#8217;ll talk more the meaning of &#8220;pseudorandom&#8221; later on) in COMSOL Multiphysics. You can use the <em>Random</em> function feature, available from the <em>Global Definitions</em> and <em>Definitions</em> nodes, to define a pseudorandom number with a uniform or normal distribution. When a <em>Uniform</em> distribution is used, specify the <em>Mean</em> and <em>Range</em>. For a mean value <em>μ<sub>u</sub></em> and a range <em>σ<sub>u</sub></em>, the PDF is</p>
<div class="latex">f(x) = \left\{<br />
\begin{array}{cc}<br />
0 &amp; x \leq \mu_u-\frac{\sigma_u}{2}\\<br />
\frac{1}{\sigma_u} &amp; \mu_u-\frac{\sigma_u}{2} \textless x \textless  \mu_u + \frac{\sigma_u}{2}\\<br />
0 &amp; \mu_u + \frac{\sigma_u}{2} \leq x\\<br />
\end{array}<br />
\right.</div>
<p>An example of a uniform distribution with a mean of 1 and range of 1.5 is shown below.</p>
<p><a href="https://cdn.comsol.com/wordpress/2016/09/comsol_multiphysics_ui_distribution_uniform.png" target="_blank"><img src="https://cdn.comsol.com/wordpress/2016/09/comsol_multiphysics_ui_distribution_uniform.png" title="Uniform distribution" alt="Screenshot depicting the Uniform Distribution setting in COMSOL Multiphysics." width="1000" height="669" class="alignnone size-full wp-image-182201" /></a></p>
<p>When a <em>Normal</em>, or Gaussian, distribution is used, specify the <em>Mean</em> and <em>Standard Deviation</em>. For a mean value of <em>μ<sub>n</sub></em> and standard deviation of <em>σ<sub>n</sub></em>, the PDF is</p>
<div class="latex">f(x) = \frac{1}{\sigma_n \sqrt{2\pi}} \exp\left(-\frac{\left(x-\mu_n \right)^2}{2\sigma_n^2}\right)</div>
<p>An example of a normal distribution with a mean of 1 and standard deviation of 1.5 is shown below. As with the uniform distribution, the curve is jagged and unpredictable. Unlike the uniform distribution, the points along the curve are very dense close to the line <em>y = 1</em> and fall off gradually from there.</p>
<p><a href="https://cdn.comsol.com/wordpress/2016/09/distribution_normal_ui.png" target="_blank"><img src="https://cdn.comsol.com/wordpress/2016/09/distribution_normal_ui.png" title="Normal distribution" alt="Screen capture displaying the Normal Distribution settings." width="1000" height="670" class="alignnone size-full wp-image-182211" /></a></p>
<p>For the default settings, in which the mean is 0 and the range or standard deviation is 1, the two distributions are compared below.</p>
<p><img src="https://cdn.comsol.com/wordpress/2016/09/normal_uniform_plot.png" title="" alt="Plot comparing a normal distribution and a uniform distribution." width="1000" height="750" class="alignnone size-full wp-image-182221" /><br />
<em>Comparison of the uniform PDF with the unit range and the Gaussian PDF with the unit standard deviation.</em></p>
<p>Instead of using the Random function feature, you can also use the built-in functions <code>random</code> and <code>randomnormal</code> in any expression. The <code>random</code> function is a uniform distribution with a mean of 0 and range of 1; the <code > randomnormal</code> function is a normal distribution with a mean of 0 and standard deviation of 1.</p>
<p>Remembering that for Eq.<a href="#eq3">(3)</a> we need a number <em>U</em> that is sampled uniformly from the interval <em>(0, 1)</em>, we have two options:</p>
<ol>
<li>Use the Random function feature with a mean of 0.5 and range of 1.</li>
<li>Use the built-in <code>random</code> function and add 0.5.</li>
</ol>
<p>In the following case, we&#8217;ll assume that the second approach is used, although both are feasible.</p>
<h3>Random Numbers, Pseudorandom Numbers, and Seeding</h3>
<p>We&#8217;ve mentioned that the above methods are used to generate pseudorandom numbers. <em><a href="https://en.wikipedia.org/wiki/Pseudorandomness" target="_blank">Pseudorandom</a></em> means that the random number is generated in a deterministic way from an initial value or <em>seed</em>. For the built-in <code>random</code> function, the seed is the argument (or arguments) to the function. In comparison, truly random numbers cannot be generated by a program alone but require some natural source of entropy &mdash; that is, a natural process that is inherently unpredictable and unrepeatable, such as radioactive decay or atmospheric noise.</p>
<p>There are several reasons why it is more convenient to work with pseudorandom numbers than truly random numbers. Their reproducibility can be used to troubleshoot Monte Carlo simulations because the same result can be obtained by running a simulation several times in a row with the same seed, making it easier to identify changes elsewhere in the model. Because they don&#8217;t require a natural entropy source, which can only harvest a finite amount of entropy in the environment in a finite time, pseudorandom numbers are less likely than truly random numbers to increase the required simulation time.</p>
<p>In exchange for the convenience of pseudorandom numbers, some extra precautions must be taken. The pseudorandom number is different for distinct values of the seed, but the same seed will repeatedly produce the same number. To see this in any COMSOL model, create a Global Evaluation node and repeatedly evaluate the built-in <code>random</code> function with a constant seed, say <code > random(1)</code>. The output will have no obvious relationship with the number 1 (so in that sense, it would seem &#8220;random&#8221;), but the value will stay the same if the expression is evaluated multiple times (and thus the distribution of values doesn&#8217;t appear random). This is illustrated below.</p>
<p><a href="https://cdn.comsol.com/wordpress/2016/09/random_number_constant_seed1.png" target="_blank"><img src="https://cdn.comsol.com/wordpress/2016/09/random_number_constant_seed1.png" title="Constant Seed" alt="Screenshot highlighting a Global Evaluation node that uses a constant seed." width="1000" height="758" class="alignnone size-full wp-image-182301" /></a></p>
<p>If a different seed is used every time the random number is evaluated, you&#8217;ll get different results each time the random number is evaluated. See the table in the following screenshot, in which the time is used as an input argument to the random function, and compare it to the previous evaluation.</p>
<p><a href="https://cdn.comsol.com/wordpress/2016/09/random_number_changing_seed.png" target="_blank"><img src="https://cdn.comsol.com/wordpress/2016/09/random_number_changing_seed.png" title="Changing seed" alt="Screen capture illustrating a Global Evaluation node that uses a changing seed." width="1000" height="758" class="alignnone size-full wp-image-182311" /></a></p>
<p>Monte Carlo simulations of particle systems often involve large groups of particles that are released with random initial conditions and subjected to random forces. Some examples of random phenomena involving groups of particles include:</p>
<ul>
<li>When releasing ion and electron beams, the initial position of each ion in phase space is sampled from a distribution &mdash; a focus of subsequent blog posts in this series</li>
<li><a href="https://www.comsol.com/model/neutralization-of-a-proton-beam-through-a-charge-exchange-cell-16631">Neutralization of ions by random charge exchange collisions with a rarefied background gas</a></li>
<li><a href="https://www.comsol.com/model/pipe-erosion-due-to-contaminant-particles-16655">Turbulent dispersion of particles in a high Reynolds number fluid flow</a></li>
<li><a href="https://www.comsol.com/model/brownian-motion-12333">Modeling particle diffusion with a Brownian force</a></li>
</ul>
<p>Clearly, if each particle gets the same pseudorandom numbers, then the simulation will be completely nonphysical. In the case of ions interacting with a background gas, for example, each ion would undergo collisions with the gas molecules or atoms at exactly the same times as all of the other ions. To remedy this, any random numbers involved in the particle simulation must be given seeds that are unique for each particle.</p>
<p>One approach is to use the <em>particle index</em>, an integer that is unique for each particle, as part of the seed. The particle index variable is <code>&lt;scope&gt;.pidx</code>, where <code>&lt;scope&gt;</code> is a unique identifier for the instance of the physics interface. For the <em>Mathematical Particle Tracing</em> interface, the particle index is usually <code>pt.pidx</code>. The function <code > random(pt.pidx)</code> will give a different pseudorandom number for each particle.</p>
<p>A further complication arises when particles are subjected to random forces throughout their entire lifetime. For example, if a random number is used to determine whether a collision with a gas molecule occurs, you wouldn&#8217;t want to use the same random number for a given particle at each time &mdash; then the particle could only undergo a collision at every single time step or not at all! The solution is to define a random number seed that uses multiple arguments: at least one argument that is distinct among particles and one that is distinct among different simulated times. Additional arguments may be needed if the simulation requires multiple pseudorandom numbers to be sampled independently of each other. A typical use of the random function could then take a form such as <code>random(pt.pidx,t,1)</code>, where the final argument <code > 1</code> can be replaced with other numeric values if additional independent pseudorandom numbers are needed.</p>
<h3>Results: Rayleigh Distribution</h3>
<p>Let&#8217;s go back to the original problem of sampling from the Rayleigh distribution. Suppose that we have a particle population and want to sample one number per particle so that the resulting values follow the Rayleigh distribution. In this example, we&#8217;ll use Eq.<a href="#eq2">(2)</a> with <em>σ = 3</em>. In a COMSOL model, define the following variables:</p>
<table class="table-blog">
<tr>
<th>
Name
</th>
<th>
Expression
</th>
<th>
Description
</th>
</tr>
<tr>
<td>
<code>rn</code>
</td>
<td>
<code>0.5+random(pt.pidx)</code>
</td>
<td>
<code>Random argument</code>
</td>
</tr>
<tr>
<td>
<code>sigma</code>
</td>
<td>
<code>3</code>
</td>
<td>
<code>Scale parameter</code>
</td>
</tr>
<tr>
<td>
<code>val</code>
</td>
<td>
<code>sigma*sqrt(-2*log(rn))</code>
</td>
<td>
<code>Value sampled from Rayleigh distribution</code>
</td>
</tr>
</table>
<p>Note that the last line is just Eq.<a href="#eq3">(3)</a>. The following plot is a histogram of the value of <code>rn</code> for a population of 1000 particles. The smooth curve is the exact Rayleigh distribution, which has been defined using an <em>Analytic</em> function feature.</p>
<p><img src="https://cdn.comsol.com/wordpress/2016/09/rayleigh_histogram_graph.png" title="" alt="Graph plotting the histogram of sampled values against the exact Rayleigh distribution." width="1000" height="750" class="alignnone size-full wp-image-182271" /></p>
<p>For curves with many fine details, a larger number of particles may be needed to accurately capture the probability distribution function.</p>
<h3>Note About Interpolation Functions</h3>
<p>If a probability distribution function is entered into COMSOL Multiphysics as an <em>Interpolation</em> function feature, instead of an <em>Analytic</em> or <em>Piecewise</em> function, then you can use built-in features to automatically define a random function that samples from the specified PDF.</p>
<p>Suppose we have an interpolation function that linearly interpolates between the following data points:</p>
<table class="table-blog">
<tr>
<th>
<strong>x</strong>
</th>
<th>
<strong>f(x)</strong>
</th>
</tr>
<tr>
<td>
0
</td>
<td>
0
</td>
</tr>
<tr>
<td>
0.2
</td>
<td>
0.6
</td>
</tr>
<tr>
<td>
0.4
</td>
<td>
0.7
</td>
</tr>
<tr>
<td>
0.6
</td>
<td>
1.2
</td>
</tr>
<tr>
<td>
0.8
</td>
<td>
1.2
</td>
</tr>
<tr>
<td>
1
</td>
<td>
0
</td>
</tr>
</table>
<p>The following screenshot shows how this data can be entered into the Interpolation function. By selecting the <em>Define random function</em> check box in the settings window for the Interpolation function feature, you can automatically define a function <code>rn_int1</code> that samples from this distribution. In the Graphics window, the histogram plot shows a random sampling of 1000 data points, and the continuous curve is the interpolation function itself. The extra factors 20 and 0.74 are included to correct for the number of bins and normalize the interpolation function, respectively.</p>
<p><a href="https://cdn.comsol.com/wordpress/2016/09/comsol_settings_interpolation_function.png" target="_blank"><img src="https://cdn.comsol.com/wordpress/2016/09/comsol_settings_interpolation_function.png" title="Interpolation settings and plot" alt="Screen capture illustrating the Interpolation function feature settings and Graphics window in COMSOL Multiphysics." width="1000" height="810" class="alignnone size-full wp-image-182281" /></a></p>
<h3>The Power of Probability Distribution Functions</h3>
<p>So far we&#8217;ve seen how probability distribution functions, cumulative distribution functions, and their inverses are related. We&#8217;ve also discussed several techniques for sampling from both uniform and nonuniform probability distribution functions in COMSOL models. In the next post in our Phase Space Distributions in Beam Physics series, we&#8217;ll start explaining the physics of ion and electron beams and how an understanding of probability distribution functions is essential to accurately modeling beam systems.</p>
<h3>Other Posts in This Series</h3>
<ol>
<li><a href="/blogs/phase-space-distributions-and-emittance-in-2d-charged-particle-beams/">Phase Space Distributions and Emittance in 2D Charged Particle Beams</a></li>
<li><a href="/blogs/sampling-from-phase-space-distributions-in-3d-charged-particle-beams/">Sampling from Phase Space Distributions in 3D Charged Particle Beams</a></li>
</ol>
<h3>References</h3>
<ol>
<li>Humphries, Stanley. <em>Charged particle beams.</em> Courier Corporation, 2013.</li>
<li>Davidson, Ronald C., and Hong Qin. <em>Physics of intense charged particle beams in high energy accelerators.</em> Imperial college press, 2001.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>https://www.comsol.no/blogs/sampling-random-numbers-from-probability-distribution-functions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Model Solar Concentrators with the Ray Optics Module</title>
		<link>https://www.comsol.no/blogs/how-to-model-solar-concentrators-with-the-ray-optics-module/</link>
		<comments>https://www.comsol.no/blogs/how-to-model-solar-concentrators-with-the-ray-optics-module/#comments</comments>
		<pubDate>Thu, 23 Jun 2016 08:02:12 +0000</pubDate>
		<dc:creator><![CDATA[Christopher Boucher]]></dc:creator>
				<category><![CDATA[Electrical]]></category>
		<category><![CDATA[Ray Optics]]></category>
		<category><![CDATA[Ray Optics Module]]></category>
		<category><![CDATA[Technical Content]]></category>

		<guid isPermaLink="false">http://com.staging.comsol.com/blogs/?p=167731</guid>
		<description><![CDATA[A paraboloidal solar dish can focus solar radiation onto a small target or cavity receiver. Because solar energy is collected over a large area, the incident heat flux at the receiver is extremely high. This thermal energy can then be converted to electrical energy or used to produce a chemical energy source, such as hydrogen. Today, we discuss strategies for computing the distribution of heat flux in the focal plane of a typical solar dish concentrator/receiver system. Solar Thermal Energy: [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>A paraboloidal solar dish can focus solar radiation onto a small target or cavity receiver. Because solar energy is collected over a large area, the incident heat flux at the receiver is extremely high. This thermal energy can then be converted to electrical energy or used to produce a chemical energy source, such as hydrogen. Today, we discuss strategies for computing the distribution of heat flux in the focal plane of a typical solar dish concentrator/receiver system.</p>
<p><span id="more-167731"></span></p>
<h3>Solar Thermal Energy: An Efficient Power Source</h3>
<p>The basic operating principle of solar concentrator/receiver systems is that incoming solar radiation can be reflected by a curved surface, concentrated to a small area, and used to power a heat engine, such as a steam turbine. To focus solar radiation to the smallest area possible, the optimal shape of the reflector is a parabolic trough or a paraboloidal dish (shown below).</p>
<p><img src="https://cdn.comsol.com/wordpress/2016/06/ANU_campus_Big_Dish_Paraboloidal_CSP_prototype_21.jpg" title="" alt="A photograph of a paraboloidal dish, a device used for concentrated solar power." width="600" height="668" class="alignnone size-full wp-image-167861" /><br />
<em>A paraboloidal dish for concentrated solar power and a maintenance crane. Image by Thennicke &#8212; Own work. Licensed under <a href="https://creativecommons.org/licenses/by-sa/4.0/deed.en" target="_blank">CC BY-SA 4.0</a>, via <a href="https://commons.wikimedia.org/wiki/File:ANU_campus_Big_Dish_Paraboloidal_CSP_prototype_2.jpg" target="_blank">Wikimedia Commons</a>.</em></p>
<p>The maximum theoretical efficiency of a heat engine increases as the maximum temperature is increased, although beyond a certain temperature, the selection of materials may become too restricted for <a href="https://en.wikipedia.org/wiki/Concentrated_solar_power" target="_blank">practical use</a>. Therefore, great interest has been placed in predicting the operating temperature of the cavity receiver as accurately as possible. </p>
<p>An important figure of merit in predicting the temperature distribution is the <em>concentration ratio</em> (<a href="#ref1">Ref. 1</a>, <a href="#ref2">Ref. 2</a>), the ratio of incident flux on the surface of the cavity receiver to the ambient solar flux. The concentration ratio is increased when the radiation is focused to a smaller area or when losses in the system, such as absorption at the surface of the dish, are reduced. For some applications, such as hydrogen production, the uniformity of the heat flux has a large effect on the efficiency of the process. Therefore, we must consider how the concentration ratio varies over the surface of the receiver.</p>
<p>The receiver may have a variety of different shapes, several of which are investigated in <a href="#ref1">Ref. 1</a>, but for this post, we&#8217;ll assume that we&#8217;re just interested in the heat flux in the focal plane of the solar dish.</p>
<h3>Predicting the Concentration Ratio of an Idealized Solar Collector</h3>
<p>Ideally, a <a href="https://en.wikipedia.org/wiki/Parabolic_reflector" target="_blank">parabolic reflector</a> can focus rays to a point. However, many perturbations prevent this idealized behavior from happening, even within the context of geometrical optics in which we neglect diffraction.</p>
<p>Let&#8217;s take a look at some of the perturbations in the system that can limit the focusing capability of a parabolic reflector.</p>
<h4>Absorption</h4>
<p>A fraction of the incident solar energy will be absorbed, not reflected, by the parabolic mirror. Even a new mirror absorbs some fraction of the incident energy, and years of wear and tear can further degrade its performance. The case described in <a href="#ref3">Ref. 3</a> is a typical example.</p>
<h4>Surface Roughness</h4>
<p>A real mirror is not perfectly smooth. In a parabolic dish, there is always some deviation in the surface normal direction from the ideal case. This causes the solar radiation to be imperfectly focused, spreading the heat flux over a larger region in the focal plane.</p>
<h4>Sunshape</h4>
<p>If the Sun were an extremely small radiation source, then all of the incoming solar rays would be nearly parallel. However, this is not the case. Even at a distance of roughly 150 million kilometers, the Sun is still large enough that rays coming from different parts of the solar disk make significant angles with each other, so an angular spread in the Sun&#8217;s rays can still be observed. On Earth, the rays coming from the solar disk form a cone with a half-angle of about 4.65 mrad. Some additional radiation comes from the <em>circumsolar region</em>, the luminous region surrounding the Sun, but circumsolar radiation will not be considered in this example.</p>
<p>Taken broadly, the term <em>sunshape</em> refers to the effects of the finite size of the solar disk. In addition to causing a distribution of ray directions, another aspect of sunshape is the relative intensity of radiation from different parts of the solar disk (<a href="#ref4">Ref. 4</a>). Radiation from the center of the solar disk is usually brighter than radiation emitted from the outside of the disk, a phenomenon called <em>solar limb darkening</em> (<a href="#ref5">Ref. 5</a>). With the Ray Optics Module, the effect of the finite size of the Sun can be considered, either with or without accounting for the solar limb darkening effect.</p>
<p>Like surface roughness, the effects of sunshape tend to spread the incident heat flux over a larger region in the focal plane. The following plots show the concentration ratio in the focal plane for an ideal reflector (accounting for finite solar diameter only; see <a href="#ref2">Ref. 2</a>) and for a real reflector (accounting for finite solar diameter, solar limb darkening, surface roughness, and absorption, as in <a href="#ref1">Ref. 1</a>). The dish has a 45-degree rim angle and a focal length of 3 m.</p>
<p><img src="https://cdn.comsol.com/wordpress/2016/06/concentration_ratios_focal_plane.png" title="" alt="Graph comparing the concentration ratio of an ideal and real reflector in the focal plane." width="1000" height="664" class="alignnone size-full wp-image-167801" /><br />
<em>The concentration ratios in the focal plane for ideal and real reflectors.</em></p>
<h3>A Monte Carlo Ray Tracing Solution</h3>
<p>Several different computational models can be used to predict the concentration ratio in the focal plane of the dish. Monte Carlo ray tracing simulations have been used to account for finite source diameter, solar limb darkening, surface roughness, and absorption by the dish (<a href="#ref1">Ref. 1</a>). A semi-analytical model can also be used to compute a more idealistic solution, in which the finite size of the Sun is taken into account but solar limb darkening, surface roughness, and absorption are neglected (<a href="#ref2">Ref. 2</a>).</p>
<p>Using the Ray Optics Module, you can release the reflected solar radiation directly from the surface of the dish using the <em>Illuminated Surface</em> feature. After the rays reach the receiver, you can compute the heat flux in the focal plane using the <em>Deposited Ray Power</em> feature.</p>
<p><img src="https://cdn.comsol.com/wordpress/2016/06/ideal_reflector_plots_combined.png" title="" alt="Images showing ray trajectories, the concentration ratio in the focal plane, and the azimuthally averaged concentration ratio." width="1176" height="712" class="alignnone size-full wp-image-167811" /><br />
<em>The trajectories of reflected rays (left), concentration ratio in the focal plane (top right), and azimuthally averaged concentration ratio as a function of radial position (bottom right).</em></p>
<h3>Reporting the Concentration Ratio</h3>
<p>As is usually the case with Monte Carlo simulations, the concentration ratio in the focal plane does include some numerical noise resulting from the random nature of the initial ray directions. Some of the built-in smoothing options can be used to improve the quality of the resulting plots. Increasing the number of rays in the simulation is another approach to smoothing out the statistical noise. Alternatively, a <em>General Projection</em> component coupling can be used to compute the average value of the concentration ratio as a function of radial position in the focal plane by integrating over all azimuthal angles:</p>
<div class="latex">\bar{C}(\rho) = \frac{1}{2\pi}\int_0^{2\pi} C(\rho, \theta) d\theta</div>
<p><img src="https://cdn.comsol.com/wordpress/2016/06/solar_dish_receiver_smoothing.png" title="" alt="Three solar dish receiver models comparing no smoothing, smoothing, and azimuthal averaging." width="1000" height="400" class="alignnone size-full wp-image-167831" /><br />
<em>A comparison of the raw data (no smoothing), smoothed concentration ratio, and azimuthally averaged ratio.</em></p>
<p>The azimuthal averaging fails at the center (where integration takes place over an infinitesimally short distance), but at other locations, it gives a fairly accurate, uniform-looking representation of the concentration ratio in the focal plane.</p>
<p>The solutions for the ideal and real reflector are shown side-by-side below. The result for the ideal reflector is compared to a semi-analytical solution (<a href="#ref2">Ref. 2</a>), while the result for the real reflector is compared to published Monte Carlo ray tracing data from <a href="#ref1">Ref. 1</a>. The results are found to be in good agreement with the literature. The statistical noise could be further reduced by increasing the number of rays in the simulation.</p>
<p><a href="https://cdn.comsol.com/wordpress/2016/06/solar_dish_receiver_ui.png" target="_blank"><img src="https://cdn.comsol.com/wordpress/2016/06/solar_dish_receiver_ui.png" title="Solar dish receiver UI " alt="Screenshot depicting the UI and results of the Solar Dish Receiver tutorial model." width="1795" height="962" class="alignnone size-full wp-image-167841" /></a></p>
<h3>Further Resources on Solar Concentrators and Ray Optics</h3>
<ul>
<li>For a more detailed discussion of the solar limb darkening models and the semi-analytical solution used in <a href="#ref2">Ref. 2</a>, download the <a href="https://www.comsol.com/model/solar-dish-receiver-19227">Solar Dish Receiver tutorial</a> from the Application Gallery</li>
<li>Read about the <a href="https://www.comsol.com/release/5.2a/ray-optics-module">new features of the Ray Optics Module</a> included with the latest version of COMSOL Multiphysics, version 5.2a</li>
<li>Learn about <a href="https://www.comsol.com/blogs/category/all/ray-optics/">other applications of ray optics simulation</a> on the COMSOL Blog</li>
</ul>
<h3>References</h3>
<ol>
<p id="ref1">
<li>Y. Shuai, X-L. Xia, and H-P. Tan, “Radiation performance of dish solar concentrator/cavity receiver systems,” Solar Energy, vol. 82, pp. 13–21, 2008.</li>
</p>
<p id="ref2">
<li>S. M. Jeter, “The distribution of concentrated solar radiation in paraboloidal collectors,” Journal of Solar Energy Engineering, vol. 108, pp. 219-225, 1986.</li>
</p>
<p id="ref3">
<li>G. Johnston, “Focal region measurements of the 20 m2 tiled dish at the Australian national university,” Solar Energy, Vol. 63, No. 2, pp. 117-124, 1998.</li>
</p>
<p id="ref4">
<li>M. Schubnell, “Sunshape and its influence on the flux distribution in imaging solar concentrators,” Journal of Solar Energy Engineering, vol. 114, pp. 260-266, 1992.</li>
</p>
<p id="ref5">
<li>D. Hestroffer and C. Magnan, “Wavelength dependency of the Solar limb darkening,” Astron. Astrophysl, vol. 333, pp. 338-342, 1998.</li>
</p>
</ol>
]]></content:encoded>
			<wfw:commentRss>https://www.comsol.no/blogs/how-to-model-solar-concentrators-with-the-ray-optics-module/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Using the New Ray Tracing Algorithm in COMSOL Multiphysics® 5.2a</title>
		<link>https://www.comsol.no/blogs/using-the-new-ray-tracing-algorithm-in-comsol-multiphysics-5-2a/</link>
		<comments>https://www.comsol.no/blogs/using-the-new-ray-tracing-algorithm-in-comsol-multiphysics-5-2a/#comments</comments>
		<pubDate>Mon, 20 Jun 2016 16:15:45 +0000</pubDate>
		<dc:creator><![CDATA[Christopher Boucher]]></dc:creator>
				<category><![CDATA[Electrical]]></category>
		<category><![CDATA[Ray Optics]]></category>
		<category><![CDATA[Ray Optics Module]]></category>
		<category><![CDATA[Technical Content]]></category>

		<guid isPermaLink="false">http://com.staging.comsol.com/blogs/?p=166881</guid>
		<description><![CDATA[With the release of COMSOL Multiphysics® version 5.2a, it is now possible to trace rays in unmeshed domains and even release and trace rays outside a geometry. The Ray Optics Module provides an entirely new algorithm that offers these capabilities and more, so that you can model your ray optics designs with ease and accuracy. Let&#8217;s investigate how this new algorithm affects your workflow when setting up a typical ray optics model. Tracing Rays Outside Meshed Domains In previous versions [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>With the release of COMSOL Multiphysics® version 5.2a, it is now possible to trace rays in unmeshed domains and even release and trace rays outside a geometry. The Ray Optics Module provides an entirely new algorithm that offers these capabilities and more, so that you can model your ray optics designs with ease and accuracy. Let&#8217;s investigate how this new algorithm affects your workflow when setting up a typical ray optics model.</p>
<p><span id="more-166881"></span></p>
<h3>Tracing Rays Outside Meshed Domains</h3>
<p>In previous versions of the Ray Optics Module, rays can only be released and propagate in meshed domains. This is because the mesh elements are used in many fundamental parts of the ray tracing process, such as detecting boundary interactions, querying the refractive index of the domain, and with some advanced features such as accumulators.</p>
<p>In version 5.2a, if a ray is not in any mesh element, it is still able to detect boundary interactions as long as the boundaries themselves are meshed. In practice, this means that you can model reflection at a surface as long as the surface is meshed, even if it isn&#8217;t adjacent to a domain mesh. You can even create &#8220;floating&#8221; surfaces that are not adjacent to any domain. In addition, it is possible to specify a refractive index for the unmeshed regions.</p>
<p><img src="https://cdn.comsol.com/wordpress/2016/06/ray_optics_meshing_combined.png" title="" alt="A collimated beam focused by a convex lens." width="1000" height="664" class="alignnone size-full wp-image-166961" /><br />
<em>A collimated beam is focused by a convex lens. The rays can propagate in the lens and in the region outside the geometry where no mesh is defined. The color expression on the rays is based on their intensity, while the color of the mesh is proportional to the element size.</em></p>
<p>This new algorithm means that rays can be accurately traced outside of meshed domains as long as the following conditions are met:</p>
<ul>
<li>The medium is homogeneous, isotropic, and doesn&#8217;t depend on field variables (such as temperature).</li>
<li>All unmeshed regions have the same refractive index.</li>
<li>Advanced mesh-dependent features like domain accumulators aren&#8217;t needed in the unmeshed regions.</li>
<li>All boundaries that affect ray propagation are meshed. This includes boundary conditions such as material discontinuities, absorbing or scattering walls, diffraction gratings, and optical components such as linear polarizers.</li>
</ul>
<h3>Modeling a Simple Lens System Example</h3>
<p>Let&#8217;s start with a simple example. We construct a 2D model in which rays are focused by a pair of cylindrical convex lenses.</p>
<p>In the previous version of COMSOL Multiphysics, version 5.2, it is necessary to create a geometry consisting of the two lenses and a surrounding air or vacuum domain, as shown below. Rays start to the left of the first lens and propagate in the positive <em>x</em> direction. The color expression is proportional to the logarithm of the ray intensity.</p>
<p><a href="https://cdn.comsol.com/wordpress/2016/06/ray_tracing_2d_v52.png" target="_blank"><img src="https://cdn.comsol.com/wordpress/2016/06/ray_tracing_2d_v52.png" title="Ray optics lens system in COMSOL Multiphysics version 5.2" alt="The simulation of a ray optics lens system in COMSOL Multiphysics version 5.2." width="1405" height="929" class="alignnone size-full wp-image-166971" /></a><br />
<em>Simulating a simple ray optics lens system in COMSOL Multiphysics version 5.2.</em></p>
<p>Let&#8217;s take a closer look at the Model Builder and the geometry. The geometry sequence includes two instances of the <em>Cylindrical Equi-Convex Lens</em> part from the built-in Part Library for the Ray Optics Module. These lenses are shown in green. It also includes a rectangle containing air (n = 1). Both lenses and the surrounding air domain must be meshed. If rays are released outside the air domain, or if the mesh in the air domain is omitted, the rays disappear immediately and can never propagate.</p>
<p>Now, let&#8217;s consider the same model, built in version 5.2a.</p>
<p><a href="https://cdn.comsol.com/wordpress/2016/06/ray_tracing_2d_COMSOL_Multiphysics_v52a.png" target="_blank"><img src="https://cdn.comsol.com/wordpress/2016/06/ray_tracing_2d_COMSOL_Multiphysics_v52a.png" title="Ray optics lens system in COMSOL Multiphysics version 5.2a" alt="The simulation of a ray optics lens system in COMSOL Multiphysics version 5.2a." width="1400" height="932" class="alignnone size-full wp-image-166981" /></a><br />
<em>The same lens example in the latest version of COMSOL Multiphysics, version 5.2a.</em></p>
<p>The most obvious change is that the air domain is gone. Rays can still be traced in this void region outside the geometry and you can still specify its refractive index. Another advantage of omitting the air domain is that you can change the focal length of the lenses without worrying about whether you need to resize the surrounding domain to capture all of the relevant physics. Rays can continue to propagate for as long as you want them to.</p>
<p>Note the difference in the default boundary conditions in the Model Builder. In version 5.2, a Wall boundary condition is automatically applied to exterior boundaries, and the Material Discontinuity boundary condition is applied to interior boundaries. In version 5.2a, Material Discontinuity is applied to interior and exterior boundaries by default, emphasizing the fact that the rays are no longer bound by the selection of the <em>Geometrical Optics</em> physics interface.</p>
<p>While it is now possible to trace rays outside the geometry, some advanced features won&#8217;t work in void domains or unmeshed domains. For instance, in the above example, it would not be possible to define a <em>Deposited Ray Power</em> feature to the air outside the geometry, because this feature deposits the absorbed ray power on mesh elements.</p>
<p>Essentially, you can think of the unmeshed regions of space as the selection of a &#8220;Geometrical Optics lite&#8221; interface, where basic functionality like ray propagation, reflection, refraction, and absorption are supported, but more specialized phenomena like heating and propagation in graded media are not supported. Since it is possible to trace rays through any combination of meshed and unmeshed domains, the solution is usually to mesh the domains in which these more specialized phenomena must be considered.</p>
<h3>Physics-Controlled Meshing</h3>
<p>As I mentioned earlier, although ray propagation through unmeshed domains is supported, rays can only interact with surfaces if a boundary mesh is present. A mesh sequence with the default <em>Physics-controlled mesh</em> automatically sets up the following mesh sequence:</p>
<ol>
<li>All domains in the selection of the <em>Geometrical Optics</em> interface are meshed. Any boundaries adjacent to these domains are therefore also meshed.</li>
<li>All surfaces that have a boundary condition applied to them are meshed. This is true even if the surfaces are not adjacent to any domain in the above bullet point.</li>
</ol>
<p>The following screenshot demonstrates this physics-controlled mesh sequence. The geometry is an array of 9 cubes in a 3-by-3 array. Three of these cubes are included in the selection of the <em>Geometrical Optics</em> interface. The geometry and mesh are shown below.</p>
<p><a href="https://cdn.comsol.com/wordpress/2016/06/physics-controlled_meshing_ray_optics.png" target="_blank"><img src="https://cdn.comsol.com/wordpress/2016/06/physics-controlled_meshing_ray_optics.png" title="Physics-controlled meshing" alt="Screenshot depicting a physics-controlled mesh sequence for an array of cubes." width="1401" height="739" class="alignnone size-full wp-image-166991" /></a><br />
<em>The geometry and mesh for a physics-controlled mesh sequence for an array of cubes.</em></p>
<p>In the left plot, the selection of the <em>Geometrical Optics</em> interface is shown in cyan. The exterior and interior boundaries of this selection are automatically assigned the Material Discontinuity boundary condition. Additional boundaries (shown in red) are then assigned the Wall boundary condition. Some interior boundaries (shown in white) and some boundaries on the top and bottom surfaces (not shown) are not assigned any boundary condition at all.</p>
<p>A <em>Physics-controlled mesh</em> is then generated with the <em>Finer</em> size. The resulting mesh is shown in the right plot. The domain mesh is shown in cyan and the boundary mesh is shown in red. An element filter has been used to display a cross section of the volume elements. Note that all domains outside the selection of the <em>Geometrical Optics</em> interface are left unmeshed, as well as any boundaries that have no boundary condition applied to them.</p>
<h3>Updated Application Library Examples with the New Ray Tracing Algorithm</h3>
<p>Most of the ray tracing examples in the Application Library have been changed in version 5.2a. Usually, this involves a simplification of the geometry and the model setup, since it is no longer necessary to draw air boxes around all geometric entities.</p>
<h4>Czerny-Turner Monochromator</h4>
<p>In the Czerny-Turner Monochromator tutorial model, polychromatic light is separated into different colors using a collimating mirror, focusing mirror, and diffraction grating, which are arranged in a crossed Czerny-Turner configuration. For more detailed information about the model, see this <a href="https://www.comsol.com/blogs/ray-tracing-in-monochromators-and-spectrometers/">previous blog post</a>.</p>
<p>In version 5.2, the model uses an air domain that surrounds the mirrors and grating. The mesh and the resulting ray trajectories are shown below.</p>
<p><img src="https://cdn.comsol.com/wordpress/2016/06/czerny_turner_mesh_results_v52.png" title="" alt="Mesh and ray trajectories in a Czerny-Turner monochromator in COMSOL Multiphysics version 5.2." width="832" height="634" class="alignnone size-full wp-image-167001" /><br />
<em>The mesh (left) and ray trajectories (right) in a Czerny-Turner monochromator in COMSOL Multiphysics version 5.2.</em></p>
<p>In version 5.2a, the air domain is completely omitted. In fact, the selection list for the <em>Geometrical Optics</em> interface is completely empty and the model includes no domain-based physics features or domain mesh, only boundary conditions and boundary mesh elements. Note that the mesh on the left is automatically applied to all surfaces where the rays are reflected, either by a Wall feature or a Diffraction Grating. The only manual change to the mesh sequence is a refinement on the curved collimating mirror and focusing mirror by specifying a small <em>Curvature factor</em> in the mesh settings.</p>
<p><img src="https://cdn.comsol.com/wordpress/2016/06/czerny_turner_mesh_results_v52a.png" title="" alt="Mesh and ray trajectories in a Czerny-Turner monochromator using updated functionality in COMSOL Multiphysics version 5.2a." width="818" height="602" class="alignnone size-full wp-image-167011" /><br />
<em>The mesh (left) and ray trajectories (right) for the same model, shown with the updated functionality in version 5.2a.</em></p>
<h4>Thermally Induced Focal Shift</h4>
<p><a href="https://www.comsol.com/blogs/modeling-thermally-induced-focal-shift-high-powered-laser-systems/">Thermally induced focal shift</a> is a phenomenon that is frequently seen in high-powered laser focusing systems, where the heat generated by the laser degrades the focusing capability of the system due to phenomena such as thermal expansion of the lenses and temperature- and strain-dependent refractive indices.</p>
<p>In version 5.2, it is necessary to create an air domain surrounding the lenses. One of the factors that can make thermally induced focal shift difficult to model is that, for any deformation in the lenses, a corresponding deformation in the surrounding air domain is also needed. This means that in version 5.2, a <em>Moving Mesh</em> interface has to be applied to the air domain.</p>
<p>In the following image, the lens domains (red) are used as the selection for the <em>Heat Transfer in Solids</em> and <em>Solid Mechanics</em> interfaces. The air domain (white) is the selection for the <em>Moving Mesh</em> interface. All three domains are included in the selection for the <em>Geometrical Optics</em> interface.</p>
<p><img src="https://cdn.comsol.com/wordpress/2016/06/thermally_induced_focal_shift_mesh_rays_v521.png" title="" alt="Simulation plot for thermally induced focal shift, performed in COMSOL Multiphysics version 5.2." width="1000" height="664" class="alignnone size-full wp-image-167041" /><br />
<em>Modeling thermally induced focal shift in in COMSOL Multiphysics version 5.2.</em></p>
<p>In COMSOL Multiphysics version 5.2a, the <em>Moving Mesh</em> interface is no longer needed. The only domains in the geometry are the two lenses and rays are free to propagate in the surrounding empty space. This greatly reduces the clutter in the model, as shown below. Because it is no longer necessary to use the <em>Moving Mesh</em> interface, the model is now considerably easier to set up and requires fewer degrees of freedom for the same mesh element size.</p>
<p><img src="https://cdn.comsol.com/wordpress/2016/06/thermally_induced_focal_shift_mesh_rays_v52a.png" title="" alt="A simulation of thermally induced focal shift from version 5.2a of COMSOL Multiphysics." width="1000" height="667" class="alignnone size-full wp-image-167051" /><br />
<em>Simulating the same thermally induced focal shift in version 5.2a.</em></p>
<h4>Luneburg Lens</h4>
<p>A Luneburg lens contains a spherically symmetric graded-index medium that can be used to focus collimated rays. As I mentioned earlier, however, to trace rays in unmeshed domains, it is necessary for the medium to be homogeneous; i.e., graded-index media are not allowed. The solution is to include the graded-index domain in the selection of the <em>Geometrical Optics</em> interface, so that a domain mesh will automatically be created by the physics-controlled mesh sequence. The region outside the lens, in which the refractive index is uniform, can be excluded from the geometry. In this case, the region outside the geometry is assumed to have a unit refractive index.</p>
<p>The lens domain is a sphere of radius <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAARCAMAAADub6yxAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TAGaIdyJEVe6Z3TMRqrvMheXUYAAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmAAAABsSURBVBjTlZBLDsAgCAUV/x/K/W9bS01b0E1ZSDLByQNj/pcFLucVD2THG5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ADIwMTgtMTEtMjJUMDA6MDM6MzkrMDE6MDBqv+kjAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE4LTExLTIyVDAwOjAzOjM5KzAxOjAwG+JRnwAAACB0RVh0cHM6SGlSZXNCb3VuZGluZ0JveAAxMHg3KzMwMSs2MzkllWOuAAAAJ3RFWHRwczpMZXZlbABBZG9iZUZvbnQtMS4wOiBDTU1JMTIgMDAzLjAwMgoxF5a7AAAASXRFWHRwczpTcG90Q29sb3ItMAAvZGV2L3NobS96ZjItY2FjaGUvN2I4Yjk2NWFkNGJjYTBlNDFhYjUxZGU3YjMxMzYzYTEuZHZpIC1vMkRBzAAAAEV0RVh0cHM6U3BvdENvbG9yLTEAL2Rldi9zaG0vemYyLWNhY2hlLzdiOGI5NjVhZDRiY2EwZTQxYWI1MWRlN2IzMTM2M2ExLnBztbBGfAAAAABJRU5ErkJggg==" /> is a function of the radial coordinate <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAMBAMAAABPbPrXAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAC1QTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////wISVsgAAAA10Uk5TADOIRBF33SLuVWa7ql+N64YAAAABYktHRACIBR1IAAAACXBIWXMAAAB4AAAAeACd9VpgAAAAN0lEQVQI12NgwASMSsxKDiAGK5tiRQCIMZF3gRNYxMAWpkgbxtgEY1yG0swXoAymA1AGC1gvAwBo8QczkHj6JwAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxOC0xMS0yMVQyMzoxNDo0NSswMTowMPHkUmYAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTgtMTEtMjFUMjM6MTQ6NDUrMDE6MDCAueraAAAAH3RFWHRwczpIaVJlc0JvdW5kaW5nQm94ADl4NyszMDErNjM5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F5a7AAAASXRFWHRwczpTcG90Q29sb3ItMAAvZGV2L3NobS96ZjItY2FjaGUvOGZhMTRjZGQ3NTRmOTFjYzY1NTRjOWU3MTkyOWNjZTcuZHZpIC1vWym2MAAAAEV0RVh0cHM6U3BvdENvbG9yLTEAL2Rldi9zaG0vemYyLWNhY2hlLzhmYTE0Y2RkNzU0ZjkxY2M2NTU0YzllNzE5MjljY2U3LnBzI+PLYwAAAABJRU5ErkJggg==" /> is a dimensionless parameter that controls the location of the focus of the paraxial rays.</p>
<p>For <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAAWCAMAAAC4wk/kAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TADOIZiIR7qq73UR3zJlV5o1pvwAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmAAAACISURBVDjLxdFLEgMhCARQaJFxNIz3v22WYUyiuEl6R5Wv+Ej0hzCQVm9kqLPmoywIxgfppCozwmiPEeFYb1BGVLCNErqh7nbinl1RX+EJSur385kgLM79EUXu8Ib0ckWLjSfdf6w/RP2OLqVABhS5A0zV4CYqLdLptpCQyi5SY9s1hGR5G/0kTymwA4LxNX75AAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE4LTExLTIyVDAxOjMwOjMxKzAxOjAw9hOjwwAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxOC0xMS0yMlQwMTozMDozMSswMTowMIdOG38AAAAhdEVYdHBzOkhpUmVzQm91bmRpbmdCb3gAMzF4MTMrMjg5KzYzNpa1AywAAAAndEVYdHBzOkxldmVsAEFkb2JlRm9udC0xLjA6IENNTUkxMiAwMDMuMDAyCjEXlrsAAABJdEVYdHBzOlNwb3RDb2xvci0wAC9kZXYvc2htL3pmMi1jYWNoZS81OGRhMTRjNWJhYTA3MmYzOTY5OWI4ODMzOTk0MzljYy5kdmkgLW9Piw2dAAAARXRFWHRwczpTcG90Q29sb3ItMQAvZGV2L3NobS96ZjItY2FjaGUvNThkYTE0YzViYWEwNzJmMzk2OTliODgzMzk5NDM5Y2MucHPmeKVHAAAAAElFTkSuQmCC" />, the focus lies on the surface of the sphere, while for <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAAWCAMAAAC4wk/kAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TADOIZiIR7qq73UR3zJlV5o1pvwAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmAAAACfSURBVDjLxdLBEsMgCARQXRSpCfr/f9seFR1pLq23zOwLZE0IfzgRIC+TzHPmXMQhsAF6hZpOJOK6LUIZXln3TiwSDKui0BeI0BV1ZELZnRS7zdCN7CDidZtWNB0RtnXXmVk09jDUqBIPiNt2zty9QakvF7t80YKa7WHT3YLmHva3BGVWDNPlmpZ1f/dPJgVOfsw0p1GfmgDS/Bj95LwBQoEDjLT1638AAAAldEVYdGRhdGU6Y3JlYXRlADIwMTgtMTEtMjJUMDE6MzA6MzErMDE6MDD2E6PDAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE4LTExLTIyVDAxOjMwOjMxKzAxOjAwh04bfwAAACF0RVh0cHM6SGlSZXNCb3VuZGluZ0JveAAzMXgxMysyODkrNjM2lrUDLAAAACd0RVh0cHM6TGV2ZWwAQWRvYmVGb250LTEuMDogQ01NSTEyIDAwMy4wMDIKMReWuwAAAEl0RVh0cHM6U3BvdENvbG9yLTAAL2Rldi9zaG0vemYyLWNhY2hlLzUwMDlkOTUwMzZhZWFlODZhMWE3MDY3MTNjMjRiNGJmLmR2aSAtb/axOpwAAABFdEVYdHBzOlNwb3RDb2xvci0xAC9kZXYvc2htL3pmMi1jYWNoZS81MDA5ZDk1MDM2YWVhZTg2YTFhNzA2NzEzYzI0YjRiZi5wczi1GdwAAAAASUVORK5CYII=" />, the focus lies outside the sphere. Note that for any positive value of <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAWBAMAAADURmpxAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADBQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////L2OGaQAAAA50Uk5TADOIZhHuqrvdRCKZVXcfEaJeAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAAAeAAAAHgAnfVaYAAAAFFJREFUCNdjYMAFhJShDJaQdCiLuWEWlMWUAFPGrgCT1Ns0AcqUc4DJmsKNU4eziuCsGBiD6xWMxRMAYzEVwK24AGWsYl0AZUVLwySVt+D0AQBhvgrLK4ta9gAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxOC0xMS0yMVQyMzoxNDo1MiswMTowMPjpbHYAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTgtMTEtMjFUMjM6MTQ6NTIrMDE6MDCJtNTKAAAAIXRFWHRwczpIaVJlc0JvdW5kaW5nQm94ADEweDEzKzMwMCs2MzYqeBGgAAAAJ3RFWHRwczpMZXZlbABBZG9iZUZvbnQtMS4wOiBDTU1JMTIgMDAzLjAwMgoxF5a7AAAASXRFWHRwczpTcG90Q29sb3ItMAAvZGV2L3NobS96ZjItY2FjaGUvOGZhMTRjZGQ3NTRmOTFjYzY1NTRjOWU3MTkyOWNjZTcuZHZpIC1vWym2MAAAAEV0RVh0cHM6U3BvdENvbG9yLTEAL2Rldi9zaG0vemYyLWNhY2hlLzhmYTE0Y2RkNzU0ZjkxY2M2NTU0YzllNzE5MjljY2U3LnBzI+PLYwAAAABJRU5ErkJggg==" />, the refractive index on the exterior of the sphere (<img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADkAAAARCAMAAABQOfTsAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TAGaIdyJEVe6Z3TMRqrvMheXUYAAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmAAAAClSURBVCjPzVJdDwQREBv1PTj//9+uE8tILtn1dn0ghmprEP0zFDq0OafaqtrovD4XrV3OVXvKDHFI45QZQ59Q+a4wQBZID0TTYxJ7NUuaItjM4GwXWDB7zKTySumY2m1pakJii9nWoQhrtmV+HzMUWUN5QRwxsamU7Zn1b7ejm8XLs3tr5QuJjdHNKv2dxOzM6QT5mYdcI752y4fWn09Pf2CDu4kXWpEEPIN2+zAAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTgtMTEtMjJUMDE6MzA6MzErMDE6MDD2E6PDAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE4LTExLTIyVDAxOjMwOjMxKzAxOjAwh04bfwAAACF0RVh0cHM6SGlSZXNCb3VuZGluZ0JveAAzNHgxMCsyODkrNjM5pyRVaAAAACd0RVh0cHM6TGV2ZWwAQWRvYmVGb250LTEuMDogQ01NSTEyIDAwMy4wMDIKMReWuwAAAEl0RVh0cHM6U3BvdENvbG9yLTAAL2Rldi9zaG0vemYyLWNhY2hlLzk2MDZmMWQxNmY4NTg2ZDM3ODgzMThjNjNjNzBmZjRjLmR2aSAtb5fLZOAAAABFdEVYdHBzOlNwb3RDb2xvci0xAC9kZXYvc2htL3pmMi1jYWNoZS85NjA2ZjFkMTZmODU4NmQzNzg4MzE4YzYzYzcwZmY0Yy5wc4l8szQAAAAASUVORK5CYII=" />) is always unity; thus, there is no reflection or refraction anywhere in the model and all changes in ray direction are solely due to the gradient of the refractive index.</p>
<p>The ray paths in the lens are shown below for <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEMAAAAWCAMAAACsV9EFAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TADOIZiIR7qq73UR3zJlV5o1pvwAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmAAAACaSURBVDjLzZJBDsMgDATNYhwCdfj/b4OqKvGhBatcMrdFMNgGoqcRgDjbw8NISdKWJwbkQezEnQqPDAH1lX/GN9jm7eY8in0Bq46IpiiLdYSWTCg3we+IYmdj8TsweVePwzPSmUMOE+pfvXCz/8vOtLgdh5CDzyHe6zeHZ6RQEUWvlwU2XjdUTx0DmEl40SEadFFBiJpWHU/gBAMABKhxextkAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE4LTExLTIyVDAxOjMwOjMyKzAxOjAwx/u5XgAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxOC0xMS0yMlQwMTozMDozMiswMTowMLamAeIAAAAhdEVYdHBzOkhpUmVzQm91bmRpbmdCb3gANDB4MTMrMjg1KzYzNrWTpBoAAAAndEVYdHBzOkxldmVsAEFkb2JlRm9udC0xLjA6IENNTUkxMiAwMDMuMDAyCjEXlrsAAABJdEVYdHBzOlNwb3RDb2xvci0wAC9kZXYvc2htL3pmMi1jYWNoZS9jMzRiNzgwOTc3N2QyMTI2MmVkNDU3MTI0YjQ1MzA3Mi5kdmkgLW/ttdcxAAAARXRFWHRwczpTcG90Q29sb3ItMQAvZGV2L3NobS96ZjItY2FjaGUvYzM0Yjc4MDk3NzdkMjEyNjJlZDQ1NzEyNGI0NTMwNzIucHNLJFuxAAAAAElFTkSuQmCC" />. Parallel rays enter from the left and are focused by the lens. The color expression in the spherical domain is proportional to the refractive index, which reaches a maximum value at the center. The color expression along the ray trajectories is proportional to the logarithm of ray intensity.</p>
<p><img src="https://cdn.comsol.com/wordpress/2016/06/luneburg_lens_go_clean.png" title="" alt="Visual depicting the ray paths of a Luneburg lens." width="1000" height="664" class="alignnone size-full wp-image-167061" /><br />
<em>Ray paths in a Luneburg lens.</em></p>
<h3>Restricting Propagation Outside Selected Domains</h3>
<p>The new capability to release rays outside the geometry will be available by default, either in new models or when opening an old model in version 5.2a. It is possible to disable this new functionality, however, so that rays will again disappear if they are released or propagate outside of the meshed domains. To restrict rays to propagation in meshed domains only, first enable <em>Advanced Physics Options</em>, as shown below. Then clear the <em>Allow propagation outside selected domains</em> check box in the <em>Advanced Settings</em> window of the physics interface.</p>
<p><a href="https://cdn.comsol.com/wordpress/2016/06/ray_advanced_physics_options_COMSOL_Multiphysics.png" target="_blank"><img src="https://cdn.comsol.com/wordpress/2016/06/ray_advanced_physics_options_COMSOL_Multiphysics.png" title="Advanced Physics Options" alt="Screenshot showing how to disable the new COMSOL Multiphysics functionality for releasing rays outside your geometry." width="1402" height="930" class="alignnone size-full wp-image-167071" /></a><br />
<em>You can easily disable the new default functionality for releasing rays outside your model geometry.</em></p>
<h3>Further Resources on Ray Optics and COMSOL Multiphysics® Version 5.2a</h3>
<ul>
<li>Read more about all of the updates in COMSOL Multiphysics version 5.2a on the <a href="https://www.comsol.com/release/5.2a">Release Highlights page</a></li>
<li>Browse the COMSOL Blog to see other applications and detailed demonstrations of <a href="https://www.comsol.com/blogs/category/all/ray-optics/">ray optics simulations</a></li>
<li>Find a <a href="https://www.comsol.com/events/">free training event online or near you</a> to learn about the ins and outs of ray optics modeling and the latest COMSOL Multiphysics functionality</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>https://www.comsol.no/blogs/using-the-new-ray-tracing-algorithm-in-comsol-multiphysics-5-2a/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Evaluating Static Mixer Performance with a Simulation App</title>
		<link>https://www.comsol.no/blogs/evaluating-static-mixer-performance-with-a-simulation-app/</link>
		<comments>https://www.comsol.no/blogs/evaluating-static-mixer-performance-with-a-simulation-app/#comments</comments>
		<pubDate>Wed, 08 Jun 2016 20:12:11 +0000</pubDate>
		<dc:creator><![CDATA[Christopher Boucher]]></dc:creator>
				<category><![CDATA[Application Builder]]></category>
		<category><![CDATA[Fluid]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Particle Tracing]]></category>
		<category><![CDATA[Particle Tracing Module]]></category>
		<category><![CDATA[Technical Content]]></category>

		<guid isPermaLink="false">http://com.staging.comsol.com/blogs/?p=164691</guid>
		<description><![CDATA[Static mixers are well-established tools in a wide variety of engineering disciplines due to their efficiency, low cost, ease of installation, and minimal maintenance requirements. When evaluating whether a mixer can be used for a certain purpose, it is important to determine whether the resulting mixture is sufficiently uniform. In this blog post, we will discuss the setup of an app designed to quantitatively and qualitatively analyze the performance of a static mixer using the Particle Tracing Module. The Foundations [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Static mixers are well-established tools in a wide variety of engineering disciplines due to their efficiency, low cost, ease of installation, and minimal maintenance requirements. When evaluating whether a mixer can be used for a certain purpose, it is important to determine whether the resulting mixture is sufficiently uniform. In this blog post, we will discuss the setup of an app designed to quantitatively and qualitatively analyze the performance of a static mixer using the Particle Tracing Module.</p>
<p><span id="more-164691"></span></p>
<h3>The Foundations of the Laminar Static Particle Mixer Designer App</h3>
<p>As a starting point for our Laminar Static Particle Mixer Designer app, we will consider the <a href="http://www.comsol.com/model/particle-trajectories-in-a-laminar-static-mixer-10644">Particle Trajectories in a Laminar Static Mixer tutorial</a>, which you can download from our Application Gallery. This model is designed to evaluate the mixing performance of a static mixer by computing particle trajectories throughout the device. To learn more about this tutorial and about mixer modeling in general, I encourage you to check out these previous blog posts:</p>
<ul>
<li><a href="http://www.comsol.com/blogs/how-simulate-particle-tracing-laminar-static-mixer/">How to Simulate Particle Tracing in a Laminar Static Mixer</a></li>
<li><a href="http://www.comsol.com/blogs/modeling-of-laminar-flow-static-mixers/">Modeling of Laminar Flow Static Mixers</a></li>
<li><a href="http://www.comsol.com/blogs/modeling-static-mixers/">Modeling Static Mixers</a></li>
</ul>
<p>The geometry that is used in the tutorial referenced above is the same one that we will use within our app. Shown in the figure below, the model consists of a tube featuring three twisted blades with alternating rotations. The mixing blades are illustrated as gray surfaces, with the outline of the surrounding pipe also depicted. As particles are carried through the pipe by the fluid, they are mixed together by the static mixing blades.</p>
<p><img src="https://cdn.comsol.com/wordpress/2016/06/laminar_mixer_geom.png" title="" alt="Image depicting the laminar static mixer model's geometry." width="869" height="578" class="alignnone size-full wp-image-164861" /><br />
<em>The geometry of the laminar static mixer model.</em></p>
<h3>An App Designed to Study the Performance of a Static Mixer</h3>
<p>Using our <a href="https://www.comsol.com/model/laminar-static-particle-mixer-designer-23921">Laminar Static Particle Mixer Designer app</a>, shown below, we can first compute the trajectories of particles as they move throughout the mixer. Then, using some built-in postprocessing tools, we can quantitatively and qualitatively evaluate how the mixer performs.</p>
<p><a href="https://cdn.comsol.com/wordpress/2016/06/laminar_mixer_app_gui1.png" target="_blank"><img src="https://cdn.comsol.com/wordpress/2016/06/laminar_mixer_app_gui1.png" title="App's user interface" alt="Image illustrating the Laminar Static Particle Mixer Designer's user interface." width="1364" height="998" class="alignnone size-full wp-image-164911" /></a><br />
<em>A screenshot of the user interface (UI) of the Laminar Static Particle Mixer Designer.</em></p>
<p>The app includes a large number of geometry parameters and material properties, with the option to create a mixer that utilizes one, two, or three helical mixing blades. Modifying the number of model particles and postprocessing parameters is also possible through the app&#8217;s advanced settings.</p>
<p><script src="https://fast.wistia.com/assets/external/E-v1.js" async></script>
<div class="wistia_responsive_padding" style="padding:56.25% 0 0 0;position:relative;">
<div class="wistia_responsive_wrapper" style="height:100%;left:0;position:absolute;top:0;width:100%;">
<div class="wistia_embed wistia_async_tewt8ly9ep playerPreference=html5 seo=false videoFoam=true" style="height:100%;position:relative;width:100%">
<div class="wistia_swatch" style="height:100%;left:0;opacity:0;overflow:hidden;position:absolute;top:0;transition:opacity 200ms;width:100%;"><img src="https://fast.wistia.com/embed/medias/tewt8ly9ep/swatch" style="filter:blur(5px);height:100%;object-fit:contain;width:100%;" alt="" onload="this.parentNode.style.opacity=1;" title="" /></div>
</div>
</div>
</div>
<p>To better visualize the distribution of different species in the static mixer, we can release particles and compute their trajectories using the <em>Particle Tracing for Fluid Flow</em> interface. The particle positions are computed via a Newtonian formulation of the equations of motion, where the position vector components are calculated by solving a set of second-order equations:</p>
<p class="latex-equation-number">(1)</p>
<div class="latex">\frac{d}{dt}\left(m_p\frac{d\mathbf{q}}{dt}\right) = \mathbf{F}_t</div>
<p>where <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAARBAMAAADwJOuSAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADBQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////L2OGaQAAAA50Uk5TABGIzKpVRDPumbvdImYA+4l+AAAAAWJLR0QAiAUdSAAAAAlwSFlzAAAAeAAAAHgAnfVaYAAAAElJREFUCNdjYMAEjMomAW4gRkU7w8xnIMY6BQZuEIPnXQIDF4jBBmOwwxgM+y4wMIMZcRsZ7oEZbKs1tZ5BzeTCyWBftUoBiyMAcmEXftalkiwAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTgtMTEtMjJUMDE6Mjk6MDQrMDE6MD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AAAAIHRFWHRwczpIaVJlc0JvdW5kaW5nQm94ADE0eDcrMjk5KzYzOSREAZEAAAAndEVYdHBzOkxldmVsAEFkb2JlRm9udC0xLjA6IENNTUkxMiAwMDMuMDAyCjEXlrsAAABJdEVYdHBzOlNwb3RDb2xvci0wAC9kZXYvc2htL3pmMi1jYWNoZS82ZjhmNTc3MTUwOTBkYTI2MzI0NTM5ODhkOWExNTAxYi5kdmkgLW9qvtwSAAAARXRFWHRwczpTcG90Q29sb3ItMQAvZGV2L3NobS96ZjItY2FjaGUvNmY4ZjU3NzE1MDkwZGEyNjMyNDUzOTg4ZDlhMTUwMWIucHOTJ5noAAAAAElFTkSuQmCC" />) is the particle position, <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAASCAMAAAB/2U7WAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TAESIM3cRZt2qVZnMu+4iyPsQWQAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmAAAACWSURBVCjPlVHRDgMhCKsIKur0///24O625FxcMh4KodgSBH5HIEJkA0lEcSEZmRJQiAWan5xGTLJcm6vMRfXuZHaVtppSN5DpdoVWsntHX5+JR8zgz4tByhgqqcb0XvuybHxpsCTpjFBuyzPP4dqVFQKbDvdmIo7jrIfXwRbksjmZHQs5bshWA+mGk4l9aN9z8v01/8cBhmwC+tq49koAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTgtMTEtMjJUMDE6MzA6MzIrMDE6MDDH+7leAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE4LTExLTIyVDAxOjMwOjMyKzAxOjAwtqYB4gAAACF0RVh0cHM6SGlSZXNCb3VuZGluZ0J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UxOTIyZDFjZWFhLmR2aSAtbzOiPVQAAABFdEVYdHBzOlNwb3RDb2xvci0xAC9kZXYvc2htL3pmMi1jYWNoZS84ZDljMzA3Y2I3ZjNjNGEzMjgyMmE1MTkyMmQxY2VhYS5wcwlgkCwAAAAASUVORK5CYII=" />) is the total force on the particles. The Newtonian formulation takes the inertia of the particles into account, allowing them to cross velocity streamlines.</p>
<p>In this model, the only force on the particles is the drag force, which is computed using the Stokes&#8217; drag law:</p>
<p class="latex-equation-number">(2)</p>
<div class="latex">\begin{aligned}<br />
\mathbf{F}_D &amp;= \frac{1}{\tau_p} m_p \left(\mathbf{u}-\mathbf{v}\right)\\<br />
\tau_p &amp;= \frac{\rho_p d_p^2}{18 \mu}<br />
\end{aligned}</div>
<p>where the following applies:</p>
<ul>
<li><img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAMBAMAAAB2C0uMAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADBQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////L2OGaQAAAA50Uk5TAGa7MxFE3ZmqiCLMd1XMsNjcAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAAAeAAAAHgAnfVaYAAAAEBJREFUCNdjYMAGhJQUGJSUQSyWdwEMZg5gwboGhokQ6XWvWDZAWOzPOQ9AWKzvVjtAdevthJlz7xWMxVaAagMA4TgM52BMXx8AAAAldEVYdGRhdGU6Y3JlYXRlADIwMTgtMTEtMjJUMDA6MzI6NDMrMDE6MDCyKrJLAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE4LTExLTIyVDAwOjMyOjQzKzAxOjAww3cK9wAAACB0RVh0cHM6SGlSZXNCb3VuZGluZ0JveAAxMHg3KzMwMCs2MzkY9UoeAAAAJ3RFWHRwczpMZXZlbABBZG9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YdGRhdGU6Y3JlYXRlADIwMTgtMTEtMjJUMDE6MzA6MzMrMDE6MDBhjLLqAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE4LTExLTIyVDAxOjMwOjMzKzAxOjAwENEKVgAAACF0RVh0cHM6SGlSZXNCb3VuZGluZ0JveAA1NHgxNCsyNzgrNjM2BqRdTQAAACd0RVh0cHM6TGV2ZWwAQWRvYmVGb250LTEuMDogQ01NSTEyIDAwMy4wMDIKMReWuwAAAEl0RVh0cHM6U3BvdENvbG9yLTAAL2Rldi9zaG0vemYyLWNhY2hlL2JiM2E5ZWU2YzI5YzgzZWE5ZGZlMzNhNmUyYTBjZmY2LmR2aSAtb92cP2kAAABFdEVYdHBzOlNwb3RDb2xvci0xAC9kZXYvc2htL3pmMi1jYWNoZS9iYjNhOWVlNmMyOWM4M2VhOWRmZTMzYTZlMmEwY2ZmNi5wc5ml9I4AAAAASUVORK5CYII=" />) is the fluid dynamic viscosity</li>
</ul>
<p>The Stokes&#8217; drag law is applicable for particles with a relative Reynolds number much less than one; that is,</p>
<p class="latex-equation-number">(3)</p>
<div class="latex">\textrm{Re}_r = \frac{\rho \parallel {\mathbf{u}-\mathbf{v}}\parallel d_p}{\mu} \ll 1</div>
<p>where <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAARCAMAAAA11AaTAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TAFWImWbMRHeqEe4zu90iBs/IzQAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmAAAABZSURBVBjTjY9LDoAwCET51Vor9P63VUxQ2DmLCS/DJADwT0iECVkA2vZi59toDxzH9J0zWNS98dv2yZYEq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Uk8qjk5a4ZKJt7Junq+Zvlim7tSpLQ1jasnVu/bLbSPlcbjwZ2DrBmli374n/xW7/RngjToRGrQzueRD7g6iSXfpsVTFTNTLi9DedgLTIhhuQ6KLW4UGKhubljzE6J74mU1eaq1mNj7iTzuU8uVoVdRBaLXX11ZU8XgpYhLtQYBwrkm2jRZ1Zjq9XtQskVBItAsJ5I6ugR4qXldsn/UYL463GAKotym70JjiTV7zfLyj6uf/Dry8/kDNtYImEITvNUAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTgtMTEtMjFUMjM6NTQ6MjErMDE6MDBzHQxwAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE4LTExLTIxVDIzOjU0OjIxKzAxOjAwAkC0zAAAACF0RVh0cHM6SGlSZXNCb3VuZGluZ0JveAAzNXgxNSsyODcrNjM2WZn/uAAAACd0RVh0cHM6TGV2ZWwAQWRvYmVGb250LTEuMDogQ01NSTEyIDAwMy4wMDIKMReWuwAAAEl0RVh0cHM6U3BvdENvbG9yLTAAL2Rldi9zaG0vemYyLWNhY2hlL2NlYWE0NzI5YjUzMWQzYzk2OTFlZjE2NjM4OGJmNmRkLmR2aSAtbzyH+NUAAABFdEVYdHBzOlNwb3RDb2xvci0xAC9kZXYvc2htL3pmMi1jYWNoZS9jZWFhNDcyOWI1MzFkM2M5NjkxZWYxNjYzODhiZjZkZC5wc8jSgE8AAAAASUVORK5CYII=" />) is the density of the fluid. This is true in the present case. A representative sample of particles in the solution is depicted below. These particles are released at the bottom-right corner of the mixer and flow to the top-left corner. The color expression indicates the initial <em>z</em>-coordinate of the particles at the inlet, and it can be used to visualize the final positions of particles relative to their initial positions in the mixer cross section.</p>
<p><img src="https://cdn.comsol.com/wordpress/2016/06/laminar_mixer_trajectories.png" title="" alt="Plot showing the laminar static mixer's particle trajectories." width="817" height="549" class="alignnone size-full wp-image-164881" /><br />
<em>Plot illustrating particle trajectories in the static mixer.</em></p>
<h3>Quantifying Static Mixer Performance with the Help of the Application Builder</h3>
<p>To some extent, we can judge the uniformity of a mixture by observation alone. In this example, the mixing performance can be visualized by creating a phase portrait of the particle positions. In a phase portrait, particles can be plotted in an arbitrary 2D phase space &#8212; that is, they can be arranged in a 2D plot in which the axes can be user-defined expressions. Phase portraits are, for example, often used to plot particle position versus momentum in a certain direction, a <em>phase space</em> distribution.</p>
<p>In the following animation, a phase portrait is used to observe the change in the transverse position of each particle as it moves throughout the mixer. Since the pipe is oriented in the y direction, the transverse directions are the x and z directions. The color expression denotes the quadrant that each particle occupied at the initial time; that is, dark blue particles were released with positive <em>x</em>- and <em>z</em>-coordinates, and so on.</p>
<p><script src="https://fast.wistia.com/assets/external/E-v1.js" async></script>
<div class="wistia_responsive_padding" style="padding:100.0% 0 0 0;position:relative;">
<div class="wistia_responsive_wrapper" style="height:100%;left:0;position:absolute;top:0;width:100%;">
<div class="wistia_embed wistia_async_b3bel56ho6 playerPreference=html5 seo=false videoFoam=true" style="height:100%;position:relative;width:100%">
<div class="wistia_swatch" style="height:100%;left:0;opacity:0;overflow:hidden;position:absolute;top:0;transition:opacity 200ms;width:100%;"><img src="https://fast.wistia.com/embed/medias/b3bel56ho6/swatch" style="filter:blur(5px);height:100%;object-fit:contain;width:100%;" alt="" onload="this.parentNode.style.opacity=1;" title="" /></div>
</div>
</div>
</div>
<p><em>A phase portrait indicates the transverse position of particles as they move throughout the mixer.</em></p>
<p>The phase portrait shows, qualitatively, that the particles are mixed together imperfectly at the outlet. There are still regions of higher or lower particle number density, along with clusters of particles of the same color &#8212; particles originating in the same quadrant &#8212; that can still be seen.</p>
<p>One potential drawback of the phase portrait is that it plots the particles in phase space at equal times, not at equal <em>y</em>-coordinates. This can produce a somewhat misleading visualization of the mixer, as some of the particles may move closer to the mixing blades and therefore potentially reach the outlet much later than other particles. An alternative option is to create a Poincaré map, which plots the intersection points of particles with a plane at a specified location.</p>
<p>In the following image, at each cut plane, the particles are colored according to whether they were released with positive (blue) or negative (red) initial <em>x</em>-coordinates. Once again, we can observe a clustering of red and blue particles at the outlet.</p>
<p><img src="https://cdn.comsol.com/wordpress/2016/06/poincare_map_with_blades.png" title="" alt="A visual showing a Poincaré map." width="738" height="553" class="alignnone size-full wp-image-164891" /><br />
<em>A Poincaré map shows the location of particles on a 2D plot.</em></p>
<p>Quite a lot of information about the mixer performance can be obtained from phase portraits and Poincaré maps, but most of it is too subjective for industrial applications. A human observer can judge approximately whether different species are completely unmixed, partially mixed, or well-mixed, but the lines between these definitions are hazy and difficult to quantify. For example, any observer can see that the previous images include pockets of particles of the same color, but it is much more difficult to assign a numerical value to describe how well-mixed they are.</p>
<p>Fortunately, the Application Builder and Method Editor provide the tools to create specialized, high-end postprocessing routines that can assign numeric values to the performance of a specific mixer geometry. A common metric for evaluating spatial uniformity of particles is the <a href="https://en.wikipedia.org/wiki/Index_of_dispersion" target="_blank">index of dispersion</a>, defined as the ratio of the variance to the mean:</p>
<p class="latex-equation-number">(4)</p>
<div class="latex">D=\frac{\sigma^2}{\mu}</div>
<p>The mean and variance are computed by subdividing the outlet into a number of regions, or <em>quadrats</em>, of equal area. Because the outlet is circular, it can be subdivided into <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAUCAMAAABLXLayAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TAGaIIjPdEcxEd7tV7pmq2FW1EQAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmAAAACHSURBVCjPpVFLEkMhCANEnp9nuf9tC0zbRcXpomzIEEjiCPBXIRF6L2T1TXJV8S4X7odNewDaRQlGjbuecajN+uSNKuZyr1wSi409TWpnt5Yms4uRpcnsZghry+zi3ZaGDpKexoHgYvwsyXpJK4fI6HK9Q9Z7lUCP2AQ9f8ocZ47ozA2Gn/UEk0ECfkXKrukAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTgtMTEtMjJUMDE6MzA6MzQrMDE6MDCkK4xkAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE4LTExLTIyVDAxOjMwOjM0KzAxOjAw1XY02AAAACF0RVh0cHM6SGlSZXNCb3VuZGluZ0JveAAxNngxMisyOTcrNjM3lmEW+QAAACd0RVh0cHM6TGV2ZWwAQWRvYmVGb250LTEuMDogQ01NSTEyIDAwMy4wMDIKMReWuwAAAEl0RVh0cHM6U3BvdENvbG9yLTAAL2Rldi9zaG0vemYyLWNhY2hlL2FlZDI1ZWZkM2FmYjg1NDU1MjFjMzhhY2UxM2U5NWJhLmR2aSAtb7wNwIcAAABFdEVYdHBzOlNwb3RDb2xvci0xAC9kZXYvc2htL3pmMi1jYWNoZS9hZWQyNWVmZDNhZmI4NTQ1NTIxYzM4YWNlMTNlOTViYS5wc92PvY4AAAAASUVORK5CYII=" /> annular regions of equal area by drawing concentric circles of radii</p>
<div class="latex">r_i = \sqrt{\frac{i}{N_r}} \hspace{1cm} \textrm{for } i=1,2,3\ldots N_r-1</div>
<p>The annular regions can each be partitioned into <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAXCAMAAAAvFN9lAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TAGaIIjPdEcxEd7tV7pmq2FW1EQAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmAAAACiSURBVCjPpZHJDsMgDES9AMUs4f//tsalUSSc9NC52OLhGQsAfgqJcFYm1UZDHGnW9EJnNA+xhhxfghJtUlyII2utYWesSa3fuCLr+VzJj9RpXemMTBdoZ7rSGXnZi6t5j0ywQ/y4tO7B1dJ6CBYR+qamvtyHRVbS21zWQGydrTvsakzTarg/lMvM4ejCUCBkOKoLAYUqZbgTwYPkgXGAf/UGVwwDHMUpsjUAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTgtMTEtMjJUMDE6MzA6MzQrMDE6MDCkK4xkAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE4LTExLTIyVDAxOjMwOjM0KzAxOjAw1XY02AAAACF0RVh0cHM6SGlSZXNCb3VuZGluZ0JveAAxN3gxNCsyOTcrNjM1kNBCMAAAACd0RVh0cHM6TGV2ZWwAQWRvYmVGb250LTEuMDogQ01NSTEyIDAwMy4wMDIKMReWuwAAAEl0RVh0cHM6U3BvdENvbG9yLTAAL2Rldi9zaG0vemYyLWNhY2hlLzYxMzQ3MDk2NDkzOTI4ZWY3NjY4NzQ5ZDYzZmIwMjIxLmR2aSAtbyH5ausAAABFdEVYdHBzOlNwb3RDb2xvci0xAC9kZXYvc2htL3pmMi1jYWNoZS82MTM0NzA5NjQ5MzkyOGVmNzY2ODc0OWQ2M2ZiMDIyMS5wc9ASpbYAAAAASUVORK5CYII=" /> domains of equal area by drawing diameters at angles</p>
<div class="latex">\phi_j = \frac{2\pi j}{N_{\phi}} \hspace{1cm} \textrm{for } j=0,1,2\ldots N_{\phi}-1</div>
<p>The subdivision produces <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGYAAAAXCAMAAADOf8o0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TAGaIIjPdEcxEd7tV7pmq2FW1EQAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB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eiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADBQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////L2OGaQAAAA50Uk5TABGIVXdmu5kz7iKqzES7W0jUAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAAAeAAAAHgAnfVaYAAAAGFJREFUCNdjYMAJhJRZVKFMRge2QrsGCJtFgE2hBSrOwcBpwMDAtQHC6xMAqjSAsH2QDNrEIMIQtADEutc4icGRdZEDiH3nUtvVBkZOAbD5DYwXGBiikfRsjkKwtzqgOgwA0rsQzEeLOioAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTgtMTEtMjJUMDE6MzA6MzQrMDE6MDCkK4xkAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE4LTExLTIyVDAxOjMwOjM0KzAxOjAw1XY02AAAACB0RVh0cHM6SGlSZXNCb3VuZGluZ0JveAAxM3g5KzI5OSs2MzciBeKHAAAAJ3RFWHRwczpMZXZlbABBZG9iZUZvbnQtMS4wOiBDTU1JMTIgMDAzLjAwMgoxF5a7AAAASXRFWHRwczpTcG90Q29sb3ItMAAvZGV2L3NobS96ZjItY2FjaGUvMWJhOGFhYWI0NzE3OWIzZDNlMjRiMGNjZWE5ZjRlMzAuZHZpIC1vPq3efAAAAEV0RVh0cHM6U3BvdENvbG9yLTEAL2Rldi9zaG0vemYyLWNhY2hlLzFiYThhYWFiNDcxNzliM2QzZTI0YjBjY2VhOWY0ZTMwLnBza1SCDgAAAABJRU5ErkJggg==" /> denote the number of particles in the <em>i</em>th quadrat, the average number of particles in each quadrat is</p>
<div class="latex">\bar{x}=\frac{1}{N_q}\sum_{i=1}^{N_q} x_i</div>
<p>The variance of the number of particles per quadrat is</p>
<div class="latex">\sigma = \frac{1}{N_q}\sum_{i=1}^{N_q} (x_i-\bar{x})^2</div>
<p>The following method (<code>p_computeIndexOfDispersion</code>) is used in the app to compute the index of dispersion.</p>
<pre>
<span style="color:#009900">/*
 * p_computeIndexOfDispersion
 * This method computes the index of dispersion at the outlet.
 * The method is called in p_initApplication and in m_compute.
 */

// Get the x- and z-coordinates of the particles at the outlet
// and store them in matrices qx and qz, respectively.</span>
model.result().numerical().create(<span style="color:#003366">"par1"</span>, <span style="color:#003366">"Particle"</span>);
model.result().numerical(<span style="color:#003366">"par1"</span>).set(<span style="color:#003366">"solnum"</span>, <span style="color:#0000FF">new</span> String[]{<span style="color:#003366">"14"</span>});
model.result().numerical(<span style="color:#003366">"par1"</span>).set(<span style="color:#003366">"expr"</span>, <span style="color:#003366">"qx"</span>);
model.result().numerical(<span style="color:#003366">"par1"</span>).set(<span style="color:#003366">"unit"</span>, <span style="color:#003366">"m"</span>);
<span style="color:#0000FF">double</span>[][] qx = model.result().numerical(<span style="color:#003366">"par1"</span>).getReal();
model.result().numerical(<span style="color:#003366">"par1"</span>).set(<span style="color:#003366">"expr"</span>, <span style="color:#003366">"qz"</span>);
model.result().numerical(<span style="color:#003366">"par1"</span>).set(<span style="color:#003366">"unit"</span>, <span style="color:#003366">"m"</span>);
model.result().numerical(<span style="color:#003366">"par1"</span>).set(<span style="color:#003366">"solnum"</span>, <span style="color:#0000FF">new</span> String[]{<span style="color:#003366">"14"</span>});
<span style="color:#0000FF">double</span>[][] qz = model.result().numerical(<span style="color:#003366">"par1"</span>).getReal();

<span style="color:#009900">// Use the "at" operator to get the initial x-coordinates of all particles
// and store them in matrix qx0.</span>
model.result().numerical(<span style="color:#003366">"par1"</span>).set(<span style="color:#003366">"expr"</span>, <span style="color:#003366">"at(0,qx)"</span>);
model.result().numerical(<span style="color:#003366">"par1"</span>).set(<span style="color:#003366">"unit"</span>, <span style="color:#003366">"m"</span>);
model.result().numerical(<span style="color:#003366">"par1"</span>).set(<span style="color:#003366">"solnum"</span>, <span style="color:#0000FF">new</span> String[]{<span style="color:#003366">"14"</span>});
<span style="color:#0000FF">double</span>[][] qx0 = model.result().numerical(<span style="color:#003366">"par1"</span>).getReal();

<span style="color:#009900">// The Particle Evaluation is no longer needed.</span>
model.result().numerical().remove(<span style="color:#003366">"par1"</span>);

<span style="color:#0000FF">double</span> Ra = model.param().evaluate(<span style="color:#003366">"Ra"</span>); <span style="color:#009900">// Radius of the outlet</span>
<span style="color:#0000FF">int</span> Np = qx.length;                      <span style="color:#009900">// Number of particles</span>
<span style="color:#0000FF">int</span> Nr = nbrR;                            <span style="color:#009900">// Number of subdivisions in the radial direction</span>
<span style="color:#0000FF">int</span> Nphi = nbrPhi;                        <span style="color:#009900">// Number of subdivisions per quadrant in the azimuthal direction</span>
<span style="color:#0000FF">int</span> nbrQuad = Nr*<span style="color:#009900">4</span>*Nphi;                  <span style="color:#009900">// Total number of quadrats (regions)</span>
<span style="color:#0000FF">double</span> deltaPhi = Math.PI/(<span style="color:#009900">2</span>*Nphi);       <span style="color:#009900">// Angular width of each quadrat</span>
<span style="color:#0000FF">int</span> index = <span style="color:#009900">0</span>;
<span style="color:#0000FF">int</span> ir = <span style="color:#009900">0</span>;
<span style="color:#0000FF">int</span> iphi = <span style="color:#009900">0</span>;
<span style="color:#0000FF">int</span>[] x = <span style="color:#0000FF">new int</span>[nbrQuad]; <span style="color:#009900">// Array to store number of points per quadrat

// Begin loop over all particles</span>
<span style="color:#0000FF">for</span> (<span style="color:#0000FF">int</span> i = <span style="color:#009900">0</span>; i &lt; Np; ++i) {
  <span style="color:#009900">// Determine which quadrat each particle is in.</span>
  ir = (<span style="color:#0000FF">int</span>) Math.floor((Math.pow(qx[i][<span style="color:#009900">0</span>], <span style="color:#009900">2</span>)+Math.pow(qz[i][<span style="color:#009900">0</span>], <span style="color:#009900">2</span>))*Nr/Math.pow(Ra, <span style="color:#009900">2</span>));
  iphi = (<span style="color:#0000FF">int</span>) Math.floor(Math.atan2(qz[i][<span style="color:#009900">0</span>], qx[i][<span style="color:#009900">0</span>])*Math.signum(qz[i][<span style="color:#009900">0</span>])/deltaPhi);
  <span style="color:#0000FF">if</span> (Math.signum(qz[i][<span style="color:#009900">0</span>]) &lt; <span style="color:#009900">0</span>) {
    iphi = (<span style="color:#0000FF">int</span>) Math.floor((<span style="color:#009900">2</span>*Math.PI-Math.atan2(qz[i][<span style="color:#009900">0</span>], qx[i][<span style="color:#009900">0</span>])*Math.signum(qz[i][<span style="color:#009900">0</span>]))/deltaPhi);
  }
  index = <span style="color:#009900">4</span>*Nphi*ir+iphi;
  <span style="color:#009900">// Consider only half of the particles when evaluating mixer performance.</span>
  <span style="color:#0000FF">if</span> (qx0[i][<span style="color:#009900">0</span>] &lt; <span style="color:#009900">0</span>) {
    x[index] = x[index]+<span style="color:#009900">1</span>;
  }
}
<span style="color:#009900">// compute the mean</span>
<span style="color:#0000FF">double</span> sum = <span style="color:#009900">0</span>;
<span style="color:#0000FF">for</span> (<span style="color:#0000FF">int</span> i = &lt;<span style="color:#009900">0</span>; i &lt; nbrQuad; ++i) {
  sum += x[i];
}
<span style="color:#009900">// compute the variance</span>
<span style="color:#0000FF">double</span> xmean = sum/nbrQuad;
sum = <span style="color:#009900">0</span>;
<span style="color:#0000FF">for</span> (<span style="color:#0000FF">int</span> i = <span style="color:#009900">0</span>; i &lt; nbrQuad; ++i) {
  sum += Math.pow(x[i]-xmean, <span style="color:#009900">2</span>);
}
indexOfDispersion = sum/xmean;
</pre>
<p>The last line of this method returns the index of dispersion. In general, a reduction of the index of dispersion corresponds to an improvement in the uniformity of the particle distribution. With the default parameters in the app, the index of dispersion is approximately 900 when three mixing blades are used, 1200 when two blades are used, and 1400 when only one blade is used. Thus, the index of dispersion quantitatively shows what we can see by looking at the plots: that a larger number of mixing blades produces a more uniform mixture of particles.</p>
<h3>Simulation Apps Optimize the Analysis of Static Mixer Performance</h3>
<p>Today, we have shown you how the Application Builder can advance your studies of static mixers. By creating an app, you can optimize the overall design workflow by spreading simulation capabilities to a wider audience, with the opportunity to gain a more accurate overview of mixing performance by assigning numerical values to different mixer geometries.</p>
<p>Interested in learning more about how to design simulation apps of your own? Be sure to check out the resources below.</p>
<h3>Helpful Resources for Your App-Building Processes</h3>
<ul>
<li>Try out the demo app presented here: <a href="https://www.comsol.com/model/laminar-static-particle-mixer-designer-23921">Laminar Static Particle Mixer Designer</a></li>
<li>For tips on how to enhance the structure and design of your simulation apps, as well as the user workflow, take a look at these blog posts:
<ul>
<li><a href="https://www.comsol.com/blogs/part-1-tips-to-improve-simulation-app-design-and-structure/">Part 1: Tips to Improve Simulation App Design and Structure</a></li>
<li><a href="https://www.comsol.com/blogs/part-2-simulation-app-design-tips-to-enhance-user-workflow/">Part 2: Simulation App Design Tips to Enhance User Workflow</a></li>
</ul>
</li>
]]></content:encoded>
			<wfw:commentRss>https://www.comsol.no/blogs/evaluating-static-mixer-performance-with-a-simulation-app/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Modeling Thin Dielectric Films in Optics</title>
		<link>https://www.comsol.no/blogs/modeling-thin-dielectric-films-in-optics/</link>
		<comments>https://www.comsol.no/blogs/modeling-thin-dielectric-films-in-optics/#comments</comments>
		<pubDate>Wed, 06 May 2015 08:22:23 +0000</pubDate>
		<dc:creator><![CDATA[Christopher Boucher]]></dc:creator>
				<category><![CDATA[Electrical]]></category>
		<category><![CDATA[Ray Optics]]></category>
		<category><![CDATA[Ray Optics Module]]></category>
		<category><![CDATA[Technical Content]]></category>

		<guid isPermaLink="false">http://com.staging.comsol.com/blogs/?p=80481</guid>
		<description><![CDATA[Thin dielectric films are versatile tools for controlling the propagation of light. They can be used, for example, as anti-reflective coatings to reduce the amount of stray light in a system. They can also be used as low-loss reflectors or as filters to selectively transmit certain frequencies of radiation. Here, we&#8217;ll discuss some of the built-in tools that the Ray Optics Module provides for modeling optical systems with dielectric films. Understanding Thin Films and Transmittance Because the optics of thin [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Thin dielectric films are versatile tools for controlling the propagation of light. They can be used, for example, as anti-reflective coatings to reduce the amount of stray light in a system. They can also be used as low-loss reflectors or as filters to selectively transmit certain frequencies of radiation. Here, we&#8217;ll discuss some of the built-in tools that the Ray Optics Module provides for modeling optical systems with dielectric films.</p>
<p><span id="more-80481"></span></p>
<h3>Understanding Thin Films and Transmittance</h3>
<p>Because the optics of thin dielectric films is based on reflection and refraction at multiple surfaces, we begin by reviewing the governing equations for reflection and refraction at a single boundary between two media, called a <em>material discontinuity</em>. The reflection and refraction of light at the boundary is governed by the <em>Fresnel equations</em>:</p>
<p id="(1)" class="latex-equation-number">(1)</p>
<div class="latex">\begin{aligned}<br />
t_s &amp;= \frac{2n_1 \cos\theta_i}{n_1 \cos\theta_i+n_2 \cos\theta_t} \\<br />
t_p &amp;= \frac{2n_1 \cos\theta_i}{n_2 \cos\theta_i+n_1 \cos\theta_t} \\<br />
r_s &amp;= \frac{n_1 \cos\theta_i-n_2 \cos\theta_t}{n_1 \cos\theta_i+n_2 \cos\theta_t} \\<br />
r_p &amp;= \frac{n_2 \cos\theta_i-n_1 \cos\theta_t}{n_2 \cos\theta_i+n_1 \cos\theta_t}<br />
\end{aligned}</div>
<p>where <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAPBAMAAAASQyJbAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADBQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////L2OGaQAAAA50Uk5TADOId91mqlWZRMwiuxGTtl3oAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAAAeAAAAHgAnfVaYAAAAGJJREFUCNdjYMAFGJUYjRSgbGYWVYZkKLuQT4GhCcqeMI+BYTEDtyKYo8PA/Zoh9CWYfYiBeQEDA4T9koHLQAHC5nzAwLchAMJmSmDgKr4AYfNeAJoFU88A1QUHQS8UUFwGAEkDFQ9c725pAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE4LTExLTIyVDAxOjMwOj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MHMBP2wAAAAgdEVYdHBzOkhpUmVzQm91bmRpbmdCb3gAMTN4OSsyOTgrNjM3H2XLNwAAACd0RVh0cHM6TGV2ZWwAQWRvYmVGb250LTEuMDogQ01NSTEyIDAwMy4wMDIKMReWuwAAAEl0RVh0cHM6U3BvdENvbG9yLTAAL2Rldi9zaG0vemYyLWNhY2hlL2U1MDFhZTJhZDkwZGMzNzQ0MTBhNzc0ZGEyMWM1NzM5LmR2aSAtb9wSu7QAAABFdEVYdHBzOlNwb3RDb2xvci0xAC9kZXYvc2htL3pmMi1jYWNoZS9lNTAxYWUyYWQ5MGRjMzc0NDEwYTc3NGRhMjFjNTczOS5wcwZWKt0AAAAASUVORK5CYII=" /> are the refractive indices in the adjacent domains containing the incident and refracted rays, respectively, <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAUCAMAAAC3SZ14AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TACKIzBFmu6rdd1WZ7kQzgmZxxgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmAAAAB7SURBVBjTjY9LDsAgCEQRwQ/aev/bFkxtqOmis5jEJzoDwH8FRNxIJEB+oaRHzJ5wUcPkUak7khHssUetH6ruI0vSCm2IQ8Pia7cyd+oxTvXY1EgWsvsZsUSGmn3OuHghOKORgHX1Qslk49Dp2fqe59eaU1k47IgrfOsCrgMCeTv4XnoAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTgtMTEtMjJUMDE6MzA6MzUrMDE6MDACXIfQAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE4LTExLTIyVDAxOjMwOjM1KzAxOjAwcwE/bAAAACF0RVh0cHM6SGlS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WHRwczpMZXZlbABBZG9iZUZvbnQtMS4wOiBDTU1JMTIgMDAzLjAwMgoxF5a7AAAASXRFWHRwczpTcG90Q29sb3ItMAAvZGV2L3NobS96ZjItY2FjaGUvMmQyZWNhOGUzYzkxNTQzZjg0MmQ3NTE2OWE4OWRkMGQuZHZpIC1v1Wq7TwAAAEV0RVh0cHM6U3BvdENvbG9yLTEAL2Rldi9zaG0vemYyLWNhY2hlLzJkMmVjYThlM2M5MTU0M2Y4NDJkNzUxNjlhODlkZDBkLnBzeeYjdwAAAABJRU5ErkJggg==" /> is the angle of refraction. This is illustrated by the following diagram.</p>
<p><img src="https://cdn.comsol.com/wordpress/2015/05/angles-of-incidence-and-refraction.png" title="" alt="A diagram of the angles of incidence and refraction in an optical system." width="938" height="744" class="alignnone size-full wp-image-80571" /></p>
<p>The coefficients <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAMBAMAAABPbPrXAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAC1QTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////wISVsgAAAA10Uk5TADOIRBF33SLuVWa7ql+N64YAAAABYktHRACIBR1IAAAACXBIWXMAAAB4AAAAeACd9VpgAAAAN0lEQVQI12NgwASMSsxKDiAGK5tiRQCIMZF3gRNYxMAWpkgbxtgEY1yG0swXoAymA1AGC1gvAwBo8QczkHj6JwAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxOC0xMS0yMVQyMzoxNDo0NSswMTowMPHkUmYAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTgtMTEtMjFUMjM6MTQ6NDUrMDE6MDCAueraAAAAH3RFWHRwczpIaVJlc0JvdW5kaW5nQm94ADl4NyszMDErNjM5sXcjOgAAACd0RVh0cHM6TGV2ZWwAQWRvYmVGb250LTE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3BvdENvbG9yLTEAL2Rldi9zaG0vemYyLWNhY2hlL2UzNThlZmE0ODlmNTgwNjJmMTBkZDczMTZiNjU2NDllLnBzU+SE6wAAAABJRU5ErkJggg==" /> are the reflection and transmission coefficients, respectively. The subscripts <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAMBAMAAABPbPrXAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADBQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////L2OGaQAAAA50Uk5TABF3iFW7Iu5EM8yqmWa9J/CeAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAAAeAAAAHgAnfVaYAAAADxJREFUCNdjYMACGJVNIAxWAeYEMMOVIR3CcLeAqmF+VwllcawGU9wGDD5gBlcDwwkwg+VGswNUyQQQCQBQoAiJWzmU4gAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxOC0xMS0yMVQyMzo1NDoyMCswMTowMNVqB8QAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTgtMTEtMjFUMjM6NTQ6MjArMDE6MDCkN794AAAAH3RFWHRwczpIaVJlc0JvdW5kaW5nQm94ADl4NyszMDErNjM5sXcjOgAAACd0RVh0cHM6TGV2ZWwAQWRvYmVGb250LTEuMDogQ01NSTEyIDAwMy4wMDIKMReWuwAAAEl0RVh0cHM6U3BvdENvbG9yLTAAL2Rldi9zaG0vemYyLWNhY2hlLzAzYzdjMGFjZTM5NWQ4MDE4MmRiMDdhZTJjMzBmMDM0LmR2aSAtb80tLAEAAABFdEVYdHBzOlNwb3RDb2xvci0xAC9kZXYvc2htL3pmMi1jYWNoZS8wM2M3YzBhY2UzOTVkODAxODJkYjA3YWUyYzMwZjAzNC5wc793BYYAAAAASUVORK5CYII=" /> and <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAARBAMAAADwJOuSAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADBQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////L2OGaQAAAA50Uk5TADOIRHe7mRHdVSLuZsxpovMrAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAAAeAAAAHgAnfVaYAAAAFdJREFUCNdjYMAEjErMTgIgBhNrIns7iCHJ4cAQAmIsWLeAYRNY0QkGrjdgRhoDzyswo4eBVQFEA8VtC0AMnpY56WAZtgQpiMkcB6BWAI0BA+ZUZQbsAACgQg7m5uhWgAAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxOC0xMS0yMVQyMzo1NDoxOSswMTowMM59RfQAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTgtMTEtMjFUMjM6NTQ6MTkrMDE6MDC/IP1IAAAAIHRFWHRwczpIaVJlc0JvdW5kaW5nQm94ADl4MTArMzAxKzYzNtljscgAAAAndEVYdHBzOkxldmVsAEFkb2JlRm9udC0xLjA6IENNTUkxMiAwMDMuMDAyCjEXlrsAAABJdEVYdHBzOlNwb3RDb2xvci0wAC9kZXYvc2htL3pmMi1jYWNoZS84Mzg3OGM5MTE3MTMzODkwMmUwZmUwZmI5N2E4YzQ3YS5kdmkgLW8m8b22AAAARXRFWHRwczpTcG90Q29sb3ItMQAvZGV2L3NobS96ZjItY2FjaGUvODM4NzhjOTExNzEzMzg5MDJlMGZlMGZiOTdhOGM0N2EucHOmynKCAAAAAElFTkSuQmCC" /> indicate the polarization of the incident ray. If the electric field vector is normal to the <em>plane of incidence</em> (the plane containing the incident ray and the surface normal), the ray is <em>s-polarized</em>; if the electric field vector lies in the plane of incidence, the ray is <em>p-polarized</em>.</p>
<p>For clarity, in the following discussion we drop the suffixes that indicate s- and p-polarization and assume that the correct reflection and transmission coefficients are used.</p>
<p>If the incident ray has intensity <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAMAAAC6V+0/AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TAIhEZjOZ7t2qIhG7zHdVE4rN5QAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmAAAABkSURBVBjTlY9BDoAwCAS7tIpQtf//raEHY4GLe+AwbCbZUn4GFvKUBmK1jhbhtidSPiKTUTOlJErOlJtdBUG9skvR0ylbt0dbldeEWJX4QEEfDFnhm3tCt0LNzH5FhSDOFZq9B2YnAjz3qDjgAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE4LTExLTIyVDAxOjMwOjM1KzAxOjAwAlyH0AAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxOC0xMS0yMlQwMTozMDozNSswMTowMHMBP2wAAAAhdEVYdHBzOkhpUmVzQm91bmRpbmdCb3gAMTJ4MTIrMjk5KzYzNypXk+cAAAAndEVYdHBzOkxldmVsAEFkb2JlRm9udC0xLjA6IENNTUkxMiAwMDMuMDAyCjEXlrsAAABJdEVYdHBzOlNwb3RDb2xvci0wAC9kZXYvc2htL3pmMi1jYWNoZS83Y2I4M2I4M2U3NjAyZWQ1NmNlNDQwZWFhYzEwOWZkZi5kdmkgLW8CLcauAAAARXRFWHRwczpTcG90Q29sb3ItMQAvZGV2L3NobS96ZjItY2FjaGUvN2NiODNiODNlNzYwMmVkNTZjZTQ0MGVhYWMxMDlmZGYucHOXYYsIAAAAAElFTkSuQmCC" />, the reflected and refracted rays have intensity given by</p>
<p id="(2)" class="latex-equation-number">(2)</p>
<div class="latex">\begin{aligned}<br />
I_r &amp;= R I_0 \\<br />
I_t &amp;= T I_0 \\<br />
R &amp;= \left|r\right|^2 \\<br />
T &amp;= \frac{n_2 \cos\theta_t}{n_1 \cos\theta_i}\left|t\right|^2<br />
\end{aligned}</div>
<p>The quantities <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAARCAMAAADub6yxAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TAGaIdyJEVe6Z3TMRqrvMheXUYAAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmAAAABsSURBVBjTlZBLDsAgCAUV/x/K/W9bS01b0E1ZSDLByQNj/pcFLucVD2THG5NT48SDkYLAucxPIHDJ3IDql3pWm5rsqm62S/NQj3gZm8p3qzNKOtVA29SYtJob4U7N+F0HOhW4LHiY5Vh8koeemFQCc+y4wzQAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTgtMTEtMjFUMjM6MTQ6NDErMDE6MDAFq3Z1AAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE4LTExLTIxVDIzOjE0OjQxKzAxOjAwdPbOyQAAACF0RVh0cHM6SGlSZXNCb3VuZGluZ0JveAAxM3gxMCszMDArNjM59NTiBAAAACd0RVh0cHM6TGV2ZWwAQWRvYmVGb250LTEuMDogQ01NSTEyIDAwMy4wMDIKMReWuwAAAEl0RVh0cHM6U3BvdENvbG9yLTAAL2Rldi9zaG0vemYyLWNhY2hlL2UxZTFkM2Q0MDU3MzEyN2U5ZWUwNDgwY2FmMTI4M2Q2LmR2aSAtb8WjpdAAAABFdEVYdHBzOlNwb3RDb2xvci0xAC9kZXYvc2htL3pmMi1jYWNoZS9lMWUxZDNkNDA1NzMxMjdlOWVlMDQ4MGNhZjEyODNkNi5wcz0sh5gAAAAASUVORK5CYII=" /> and <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAARBAMAAAAidOHKAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADBQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////L2OGaQAAAA50Uk5TABGIZneqRFWZIt3uM8w0ZYRTAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAAAeAAAAHgAnfVaYAAAAFtJREFUCNdjYMAGhJRAwADIck1kf8SQ0QBkBTCwvGTgVGBg4DRgYF3AwJbAwMAswMDdwMA2AaznnAFMt98EGCsKbuIOGIPnMYwFNA4KgMZBAXcDlGF0b5ECqpsAJWYPDhtP+s0AAAAldEVYdGRhdGU6Y3JlYXRlADIwMTgtMTEtMjFUMjM6MTQ6MzYrMDE6MDDKyUHiAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE4LTExLTIxVDIzOjE0OjM2KzAxOjAwu5T5XgAAACF0RVh0cHM6SGlSZXNCb3VuZGluZ0JveAAxMXgxMCszMDArNjM5GO98mwAAACd0RVh0cHM6TGV2ZWwAQWRvYmVGb250LTEuMDogQ01NSTEyIDAwMy4wMDIKMReWuwAAAEl0RVh0cHM6U3BvdENvbG9yLTAAL2Rldi9zaG0vemYyLWNhY2hlL2I5ZWNlMThjOTUwYWZiZmE2YjBmZGJmYTRmZjczMWQzLmR2aSAtb+cbL6UAAABFdEVYdHBzOlNwb3RDb2xvci0xAC9kZXYvc2htL3pmMi1jYWNoZS9iOWVjZTE4Yzk1MGFmYmZhNmIwZmRiZmE0ZmY3MzFkMy5wc5d5OxUAAAAASUVORK5CYII=" /> are called the <em>reflectance</em> and <em>transmittance</em>, respectively. By combining Eq.<a href="#(2)">(2)</a> with either set of Fresnel coefficients from Eq.<a href="#(1)">(1)</a>, we observe that energy is conserved, <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAUCAMAAABMHminAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TAIhEZjNVme673aoizBF3inz/EAAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmAAAAEBSURBVDjL3ZTbEoMgDEQJFxuKwP//bSsotbKFzLRP3QedcY65bCBK/Zlok/4dh0GdSVSNlIOgyRaQTsgBIXC5IZKFHBAC/V2WBHNAAAzZiJJ84Hoh0OQgStJxVr9kJwEXD+vhKUdnTQL65fKh1rbWV8dF2HcXMJKmOHAwldJ8eaaOo9llqSAHFdehg8iug+PWXMJ2FdBuv3ObVHEwmsUaGiapTjvKbWOcB68vYCpJWsTioImcTt2hJPtIdH9/EEinJIE4e3rap/LQroObjuQA6b2TKtcV+KFiluzhPR5fjlRfoMN/ZxUkFz9ug/GXI8XCBatWl0ScoUDCNfSFgi59PAB3RQboZvXQJgAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxOC0xMS0yMlQwMTozMDozNiswMTowMDO0nU0AAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTgtMTEtMjJUMDE6MzA6MzYrMDE6MDBC6SXxAAAAIXRFWHRwczpIaVJlc0JvdW5kaW5nQm94ADYweDEyKzI3NSs2MzdE5YdRAAAAJ3RFWHRwczpMZXZlbABBZG9iZUZvbnQtMS4wOiBDTU1JMTIgMDAzLjAwMgoxF5a7AAAASXRFWHRwczpTcG90Q29sb3ItMAAvZGV2L3NobS96ZjItY2FjaGUvOTEzNjgwMDYwZWRiODUyMDc0ZjI1OWUzM2I0ODAyYmEuZHZpIC1vcClkcgAAAEV0RVh0cHM6U3BvdENvbG9yLTEAL2Rldi9zaG0vemYyLWNhY2hlLzkxMzY4MDA2MGVkYjg1MjA3NGYyNTllMzNiNDgwMmJhLnBzlirAkwAAAABJRU5ErkJggg==" />.</p>
<p>We now consider what happens if rays are reflected and refracted at two parallel boundaries that are separated by a small distance. These two boundaries are the surfaces of a thin dielectric film that separates two media. By &#8220;small&#8221;, we usually mean that the film thickness is comparable in magnitude to the electromagnetic wavelength. Let us assume that the film thickness is much smaller than the <em>coherence length</em> of the radiation &#8212; in other words, over a length scale comparable to the film thickness, we can treat electromagnetic waves as perfect sinusoidal curves. We wish to compute the intensity of radiation that propagates into the domains on either side of the thin film.</p>
<p>As illustrated below, we can imagine a single ray entering a narrow region of refractive index <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAPCAMAAADXs89aAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TADOId91mqlWZRMwiuxHuO/L85QAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmAAAAB5SURBVBjTlZDBEoUgCEWv8EqJiP//25CnC5tp0V2gc4GDCHxVIULhCKsYP9qAnRe3FnivbGu5QLyfByev6UzQGUFdYZGRy4Z99nY+8G9zGXZegkEBhHkZ8EQHY0tim+g9J1buUJkuzMaL+moxVPFUqbnHQ3p56P2bbocFAp8aXrwWAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE4LTExLTIyVDAxOjMwOjM1KzAxOjAwAlyH0AAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxOC0xMS0yMlQwMTozMDozNSswMTowMHMBP2wAAAAg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dmkgLW/G/PSAAAAARXRFWHRwczpTcG90Q29sb3ItMQAvZGV2L3NobS96ZjItY2FjaGUvM2ZlZTc4ZGE3YzEyZTc0M2JlYmI3ZmJkZWMzMjE0NzEucHOVjNibAAAAAElFTkSuQmCC" /> indicate the reflection coefficient at the interface between domains 1 and 2, while <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAPCAMAAAAiTUTqAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TADOIRBF33SLuVWaZu8yqXUs1CQAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmAAAACJSURBVBjTnVBJEsMwCGNz8JKa//82kMTOpONeysHMIEtCAPxfSARMJCsswUaoOS2ggmAVZMljYBvaTb1VJpwo7fGKi3IW+CiUPLGdTn6wjcG5/GA+uMRB7FTrdRrao97CN3Wdgz5/tbvnAcrYHn0b1chp32GxRNi6hW15Q5rNy49QuNHP+/LldgDaawLMRixwUgAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxOC0xMS0yMlQwMTozMDozNiswMTowMDO0nU0AAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTgtMTEtMjJUMDE6MzA6MzYrMDE6MDBC6SXxAAAAIHRFWHRwczpIaVJlc0JvdW5kaW5nQm94ADE2eDkrMjk3KzYzN+xi8KQAAAAndEVYdHBzOkxldmVsAEFkb2JlRm9udC0xLjA6IENNTUkxMiAwMDMuMDAyCjEXlrsAAABJdEVYdHBzOlNwb3RDb2xvci0wAC9kZXYvc2htL3pmMi1jYWNoZS82MjgwMTU5Y2MwODhjNzU0MGI4MDE2MWIwNmU2ZTY0Ny5kdmkgLW9AstQSAAAARXRFWHRwczpTcG90Q29sb3ItMQAvZGV2L3NobS96ZjItY2FjaGUvNjI4MDE1OWNjMDg4Yzc1NDBiODAxNjFiMDZlNmU2NDcucHOxQ6PjAAAAAElFTkSuQmCC" /> indicates the reflection coefficient at the boundary between domains 2 and 3.</p>
<p><img src="https://cdn.comsol.com/wordpress/2015/05/Single-ray-entering-narrow-region-of-refractive-index.png" title="" alt="An illustration of a single ray entering a narrow region of a refractive index." width="1000" height="1139" class="alignnone size-full wp-image-80581" /></p>
<p>After entering the thin film, the ray is reflected back and forth between the two boundaries. Every time the ray reaches a boundary with a neighboring domain, a refracted ray propagates into that domain, causing the intensity within the film to be reduced. The amplitudes of the multiple rays that propagate into the domains adjacent to the film will all contribute to the total reflected and transmitted fields. Because each of these rays travels a different distance within the film, they may <em>interfere</em> constructively or destructively with each other &#8212; that is, the total amplitude of the transmitted and reflected fields can increase or decrease, depending on the phase difference between the rays.</p>
<p>Because of these interference effects, the intensity of the reflected and refracted radiation depends on the ratio of the free-space wavelength, <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAUBAMAAAB7UtADAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADBQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////L2OGaQAAAA50Uk5TADOZRGYi7nfMVd2IEbvqfMauAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAAAeAAAAHgAnfVaYAAAAHRJREFUCNdjYMAJGJWROH4BCDZbAYLN1IBgcz5F0pCOxNZCYs8TQFiwawPDaesDYLbs6QUMV3nAhjGuYXzIeIHhIogtJsCwiP0Cw22QcAoDwzZuCJtrAwND3GyoOAhHXmC4AjOWZwHDUrgd3tEOcDarKQMDANkcGkzHjBPvAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE4LTExLTIyVDAw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W5nQm94ADEweDEwKzMwMSs2Mzm+KhlEAAAAJ3RFWHRwczpMZXZlbABBZG9iZUZvbnQtMS4wOiBDTU1JMTIgMDAzLjAwMgoxF5a7AAAASXRFWHRwczpTcG90Q29sb3ItMAAvZGV2L3NobS96ZjItY2FjaGUvODI3N2UwOTEwZDc1MDE5NWI0NDg3OTc2MTZlMDkxYWQuZHZpIC1v6ILfKwAAAEV0RVh0cHM6U3BvdENvbG9yLTEAL2Rldi9zaG0vemYyLWNhY2hlLzgyNzdlMDkxMGQ3NTAxOTViNDQ4Nzk3NjE2ZTA5MWFkLnBzakwE0AAAAABJRU5ErkJggg==" />, not just on the medium properties and angle of incidence. As per <em>Optical Properties of Thin Solid Films</em> by O. S. Heavens (1991), the <em>equivalent reflection coefficient</em> req for the single-layer film is given as</p>
<p id="(3)" class="latex-equation-number">(3)</p>
<div class="latex">r_{\textrm{eq}} = \frac{r_{12}+r_{23}e^{-2i\delta}}{1+r_{12}r_{23}e^{-2i\delta}}</div>
<p>where <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TAFWIqkTdd+4zEZkiZsy70ssybQAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmAAAABcSURBVBjTjY85EsAwCAN9YIyP4P//1tCJpAkFM9pBgFL6XbnUUwIxRRRI+7gqvwl1iWBwiz6Zi87GiWaWpwKZ0+8rkJ6dwAwd7wr3xcnoCx82wSGVKO0Y01aB5QK+mwGXt1aj/wAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxOC0xMS0yMlQwMDowNTo1MCswMTowMDRW1TAAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTgtMTEtMjJUMDA6MDU6NTArMDE6MDBFC22MAAAAIXRFWHRwczpIaVJlc0JvdW5kaW5nQm94ADEweDEwKzMwMSs2Mzm+KhlEAAAAJ3RFWHRwczpMZXZlbABBZG9iZUZvbnQtMS4wOiBDTU1JMTIgMDAzLjAwMgoxF5a7AAAASXRFWHRwczpTcG90Q29sb3ItMAAvZGV2L3NobS96ZjItY2FjaGUvNzdhM2I3MTU4NDJiNDVlNDQwYTViZWUxNTM1N2FkMjkuZHZpIC1vPxZYawAAAEV0RVh0cHM6U3BvdENvbG9yLTEAL2Rldi9zaG0vemYyLWNhY2hlLzc3YTNiNzE1ODQyYjQ1ZTQ0MGE1YmVlMTUzNTdhZDI5LnBzMlvh8QAAAABJRU5ErkJggg==" /> is the phase delay that is introduced by crossing the film:</p>
<p class="latex-equation-number">(4)</p>
<div class="latex">\delta = \frac{2\pi n_2 d \cos\theta_2}{\lambda_0}</div>
<p>and <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAMAAAC6V+0/AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TACKIzBFmu6rdd1WZ7kQzgmZxxgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmAAAACISURBVBjTlZDRDsMgCEURaWtF4f//dpfOLaHNHsYDwWPCuYHozyrM/GBViLcb3AH4yGxraLxn2M4n7F5iRYY6JmpkfdsRSL0n6BHmHESGv/Jm0w29Kgl8c8iCER+ya/B5QYlZQzPjYUskZHXtZ/3k5H7I2q9ffVlKMqgK5TJE7XY74HDUr5O/AD/KA2KDWmzoAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE4LTExLTIyVDAxOjMwOjM2KzAxOjAwM7SdTQAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxOC0xMS0yMlQwMTozMDozNiswMTowMELpJfEAAAAhdEVYdHBzOkhpUmVzQm91bmRpbmdCb3gAMTJ4MTIrMjk5KzYzNypXk+cAAAAndEVYdHBzOkxldmVsAEFkb2JlRm9udC0xLjA6IENNTUkxMiAwMDMuMDAyCjEXlrsAAABJdEVYdHBzOlNwb3RDb2xvci0wAC9kZXYvc2htL3pmMi1jYWNoZS9mNWM4ZmZkZTk4ZDIxZWQwYTZlMGM5NGZlZTE4NDA1OS5kdmkgLW8g7Ms/AAAARXRFWHRwczpTcG90Q29sb3ItMQAvZGV2L3NobS96ZjItY2FjaGUvZjVjOGZmZGU5OGQyMWVkMGE2ZTBjOTRmZWUxODQwNTkucHM/1EnTAAAAAElFTkSuQmCC" /> is the acute angle that the ray makes with the surface normal as it propagates through the film. If multiple thin layers are placed side-by-side, it is possible to use Eq.<a href="#(3)">(3)</a> recursively to compute the transmittance and reflectance of the entire structure. There are also several other algorithms that can be used to compute the transmittance and reflectance of a multilayer film. See, for example, <em>Optical Properties of Thin Solid Films</em> by O. S. Heavens (1991) and <em>Principles of Optics</em> by M. Born and E. Wolf (1999).</p>
<h3>Anti-Reflective Coatings</h3>
<p>We have seen that, due to the interference of electromagnetic waves on either side of a thin film, the transmittance of the film can be significantly larger or smaller than the transmittance of a single boundary between two media, depending on the medium properties, film thickness, wavelength, and angle of incidence. We can use this behavior to control the amount of transmitted or reflected radiation in an optical system.</p>
<p>When thin dielectric films are used to reduce the reflectance at a material discontinuity, such films form an <em>anti-reflective coating</em>. The coating may consist of a single layer or multiple layers. Anti-reflective coatings can significantly reduce the amount of unwanted or unintended radiation, called <em>stray light</em>, in an optical system. For example, suppose that light propagating through a room is focused by a glass lens with a refractive index of 1.45. Assuming that the angle of incidence is nearly 0, the reflectance of the glass surface is</p>
<p class="latex-equation-number">(5)</p>
<div class="latex">R\approx\left(\frac{1-1.45}{1+1.45}\right)^2\approx 0.034</div>
<p>That is, more than 3%  of the radiation is reflected immediately when reaching the lens, reducing the amount of light that can be properly focused by the lens. Usually, we wish to reduce the amount of stray light as much as possible.</p>
<p><img src="https://cdn.comsol.com/wordpress/2015/05/Stray-light-in-an-optical-system.png" title="" alt="An image of stray light traveling through a lens." width="1000" height="749" class="alignnone size-full wp-image-80591" /></p>
<p>For example, if the reflection coefficients on both sides of the film are equal, <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE0AAAAPCAMAAACWR7LlAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TADOIRBF33SLuVWaZu8yqXUs1CQAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmAAAADUSURBVDjLzZJJEsMgDAS14LA51v9/GxYjHOLYHHKILlDF9CANAPx3IREwkfkNscCD0LrlHOReOEF4BAlgvvRGx5ogGFjqzhLWMaK9HFSJXYqBCfv9a1lCEAYwqX92NyFWokmfFrzTs7WNkN3KtXmzR3QyaSOaNPXH3U3Zssn9iTZ+fAUeiS7dgsYgoy3F60E7UaW4bJo0beOVN2YHoknZNTtj3t0whXv9qEoUqc3/Tj4/X3FDX37UTFVpeOT4/HAWSCKBdZJqymyXGvIcaYqY65FrMi9DiQXMlCb4CwAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxOC0xMS0yMlQwMTozMDozNyswMTowMJXDlvkAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTgtMTEtMjJUMDE6MzA6MzcrMDE6MDDkni5FAAAAIHRFWHRwczpIaVJlc0JvdW5kaW5nQm94ADQ2eDkrMjgyKzYzN3d922EAAAAndEVYdHBzOkxldmVsAEFkb2JlRm9udC0xLjA6IENNTUkxMiAwMDMuMDAyCjEXlrsAAABJdEVYdHBzOlNwb3RDb2xvci0wAC9kZXYvc2htL3pmMi1jYWNoZS9mMzA1ZGVmYjVhZTk1NDhlNTUxZmU5ZjM1ZWZhZTNiZS5kdmkgLW+9fuwdAAAARXRFWHRwczpTcG90Q29sb3ItMQAvZGV2L3NobS96ZjItY2FjaGUvZjMwNWRlZmI1YWU5NTQ4ZTU1MWZlOWYzNWVmYWUzYmUucHMhyodbAAAAAElFTkSuQmCC" />, and the phase delay for rays crossing the layer is <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEYAAAAXCAMAAACBIsnkAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TACJmVYiqEUTMd5kz3e67XlpLFAAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmAAAAEYSURBVDjL3VPtcsMgDDNgvgm8/9sOE2PSW7uUdb+muyQHASHJBuB/QOnvcwZtwz0aNP3lvHqYA/B+jyb0JyKmkNdc2faU+8mRGPBYgmzcpcFOUYnAXdLwR96kIU+tgrwJLpY7Wx4Z59DQ14w4W5o+k/JN6pf9gmjUFS1iRWT3SQIxjWvjSl8drLi+gudUHNVcCYoRCHNNIlW4fjwBnY3gJEwthGlagoMaCS38DKN7PnNg3eQTFt+GSuGPT0zRTtX/zJLMMzWy1B4p0bjVRNeIV2erQqnN3VyPPL48KArWQa9AFBhmwKenXK+Sc/X69l4enmrLyjiQow2I5Md7+rJWwG0Uze3ydxA+pyBN6XMOOC/3H+CuUX+PL5/CBsCSY4sfAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE4LTExLTIyVDAxOjMwOjM3KzAxOjAwlcOW+QAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxOC0xMS0yMlQwMTozMDozNyswMTowMOSeLkUAAAAhdEVYdHBzOkhpUmVzQm91bmRpbmdCb3gANDJ4MTQrMjg0KzYzNgCpfvwAAAAndEVYdHBzOkxldmVsAEFkb2JlRm9udC0xLjA6IENNTUkxMiAwMDMuMDAyCjEXlrsAAABJdEVYdHBzOlNwb3RDb2xvci0wAC9kZXYvc2htL3pmMi1jYWNoZS8xZWI5YmEwNjkxMDVlODhiYjYzYWJhYTA1ZTg2MmYzZi5kdmkgLW80naDlAAAARXRFWHRwczpTcG90Q29sb3ItMQAvZGV2L3NobS96ZjItY2FjaGUvMWViOWJhMDY5MTA1ZTg4YmI2M2FiYWEwNWU4NjJmM2YucHMBn5jfAAAAAElFTkSuQmCC" />, then, by applying Eq.<a href="#(3)">(3)</a> we find that <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD8AAAAXCAMAAACLfme2AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TADMiVYhEmd3M7rsRd2aq2uzrIQAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmAAAADeSURBVDjLxZTbDoQgDERbmIICyv//7YqIl3hbMdmdBwykx7ZTkeg/YvWG1hBt6t+gbKqgqeYN0troWr4deWeKFwAJ4L/mo4y8m7aBLFi14TCWZRHnI8k8Jl4zxY78SX6steXjtB0OHrVfeDvncI94FfWmf3I4Dw77+ilm//utn0NhCIMLChrMR/5NYdTn+RfDS/vps9LGt0y+EbqQpM5VWwxHX55DChdSW7jkKRiv3Fyi92VUs5k3PKnQ7cct6UZoTsW5G/5YnZHAae1sFb+oLv+Kr76buRHg1f/pd/oAh7oFaTD4HHoAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTgtMTEtMjJUMDE6MzA6MzcrMDE6MDCVw5b5AAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE4LTExLTIyVDAxOjMwOjM3KzAxOjAw5J4uRQAAACF0RVh0cHM6SGlSZXNCb3VuZGluZ0JveAAzOHgxNCsyODYrNjM1dCSSHwAAACd0RVh0cHM6TGV2ZWwAQWRvYmVGb250LTEuMDogQ01NSTEyIDAwMy4wMDIKMReWuwAAAEl0RVh0cHM6U3BvdENvbG9yLTAAL2Rldi9zaG0vemYyLWNhY2hlL2M1ZDk0MTIyOWY4NjkxMDZkNTg5M2ExMTEwN2MzNDgxLmR2aSAtbwIh+uYAAABFdEVYdHBzOlNwb3RDb2xvci0xAC9kZXYvc2htL3pmMi1jYWNoZS9jNWQ5NDEyMjlmODY5MTA2ZDU4OTNhMTExMDdjMzQ4MS5wc2UMZqIAAAAASUVORK5CYII=" /> and no radiation is reflected at all. For rays at normal incidence, we can obtain the desired phase delay by adjusting the thickness of the layer so that <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHEAAAAXCAMAAAALDVClAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TACJmM3cRiLuZRFXMqt3uClKdvQAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmAAAAH1SURBVEjH7VbLtusgCFURfCTR///bq6AmtUlcq4MzugyaVoENm0eq1H9ZijbyNLBQtDifkHOvFuDD3TFFfgQ79PDeHv237fYepMn65lSMcB+Oj/BgH2g+caTeJdnvMxCj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ating is a quarter of the wavelength. To ensure that <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE0AAAAPCAMAAACWR7LlAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TADOIRBF33SLuVWaZu8yqXUs1CQAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmAAAADUSURBVDjLzZJJEsMgDAS14LA51v9/GxYjHOLYHHKILlDF9CANAPx3IREwkfkNscCD0LrlHOReOEF4BAlgvvRGx5ogGFjqzhLWMaK9HFSJXYqBCfv9a1lCEAYwqX92NyFWokmfFrzTs7WNkN3KtXmzR3QyaSOaNPXH3U3Zssn9iTZ+fAUeiS7dgsYgoy3F60E7UaW4bJo0beOVN2YHoknZNTtj3t0whXv9qEoUqc3/Tj4/X3FDX37UTFVpeOT4/HAWSCKBdZJqymyXGvIcaYqY65FrMi9DiQXMlCb4CwAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxOC0xMS0yMlQwMTozMDozNyswMTowMJXDlvkAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTgtMTEtMjJUMDE6MzA6MzcrMDE6MDDkni5FAAAAIHRFWHRwczpIaVJlc0JvdW5kaW5nQm94ADQ2eDkrMjgyKzYzN3d922EAAAAndEVYdHBzOkxldmVsAEFkb2JlRm9udC0xLjA6IENNTUkxMiAwMDMuMDAyCjEXlrsAAABJdEVYdHBzOlNwb3RDb2xvci0wAC9kZXYvc2htL3pmMi1jYWNoZS9mMzA1ZGVmYjVhZTk1NDhlNTUxZmU5ZjM1ZWZhZTNiZS5kdmkgLW+9fuwdAAAARXRFWHRwczpTcG90Q29sb3ItMQAvZGV2L3NobS96ZjItY2FjaGUvZjMwNWRlZmI1YWU5NTQ4ZTU1MWZlOWYzNWVmYWUzYmUucHMhyodbAAAAAElFTkSuQmCC" />, the refractive index of the film should be the geometric mean of the refractive indices on either side, <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGkAAAAXCAMAAAA/dJG5AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TAERmiMwimbszd92qVRHuGN00BgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmAAAAFCSURBVEjH7VXbcoUgDEwIIAiY///bcjnKRa1OnTp9aF50ApvNJgQA/m00vmf4mEjQW5KkeokI9VuSpr8qyRCBsfSD3iZJR+iziBZmEgDO7lLAauZM0hH6JKI3wIld71Kg1k4kHaHPIiIgp6+0Wba+3WTjBjSAIjNGFEi1HjSlTawgxCVcwvcESoryo7FHxzkWPPriwPmlViGptBJKKvXmsEfVQzvLwjgNaKjg6oslwsqUl6NUiroh8Ca2PRHNxWVLuI+kBl2ZOp8TW5a5qFFq9tDljITFNZJ6dGFqfca6rfPkcvu8TQ26M4yUGrBK6tAfpt6Hy0oVyhHIe0w8E5eHL7DeJHXolan6VDqSbPcxjM/TcGWag/aHK+NDJOaU2H6vWtKrdV0+xSSP/IJ4mNZAHvWTN8yxuLvV4KP7Hucn6N+2L1FeC6pWWWLmAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE4LTExLTIyVDAxOjMwOjM3KzAxOjAwlcOW+QAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxOC0xMS0yMlQwMTozMDozNyswMTowMOSeLkUAAAAhdEVYdHBzOkhpUmVzQm91bmRpbmdCb3gANjN4MTQrMjc0KzYzNgoGNQ0AAAAndEVYdHBzOkxldmVsAEFkb2JlRm9udC0xLjA6IENNTUkxMiAwMDMuMDAyCjEXlrsAAABJdEVYdHBzOlNwb3RDb2xvci0wAC9kZXYvc2htL3pmMi1jYWNoZS82ZDk4NTZlOTdmMTNiZWUzYTczODZjMWVkMWE3YjRkNC5kdmkgLW+qq030AAAARXRFWHRwczpTcG90Q29sb3ItMQAvZGV2L3NobS96ZjItY2FjaGUvNmQ5ODU2ZTk3ZjEzYmVlM2E3Mzg2YzFlZDFhN2I0ZDQucHMvv+7EAAAAAElFTkSuQmCC" />.</p>
<p>The single-layer coating we&#8217;ve just described would have a reflectance of exactly zero, but only for a specific frequency of radiation and a specific angle of incidence. In addition, we might not have access to a material with a refractive index equal to the geometric mean of the refractive indices on either side of the film. A solution to this dilemma is to use a multilayer film that is capable of providing consistently low reflectance across a wide frequency band while also providing more flexibility in the selection of materials.</p>
<p>The <a href="http://www.comsol.com/ray-optics-module">Ray Optics Module</a> includes settings for applying single-layer or multilayer films to surfaces. It includes a built-in option to apply single-layer anti-reflective coatings at boundaries. There are also built-in settings for applying single-layer films that have a specified reflectance or transmittance for a certain refractive index, electromagnetic wavelength, and angle of incidence. Alternatively, single-layer or multilayer films can be applied at boundaries by specifying the refractive index and thickness of each layer directly.</p>
<p>For example, the following plot compares the reflectance of an anti-reflective coating with two layers, each of which has a thickness equal to 1/4 of the wavelength, to an anti-reflective coating consisting of three layers with thicknesses of 1/4 of the wavelength, 1/2 of the wavelength, and 1/4 of the wavelength, respectively. We see that the quarter-quarter film provides a reflectance of less than 0.5% over a range of about 100 nm, whereas the quarter-half-quarter film provides a reflectance of less than 0.5% over a range of more than 250 nm.</p>
<p><img src="https://cdn.comsol.com/wordpress/2015/05/Plot-comparing-reflectance-with-2-layers.png" title="" alt="A graph comparing reflectance between two thin films." width="1000" height="664" class="alignnone size-full wp-image-80601" /></p>
<p>For more information about the set-up of thin dielectric films, see the <a href="http://www.comsol.com/model/anti-reflective-coating-multilayer-19279">Anti-reflective Coating, Multilayer</a> tutorial.</p>
<h3>High-Reflection Coatings</h3>
<p>Thin dielectric films can also be used to increase the reflectance at a boundary, creating mirrors with significantly lower losses than shiny metallic surfaces. These arrangements of films are called <em>high-reflection coatings</em> or <em>distributed Bragg reflectors</em> (DBRs). The DBR consists of alternating layers of higher refractive index <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAPCAMAAADAkV+TAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TADOId91mqlWZRMwRuyLuLQfOmgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmAAAACFSURBVBjTpZDLDsUgCETHsT6oWv7/b69ia3ITky7KAkmGA4PAh3AknO9pFx4HAxD9RksOOqi8QwWi4z2NLNSckOrBMmXWnpq26cA66xpjlT9vB6MTlzyiypxq3ZELt6VW9anBmEyy1kdkND/Jl8XEtbKU2/Vu5V8YI7qTGq8sCP3K91//ATBzAvBrtVqoAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE4LTExLTIyVDAxOjMwOjM4KzAxOjAwY4vmEAAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxOC0xMS0yMlQwMTozMDozOCswMTowMBLWXqwAAAAgdEVYdHBzOkhpUmVzQm91bmRpbmdCb3gAMTd4OSsyOTcrNjM3LewvZAAAACd0RVh0cHM6TGV2ZWwAQWRvYmVGb250LTEuMDogQ01NSTEyIDAwMy4wMDIKMReWuwAAAEl0RVh0cHM6U3BvdENvbG9yLTAAL2Rldi9zaG0vemYyLWNhY2hlLzBmMDY4Yzg1NWM2MTJiZTYxM2Q5ODA3NGQ4MTA0NzI5LmR2aSAtb383C1EAAABFdEVYdHBzOlNwb3RDb2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ThkMzQ2ZDAzNWEucHMEOGZbAAAAAElFTkSuQmCC" />, as shown below.</p>
<p><img src="https://cdn.comsol.com/wordpress/2015/05/Alternating-layers-in-a-DBR.png" title="" alt="An illustration of the alternating layers in a distributed Bragg reflector." width="386" height="301" class="alignnone size-full wp-image-80611" /></p>
<p>The thicknesses of the layers are determined by the equation</p>
<p class="latex-equation-number">(6)</p>
<div class="latex">n_H t_H = n_L t_L = \frac{\lambda_0}{4}</div>
<p>The DBR is characterized by a photonic stop-band <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAUBAMAAAAToVI7AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADBQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////L2OGaQAAAA50Uk5TABGIuzOZRN1mIu53zFUl1XfZAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAAAeAAAAHgAnfVaYAAAALxJREFUGNNjYMAFBLGIKYNJ1wQkIcY6MI/jJZIYk58BmF6NJCbE+gxMxyCJaXI+BtP3JiCMU2CIcwAxuDYgjJvAMC8AxGAtQBgH5IGt5H2CMI6BgfMpiOFUxMCopgg1joEhDmg8i6E6A/MEGahxDGAD3QX8HJwZmB0gxoENZFnCwB6wmYEZpE1VCQhUnzJ4NTAwLVCGiK17BwYTioBWvYWKwQDIHM/LDMwN6KEmzsA+AV2MQ1MDM3inTWAAAA4EJvL/LhOHAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE4LTExLTIyVDAxOjMwOjM4KzAxOjAwY4vmEAAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxOC0xMS0yMlQwMTozMDozOCswMTowMBLWXqwAAAAhdEVYdHBzOkhpUmVzQm91bmRpbmdCb3gAMjN4MTIrMjkzKzYzN0aIq+cAAAAmdEVYdHBzOkxldmVsAEFkb2JlRm9udC0xLjA6IENNUjEyIDAwMy4wMDIK7bPeSwAAAEl0RVh0cHM6U3BvdENvbG9yLTAAL2Rldi9zaG0vemYyLWNhY2hlLzY2ZjRiNDhmZjE4YzQxNjJhZTI2MzY1ZTE2M2ZhY2UwLmR2aSAtb8X7myMAAABFdEVYdHBzOlNwb3RDb2xvci0xAC9kZXYvc2htL3pmMi1jYWNoZS82NmY0YjQ4ZmYxOGM0MTYyYWUyNjM2NWUxNjNmYWNlMC5wc14pilMAAAAASUVORK5CYII=" />, which is the range of wavelengths over which the reflectance is nearly 1:</p>
<p class="latex-equation-number">(7)</p>
<div class="latex">\Delta \lambda_0 = \frac{4\lambda_0}{\pi}\arcsin\left(\frac{n_H-n_L}{n_H+n_L}\right)</div>
<p>The reflectance becomes closer to 1 within the stop-band as the number of layers is increased.</p>
<p><img src="https://cdn.comsol.com/wordpress/2015/05/Reflectance-within-stop-band-as-layers-increase.png" title="" alt="A plot showing the reflectance within a stop-band." width="1000" height="664" class="alignnone size-full wp-image-80621" /></p>
<p>To learn more about the set-up of distributed Bragg reflectors, see the <a href="http://www.comsol.com/model/distributed-bragg-reflector-19275">Distributed Bragg Reflector</a> tutorial.</p>
<p>This tutorial is also available as a runnable application. With the Distributed Bragg Reflector (DBR) Filter application, you can compute the reflectance of a DBR over a wide frequency range. In addition to plotting the reflectance as a function of the vacuum wavelength, the application also computes the width of the stop-band, defined as the region in which the reflectance exceeds a specified threshold.</p>
<p><img src="https://cdn.comsol.com/wordpress/2015/05/DBR-filter-app-computing-stop-band-width.png" title="" alt="A screenshot shoing how to compute the stop-band width in the DBR filter app." width="993" height="718" class="alignnone size-full wp-image-80631" /></p>
<p>As we&#8217;ve seen previously, the optical thickness of each layer in a typical DBR is equal to <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACsAAAAXCAMAAAClO0YkAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TACJmM5lEiFURzN3ud7uqs4YuTgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmAAAADdSURBVCjPxZLrDsMgCIVBFFBrff+3nZfatc5s/beTNBr6CQcR4A9CswiSdSuWZfzXS9RkXLD+WDXcUsVtUY1H/nxjrf9kmfrqJlYWJsZxdnd2YUIOC5vOrA0za3slEphZyTSx6XAAM0scWkllx/0yTTdlcGYpKTcTCUF7T3s70kZ3YykoUDVBtXCqbnTvaVORzz4NhxTrLtjSc2OrG3N5C5e8FFucY/lONumS7V0BZnmzaE8S2ec0xn1aQZDGljKbwC9pvYyA7/l+k2FkUx/0AxbQ1dEyPWG79ufoWi/8WAVyqCM8YAAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxOC0xMS0yMlQwMTozMDozOCswMTowMGOL5hAAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTgtMTEtMjJUMDE6MzA6MzgrMDE6MDAS1l6sAAAAIXRFWHRwczpIaVJlc0JvdW5kaW5nQm94ADI2eDE0KzI5Mis2MzbnVrxbAAAAJ3RFWHRwczpMZXZlbABBZG9iZUZvbnQtMS4wOiBDTU1JMTIgMDAzLjAwMgoxF5a7AAAASXRFWHRwczpTcG90Q29sb3ItMAAvZGV2L3NobS96ZjItY2FjaGUvMDE1MjJkMDk0ZjI4NmJjM2FlMTE3NmY5MmVjYWE1OTIuZHZpIC1vV++GQAAAAEV0RVh0cHM6U3BvdENvbG9yLTEAL2Rldi9zaG0vemYyLWNhY2hlLzAxNTIyZDA5NGYyODZiYzNhZTExNzZmOTJlY2FhNTkyLnBzoCNvVAAAAABJRU5ErkJggg==" />. If a layer of optical thickness <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACsAA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y+tzAAAAAElFTkSuQmCC" /> is inserted within the DBR, then it becomes possible to transmit radiation of a specific frequency within the stop-band, as illustrated below.</p>
<p><img src="https://cdn.comsol.com/wordpress/2015/05/DBR-filter-app-transmitting-radiation.png" alt="How to plot the transmitting radiation in the DBR filter app in COMSOL Multiphysics." width="996" height="715" class="alignnone size-full wp-image-80641" title="DBR filter app transmitting radiation" /></p>
<p>This type of filter is useful for transmitting radiation from a spectrally narrow source while rejecting contamination from other sources.</p>
<p>You can download the <a href="http://www.comsol.com/model/distributed-bragg-reflector-filter-22561">Distributed Bragg Reflector (DBR) Filter app here</a>.</p>
<h3>Learn More</h3>
<ul>
<li>See what else is <a href="http://www.comsol.com/release/5.1/ray-optics-module">new in the Ray Optics Module</a> with COMSOL Multiphysics version 5.1, released on April 15, 2015.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>https://www.comsol.no/blogs/modeling-thin-dielectric-films-in-optics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ray Tracing in Monochromators and Spectrometers</title>
		<link>https://www.comsol.no/blogs/ray-tracing-in-monochromators-and-spectrometers/</link>
		<comments>https://www.comsol.no/blogs/ray-tracing-in-monochromators-and-spectrometers/#comments</comments>
		<pubDate>Thu, 25 Dec 2014 09:02:25 +0000</pubDate>
		<dc:creator><![CDATA[Christopher Boucher]]></dc:creator>
				<category><![CDATA[Electrical]]></category>
		<category><![CDATA[Ray Optics]]></category>
		<category><![CDATA[Ray Optics Module]]></category>
		<category><![CDATA[Technical Content]]></category>

		<guid isPermaLink="false">http://com.staging.comsol.com/blogs/?p=48451</guid>
		<description><![CDATA[Optical devices such as monochromators and spectrometers can be used to separate polychromatic, or multicolored, light into separate colors. These devices have many applications in diverse areas that range from chemistry to astronomy. Using built-in tools in the Ray Optics Module, it is possible to model the separation of electromagnetic rays at different frequencies with a monochromator or spectrometer as well as analyze the resolution of such devices. The Setup of a Basic Spectrometer A spectrometer is a device that [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Optical devices such as monochromators and spectrometers can be used to separate polychromatic, or multicolored, light into separate colors. These devices have many applications in diverse areas that range from chemistry to astronomy. Using built-in tools in the Ray Optics Module, it is possible to model the separation of electromagnetic rays at different frequencies with a monochromator or spectrometer as well as analyze the resolution of such devices.</p>
<p><span id="more-48451"></span></p>
<h3>The Setup of a Basic Spectrometer</h3>
<p>A <a href="http://en.wikipedia.org/wiki/Spectrometer" target="_blank"><em>spectrometer</em></a> is a device that measures some property of radiation (e.g., its intensity or state of polarization) as a function of its frequency. Spectrometers can be designed for detecting radiation at a number of different frequency ranges. This extends from visible light to gamma rays and infrared radiation.</p>
<p>A basic spectrometer includes a lens or mirror to convert incoming light into a parallel (or <em>collimated</em>) beam along with a mechanism for separating the light into different frequencies. The device also features another lens or mirror to focus light of different frequencies at specific locations. If a narrow exit slit is used to only transmit radiation of a specific frequency, the device is referred to as a <a href="http://en.wikipedia.org/wiki/Monochromator" target="_blank"><em>monochromator</em></a>.</p>
<p>Spectrometers are widely used to analyze the composition of mixtures of chemicals. Each element releases photons in specific frequency ranges (collectively known as the element&#8217;s <em>emission spectrum</em>) as excited electrons return to lower energy states. Using known emission spectra, it is possible to determine the composition of a sample based on the radiation that it emits. Similarly, it is possible to analyze the composition of stars based on the radiation they emit and even estimate the <a href="http://en.wikipedia.org/wiki/Redshift" target="_blank">redshift</a> of very distant objects.</p>
<p>There are several ways to separate polychromatic light into individual colors. Early spectrometers often used a prism made of a material with a frequency-dependent refractive index <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAMBAMAAAB2C0uMAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADBQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////L2OGaQAAAA50Uk5TADOId91mqlWZRMy7IhHB9+/EAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAAAeAAAAHgAnfVaYAAAAE9JREFUCNdjYMAGhBSElSAsA6cANgMQg13gEQOHAojFyfmAgQssxsC0geHcATCLW4HBCqKDbwLDYiYwax4DwxtWMEuNgWG5LZh1F6gfRAMAGx8LFHk0zoMAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTgtMTEtMjJUMDA6MDM6MzkrMDE6MDBqv+kjAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE4LTExLTIyVDAwOjAzOjM5KzAxOjAwG+JRnwAAACB0RVh0cHM6SGlSZXNCb3VuZGluZ0JveAAxMHg3KzMwMSs2MzkllWOuAAAAJ3RFWHRwczpMZXZlbABBZG9iZUZvbnQtMS4wOiBDTU1JMTIgMDAzLjAwMgoxF5a7AAAASXRFWHRwczpTcG90Q29sb3ItMAAvZGV2L3NobS96ZjItY2FjaGUvN2I4Yjk2NWFkNGJjYTBlNDFhYjUxZGU3YjMxMzYzYTEuZHZpIC1vMkRBzAAAAEV0RVh0cHM6U3BvdENvbG9yLTEAL2Rldi9zaG0vemYyLWNhY2hlLzdiOGI5NjVhZDRiY2EwZTQxYWI1MWRlN2IzMTM2M2ExLnBztbBGfAAAAABJRU5ErkJggg==" />. Such materials are also called <em>dispersive media</em>. As light enters and leaves the prism, its direction of propagation is determined by Snell&#8217;s Law,</p>
<p style="float: right;">(1)</p>
<div class="latex">n_i \sin(\theta_i) = n_t \sin(\theta_t)</div>
<p>where the subscripts <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAARBAMAAAD00TuvAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADBQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////L2OGaQAAAA50Uk5TACLudxGImTNEqszdu1W4drVjAAAAA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lOmNyZWF0ZQAyMDE4LTExLTIyVDAwOjM2OjI5KzAxOjAw2d5E+AAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxOC0xMS0yMlQwMDozNjoyOSswMTowMKiD/EQAAAAfdEVYdHBzOkhpUmVzQm91bmRpbmdCb3gAOHg5KzMwMis2Mzn/m124AAAAJ3RFWHRwczpMZXZlbABBZG9iZUZvbnQtMS4wOiBDTU1JMTIgMDAzLjAwMgoxF5a7AAAASXRFWHRwczpTcG90Q29sb3ItMAAvZGV2L3NobS96ZjItY2FjaGUvZTM1OGVmYTQ4OWY1ODA2MmYxMGRkNzMxNmI2NTY0OWUuZHZpIC1vF0YF4gAAAEV0RVh0cHM6U3BvdENvbG9yLTEAL2Rldi9zaG0vemYyLWNhY2hlL2UzNThlZmE0ODlmNTgwNjJmMTBkZDczMTZiNjU2NDllLnBzU+SE6wAAAABJRU5ErkJggg==" /> denote the incident and refracted light, respectively. If the refractive index is frequency-dependent and the angle of incidence is nonzero, then the angle of refraction is also frequency-dependent. As a result, a collimated beam of polychromatic light will be separated, as illustrated below.</p>
<p><img src="https://cdn.comsol.com/wordpress/2014/12/Polychromatic-prism.png" title="" alt="An image depicting the separation of polychromatic light." width="1000" height="664" class="alignnone size-full wp-image-48531" /></p>
<p>Modern spectrometers typically use a diffraction grating instead of a prism containing a dispersive medium. A <em>diffraction grating</em> is a periodic arrangement containing a large number of identical unit cells. When an electromagnetic wave reaches the grating, it can only be transmitted and reflected in specific directions. These directions depend on the wavelength of the incident light and the width of a single unit cell <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAARBAMAAADJQ1rJAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAC1QTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////wISVsgAAAA10Uk5TAIi7zFVEESIz7plmd1RQ0ksAAAABYktHRACIBR1IAAAACXBIWXMAAAB4AAAAeACd9VpgAAAAWElEQVQI12NgwAGEFGAsRgMYi0kAxuJ1gLFiEyB0oYgwhMGhxjoRwsoMYLgKYS1mYL0AYU1kYIQYzHEVZhzrNQbegA1g5nSGsxkQk3cFNjlCdLA1MASAaADz8A4bI2YMvwAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxOC0xMS0yMlQwMDowMjo1OSswMTowMEMSi5oAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTgtMTEtMjJUMDA6MDI6NTkrMDE6MDAyTzMmAAAAIXRFWHRwczpIaVJlc0JvdW5kaW5nQm94ADEweDEwKzMwMSs2Mzm+KhlEAAAAJ3RFWHRwczpMZXZlbABBZG9iZUZvbnQtMS4wOiBDTU1JMTIgMDAzLjAwMgoxF5a7AAAASXRFWHRwczpTcG90Q29sb3ItMAAvZGV2L3NobS96ZjItY2FjaGUvODI3N2UwOTEwZDc1MDE5NWI0NDg3OTc2MTZlMDkxYWQuZHZpIC1v6ILfKwAAAEV0RVh0cHM6U3BvdENvbG9yLTEAL2Rldi9zaG0vemYyLWNhY2hlLzgyNzdlMDkxMGQ3NTAxOTViNDQ4Nzk3NjE2ZTA5MWFkLnBzakwE0AAAAABJRU5ErkJggg==" />. </p>
<p>In order for reflected or refracted light to propagate in a certain direction, the waves from adjacent unit cells must interfere constructively with each other. For a reflected ray of free-space wavelength <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAUBAMAAAB7UtADAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADBQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////L2OGaQAAAA50Uk5TADOZRGYi7nfMVd2IEbvqfMauAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAAAeAAAAHgAnfVaYAAAAHRJREFUCNdjYMAJGJWROH4BCDZbAYLN1IBgcz5F0pCOxNZCYs8TQFiwawPDaesDYLbs6QUMV3nAhjGuYXzIeIHhIogtJsCwiP0Cw22QcAoDwzZuCJtrAwND3GyoOAhHXmC4AjOWZwHDUrgd3tEOcDarKQMDANkcGkzHjBPvAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE4LTExLTIyVDAwOjA1OjI4KzAxOjAwDXySTgAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxOC0xMS0yMlQwMDowNToyOCswMTowMHwhKvIAAAAhdEVYdHBzOkhpUmVzQm91bmRpbmdCb3gAMTN4MTIrMjk4KzYzN4yS9jgAAAAndEVYdHBzOkxldmVsAEFkb2JlRm9udC0xLjA6IENNTUkxMiAwMDMuMDAyCjEXlrsAAABJdEVYdHBzOlNwb3RDb2xvci0wAC9kZXYvc2htL3pmMi1jYWNoZS9mZmVlYWY1Zjc4Y2ZhOTI4ODVkZTc2YzlmNmVkZWYwMC5kdmkgLW8A421cAAAARXRFWHRwczpTcG90Q29sb3ItMQAvZGV2L3NobS96ZjItY2FjaGUvZmZlZWFmNWY3OGNmYTkyODg1ZGU3NmM5ZjZlZGVmMDAucHMIY+GnAAAAAElFTkSuQmCC" /> with integer-valued <em>diffraction order</em> <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAMCAMAAAC+5dbKAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TAESIM3cRZt2qVZnMu+4iyPsQWQAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmAAAABrSURBVBjTlU7LAoAgCFsT36X//7eBqXWNw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QAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTgtMTEtMjJUMDE6MzA6MzkrMDE6MDDF/O2kAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE4LTExLTIyVDAxOjMwOjM5KzAxOjAwtKFVGAAAACF0RVh0cHM6SGlSZXNCb3VuZGluZ0JveAAxMngxMisyOTkrNjM3KleT5wAAACd0RVh0cHM6TGV2ZWwAQWRvYmVGb250LTEuMDogQ01NSTEyIDAwMy4wMDIKMReWuwAAAEl0RVh0cHM6U3BvdENvbG9yLTAAL2Rldi9zaG0vemYyLWNhY2hlLzUyMTcxYWViZmNjOWE3MmNjMzdkNDAxMjlhODQ5NWY4LmR2aSAtb8fInUUAAABFdEVYdHBzOlNwb3RDb2xvci0xAC9kZXYvc2htL3pmMi1jYWNoZS81MjE3MWFlYmZjYzlhNzJjYzM3ZDQwMTI5YTg0OTVmOC5wcyN6OB0AAAAASUVORK5CYII=" /> are related by</p>
<p><a name="equation-2"></a>
<p style="float: right;">(2)</p>
<div class="latex">m\lambda_0 = d n_1 \left(\sin\theta_r -\sin\theta_i\right)</div>
<p>The reflection of rays from adjacent unit cells is illustrated below.</p>
<p><img src="https://cdn.comsol.com/wordpress/2014/12/Diffraction-grating-geometry.png" title="" alt="A schematic showing diffraction grating." width="1000" height="389" class="alignnone size-full wp-image-48551" /></p>
<p>From Eq. <a href="#equation-2">(2)</a>, it is clear that if the diffraction order is nonzero, the direction of reflected radiation will depend on the free-space wavelength. This is the basic property of the grating that can be used to separate different frequencies of radiation.</p>
<h3>Modeling the Czerny-Turner Configuration</h3>
<p>We now use <a href="/comsol-multiphysics">the COMSOL Multiphysics® software</a> with the <a href="/ray-optics-module">Ray Optics Module</a> to model light propagation in a basic optical device. This example consists of two mirrors and a diffraction grating arranged in a <em>crossed Czerny-Turner configuration</em>, which is depicted below.</p>
<p><img src="https://cdn.comsol.com/wordpress/2014/12/Czerny-Turner-geometry.png" title="" alt="A crossed Czerny-Turner configuration." width="550" height="730" class="alignnone size-full wp-image-48641" /></p>
<p>Incoming rays are released from a slit (1) with a conical distribution. The rays are reflected by a collimating mirror (2) so that all of the rays are parallel as they hit the diffraction grating (3). The reflected rays of diffraction order 0 travel along parallel paths because their angle of reflection is not wavelength-dependent. Because the different colors have not been separated, these rays are aimed away from the mirrors and ignored (4).</p>
<p>However, the rays of diffraction order 1 are reflected in different directions based on free-space wavelength. They are reflected by a focusing mirror (5) so that rays of different frequencies are focused at different points on a detector (6). If a narrow exit slit were placed at the detector, the resulting device would be a Czerny-Turner monochromator capable of transmitting radiation only in an extremely narrow frequency band.</p>
<p>In order to compute the ray paths as accurately as possible, we can resolve the mesh on the curved surfaces of the collimating mirror and the focusing mirror. On planar surfaces, a coarse mesh is acceptable. One way to quickly set up the mesh is to specify a very low <em>curvature factor</em>, which causes the mesh to be automatically refined near curved boundaries.</p>
<p><img src="https://cdn.comsol.com/wordpress/2014/12/Czerny-Turner-meshing.png" title="" alt="Setting up the mesh for the Czerny-Turner configuration." width="1000" height="664" class="alignnone size-full wp-image-48571" /></p>
<p>The paths followed by rays of different colors are shown in the following plot.</p>
<p><img src="https://cdn.comsol.com/wordpress/2014/12/Vacuum-wavelength-plot.png" title="" alt="A plot highlighting the paths of rays of varying colors." width="1000" height="664" class="alignnone size-full wp-image-48581" /></p>
<p>Although the crossed Czerny-Turner configuration appears to focus rays of each frequency to a distinct point, rays of a single frequency are actually distributed over an area of small but nonzero width. We can see this more clearly by zooming in at the detector surface.</p>
<p><img src="https://cdn.comsol.com/wordpress/2014/12/Ray-distribution.png" title="" alt="A close-up image shows the focusing of the rays." width="1000" height="664" class="alignnone size-full wp-image-48591" /></p>
<p>It is clear that rays of a single frequency are not focused to a single point. This naturally leads us to wonder about the resolution of the device. In other words, using the mirrors and grating as they are arranged in this model, what is the smallest change in wavelength that we can detect? It is possible to analyze the resolution using the Ray plot type. One way to quantify the resolution of the device is by using the expression</p>
<p style="float: right;">(3)</p>
<div class="latex">\textrm{Resolution} = \frac{Sw_{i}}{Nw_{p}}</div>
<p>where <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAARBAMAAAAidOHKAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADBQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////L2OGaQAAAA50Uk5TABGImVUidzO7zO7dZkRmwzgEAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAAAeAAAAHgAnfVaYAAAAGVJREFUCNdjYMAOGJWUXRPArIoAhkwHMGsqAwOfAIjB0sDAwAwWYpoAxGAWyzMBmN6+F6lQFovmqwCYaJUBmCoAamgA26AAZCmAVQFJzgKwcRsZGA6BlXEUn70MlmRgZ7h0EEQDAEryEC0OQMRTAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE4LTExLTIxVDIzOjE0OjM5KzAxOjAwPIExCwAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxOC0xMS0yMVQyMzoxNDozOSswMTowME3cibcAAAAhdEVYdHBzOkhpUmVzQm91bmRpbmdCb3gAMTF4MTArMzAwKzYzORjvfJsAAAAndEVYdHBzOkxldmVsAEFkb2JlRm9udC0xLjA6IENNTUkxMiAwMDMuMDAyCjEXlrsAAABJdEVYdHBzOlNwb3RDb2xvci0wAC9kZXYvc2htL3pmMi1jYWNoZS81ZGJjOThkY2M5ODNhNzA3MjhiZDA4MmQxYTQ3NTQ2ZS5kdmkgLW+e3nnRAAAARXRFWHRwczpTcG90Q29sb3ItMQAvZGV2L3NobS96ZjItY2FjaGUvNWRiYzk4ZGNjOTgzYTcwNzI4YmQwODJkMWE0NzU0NmUucHMVT0EXAAAAAElFTkSuQmCC" /> is the spectral width of the incident polychromatic beam, <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAPCAMAAAAmuJTXAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TABF3iCKqmTPuRN3MZlW7LSV6eAAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmAAAAB/SURBVBjTnY7LDoUwCESnPNqi1P7/314wN7EudOEsgOTAMMA3FWKJRgVF5UYYXIE2BdJpBc2gHCdbLtlKDDIboDVJuIlejPYom+eUb8dFjjCTKX+yasaW9TQOV+cl3x6E+5kSLrwc2mE+KhmX+IJebvkyUztHVzxIh8sDccK7frLBAljtrILZAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE4LTExLTIyVDAxOjMwOjM5KzAxOjAwxfztpAAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxOC0xMS0yMlQwMTozMDozOSswMTowMLShVRgAAAAgdEVYdHBzOkhpUmVzQm91bmRpbmdCb3gAMTV4OSsyOTgrNjM399ABdAAAACd0RVh0cHM6TGV2ZWwAQWRvYmVGb250LTEuMDogQ01NSTEyIDAwMy4wMDIKMReWuwAAAEl0RVh0cHM6U3BvdENvbG9yLTAAL2Rldi9zaG0vemYyLWNhY2hlL2FhMzhmMTA3Mjg5ZDRkNzNkNTE2MTkwNTgxMzk3MzQ5LmR2aSAtb0PFW0UAAABFdEVYdHBzOlNwb3RDb2xvci0xAC9kZXYvc2htL3pmMi1jYWNoZS9hYTM4ZjEwNzI4OWQ0ZDczZDUxNjE5MDU4MTM5NzM0OS5wc4zWLHMAAAAASUVORK5CYII=" /> is the width of an incident monochromatic beam at the detector, <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAASCAMAAACZ8IWSAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TABF3iCKqmTPuRN3MZrtVqmprZQAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmAAAACRSURBVBjTnZDbEsMgCERXQRFv/P/fBjvpNOmYPnQf1PHgsgL8UIjEvsWAkPhGCJQBMQaXeAWiSORP6irSK1GwCZDyInc3xOZL7ev0FWG4GRtviE33LMtYEHqWTnKS5oTKKyV6GBGa3hmG9pmjUvDPwfyiffJ5E5azzNslbERuWWVHWlaa2yHa03jneJo7keB/HfV8AuBuI/ItAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE4LTExLTIyVDAxOjMwOjM5KzAxOjAwxfztpAAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxOC0xMS0yMlQwMTozMDozOSswMTowMLShVRgAAAAhdEVYdHBzOkhpUmVzQm91bmRpbmdCb3gAMTV4MTErMjk4KzYzNbQsDjEAAAAndEVYdHBzOkxldmVsAEFkb2JlRm9udC0xLjA6IENNTUkxMiAwMDMuMDAyCjEXlrsAAABJdEVYdHBzOlNwb3RDb2xvci0wAC9kZXYvc2htL3pmMi1jYWNoZS8yZjkxYTJhZGQ5MWU2YmEwYmNlOWVjY2U5MTBlZTlhOS5kdmkgLW/wWXPMAAAARXRFWHRwczpTcG90Q29sb3ItMQAvZGV2L3NobS96ZjItY2FjaGUvMmY5MWEyYWRkOTFlNmJhMGJjZTllY2NlOTEwZWU5YTkucHNuypggAAAAAElFTkSuQmCC" /> is the width of a single pixel on the detector, and <img class="latexImg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAARCAMAAADub6yxAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////8T5qHgAAAA90Uk5TAGaIIjPdEcxEd7tV7pmq2FW1EQAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAHgAAAB4AJ31WmAAAABvSURBVBjTnZDBDsAgCEMF1Omc4///dpXsoHhYMi7FBl4jIfwoYqahwqjJj0nz0HzQMl60WsMLhcOZbLo6m7RAW5xdAfHqG4MEzgj1aGwg1KHthVCHbkbS4tD2FYTyzhihCzr3l6UzmtPVxbr746IPXUECAJTNZncAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTgtMTEtMjFUMjM6NTU6MzcrMDE6MDAzpVLqAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE4LTExLTIxVDIzOjU1OjM3KzAxOjAwQvjqVgAAACF0RVh0cHM6SGlSZXNCb3VuZGluZ0JveAAxM3gxMCsyOTkrNjM5eLzaCQAAACd0RVh0cHM6TGV2ZWwAQWRvYmVGb250LTEuMDogQ01NSTEyIDAwMy4wMDIKMReWuwAAAEl0RVh0cHM6U3BvdENvbG9yLTAAL2Rldi9zaG0vemYyLWNhY2hlLzhkOWMzMDdjYjdmM2M0YTMyODIyYTUxOTIyZDFjZWFhLmR2aSAtbzOiPVQAAABFdEVYdHBzOlNwb3RDb2xvci0xAC9kZXYvc2htL3pmMi1jYWNoZS84ZDljMzA3Y2I3ZjNjNGEzMjgyMmE1MTkyMmQxY2VhYS5wcwlgkCwAAAAASUVORK5CYII=" /> is the total number of pixels. The resulting resolution is shown in the following plot.</p>
<p><img src="https://cdn.comsol.com/wordpress/2014/12/Resulting-resolution.png" title="" alt="The resulting resolution of the monochromator." width="1000" height="750" class="alignnone size-full wp-image-48601" /></p>
<h3>Next Steps</h3>
<p>To learn more about modeling the separation of polychromatic light with the Ray Optics Module, download the <a href="/model/czerny-turner-monochromator-19061">Czerny-Turner Monochromator model</a> from our Application Gallery.</p>
<p>If you have any questions about the COMSOL Multiphysics software, please <a href="/contact">contact us</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.comsol.no/blogs/ray-tracing-in-monochromators-and-spectrometers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
