O P A R - Open Architecture Particle in Cell Simulation - Version 3.0
Plasma simulations with dust particles
 All Classes Files Functions Variables Friends Macros Groups Pages
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes
Wall Class Reference

A simple totally absorbing wall in all boundary directions, absorbing dust particle(s) and insertion of particles at all boundary grid cells. Absorbing wall and dust particle: Test all the particles of all the Species if they are outside the simulation box or inside the dust particle. If so the particle is removed from the simulation. If the particle is absorbed by the dust particle, the charge (-+1) is added at the dust particle(s) charge(s). Insertion of particles at all boundaries: Number of inserted particles per boundary cell is calculated from the current density per grid cell: j = np*Vm/dx, where Vm is the average thermal velocity of the particles according to Maxwells velocity distribution. More...

#include <wall.h>

Inheritance diagram for Wall:
Task

List of all members.

Public Member Functions

 Wall ()
 Default constructor.
virtual ~Wall ()
 Destructor.
virtual std::string GetClassName () const
 Returns the name of the class, here "Wall".
void AddSpecies (Species *pS)
 Here a Species can add itself, so it will be influenced by this Wall.
virtual void Init ()
 Removes particles outside the simulation box or inside the dust particle, insertion of particles and some diagnostics. Iterates through all the partices of all the Species and checks the Geometry::outside and Geometry::insidedust condition. If the particle is found outside the simulation box or inside the dust particle it is removed via the Species::Remove method. If the particle is absorbed by the dust particle, the charge (-+1) is added to the dust particle(s) charge(s). At all boundary grid cells particles are injected with a Maxwell velocity distribution. Also some diagnostics outputs are implemented here: Number of super particles, velocity distributions and physical electron and ion density.
virtual bool Execute ()
 Executes the Task. This is the place where the algorithm for executing a Task it placed. The return value specifies, if the task is finished and can be removed. The basic Execute method executes all its sub-Tasks. The derived classes should call this member function, whenever there are subtasks to be executed.
virtual double GetChargeDust (int k)
 Give the number of charges on the dust particle. This means: +1 is added if one ion (super particle) is absorbed, -1 is added if one electron (super particle) is absorbed.
virtual double VelocityGeneration (double v)
 Generate the velocity distribution for the injected particles, only for 1D simulations.
virtual void InputVeloDistribution (Velocity V, double cs, double Vn, int id)
 Determination of the velocity distribution of the super particles. 4000 interval steps are used.
virtual void OutputVeloDistribution (int id)
 Output of the velocity distribution of the super particles. 4000 interval steps (resolution of the distribution function) are used.
virtual std::string ParseFileName (std::string strFile, int t, int tmax)
- Public Member Functions inherited from Task
 Task ()
 Default constructor sets the running number nNr of the Task.
virtual ~Task ()
 When destructing a Task is has to be detatched from the parents Task list.
int GetStep () const
 Return the interval between execution in timesteps.
int GetEnd () const
 Return the timestep when the Task ends execution.
bool DoNow ()
 Returns true if the Task is to be executed now.
std::string GetName () const
 Returns the name given to the Task object.
virtual bool IsInteractive () const
 If not specified otherwise, a Task is not interactive.
void AttachTask (Task *pTask)
 Insert Task into Task list and registers it with the Process.
void DetachTask (Task *pTask)
 DetachTask from Task list.
virtual std::string Rebuild (std::istream &in)
 Rebuilds the task from the setup. This normally does not need to be overwritten. Rebuild always returns the next token that does not belong to the object setup.
virtual void DumpTaskList (std::ostream &o, int nDepth=0)
 Recursively dumps the complete Task list into a stream.

Public Attributes

double * px
int C1 [4000]
 Array of particle velocity distribution. 4000 intervall steps.
int C2 [4000]
 Array of particle velocity distribution. 4000 intervall steps.
int C3 [4000]
 Array of particle velocity distribution. 4000 intervall steps.
int C4 [4000]
 Array of particle velocity distribution. 4000 intervall steps.
double cdust [20]
 Dust particle charge, array for 20 dust particles.
double cdust_e [20]
 Number of absorbed electrons.
double cdust_i [20]
 Number of absorbed ions.
double deb

Protected Member Functions

virtual PARAMETERMAP * MakeParamMap (PARAMETERMAP *pm=NULL)
 Register the parameters needed for the Task. A derived class should overwrite this whenever it needs additional parameters from the setup file. It should then ALWAYS call the MakeParamMap of its superclass.
- Protected Member Functions inherited from Task
void AddPredecessor (const std::string &strPred)
 Add the name of a predecessor that has to be executed before this Task.

Protected Attributes

GeometrypGeom
 Pointer to the referenced Geometry.
std::vector< WSpeciesspecies
 All the species that are affected by the wall.
int tstep
 Time step size for output of number of super particles.
int tstepn
 Time step size for output of physical particle density.
Position X
 Position of plasma particle.
Velocity V
 Velocity of plasma particle.
int Nx
 Grid size in x direction.
int Ny
 Grid size in y direction.
int Nz
 Grid size in z direction.
double dx
 Grid spacing in x direction.
double dy
 Grid spacing in y direction.
double dz
 Grid spacing in z direction.
int number_d
 Number of dust particles in the simulation, only fpr 2D and 3D.
double dk
 Grid spacing for output of physical particle density.
double dt
 Time step.
double m
 Mass of the plasma species.
double N
 The normalized density.
double Vmp
 Most probably velocity of plasma species according to Maxwell distribution.
double Vm
 Average velocity of plasma species according to Maxwell distribution.
double np
 Super particles per cell.
double T
 Temperature of the plasma species.
double cs
 Cell velocity dx/dt.
double je
 Average current density for electrons.
double ji
 Average current density for ions.
double nop_e
 Number of injected electrons per timestep and grid cell.
double nop_i
 Number of injected ions per timestep and grid cell.
int jmax
 Integer number of injected particles per timestep and grid cell.
int r
 Integer value of position of super particle in 1D simulations.
int rz
 Integer value of z-position of super particle.
int ds
 = dx/dk
int Rg
 Dust particle radius divided by dx: R/dx.
int Rv
 Dust particle radius divided by dk: R/dk.
double Vol
 Physical volume needed for calulation of the physical particle density.
double Volz
 Physical volume needed for calulation of the physical particle density in the case of magnetic field Bz.
double Vol1
double Vol2
double Vol3
double d
double b1
double b2
- Protected Attributes inherited from Task
int nNr
 The running number of this Task.
std::string strName
 The name of this Task.
TaskpParent
 The parent Task to which this Task belongs.
ProcesspProcess
 The Process to which this Task belongs.
std::string strNorm
 The name of the referenced Normalization object.
NormalizationNorm
 The pointer to the referenced Normalization object.
TASKLIST plTasks
 A list of sub-Tasks.
int nStart
int nEnd
int nStep

Detailed Description

A simple totally absorbing wall in all boundary directions, absorbing dust particle(s) and insertion of particles at all boundary grid cells. Absorbing wall and dust particle: Test all the particles of all the Species if they are outside the simulation box or inside the dust particle. If so the particle is removed from the simulation. If the particle is absorbed by the dust particle, the charge (-+1) is added at the dust particle(s) charge(s). Insertion of particles at all boundaries: Number of inserted particles per boundary cell is calculated from the current density per grid cell: j = np*Vm/dx, where Vm is the average thermal velocity of the particles according to Maxwells velocity distribution.

Parameters:
geometryName of the referenced Geometry
stepNOutput timestep for the electron and ion density
dkGrid spacing (cell volume) for output of the electron and ion density

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