Gyselalib++
 
Loading...
Searching...
No Matches
KrookSourceConstant Class Reference

A class that describes a source of particles. More...

Inheritance diagram for KrookSourceConstant:
IRightHandSide

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.
 

Detailed Description

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)

Constructor & Destructor Documentation

◆ KrookSourceConstant()

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.

Parameters
[in]gridxThe mesh in the x direction.
[in]gridvThe mesh in the vx direction.
[in]typeA 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]extentA parameter that sets the extent of the source.
[in]stiffnessA parameter that sets the stiffness of the source extent.
[in]amplitudeA parameter that sets the the amplitude of the source.
[in]densityA parameter that sets the density of the Maxwellian ftarget.
[in]temperatureA parameter that sets the temperature of the Maxwellian ftarget.

Member Function Documentation

◆ operator()()

DFieldSpXVx KrookSourceConstant::operator() ( DFieldSpXVx  allfdistribu,
double  dt 
) const
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.

Parameters
[in,out]allfdistribuThe distribution function.
[in]dtThe time step.
Returns
A field referencing the distribution function passed as argument.

Implements IRightHandSide.


The documentation for this class was generated from the following file: