Skip to content

endeve/MicroMacroPy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 

Repository files navigation

MicroMacroPy

Python code for solving the micro-macro decomposition of the Vlasov-Poisson-Lenard-Bernstein system.

This code was used to generate the results presented in Endeve & Hauck (2022), JCP, 462, 111227.

In the micro-macro decomposition, the kinetic distribution function is decomposed as $f=M_{f}+g$, where $M_{f}$ is the Maxwellian with the same first three velocity moments as $f$; i.e., $\rho_{f}=\langle M_{f} \mathbf{e} \rangle=\langle f \mathbf{e} \rangle$, with $\mathbf{e}=(1,v,\frac{1}{2}v^{2})^{\intercal}$. The first three velocity moments of the perturbation $g$ satisfy $\langle g\mathbf{e}\rangle=0$.

The micro-macro method solves for a coupled system of equations for the moments $\rho_{f}$ and the perturbation $g$. The code provided in this repository uses the discontinous Galerkin method for phase-space discretization, combined with implicit-explicit time integration.

Basic Code Description

All python source code is located under the Source directory.

Drivers for the Relaxation, Riemann, and Collisional Landau Damping problems are named RelaxationMM.py, RiemannProblemMM.py, and CollisionalLandauDampingMM.py, respectively. Corresponding drivers using the direct method (solving for the kinetic distribution $f$) are named Relaxation.py, RiemannProblem.py, and CollisonalLandauDamping.py.

Running the Code

As an example, to run the Relaxation problem with the micro-macro method, invoke the following command in a terminal window from the Source directory

python RelaxationMM.py

During execution, select time slices are written to HDF5 files (named RelaxationMM_00000000.h5, etc.).

The MatLab function ReadData.m can be used to read data from an HDF5 file for plotting.

About

Python code for solving the micro-macro decomposition of the Vlasov-Poisson-Lenard-Bernstein system. This code was used to generate the results presented in Endeve & Hauck (2022), JCP, 462, 111227

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors