Numerical Methods
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 the polygon, how to classify their position, and how to scatter and gather particle data.
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 algorithm with a simple Matlab code.
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 flat 1D array representation of 3D data via a mapping function.
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 coordinate system.
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.
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. These devices have been flown for over 40 years, however, much still remains unknown about the details of their operation.
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 makes it easy to add multithreading to your code. Here we show you how to implement a "poor-man's" method, in which individual cases run serially, but multiple cases are launched concurrently.
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 somewhat more complex than the Finite Difference, however, it can be applied to arbitrarily shaped domains. In this article we show you the basics of this method and provide a simple solver.
