Introduction to Vlasov Solvers

A simple 1D-1V Vlasov code for two-stream instability is developed. The code is based on a splitting scheme proposed by Cheng and Knorr in 1975.

Multigrid Solver

The Multigrid scheme for accelerating convergence of iterative matrix solvers is explained and demonstrated with a one-dimensional Python code.

Handling Surfaces: Line Triangle Intersection Example

This article presents an algorithm for performing particle-surface impact checks using a mixed triangular-quadrilateral mesh with warped and overlapping elements.

Starfish DSMC Tutorial: Supersonic Jet and Argon Diffusion

This tutorial shows you how setup a DSMC simulation using Starfish. We model expansion of an atmospheric pressure gas to a low pressure reservoir and also compute self-diffusion coefficient of argon.

Vorticity – Stream Function Formulation for Axisymmetric Flow

Vorticity - Stream Function formulation for incompressible Navier Stokes equation is developed and demonstrated with Python code for flow in a cylindrical cavity. More complex geometry from a Java code is also shown.

Fun with Raspberry Pi – plasma simulation code performance

Raspberry Pi 3 Model B is a $40 credit card sized computer with 1.2GHz CPU and 1Gb of RAM. But before buying bunch of the boards to build a small MPI cluster, I wanted to see how the performance compares to a typical PC.

Free molecular flow in a cylindrical pipe – with multithreading

In this blog post we develop a multi-threaded C++ program for computing molecular transmission through a cylinder of a varying length. The results are compared against tabulated data of Clausing.

Brief Intro to GPU PIC with CUDA

This post shows how to develop a PIC plasma simulation code that uses NVIDIA CUDA to perform computations on the graphics card (GPU). Even without any optimization, the GPU version runs almost twice as fast as the CPU version for a large number of pa...

3D Viewer

WebGL-based interactive 3D plotter for surface mesh files in Paraview's .vtu or .vtp formats

Particulate Contamination Transport on Orbiting Satellites

Particulates launched from an orbiting object may intersect the satellite on a future orbit and cause contamination of surfaces beyond the line of sight of the originating surface. This post describes a simply Python code that was developed to model ...

CTSP Molecular Contamination Modeling Validation

Summary of CTSP molecular contamination modeling validation effort to date

Finite Element Particle in Cell (FEM-PIC)

Example Finite Element Particle in Cell code for flow of ions past a charged sphere on an unstructured mesh

Advanced PIC Course Debrief

Some observations and lessons learned from the Advanced PIC course. Were you a student? I would love to get your feedback!

QCM Analyzer

Interactive on-line analyzer of Quartz Crystal Microbalance (QCM) log files. The analyzer can visualize multiple channels, automatically compute smoothed delta-deltas, and lets you interactively analyze TGA data.

Detailed Surface Model

New detailed model was developed for the space-surface interface. Instead of using sticking coefficients, the model uses residence time to determine if a molecule "sticks". Adsorbed molecules are added to a surface layer and objects can also contain ...

Particle In Cell Method in Cylindrical Coordinates

Details of implementing plasma simulations with the Particle In Cell Method in cylindrical coordinates. We develop a simulation of a simplistic ion gun.

Two Stream Instability Javascript Simulation

Particle In Cell (PIC) plasma simulation of two-stream instability implemented in Javascript and running in your browser. Two cold beams interact with each other until streaming is destroyed and particles become trapped in phase space vortices.

Modeling Diffuse Reflection (or How to Sample Cosine Distribution)

Molecules impacting surfaces reflect either diffusely or specularly, Since diffuse reflection is more common, it is important to model it correctly. In this article we discuss how to model diffuse reflection by sampling from Lambert's cosine law.

Sputter Calculator (alpha version)

Online calculator and plotting program for normal and angular sputter yields using the models of Yamamura and Matsunami.

XY Interpolation Program

Online interpolation program that takes arbitrarily spaced unsorted X-Y data, fits a spline to it, and generates equidistant points.

Stretched Mesh

Tutorial on implementing mesh stretching in Particle In Cell codes. Equations for node positions and finite difference coefficients are derived.

Potential Solver for Composite Dielectrics

Form of Gauss' law for composite dielectrics is derived. The governing equations are demonstrated with a 1D program that solves electric potential across several pieces with a variable permittivity and mesh spacing.

Some recent papers

This post is bit of an advertisement, in that I wanted to share with you some recent papers that I was involved in. Recent here is to be taken with a bit of grain of salt, since some the papers noted below are from as far back as 2010.

Advection Diffusion Crank Nicolson Solver

Online Advection Diffusion equation solver implemented with Javascript and HTML5, and based on Crank Nicolson Finite Volume Method.

Current Density Limit

Ion thrusters are space charge limited devices, with maximum current density given by the Child Langmuir law. This simulation code explores the impact of space charge saturation on the flow between two planar electrodes.

Turbofan Calculator

Interactive turbofan calculator based on the one-dimensional model in Hill and Peterson's Mechanics and Thermodynamics of Propulsion.

2D Data Plotting

Demo of plotting 2D scalar mesh scalar values using HTML5 canvas and rainbow RGB colormap.

Converting Scalars to RGB Colormap

We can visualize variation of mesh-based scalars by converting each scalar to a color with the help of some colormap. This article describes how to convert a scalar to the rainbow colormap, which ranges from blue to red as the value increases from t...

Flow in a Nozzle

By considering one-dimensional flow, we can derive an expression for the variation of Mach number in a nozzle with a variable area change. Such a relationship is explored here with an interactive demo that allows you to change the shape of a convergi...

IEPC2013 Debrief

The 33rd International Electric Propulsion Conference, IEPC2013, turned out really well with record attendance despite the on-going government shutdown.

Scammers Everywhere

Interesting experience with a scam registration for a technical conference using a "virtual" credit card, and requesting a wire refund after their visa was supposedly denied.

Computing Intersections Between a Cubic Bezier Curve and a Line

Interactive SVG+Javascript code for computing intersections between a line and a cubic Bezier curve.

On partial pressure determination of condensable materials with a TQCM

In this article we look at how we could use surface flux collected by a quartz crystal microbalance (QCM) to compute the volumetric partial pressure of condensable materials such as magnesium vapor.

Initial Progress on Micro Cathodic Arc Thruster Plume Simulations

Preliminary results from a fully-kinetic simulation of a micro cathode arc thruster for nanosatellites. The thruster uses a magnetic field to turn an initially radial jet into the axial direction to crate thrust.

Bird’s DSMC0.FOR in Java

G.A. Bird included several example codes with his book on the DSMC method. These codes are written in Fortran 77 which makes them somewhat hard to understand due to short variable names and reliance on global variables. This post is a summary of my e...
Figure 5. Erosion Angle.

Surface Erosion

Every time a particle impacts a surface there is a chance that it will knock off or “sputter” some material from the surface. Over time this can cause noticeable degradation in high flux areas such as Hall thruster channels, electrostatic acceler...

HTML5 + Javascript DSMC Simulation

Details of the Javascript implementation of the Direct Simulation Monte Carlo (DSMC) method and a how to guide to plotting animated simulation results with Javascript and HTML5 canvas element.

Direct Simulation Monte Carlo (DSMC) Method

DSMC, or Direct Simulation Monte Carlo, is a particle based method for simulating gas kinetics. Popularized by G.A. Bird in the 60's, this method is now commonly used as an alternative to CFD. In addition, DSMC is commonly combined with PIC codes to ...

Starfish Tutorial Part 5: Collisions and Chemical Reactions

The final part of the multipart Startfish tutorial. In this part we discuss adding material interactions, including chemical reactions, Monte Carlo Collisions (MCC), and Direct Simulation Monte Carlo (DSMC).

Starfish Tutorial Part 4: Steady State, Surface Flux, and Averaging

Part 4 of the multi-part Starfish tutorial. In this part we add commands to export surface properties such as surface flux, learn about steady state, and setup data averaging.

Starfish Tutorial Part 3: Surface Interactions

Part 3 of Starfish plasma simulation solver tutorial. Here we introduce surface interactions and modify the input files to simulate the recombinations of ions at the surface of the cylinder.

Starfish Tutorial Part 2: Particles and Animation

The second part of the multi-part Starfish tutorial. In this part we add particle sources to simulate flow of plasma over a cylinder. We also introduce animations.

Starfish Tutorial Part 1: Domain, Boundaries, and a Potential Solver

The first part of the multi-part Starfish tutorial. In this article we introduce the input files needed to setup a simulation for a flow of plasma over an infinitely long cylinder.

Exporting Magnetic Field from FEMM

FEMM is a powerful (and free) 2D magnetic, electrostatic, and heat transfer solver. FEMM contains a nice GUI for defining and analyzing the problem. It does not contain an option for exporting the results. However, you can export the results from FEM...

Finite Element Experiments in MATLAB

Collection of examples of the Continuous Galerkin Finite Element Method (FEM) implemented in Matlab comparing linear, quadratic, and cubic elements, as well as mesh refinement to solve the Poisson's and Laplace equations over a variety of domains.

A quick summary of the past six months

A quick summary of the projects completed over the past 6 months. These include development of a 2D plasma simulation code Starfish, publication of two papers, initial analysis of a plasma-wall interface, and development of a Java-based VTK GUI.

Interactive Elliptic Mesh Generation with SVG and Javascript

SVG and Javascript can be used to create interactive applications and graphical user interfaces. Here is an example of an interactive elliptic mesh generator.

Smooth Bézier Spline Through Prescribed Points

How do you construct a smooth line through a set of prescribed points? This article shows you how. It also includes an interactive SVG demo that allows you to try it in real-time.

Efficient Particle Data Structures

Particle codes have very different memory optimization requirements than fluid-based solvers. Here we consider three types of data structures for holding particles that offer an efficient way of adding and removing particles and compare their perform...

2D Finite Element Method in MATLAB

This tutorial discusses how to generate unstructured meshes using a Matlab code distmesh.m and how to use the mesh in a Matlab Finite Element Solver to solve the Poisson's equation on an unstructured domain.

Interpolation using an arbitrary quadrilateral

This article describes how to interpolate data between a particle and an arbitrary quadrilateral cell used in non-Cartesian grids. The technique is illustrated with several Matlab / Octave examples. The examples show how pick points located inside th...

Loading an isotropic velocity distribution

Tutorial on the simple but important topic of loading particles with uniform spatially distributed velocity. This loading is important when loading background gas for particle simulations or when loading drifting Maxwellian beams.

Implementation of VTK-based 3D visualization capability in a solver GUI

Over the past few weeks, we at PIC-C have been busy integrating VTK (The Visualization Toolkit) into a client’s graphical user interface. The client for this project is a company specializing in CFD software for turbomachinery aerodynamic analysis....

Nonlinear Poisson Solver

Nonlinear Poisson's equation arises in typical plasma simulations which use a fluid approximation to model electron density. This article describes how to solve the non-linear Poisson's equation using the Newton's method and demonstrates the algorith...

Code Optimization: Speed up your code by rearranging data access

Often, a significant code speed up can be accomplished by simply rearranging the way data is stored or accessed in memory. This article compares data access with arrays vs. linked lists, and compares loop ordering for 3D data sets. It also looks at a...

Orthogonal Curvilinear Coordinates

Cylindrical and spherical coordinates are just two examples of general orthogonal curvilinear coordinates. In this article we derive the vector operators such as gradient, divergence, Laplacian, and curl for a general orthogonal curvilinear coordinat...

Data Visualization with Java and VTK

VTK is a powerful library for analyzing and visualizing scientific data. This example shows how to develop a simple Java application that uses VTK to render surface geometry, isosurfaces, and cutting planes.

Simple Particle In Cell Code in Matlab

This article includes the source code for a simple particle in cell code. The code simulates flow of plasma over a charged plate and is written in Matlab.

Monte Carlo Collisions (MCC) Example

Monte Carlo Collisions (MCC) is a simple algorithm for modeling particle collisions in situations where the target species is much denser than the source. In this example we use this method to model the charge-exchange (CEX) process in the plume of a...

Charge Exchange Collisions (CEX)

Charge exchange is an important reaction occurring in the plumes of electric propulsion devices. In this reaction, an ion and neutral come into a close contact and exchange an electron without any corresponding change in the momentum of the two parti...

HTML5 for Scientific Computing

HTML5 is the new standard for writing webpages. It introduces several new powerful capabilities, such as embedded video and drag and drop. It also introduces a new tag called canvas that allows us to do real time graphing and visualization using Java...

Multiscale Modeling of Hall Thrusters

One of the topics we specialize in at Particle In Cell Consulting is modeling of electric propulsion (EP) thrusters. These devices generate thrust by accelerating ionized propellant (plasma). One of the most efficient EP devices is the Hall thruster....

2013 IEPC at GWU

The International Electric Propulsion Conference (IEPC) is the premier international conference for researches studying electric propulsion (plasma) rockets. The 2011 conference took place in Wiesbaden, Germany. The next conference will take place in...

Particle Push in Magnetic Field (Boris Method)

A follow up on the previous article, in this tutorial we show you how to integrate the particle motion in the presence of a magnetic field. Inclusion of the magnetic field makes the integration an implicit problem, and care needs to be taken to conse...

Leapfrog Particle Push (Velocity Integration)

In this article we discuss probably the most fundamental aspect of numerical simulations with the particle in cell (PIC) method: pushing particles. We introduce the commonly used leapfrog method, and provide a simple numerical algorithm in the form o...

Get results faster with Java multithreading

Code parallelization is the process of modifying a simulation program so that it can take advantage of multiple computational cores to obtain results faster. One method is to distribute the workload locally in the form of computational threads. Java...

Spacecraft Surface Charging

A spacecraft acts as an isolated probe and will become charged due to the presence of space plasma. Surface potential will change due to the thermal motion of electrons and ions. The potential will continue to change until the fluxes of the negative ...

The Finite Volume Method

The Finite Volume Method (FVM) is an algorithm for solving differential equations. It is based on the integral formulation of the problem, with each computational element corresponding to a volume over which the integration is performed. It is somewh...

The Finite Difference Method

Numerical simulations generally involve solving some differential equations on a computational domain too complicated to solve analytically. The Finite Difference (FD) is a method for solving differential equations. It is a very popular method since ...

The Electrostatic Particle In Cell (ES-PIC) Method

Particle In Cell (PIC) is the name of a method used to numerically model dynamics of ionized gases, or plasmas. Its name stems from the fact that the gas is represented by a large number of computational particles that move in a disretized domain. Th...