When it comes to counting particles, the easiest way to do so is directly within postprocessing, after the solution has been computed. Let’s walk through the steps behind this basic methodology.

First, create a duplicate of the default Particle Data Set, which is automatically generated after computing the solution. Add a Selection to the data set, as illustrated below, and then select the domains or boundaries in which you will count the particles.

Next, add a Global Evaluation node under Derived Values and point to the new Particle Data Set, in this case, *Particle 2*. You can select specific parameter values or output times in the settings window.

Choose from the following predefined expressions under the *Particle statistics* section in the Add/Replace Expression menu:

- <
`phys`

>`.alpha`

— Transmission probability (the number of particles in the selection specified by the Particle Data Set divided by the total number of particles). - <
`phys`

>`.Nsel`

— Total number of particles in selection (the number of particles in the selection specified by the Particle Data Set). - <
`phys`

>`.Nt`

— Total number of particles (the total number of particles in the entire model).

*Evaluating the Global Evaluation node will display the value of the expression in a results table.*

- Molecular Flow Module > Industrial Applications > charge exchange cell
- AC/DC Module > Particle Tracing > quadrupole mass filter

If the number of particles or the number density of particles needs to be used in another physics interface, the best option is to use an *Accumulator*. Accumulators transfer information from particles to the mesh elements in which they reside. They are available on both domains and boundaries and can be accessed from the context menu of any *Particle Tracing* interface. Upon adding an accumulator to a domain, the following settings are shown:

The available options in the *Accumulator* feature are:

*Accumulator type*: When set to*Count*, the accumulated variable is simply counted in each mesh element, unaffected by the element size. For*Density*, the accumulated variable is divided by the volume of the mesh element, allowing you to compute quantities like the number density of particles.*Accumulate over*: When set to*Elements*, the accumulated variable is simply the sum of the source terms for all of the particles that reside in the element at a given point in time. When set to*Elements and time*, the particles leave behind a contribution in the elements that they pass through, based upon how long they were in each element.*Source*: This is the expression defined on the particle that you want to project onto the underlying mesh. When counting particles,*Source*is simply set to “1″, but it can be any expression that exists on the particles, such as charge or kinetic energy. It can also depend on variables that are defined in the domain in which the particles are located.*Unit*: When the unit is selected for the accumulated variable, the required unit for the*Source*will change accordingly.

To count the total number of particles, you can add an integration component coupling to the domain where the accumulator exists. Boundary accumulators automatically add component couplings on the selected boundaries. In our example, the total number of particles is then given by <`integration_operator_name`

>`(pt.count)`

. This can be evaluated using the Global Evaluation node. The number of particles within each mesh element may also be coupled to other physics, since it is a degree of freedom. We can visualize how the particle counting works by plotting particle locations on a plot of the accumulated variable and the underlying mesh.

*A plot shows the particle locations (black dots) on top of the underlying mesh (gray lines). The color in each element represents the value of the accumulated variable.*

From the plot above, it is clear that the accumulator does indeed count the number of particles within each mesh element. For mesh elements in which there are no particles, the accumulated variable is zero, indicated by the mesh elements (shown in blue). Most mesh elements have one particle, which is highlighted in green. However, one mesh element happens to contain 2 particles (shown in red).

You can also use accumulators to count the number of particles passing through an interior boundary. To do this, simply add a Wall condition on the boundary that the particles will pass through, setting the Wall condition to *Pass through*. Add an Accumulator subfeature to the Wall node with the following settings:

When a particle passes through the boundary, the accumulator increments the degree of freedom in the corresponding boundary mesh element. This gives the spatial distribution of the number of particles passing through the interior boundary, as depicted in the animation below.

It is possible to conveniently plot the total number of particles passing through the boundary as a function of time. Simply add a *1D Plot Group* and a *Global* plot feature. The accumulator creates predefined variables to add up the accumulated variables over all the mesh elements. To get the total number of particles, you can use the *Sum of accumulated variable count* option.

The plot below shows the results for the total number of particles that crossed the interior boundary.

Note: To learn more about the applications of accumulators, you can refer to this earlier blog post by my colleague Christopher Boucher.

- Molecular Flow Module > Benchmarks > s_bend_benchmark

A *Particle Counter* is a domain or boundary feature that provides information about particles arriving on a set of selected domains or surfaces from a specified release feature. Such quantities include transmission probability, current, and mass flow rate. The settings for a *Particle Counter* feature are very simple. Select a *Release feature* to connect to, or select *All* release features. You can add Particle Counter features to the model and access their variables without having to recompute the solution. Simply use *Study > Update Solution*, and the new variables will be automatically generated and immediately available for evaluation.

Each Particle Counter generates the following expressions. Note that the scope is different than the variables that are always available in the *Particle statistics* plot group, as outlined in the first section.

- <
`phys`

>`.`

<`feature`

>`.rL`

— Logical expression for particle inclusion; can be used in the*Filter*node of the*Particle Trajectories*plot, allowing visualization of only the particles that connect a source and a destination. - <
`phys`

>`.`

<`feature`

>`.Nsel`

— Total number of particles in selection; computes the total number of particles released by a specific release feature in the set of domains or boundaries determined by the Particle Counter selection. - <
`phys`

>`.`

<`feature`

>`.Nfin,`

— The number of transmitted particles at the final time (the number of particles in the Particle Counter selection at the final solution time). - <
`phys`

>`.`

<`feature`

>`.alpha`

— Transmission probability (the ratio of the number of particles in the Particle Counter selection divided by the number of particles released by the release feature).

When the Release feature is a *Particle Beam* feature — a specialized release feature for the *Charged Particle Tracing* interface — additional variables for the average beam position, velocity, and kinetic energy are generated for the particles that connect the counter to the particle beam.

- Particle Tracing Module > Charged Particle Tracing > sensitive high resolution ion microprobe
- Particle Tracing Module > Tutorials > brownian motion
- Particle Tracing Module > Fluid Flow > laminar mixer particle

There are three ways to count the number of particles on domains and boundaries. For simple models in which only a single release feature is present, the postprocessing tools might suffice. If you want to plot the number of particles on a domain or boundary, or if you want to use the number of particles in another physics interface, accumulators are the answer. To count particles that only connect a specific release feature to a selection of domains or boundaries, you can use the Particle Counter feature — one of the many new additions in COMSOL Multiphysics version 5.2.

]]>

A gas box is used to feed in mixtures of chemicals in specific ratios into a process chamber. Once inside the process chamber, these gases react to allow thin films to be deposited on the surface of a wafer. These films can be grown in a controlled manner, allowing for the manufacturing of semiconducting computer chips. The gas box can be considered an essential piece of the semiconductor manufacturing process.

The ratio and magnitude of each of the chemicals fed into the process chamber is controlled by a mass flow controller (MFC). Each MFC supplies a given flow rate to each of the pipes in a network and can only function correctly if the back pressure in the pipe network remains below 760 Torr. The back pressure is defined as the maximum pressure in the pipe network. This application computes the back pressure in a network of pipes fed by a system of mass flow controllers.

The Pipe Flow Module is used to compute the pressure distribution inside the pipe network and report whether a given design will meet the back pressure specification. The first row in the “Mass flow controller properties” table (shown in the screenshot a bit further down) corresponds to the pipe farthest to the right in the default plot (the bottom pipe in the sketch below).

The back pressure in the network increases if:

- The
*Pipe length*is increased. - The
*Pipe diameter*is decreased. - The
*Temperature*is increased. - The
*Process chamber pressure*is increased. - The
*Spacing between pipes*is increased.

The back pressure generated across a single pipe can be estimated using the Hagen-Poiseuille equation:

\Delta p = \frac{128 \mu L Q}{\pi d^4}

where the left-hand side is the pressure drop, \mu is the dynamic viscosity, L is the pipe length, Q is the flow rate, and d is the pipe diameter.

So, the pressure drop will scale linearly with the pipe length and flow rate, but to the fourth power of the inverse of the pipe diameter. In other words, small changes to the pipe diameter can significantly change the back pressure. Once the pipes become connected in a network, a more sophisticated approach is required. COMSOL Multiphysics simulation software solves a one-dimensional form of the Navier-Stokes equations to accurately predict the back pressure in a system of connected pipes.

When you run the application, there are options to change the pipe length, pipe diameter, the number of flow controllers, etc. If any of the input parameters are changed, the *Information* section warns you that the current solution is not consistent with the input parameters. The report generation is disabled until the solution is computed again.

If the number of flow controllers is changed by adding or removing rows in the table, the geometry is automatically re-generated and displayed in the graphics window. Upon computing the solution, the back pressure is reported in the *Results* section and the Information section displays whether the specific design will meet the specification or not.

*Screenshot of the app in action.*

This application is constructed by adding the following components in the COMSOL Multiphysics Application Builder:

- Menu
- The menu is used to save or exit the application

- Ribbon
- The ribbon is used to execute certain actions such as resetting the user input and computing the solution

- A collection of Forms
- The forms give the application its look and feel

- Events
- Events are used to trigger a warning in the Information section when the data in the table is modified

- Declarations
- Declarations store data internal to the application

- A set of Methods
- Methods perform actions that can’t be attached directly to form components

- A Library of images
- This is used to decorate the ribbon and provide a nicer look and feel for the application

*Annotated screenshot showing the different components of the application.*

The *Form Editor* is used to give the look and feel of the application. This is done by laying out form components on a number of different forms. These forms are then integrated into a main form, which is shown when you run the application. A grid-based layout is used for each form, which ensures that the application will look the same on different platforms.

The user interface for an application consists of a collection of form components.

My app has the following form components:

*Text Labels*to describe which input should be entered.*Input Fields*for the pipe length, pipe diameter, etc.*Units*, which are associated with each of the input fields.- A
*Combo Box*to indicate which friction model is used. - A
*Table*to specify the flow rates, molecular weights, and dynamic viscosity for each flow controller. *Lines*to separate the Input, Results, and Information sections.- An
*Equation*to describe the analytic pressure drop in a pipe. *Data Display*to indicate the value of the back pressure.*Images*to decorate the ribbon, update the Information section, and show the COMSOL Multiphysics logo.*Graphics*to plot the pressure and velocity in the pipe network.- A
*Card Stack*to update the Information section depending on the current status of the application. - A
*Form Collection*to provide tabbed graphics windows for the pressure and velocity plots.

Card stacks provide a simple way to show different text or images when a certain event occurs. The source for the active card is a **String** declaration called `information_card`

. When the value of this string changes, the card displayed in the application is updated. The Information section of this application contains a card stack with four different cards.

One card each for:

- Displaying that the current design meets the specification.
- Displaying that the current design does not meet the specification.
- Indicating that no solution exists. This is the default card and is shown when the application is first launched.
- Displaying that the input data has changed since the solution was computed.

The individual cards can be accessed from the Card Stack in the Form Editor by holding down the Alt key and left-clicking.

*Screenshot showing the status of the app if the back pressure exceeds the maximum value.*

The ribbon provides a convenient way of adding buttons that can trigger events to the Main Window. In the application that I created, each ribbon item executes a method when clicked.

There are four ribbon items in my app:

- Reset to Default Values
- Clicking this item causes the input parameters to be reset to their default values

- Compute
- This calls a method, which solves the problem, updates the plots, and computes the back pressure

- About
- This launches a PDF document containing information about the operating principle and limitations of the application

- Create Report
- This calls a method that generates a Microsoft® Word® document for the current state of the application.

For each ribbon item, it is possible to execute various commands to run, like computing the solution, updating the geometry, opening dialog boxes, and so forth. It is also possible to call any number of methods.

*Screenshot showing how items can be added to a ribbon in the Main Window.*

If any of the input data is changed before the solution has been re-computed, it is useful to make the app user aware of this. The card shown in the card stack is updated when any of the inputs are changed. This is done by writing a *Local method* for each of the input edit fields. The method is extremely simple, consisting of only one line of code:

information_card = "warningnewinput";

This swaps the image shown in the Information section for a warning message.

*Screenshot showing the status of the application when the inputs have changed (the warning is in the bottom-left corner).*

There are six methods defined in the application. The methods and the tasks they are designed to accomplish are as follows:

- b_reset_input_to_defaults
- This method resets all the user input to the default values and rebuilds the geometry.

- b_solve_and_update
- This is the main method and is executed when clicking the Compute button. For each flow controller in the table, an inlet feature is applied and the appropriate flow rate is specified. The material properties in each leg of the pipe network are also set. The solution is then computed and the graphics windows updated with the new plots. Finally, the maximum pressure is computed, and the Information section is updated to reflect whether the given design will meet the specification.

- b_open_doc
- This opens the PDF document explaining the operating principle of the gas box.

- b_report_generation
- This method generates the report that summarizes the inputs and outputs in a Microsoft® Word® document.

- data_change
- This method updates the geometry if the number of flow controllers changes and shows a warning in the Information section explaining that the current solution is inconsistent with the inputs.

- update_geometry
- This method updates the geometry and plots it in the graphics window.

Methods are extremely powerful in that they allow you to manipulate the model and application in a very flexible way. The method b_solve_and_update adds an inlet feature to the model for each mass flow controller and sets the flow properties based on the data in the table. It then sets the density and viscosity of the fluid in each of the pipes, also based on the data specified in the *Flow controller and fluid properties* table. Following this, the solution is computed and the plots are updated. Finally, the maximum back pressure is computed and the information card indicating whether this specific configuration will meet the specification is updated.

*Screenshot of the solve_and_compute method when viewed in the Method Editor.*

A sample report from the default input parameters can be found here: gas_box.

- Download the Gas Box Application tutorial via the Application Library update or from the Model Gallery

Microwave plasmas are sustained when electrons can gain enough energy from an electromagnetic wave as it penetrates into the plasma. The physics of a microwave plasma is quite different depending on whether the TE mode (out-of-plane electric field) or the TM mode (in-plane electric field) is propagating. In both cases, it is not possible for the electromagnetic wave to penetrate into regions of the plasma where the electron density exceeds the critical electron density (around 7.6×10^{16} 1/m^{3} for 2.45 GHz). The critical electron density is given by the formula:

n_e = \frac{\epsilon_0 m_e \omega^2}{e^2}

where \epsilon_0 is the permittivity of free space, m_e is the electron mass, \omega is the angular frequency, and e is the electron charge. This corresponds to the point at which the angular frequency of the electromagnetic wave is equal to the plasma frequency. The pressure range for microwave plasmas is very broad. For electron cyclotron resonance (ECR) plasmas, the pressure can be on the order of around 1 Pa, while for non-ECR plasmas, the pressure typically ranges from 100 Pa up to atmospheric pressure. The power can range from a few watts to several kilowatts. Microwave plasmas are popular due to the cheap availability of microwave power.

In order to understand the nuances associated with modeling microwave plasmas, it is necessary to go over some of the theory as to how the discharge is sustained. The plasma characteristics on the microwave time scale are separated from the longer term plasma behavior, which is governed by the ambipolar fields.

In the Plasma Module, the electromagnetic waves are computed in the frequency domain and all other variables in the time domain. In order to justify this approach, we start from Maxwell’s equations, which state that:

(2)

\nabla \times \mathbf{\tilde{E}} = -\frac{\partial \mathbf{\tilde{B}}} {\partial t}

(3)

\nabla \times \mathbf{\tilde{H}} = \mathbf{\tilde{J}}_p+\frac{\partial \mathbf{\tilde{D}}} {\partial t}

where \mathbf{\tilde{E}} is the electric field (V/m), \mathbf{\tilde{B}} is the magnetic flux density (T), \mathbf{\tilde{H}} is the magnetic field (A/m), \mathbf{\tilde{J}_p} is the plasma current density (A/m^{2}), and \mathbf{\tilde{D}} is the electrical displacement (C/m^{2}). The tilde is used to denote that the field is varying in time with frequency \omega/2 \pi. The plasma current density can be approximated by this expression:

(4)

\mathbf{\tilde{J}}_p = -e n_e \mathbf{\tilde{v}_e}

where e is the unit charge (C), n_e is the electron density (1/m^{3}), and \mathbf{\tilde{v}_e} is the mean electron velocity under the following two assumptions (Ref 1):

- Ion motion is neglected with respect to the electron motion on the microwave time scale.
- The electron density is assumed constant in space on the microwave time scale.

The mean electron velocity on the microwave time scale, \tilde{\mathbf{v}}_e, is obtained by assuming a Maxwellian distribution function and taking a first moment of the Boltzmann equation (Ref 2):

(5)

\frac{\partial \mathbf{\tilde{v}_e}}{\partial t} = -\frac{e}{m_e}\mathbf{\tilde{E}}-\nu_m \mathbf{\tilde{v}}_e

where m_e is the electron mass (kg) and \nu_m is the momentum transfer frequency between the electrons and background gas (1/s). As pointed out in Ref 1, the equations are linear, so we can take a Fourier transform of the equation system. Taking a Fourier transform of equation (5) gives:

(6)

j \omega \mathbf{\bar{v}}_e+\nu_m \mathbf{\bar{v}}_e =-\frac{e}{m_e} \mathbf{\bar{E}}

where the tilde has been replaced by a bar to reflect the fact that we are now referring to the amplitude of the fields. Multiplying both sides by -e n_e and re-arranging gives:

(7)

-e n_e \mathbf{\bar{v}}_e = \frac{n_e e^2}{m_e(\nu_m + j \omega)} \mathbf{\bar{E}}

or, in a simpler form:

(8)

\mathbf{\bar{J}}_p = \sigma \mathbf{\bar{E}}

where

(9)

\sigma = \frac{n_e e^2}{m_e(\nu_m + j \omega)}

Equations (1) and (2) can be re-arranged by taking the time derivative of (2) and substituting in (1)

(10)

\nabla \times \mu^{-1} \nabla \times \mathbf{\bar{E}} = (\omega^2 \epsilon_0 \epsilon_r-j \omega \sigma)\mathbf{\bar{E}}

where \mu is the permeability, \sigma is given in equation (8) above, and the plasma relative permittivity set to one. The equation could also be recast where the relative permittivity is complex-valued and the plasma conductivity is zero (Ref 3). The convention employed throughout the Plasma Module is that the plasma conductivity is given by equation (8) and the plasma relative permittivity is set to 1.

Solving the above equation with appropriate boundary conditions allows for the power transferred from the electromagnetic fields to the electrons to be calculated:

(11)

Q_{rh} = \frac{1}{2} \textrm{Re}(\mathbf{\bar{J}} \cdot \mathbf{\bar{E}}^*)

where \mathbf{\bar{J}} is the total current density (the plasma current plus the displacement current density) and * denotes the complex conjugate.

In addition to the equation above, a set of equations are solved in the time domain for the electron density n_e, electron energy density n_{\epsilon}, plasma potential V, and all ionic and neutral species. For the electron density:

(12)

\frac{\partial n_e}{\partial t} + \nabla \cdot \mathbf{\Gamma}_e = R_e

where the electron flux, \mathbf{\Gamma}_e (1/(m^{2}s)), is given by:

(13)

\mathbf{\Gamma}_e = -\mu_e n_e \mathbf{E}-\nabla D_e n_e

where \mu_e is the electron mobility (m^{2}/(V-s)) and D_e is the electron diffusivity (m^{2}/s). Notice that \mathbf{E} given above has no tilde associated with it. The electric field in this case is a static electric field that arises due to the separation of ions and electrons in the plasma. This is often known as the ambipolar field, and causes loss of electrons and ions to the reactor walls on time scales much longer than the microwave time scale (microseconds rather than sub-nanoseconds). The electron energy density, n_{\epsilon}, is computed using a similar equation:

(14)

\frac{\partial n_{\epsilon}}{\partial t} + \nabla \cdot \mathbf{\Gamma}_{\epsilon} + \mathbf{E} \cdot \mathbf{\Gamma_e} = S_{\epsilon} + Q_{rh}/e

where the third term on the left-hand side represents heating or cooling of electrons depending on whether their drift velocity is aligned with the ambipolar electric field. The heating of electrons due to the microwaves is given by the last term on the right-hand side and is defined in equation (10). The electron energy flux is given by:

(15)

\mathbf{\Gamma}_{\epsilon} = -\mu_{\epsilon} n_{\epsilon} \mathbf{E}-\nabla D_{\epsilon} n_{\epsilon}

The mean electron energy is computed using \bar{\epsilon} = n_{\epsilon}/n_e, \mu_{\epsilon} is the electron energy mobility (m^{2}/(V-s)), D_{\epsilon} is the electron energy diffusivity (m^{2}/s), and the term S_{\epsilon} represents energy loss due to elastic and inelastic collisions. This term is a highly nonlinear function of the mean electron energy and also a function of the electron density, background number density, and plasma chemistry. The complexities of this source term are not relevant to this discussion, but more details are given in the *Plasma Module User’s Guide*. For each ion and neutral species, a similar drift-diffusion equation is solved for the mass fraction of each species, w_k:

(16)

\rho \frac{\partial w_k}{\partial t} = \nabla \cdot \mathbf{j}_k + R_k

where the subscript k indicates the *k*^{th} species. The mass flux vector, \mathbf{j}_k, represents mass transport due to migration from the ambipolar field and diffusion from concentration gradients (kg/m^{2}s) and R_k is the reaction source or sink (kg/m^{3}s). Again, further details are available in the *Plasma Module User’s Guide* and are not relevant to this discussion.

Finally, Poisson’s equation is solved in order to compute the ambipolar electric field generated by the separation of charges:

(17)

\nabla \cdot \mathbf{E} = \frac{\rho_v}{\epsilon_0}

where \rho_v is the space charge density (C/m^{3}) and \rho_v = e(n_i^+-n_e-n_i^-) where n_i^+ is the total number of positive ions and n_i^- is the total number of negative ions.

To summarize, the *Microwave Plasma* interface solves equations (9), (11), (13), (15), and (16) along with a suitable set of boundary conditions.

In 2D or 2D axisymmetric models, the electromagnetic waves propagate in either the transverse electric (TE) mode or the transverse magnetic (TM) mode. In the TE mode, the electric field is only in the transverse direction and the magnetic field in the direction of propagation. Therefore, COMSOL solves only for the out-of-plane component of the high-frequency electric field. In the TM mode, the magnetic field is in the transverse direction and the electric field only in the direction of propagation, so COMSOL solves only for the in-plane components of the high-frequency electric field.

In the TE mode, electrons do not experience any change in the high-frequency electric field during the microwave time scale. This means that the phase coherence between the electrons and electromagnetic waves is only destroyed through collisions with the background gas. The loss of phase coherence between the electrons and high-frequency fields is what results in energy gain for the electrons. Therefore, the momentum collision frequency is simply given by:

\nu_m = \nu_e

where \nu_e is the collision frequency between the electrons and neutrals.

The TM mode causes in-plane motion of the electrons on the microwave time scale, so in regions where the high-frequency electric field is significant (the contour where the electron density is equal to the critical density), the time-averaged electric field experienced by the electrons may be non-zero. This destroys the phase coherence between the electrons and the fields, causing the electrons to gain energy. This is an example of a non-local kinetic effect, which is difficult to approximate with a fluid model. However, since this effect is similar to collisions with a background gas, the non-local effects can be approximated by adding an effective collision frequency to the momentum collision frequency:

\nu_m = \nu_e + \nu_{\textrm{eff}}

where \nu_{\textrm{eff}} is the effective collision frequency to account for non-local effects. This is discussed in more detail in Ref 1, where an effective collision frequency of no more than \omega/20 is suggested.

When modeling ECR (electron cyclotron resonance) reactors, another layer of complication is added to the problem. The electron transport properties become tensors and functions of a static magnetic flux density, which can be created using permanent magnets. The plasma conductivity also becomes a full tensor, and a highly nonlinear function of the static magnetic flux density. In addition, it is necessary to consider all three components of the electromagnetic field. Comprehensive details on how to set up and solve a model of an ECR reactor can be found in the Dipolar Microwave Plasma Source model documentation.

The *Microwave Plasma* interface can be used to model the three types of wave heated discharges listed above, but some care is required when setting up such models. In the Microwave Plasma settings window, there are three options under “Electric field components solved for”:

The options are as follows:

- Out-of-plane vector
- This corresponds to the TE mode
- In-plane vector
- This corresponds to the TM or TEM mode
- Three-component vector
- This is needed when modeling ECR reactors

The above equations are quite straightforward to solve, provided that the plasma frequency is below the angular frequency everywhere in the modeling domain. At a frequency of 2.45 GHz, this corresponds to an electron density of 7.6×10^{16} 1/m^{3}, which is lower than most industrial applications. When the plasma density is equal to this value, the electromagnetic wave transitions from propagating waves to evanescent waves. Applications of microwave plasmas where the electron density is greater than the critical density include:

- Atmospheric pressure discharges, where the electron density can be several orders of magnitude higher than the critical density.
- Traveling-wave-sustained and surface-wave discharges. For the surface wave to propagate, the electron density must be higher than the critical density.

The resonance zone can be smoothed by activating the “Compute tensor plasma conductivity” checkbox in the Plasma Properties section:

The Doppler broadening parameter, \delta, corresponds to the value used for the effective collision frequency via the formula:

\nu_m = \nu_e + \frac{\omega}{\delta}

Therefore, a value of 20 is a compromise between accuracy and numerical stability as detailed above.

When using the Port boundary condition, the sum of the deposited and reflected power is supplied by default. In COMSOL Multiphysics version 4.4 it is also possible to specify only the deposited power, as shown in the settings window below:

Using this option results in a more stable equation system because the total power transferred to the electrons remains constant. When the “Port input power” option is used, some of the power is deposited and some is reflected back out of the port, depending on the plasma’s current state. The plasma can go from absorbing a very small amount to a very large amount of power in a very short time period, which can make the problem numerically unstable or lead to the solver taking extremely small time steps.

The following is a collection of tips and tricks to try to help with convergence and decrease computation time:

- Fix the total power into the discharge by using the “Specify deposited power” option in the Port boundary condition, or by using the approach suggested in Ref 1 (demonstrated in the Dipolar Microwave Plasma Source model).
- Start the “Doppler broadening parameter” to a number below 1, then ramp this number up to 20 over the course of the simulation. This will smear out the resonance zone initially, then gradually make the region smaller and smaller. This can be implemented by defining a Ramp function with a cutoff value of 20.

- If the number density in the discharge is very high, it will probably be operating in full surface-wave mode. In this case, it may be necessary to use a doppler broadening parameter of 10. This will make the model more stable when solving, but the accuracy of such a model should be carefully considered.
- The initial electron density should be below the critical plasma density in the TM mode case. This recommendation is not strictly necessary for the TE mode case.
- Negatively biasing an electrode may have a significant effect on the discharge because it may shift the contour of critical plasma density away from its unbiased location. The best thing to do is to solve the model with a value of around 5 for the doppler broadening parameter, then slowly increase its value.

The following suggestions apply to all types of plasmas, but are worth mentioning again:

- The Debye length must be resolved adequately by the mesh. If your geometry is large (i.e. between 10 and 100 centimeters) and the electron density is very high (on the order of 10
^{18}1/m^{3}), then a very fine boundary layer mesh will be required close to the walls. - Start with a simple plasma chemistry, like argon, before attempting a more exotic gas.

Solver settings play an important role and COMSOL will automatically generate the best solver settings depending on how the model is set up. By default, when the “Port input power” option is used, the solver settings mentioned below are implemented. The segregated solver is used with two groups:

- All the plasma variables (electron density, electron energy, ion density, plasma potential, etc.)
- All the variables associated with the electromagnetic waves (high frequency electric field, S-parameters)

When the “Specify deposited power” option in the Port boundary condition is used, the solver suggestion is modified so that there are three groups:

- All the plasma variables (electron density, electron energy, ion density, plasma potential, etc.)
- All the variables associated with the electromagnetic waves (high-frequency electric field, S-parameters)
- A dependent variable called
`P`

deposited, which is a differential algebraic equation used to fix the deposited, rather than total power

An example of a TM mode microwave plasma can be found in the Model Gallery. The model uses an effective collision frequency of \omega/20, which smooths the region over which power is deposited to the electrons. As can be seen from the figure below, nearly all power deposition is still highly localized to the contour of critical electron density.

*Plot of the power deposition into the plasma due to the high frequency fields. The white contour
is the contour of critical electron density.*

Collisionless heating of electrons occurring in the TM mode can be demonstrated using the Particle Tracing Module. By starting an ensemble of particles with an initial mean energy of 0.5 eV on the contour of critical plasma density, the time evolution of the mean energy can be computed. The two plots below show how collisionless heating occurs in the TM mode, but not the TE mode.

*Plot of the mean electron energy for electrons in a TM mode collisionless plasma released on the contour
of critical plasma density. There is a net energy gain even though there are no collisions.*

*Plot of the mean electron energy for electrons in a TE mode collisionless plasma released on the contour
of critical plasma density. There is no net energy gain over a number of RF cycles.*

- G.J.M. Hagelaar, K. Makasheva, L. Garrigues, and J.-P. Boeuf, “Modelling of a dipolar microwave plasma sustained by electron cyclotron resonance,” J. Phys. D: Appl. Phys., vol. 42, p. 194019 (12pp), 2009.
- R.L. Kinder and M.J. Kushner, “Consequences of mode structure on plasma properties in electron cyclotron resonance sources,” J. Vac. Sci. Technol. A, vol. 17, Sep/Oct 1999.
- Michael A. Lieberman and Allan J. Lichtenberg, “Principles of Plasma Discharges and Materials Processing”, Wiley (2005).

Until recently, the cost of additive manufacturing was prohibitive. Back in the 1990s, printers could cost up to $100k to build, and would fill up an entire room. In the 2000s, 3D printing started to gain popularity, largely due to the biomedical applications. Low-cost, consumer-friendly printers have really entered the mainstream in the 2010s and have drawn widespread media coverage.

COMSOL underwent a similar rapid growth of its interoperability products, starting with the release of the CAD Import Module in 2005. CAD interoperability is a useful, but not strictly speaking necessary, step in the design cycle. You can always use COMSOL’s own built-in CAD tools to design your product. Many businesses are, however, standardized on a specific CAD software and the designs for their existing products are readily available in this format. Realizing this, we went on to release dedicated LiveLink™ products:

- LiveLink™ for Pro/ENGINEER®
- LiveLink™ for Inventor®
- LiveLink™ for SolidWorks®

- LiveLink™ for AutoCad®
- LiveLink™ for SpaceClaim®
- LiveLink™ for Creo™ Parametric

- LiveLink™ for Solid Edge®

These products allow for simulation and optimization of existing CAD designs using COMSOL’s powerful analysis tools. Hence they provide a convenient way of optimizing an existing design before printing a prototype.

With the release of COMSOL Multiphysics 4.3b in 2013, it is now possible to export geometries, meshes, and surface plots in the STL format for printing in 3D. This means you can conceive, design, optimize, and prototype a product using only COMSOL Multiphysics (and/or one of the LiveLink™ products) and a 3D printer. The quality and speed at which objects can be printed depends, of course, on the printer.

Low-end printers take several hours to print objects the size of a baseball, while high-end printers can maybe print two per hour. This is rather slow for mass-scale manufacturing, but quite alright for prototyping. There is no need to outsource the creation of parts to a machine shop. Printer resolution is currently around 150-200µm in the vertical direction but some high-end machines can print much finer resolutions. Although this sounds impressive, it is still not accurate enough for printing microfluidic devices whose intricate flow channels require an *even* finer resolution. Models analyzed in COMSOL Multiphysics typically consist of multiple materials, often some combination of metals and plastics. This places a lot of restrictions on exactly what type of devices can be printed from a practical stand-point. Metal 3D printers are starting to become available, but printing combinations of metals and plastics remains a significant challenge.

So what does the future hold for COMSOL and 3D printing? While I am not an expert in additive manufacturing myself, by all accounts it sounds like it is here to stay. Microsoft® has just announced that Windows® 8.1 will have native support for 3D printing, which should allow for 3D printing without having to first export the geometry and then import it into software that comes with the printer. The list of available printing materials also keeps growing, and printers continually become faster, more accurate, and cheaper. On the simulation side, we are constantly adding new machinery to characterize and optimize physical systems, and our software’s simulation capabilities will allow you to gain an advantage over competitors. Anyone can design and prototype something, but only true multiphysics software will allow you to optimize and perfect the design based on the underlying physics.

Consider a simple acoustic horn, for example. The performance of the horn depends very strongly on the shape of the horn surface. By changing the curvature of this surface, the directivity and impedance can be changed.

*Optimum curvature of an acoustic horn.*

The image above shows the optimum curvature of the horn that has been optimized so that the far-field sound pressure level is maximized for a single frequency and in a single direction. Since this could easily be printed in 3D, such a device would have superior performance over a design made with no consideration of the physics involved. (You can find more information on the acoustic horn model in the Model Gallery.)

While part of the 3D printing community remains cautious about its applicability for large-scale manufacturing, there is no doubt that this will eventually be the most convenient and cost-effective method of prototyping designs.

]]>

STL (Stereolithography, or Standard Tessellation Language) is a file format developed in the late 80′s by 3D Systems to facilitate the prototyping of designs created using computer-aided design software. The file format represents three dimensional geometric entities as triangulated surfaces in a Cartesian coordinate system. Scale, color, and material property information are not stored in the file. Color printing of STL files is hence only possible if the color information is added after the design has been imported into the software that connects to the 3D printer.

In this example I will print the model that computes the thermally-induced stresses in a turbine stator blade. The model is available in the Structural Mechanics Module Model Library, but the process by which you can 3D print is the same regardless of the model. In the **Model Library** tab, select the model **Structural Mechanics Module>Thermal-Structure Interaction>turbine_stator** and click the **Open Model** button.

When the model is opened, the default view is a plot of the displacement induced by the thermal stresses.

There are two ways you can export the geometry for printing. The first way is to go to the **Geometry** node in the **Model Builder**, right-click, and select **Export to File**.

As discussed above, the standard geometry representation for 3D printing is the STL file. In the **Export Geometry** section, set the **File type** to **STL binary (.stl)**.

Next, enter a file name for the STL file and click the **Export** button.

An alternative method of exporting the geometry for printing is to export the mesh as an STL file. In general, this will result in a larger file size that may be harder to import into the software that comes with the 3D printer. In this case, go to the **Mesh** node in the **Model Builder**. Right-click, and choose **Export to File**.

As before, set the **File type** to **STL binary (.stl)**.

Next, enter a file name for the STL file and click the **Export** button.

All that remains is to open the STL file in the software that comes with your 3D printer. The software should be able to align and scale the STL file so it fits within the feasible printing area.

Finally, select **Print**!

Above is a picture of the physical turbine stator we printed. This specific model took around an hour to print.

There are some additional details to keep in mind when 3D printing:

- If you are printing a single solid object, internal boundaries should be deleted from the geometry. Otherwise, the printer will insert a small gap where the interior boundaries are present.
- Larger assemblies can be constructed by printing individual parts one at a time.
- Exporting the mesh and printing may give slightly different results compared to exporting the geometry.
- You can also export the deformed mesh resulting from a model including the
*Moving Mesh*interface. To do this, use the**Remesh Deformed Configuration**option which is available for the**Solution**data set. This creates an additional mesh in the**Mesh**node which you can export as an STL file.

Now that you know how to 3D print your COMSOL models, why don’t you try it out? Once you have printed your model, take a photo of it, and submit it to 3dprint@comsol.com for a chance to be featured in a future blog post.

]]>

The basic idea of a MOSFET is to apply a gate voltage to control the drain-to-source resistance and thus the drain current (see image below). At a certain gate-to-source voltage (V_{GS}), and at low drain-to-source voltages (V_{DS}), the drain current is almost linearly dependent on V_{DS}. When V_{DS} increases, the drain current saturates. The level of saturation depends on the gate-to-source voltage and the switching time depends on the mobility of the semiconductor. The higher the mobility of the semiconducting material, the faster the current can be switched on and off.

Semiconductor physics is extremely complicated. Strictly speaking, the Boltzmann equation should be solved with Maxwell’s equations in order to describe the device physics completely. Since this is computationally intractable, the most common approach for modeling semiconductors is to solve a set of drift diffusion equations coupled to Poisson’s equation:

\begin{aligned}

\frac{\partial n}{\partial t}&=\frac{1}{q}\nabla \cdot \mathbf{J_{n}}-R_n \\

\frac{\partial p}{\partial t}&=-\frac{1}{q}\nabla \cdot \mathbf{J_{p}}-R_p \\

\nabla \cdot{} \left(\epsilon \nabla V\right) &= -q(p-n+N_D^+-N_A^-)

\end{aligned}

\frac{\partial n}{\partial t}&=\frac{1}{q}\nabla \cdot \mathbf{J_{n}}-R_n \\

\frac{\partial p}{\partial t}&=-\frac{1}{q}\nabla \cdot \mathbf{J_{p}}-R_p \\

\nabla \cdot{} \left(\epsilon \nabla V\right) &= -q(p-n+N_D^+-N_A^-)

\end{aligned}

Here *n* is the number density of electrons, *p* is the number density of holes, *V* is the electrostatic potential, *R _{n}* is the electron recombination rate,

As we recently announced, a dedicated product for modeling semiconductor devices is now available within the COMSOL platform. The Semiconductor Module, as it’s called, allows for detailed analysis of semiconductor device operation at the fundamental physics level. The module is based on the drift-diffusion equations with isothermal or non-isothermal transport models. Two numerical methods are provided: the finite volume method with Scharfetter-Gummel upwinding and a Galerkin least-squares stabilized finite element method. The module provides an easy-to-use interface for analyzing and designing semiconductor devices, greatly simplifying the task of device simulation on the COMSOL platform.

Models for semiconducting and insulating materials in addition to boundary conditions for ohmic contacts, Schottky contacts, and gates are provided as dedicated features within the Semiconductor Module. The module includes enhanced functionality for modeling electrostatics. System level and mixed device simulations are enabled through an interface for electrical circuits with SPICE import capability.

The Semiconductor Module is useful for simulating a range of practical devices. The built-in Model Library contains a suite of models designed to provide straightforward instruction and demonstrate how to use the interface to simulate your own devices. The Semiconductor Module is particularly relevant for simulating transistors including bipolar, metal semiconductor field-effect transistors (MESFETs), metal-oxide-semiconductor field-effect transistors (MOSFETs), Schottky diodes, thyristors, and P-N junctions.

The Semiconductor Module could hence be used to investigate the device characteristics of graphene-based semiconductors similar to the ones explained in the paper referenced at the beginning of this blog post.

Over the past few months, in the previous four posts of our blog series, we have read lots about the history, applications, and manufacture of graphene. I’ve enjoyed talking about this topic very much — but I’ve only scratched the surface. There are still many sub-topics that haven’t been explored, and I encourage you to keep up with the latest graphene-related developments in technical magazines and publications. Whether you’re interested in the applications or the manufacture of graphene, COMSOL offers a wide range of products that can provide insight and a better understanding of these processes.

A while back I blogged about graphene and some of its properties, as well as some of the modeling tools available in COMSOL for investigating applications of this exotic material. One of the main hurdles to overcome before graphene can be released to the mass market is how to manufacture it in an economical way. Many production methods are currently employed, including exfoliation, expitaxial growth on a suitable substrate, reduction of graphene oxide, pyrolisis or growth from metal-carbon melts.

In this thesis titled “Growth of Graphene Films on Pt(111) by Thermal Decomposition of Propylene” the author explains how graphene can be manufactured using thermal decomposition at high vacuum. As my colleague, Bjorn, mentions in his blog post on “What is Molecular Flow?” there are few modeling tools available to assist with design and optimization of high vacuum systems, especially if the system is non-isothermal. Gases at low pressures cannot be modeled with conventional fluid dynamics tools because kinetic effects become important as the mean free path of the gas molecules becomes comparable to the length scale of the flow. The pressure on surfaces depends primarily on the line of sight with respect to molecular sources and sinks in the vacuum system. The non-isothermal vacuum system described in the thesis would inevitably be expensive to build, so any design optimizations that could be made before construction would result in big savings further down the line. Some estimations on the fluxes onto surfaces and deposition rates are given in the thesis, but these don’t take into account the geometry of the system, the fact that different surfaces have different temperatures, or the location of the pumps.

We at COMSOL are getting ready to announce that a dedicated product for modeling high vacuum systems, the Molecular Flow Module, will be made available to our customers in early May. The product will greatly expand on the capabilities currently available in the Microfluidics Module. The Molecular Flow Module is a collection of tailored physics interfaces for the simulation of kinetic gas flows. The module includes two physics interfaces: the *Transitional Flow* interface and the *Free Molecular Flow* interface. The *Transitional Flow* interface uses a discrete velocity/lattice Boltzmann approach to solve low velocity gas flows in the transitional flow regime. The *Free Molecular Flow* interface uses the angular coefficient method to compute the particle flux, pressure, and heat flux on surfaces. The number density can be computed on domains, surfaces, edges, and points and is thus available to be coupled to other physics.

Simulations can increase the pace of product development and also lead to a better understanding of vacuum systems for design engineers. High and ultra-high vacuum systems are typically very expensive to construct and test. It is not only the cost to design and machine parts; a large amount of time can be spent baking out, pumping down, and checking for leaks in the system. Imagine if a smaller pump could be fitted onto a process tool simply by *placing the pump port at a specific location*. Or that the chamber met the necessary specification on *the first build*. The cost savings would be substantial. The Molecular Flow Module will allow you to test and optimize different designs before you have to start cutting metal.

In order to accurately model non-isothermal molecular flows and deposition rates onto substrates on arbitrarily complicated geometries, a sophisticated modeling approach is required. Since gas molecules interact with surfaces more frequently than they interact with one another, the flow of gas is determined by collisions with the surfaces in the system. It becomes necessary to solve a complicated integral equation in order to compute the molecular flux, pressure, heat flux, and number density in the system. The molecular flux can be used in combination with a suitable differential equation to determine the deposition rate and the deposited film thickness as well.

Let’s have a look at a couple of modeling examples.

Gold is evaporated from a thermal source at a temperature of 2000 K onto a substrate held on a fixed surface. The deposited film thickness on the substrate and the chamber walls is computed.

*Molecular flow calculations can show uniformity and deposition rate onto a wafer from a thermally evaporated material.*

The system consists of two chambers separated by a gate valve (not shown in the plot below). The lower cylindrical chamber is the load lock chamber. The upper spherical chamber is a high vacuum chamber, which is not vented during the sample loading process. The vacuum pump is located opposite the gate valve, and has a constant speed of 500 l/s.

*Time dependent adsorption and desorption of water in a vacuum system at low pressures. The water is introduced into the system when a gate valve to a load lock is opened and the subsequent migration and pumping of the water is modeled.*

COMSOL provides a wide range of tools to assist in modeling geometries and features with very high aspect ratios. Thermal modeling of graphene quilts was recently performed in COMSOL and appeared in Nature Communications: “Graphene quilts for thermal management of high-power GaN transistors“. The authors of the paper use COMSOL Multiphysics to show that the local thermal management of a AlGaN/GaN heterojunction field effect transistor (HFET) can be substantially improved via introduction of the additional heat-escaping channels — top-surface heat spreaders — made of few-layer graphene (FLG).

The *Heat Transfer* interface in COMSOL Multiphysics allows you to model very high aspect ratio components using the *Highly Conductive Layer* feature. This feature solves the heat transfer equation only in the tangential plane of the surface, thus removing the need to use a very fine mesh on the high aspect ratio layers. Computation time and memory usage is substantially reduced using this approach.

*The settings window for the Highly Conductive Layer feature.*

COMSOL has been used to study the electrical characteristics of graphene from as far back as 2006. In this paper researchers used COMSOL to infer the in-plane and transverse electrical conductivity of a graphene-based composite material. Providing tensor quantities for electrical conductivity is very easy in COMSOL Multiphysics. You simply need to provide the elements of the conductivity tensor, which can be functions of temperature or any other quantity.

*In the settings windows for the Current Conservation feature in the Electric Currents interface, it is easy to specify anisotropic electrical conductivity.*

COMSOL may also be used to model structural applications of graphene. In this paper researchers calculated the deflection and strain induced in a graphene membrane subjected to a pressure difference. Changes in the band structure could be detected electrically, suggesting a potential application as ultra-sensitive pressure sensor. The *Shell* interface, available in the Structural Mechanics Module, is intended for the structural analysis of thin-walled structures and thus perfect for such applications. The formulation used in the *Shell* interface is a Mindlin-Reissner type, which means that transverse shear deformations are accounted for. This means that highly accurate results can be obtained without the need to mesh a very thin structure.

*Settings window for the material model in the Shell interface.*

Now that we’ve gone through thermal, electrical, and structural modeling concepts you might wonder if there is one grand example that demonstrates all of the concepts at once. There is — it’s located in the Model Library and shown below as well.

*Model of a heating circuit demonstrating thermal, electrical, and structural modeling concepts.*

This multiphysics example simulates the electrical heat generation, heat transfer, and mechanical stresses and deformations of a heating circuit device. The model uses the *Heat Transfer* interface of the Heat Transfer Module in combination with the *Shell* and *Conductive Media DC* interfaces from the AC/DC Module, and the *Solid*, *Stress-Strain*, and *Shell* interfaces from the Structural Mechanics Module.

*Graphene. Image attributed to AlexanderAIUS.*

Graphene was first isolated in its planar form using adhesive tape in 2004. Since then, the race has been on to produce graphene in large quantities using economical fabrication techniques. A more popular method nowadays is to perform epitaxial growth on silicon carbide by heating it to high temperatures at very low pressures. Many other techniques exist, all with their own advantages and shortcomings.

Graphene has a set of remarkable material properties: it is roughly 200 times stronger than steel, has a higher electrical and thermal conductivity than copper, and weighs less than 1 milligram per square meter. The high electrical and thermal conductivity can be attributed to the unusually high room temperature electron mobility of 15,000 cm^{2}/(V-s). Researchers are already using COMSOL to study applications that can exploit these unusual properties. In this article the author investigates plasmon modes in graphene rings. This is accomplished by combining Ohm’s law, Gauss’s law, and the continuity equation to produce an integral equation for the electric potential. COMSOL Multiphysics is used to compute the eigenfrequencies of the symmetric and antisymmetric modes for different ring configurations.

In this thesis the author has investigated the semiconducting properties of nanoribbons of graphene and its application to the electronics industry.

COMSOL Multiphysics is the perfect tool to investigate applications of the unusual properties of graphene, since it allows arbitrary expressions and functions to be entered for any material properties required by the model. Check our blog regularly for more upcoming entries on the unusual properties of graphene and how COMSOL can be used to study this new and exciting material!

]]>