A class that describes a source of particles. More...
Public Member Functions | |
KineticSource (IdxRangeX const &gridx, IdxRangeVx const &gridv, double extent, double stiffness, double amplitude, double density, double energy, double temperature) | |
Creates an instance of the KineticSource class. | |
DFieldSpXVx | operator() (DFieldSpXVx allfdistribu, double dt) const override |
Update the distribution function following the KineticSource operator. | |
A class that describes a source of particles.
The KineticSource class solves the following evolution equation: df/dt = S_kin Where S_kin = spatial_extent(x) * velocity_shape(v) Since S_kin does not depend on time, we have f(t+dt) = f(t) + S_kin*dt as a solution of this evolution equation.
spatial_extent defines the location where the source is active. spatial_extent is normalized, so that its integral along the spatial direction equals one. It has a hyperbolic tangent shape. It is equal to one in a central zone of the plasma of width defined by the extent parameter.
velocity_shape defines the velocity profile of the source in the parallel velocity direction. It is the sum of a source that injects only density, and a source that injects only energy. If the density and energy parameters are equal to one (usual case), the resulting velocity_shape is maxwellian.
The complete description of the operator can be found in rhs docs.
KineticSource::KineticSource | ( | IdxRangeX const & | gridx, |
IdxRangeVx const & | gridv, | ||
double | extent, | ||
double | stiffness, | ||
double | amplitude, | ||
double | density, | ||
double | energy, | ||
double | temperature | ||
) |
Creates an instance of the KineticSource class.
[in] | gridx | The mesh in the x direction. |
[in] | gridv | The mesh in the vx direction. |
[in] | extent | A parameter that sets the spatial extent of the source. |
[in] | stiffness | A parameter that sets stiffness of the source extent. |
[in] | amplitude | A parameter that sets the amplitude of the source. |
[in] | density | A parameter that sets the density of the source. |
[in] | energy | A parameter that sets the energy of the source. |
[in] | temperature | A parameter that sets the temperature of the source. |
|
overridevirtual |
Update the distribution function following the KineticSource operator.
Update the distribution function for both electrons and ions to show how it is modified following the effect of the KineticSource operator.
[in,out] | allfdistribu | The distribution function. |
[in] | dt | The time step over which the collisions occur. |
Implements IRightHandSide.