A class that describes a source of particles. More...
Public Member Functions | |
KrookSourceConstant (IdxRangeX const &gridx, IdxRangeVx const &gridv, RhsType const type, double extent, double stiffness, double amplitude, double density, double temperature) | |
Creates an instance of the KrookSourceConstant class. | |
KrookSourceConstant (KrookSourceConstant &&)=default | |
Creates an instance of the KrookSourceConstant class. | |
DFieldSpXVx | operator() (DFieldSpXVx allfdistribu, double dt) const override |
Update the distribution function following the KrookSourceConstant operator. | |
A class that describes a source of particles.
The KrookSourceConstant class solves the following evolution equation: df/dt = -amplitude * mask * (f - ftarget)
mask defines the spatial region where the operator is active.
ftarget is a maxwellian characterized by density and temperature, and a zero fluid velocity.
amplitude is a constant for both species.
The solution of the evolution equation is therefore : f(t+dt) = ftarget + (f(t)-ftarget)*exp(-amplitude*mask*dt)
KrookSourceConstant::KrookSourceConstant | ( | IdxRangeX const & | gridx, |
IdxRangeVx const & | gridv, | ||
RhsType const | type, | ||
double | extent, | ||
double | stiffness, | ||
double | amplitude, | ||
double | density, | ||
double | temperature | ||
) |
Creates an instance of the KrookSourceConstant class.
[in] | gridx | The mesh in the x direction. |
[in] | gridv | The mesh in the vx direction. |
[in] | type | A RhsType parameter that defines the region where the operator is active. If type = Source, the mask equals one in the central zone of the plasma of width extent; If type = Sink, the mask equals zero in the central zone of the plasma of width extent; |
[in] | extent | A parameter that sets the extent of the source. |
[in] | stiffness | A parameter that sets the stiffness of the source extent. |
[in] | amplitude | A parameter that sets the the amplitude of the source. |
[in] | density | A parameter that sets the density of the Maxwellian ftarget. |
[in] | temperature | A parameter that sets the temperature of the Maxwellian ftarget. |
|
overridevirtual |
Update the distribution function following the KrookSourceConstant operator.
Update the distribution function for both electrons and ions to show how it is modified following the effect of the KrookSourceConstant operator.
[in,out] | allfdistribu | The distribution function. |
[in] | dt | The time step. |
Implements IRightHandSide.