MFEM v4.10.0
Finite element discretization library
Loading...
Searching...
No Matches
plasma.hpp
Go to the documentation of this file.
1// Copyright (c) 2010-2026, Lawrence Livermore National Security, LLC. Produced
2// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
3// LICENSE and NOTICE for details. LLNL-CODE-806117.
4//
5// This file is part of the MFEM library. For more information and source code
6// availability visit https://mfem.org.
7//
8// MFEM is free software; you can redistribute it and/or modify it under the
9// terms of the BSD-3 license. We welcome feedback and contributions, see file
10// CONTRIBUTING.md for details.
11
12#ifndef MFEM_PLASMA_HPP
13#define MFEM_PLASMA_HPP
14
15#include <cmath>
16#include <complex>
17
18namespace mfem
19{
20
21namespace plasma
22{
23
24// Physical Constants
25
26// Permittivity of Free Space (units F/m)
27static const real_t epsilon0_ = 8.8541878176e-12;
28
29// Permeability of Free Space (units H/m)
30static const real_t mu0_ = 4.0e-7 * M_PI;
31
32// Speed of light in Free Space (units m/s)
33static const real_t c0_ = 1.0 / sqrt(epsilon0_ * mu0_);
34
35// Impedance of Free Space (units Ohm)
36static const real_t Z0_ = sqrt(mu0_ / epsilon0_);
37
38static const real_t q_ = 1.602176634e-19; // Elementary charge in coulombs
39static const real_t eV_ = 1.602176634e-19; // 1 eV in Joules
40static const real_t amu_ = 1.660539040e-27; // Atomic mass unit in kilograms
41static const real_t me_kg_ = 9.10938356e-31; // Mass of electron in kilograms
42static const real_t me_u_ = 5.4857990907e-4; // Mass of electron in a.m.u
43
44/**
45 Returns the cyclotron frequency in radians/second
46 m is the mass in a.m.u
47 q is the charge in units of elementary electric charge
48 B is the magnetic field magnitude in tesla
49 */
51{
52 return fabs(q * q_ * B / (m * amu_));
53}
54
55typedef std::complex<real_t> complex_t;
56
57} // namespace plasma
58
59} // namespace mfem
60
61#endif // MFEM_PLASMA_HPP
62
real_t cyclotronFrequency(real_t B, real_t m, real_t q)
Definition plasma.hpp:50
std::complex< real_t > complex_t
Definition plasma.hpp:55
float real_t
Definition config.hpp:46