spis.Top.Plasma
Class MmfPlasma

java.lang.Object
  extended byspis.Top.Plasma.Plasma
      extended byspis.Top.Plasma.MeshedPlasma
          extended byspis.Top.Plasma.MmfPlasma
Direct Known Subclasses:
FlexibleMFPlasmaDeprecated, Hybrid1MmfPlasma

public class MmfPlasma
extends MeshedPlasma

Class Name : MmfPlasma (Meshed Matter-Fields Plasma class)
Project ref : SPIS project
File name : MmfPlasma.java
File type : class
Copyright : ONERA, 2 Av. E. Belin, 31055 Toulouse cedex, France http://www.onecert.fr
Status : under development
Creation : 25/08/2003
Modification :

Description : Meshed Matter-Fields Plasma class.
plasma model in which the matter and the field dynamics are described with a "separate" dynamics (contrarily e.g. to MHD). Although abstract, most of the job is done in this class (integrate...). The derived classes are mostly used to build/initialise the plasma and their dynamics will be handled by this class. For that, two opposite options to build the fields and matter in derived classes are:
A) a very specicifc plasma model is defined with pre-determined matter distribution types, possibly with pre-determined solving scheme, e.g. with a non linear Poisson solver (electron Boltzman distribution "included" in Poisson equation with implicit solving method), or quasi-neutral model, etc.
An exemple of this strategy is Hybrid1MmfPlasma.
B) the class is made very flexible thanks to methods like:
- addDistribution (matter) including type/details description
- addField, above all the type of storage
- selectSolver...
This strategy is exemplified by FlexibleMFPlasmaDeprecated

Versions and anomalies correction :

Version numberAuthor (name, e-mail) Corrections/Modifications
0.1 JF Roussel, roussel@onecert.frCreation


Version:
0.1
Author:
JF Roussel

Field Summary
protected  VectVolField B
          Magnetic field (field only)
protected  SurfDistrib[] bdOutFlux
          Outgoing fluxes to external boundary generated by the plasma dynamics.
protected  ScalVolField densBuf
          density buffer
protected  EField E
          Electric field (the field and its solver
protected  VolDistrib[] pop
          particle populations, TBD derived types
protected  int popNb
          number of (used) populations
private static int popNbIncr
          increment of population number when resized
protected  SurfDistrib[] scOutFlux
          Outgoing fluxes onto the SC generated by the plasma dynamics.
protected  ScalVolField totDens
          total density
 
Fields inherited from class spis.Top.Plasma.MeshedPlasma
vm
 
Constructor Summary
MmfPlasma(ThreeDUnstructVolMesh volMesh)
          Constructor without E and B fields => they are generated automatically (EField E includes the solver), and as a consequence, the volMesh must be of ThreeDUnstructVolMesh type because a Poisson solver on a ConjGrad3DUnstructPoissonSolver is used.
MmfPlasma(VolMesh volMesh, EField electricField, VectVolField magneticField)
          Default constructor
 
Method Summary
 void addPop(VolDistrib newPop)
          adds a new particle population to the plasma
 void addPops(VolDistrib[] newPops)
          adds a new particle populations to the plasma
 float assessLargestDt()
           
protected  void buildDefaultFields(ThreeDUnstructVolMesh volMesh)
          Builds and returns an electric field as an EField object: the field stored as a potential and a ConjGrad3DUnstructPoissonSolver for Poisson eq.
 ScalVolField buildElectronDensity()
          Builds a ScalVolField giving the total electron density and returns it.
 ScalVolField buildIonDensity()
          Builds a ScalVolField giving the total ion density and returns it.
 void buildMostAccurateScOutFluxes()
          Builds the most accurate outgoing flux onto spacecraft for all populations of this plasma.
 ScalVolField buildTotalDensity()
          Builds a ScalVolField giving the total plasma density [ecu/node] and returns it.
 void collectOutFluxes()
           
 void computeTotalChargeDensity(int flag)
          Computes the total current of the populations of the plasma and stores it in totDens.
 VectVolField getB()
          returns volume B field.
 VolDistrib getDistrib(int n)
          returns population n.
 int getDistribNb()
          returns population number.
 VolDistrib[] getDistribs()
           
 VectVolField getE()
          returns electric field as a vector volume field (elecectric field only, i.e. values only).
 EField getEField()
          returns E as an EField object, i.e. the field + the solver.
private  void init()
          Initisations: populations, buffers...
 SurfDistrib[] integrate(float dt, ScalSurfField scPot, SurfDistrib[] inFlux)
          Integrates the plasma dynamics over the (small) time dt.
 void setB(VectVolField BField)
          Defines B field (by refrence, no copy)
 void setEField(EField EField)
          Defines E field (by reference, no copy)
 
Methods inherited from class spis.Top.Plasma.MeshedPlasma
getVm
 
Methods inherited from class spis.Top.Plasma.Plasma
integrate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

E

protected EField E
Electric field (the field and its solver


B

protected VectVolField B
Magnetic field (field only)


pop

protected VolDistrib[] pop
particle populations, TBD derived types


popNb

protected int popNb
number of (used) populations


totDens

protected ScalVolField totDens
total density


densBuf

protected ScalVolField densBuf
density buffer


scOutFlux

protected SurfDistrib[] scOutFlux
Outgoing fluxes onto the SC generated by the plasma dynamics. Their sub-types is enforced upon the move methods of the populations and must be determined by allocation of outFlux in the derived classes.


bdOutFlux

protected SurfDistrib[] bdOutFlux
Outgoing fluxes to external boundary generated by the plasma dynamics. Their sub-types is enforced upon the move methods of the populations and must be determined by allocation of outFlux in the derived classes.


popNbIncr

private static int popNbIncr
increment of population number when resized

Constructor Detail

MmfPlasma

public MmfPlasma(VolMesh volMesh,
                 EField electricField,
                 VectVolField magneticField)
Default constructor

Parameters:
volMesh -
electricField -
magneticField -

MmfPlasma

public MmfPlasma(ThreeDUnstructVolMesh volMesh)
Constructor without E and B fields => they are generated automatically (EField E includes the solver), and as a consequence, the volMesh must be of ThreeDUnstructVolMesh type because a Poisson solver on a ConjGrad3DUnstructPoissonSolver is used.

Parameters:
volMesh -
Method Detail

init

private void init()
Initisations: populations, buffers...


buildDefaultFields

protected void buildDefaultFields(ThreeDUnstructVolMesh volMesh)
Builds and returns an electric field as an EField object: the field stored as a potential and a ConjGrad3DUnstructPoissonSolver for Poisson eq.


integrate

public SurfDistrib[] integrate(float dt,
                               ScalSurfField scPot,
                               SurfDistrib[] inFlux)
Integrates the plasma dynamics over the (small) time dt.
The results of this time evolution are:
- the update of the plasma state (internal variables, accessible through the next methods)
- the integrated currents on the surface meshes (on spacecraft and external),

Specified by:
integrate in class Plasma
Parameters:
dt - integration duration
scPot - spacecraft potential
inFlux - incoming plasma fluxes (sources, secondary particles...
Returns:
the matter fluxes from the plasma
See Also:
Plasma#integrate(float, ScalSurfField)

assessLargestDt

public float assessLargestDt()
Specified by:
assessLargestDt in class Plasma
Returns:
the largest acceptable time step dt for plasma integration

computeTotalChargeDensity

public void computeTotalChargeDensity(int flag)
Computes the total current of the populations of the plasma and stores it in totDens.
If flag = 0 (basis): sums up all densities
If flag = 1: if the Poisson solver is non-linear the implicit densities (implicitly taken into account in the poisson solver) are not added
If flag = 2: the implicit densities are not added (whatever the Poisson solver option)

Parameters:
flag -
See Also:
VolDistrib.isDensityImplicit()

collectOutFluxes

public void collectOutFluxes()

addPop

public void addPop(VolDistrib newPop)
adds a new particle population to the plasma

Parameters:
newPop - the population to be added

addPops

public void addPops(VolDistrib[] newPops)
adds a new particle populations to the plasma

Parameters:
newPops - the populations to be added, the null ones are discarded

buildMostAccurateScOutFluxes

public void buildMostAccurateScOutFluxes()
Builds the most accurate outgoing flux onto spacecraft for all populations of this plasma. It shall e.g. be a PICSurfDistrib for a PICVolDistrib, a LocalMaxwellSurfDistrib for a GlobalMaxwellSurfDistrib...


setEField

public void setEField(EField EField)
Defines E field (by reference, no copy)


setB

public void setB(VectVolField BField)
Defines B field (by refrence, no copy)


getEField

public EField getEField()
returns E as an EField object, i.e. the field + the solver.


getE

public VectVolField getE()
returns electric field as a vector volume field (elecectric field only, i.e. values only).


getB

public VectVolField getB()
returns volume B field.


getDistribNb

public int getDistribNb()
returns population number.


getDistrib

public VolDistrib getDistrib(int n)
returns population n.


buildTotalDensity

public ScalVolField buildTotalDensity()
Builds a ScalVolField giving the total plasma density [ecu/node] and returns it.

Specified by:
buildTotalDensity in class MeshedPlasma

buildIonDensity

public ScalVolField buildIonDensity()
Builds a ScalVolField giving the total ion density and returns it.

Specified by:
buildIonDensity in class MeshedPlasma

buildElectronDensity

public ScalVolField buildElectronDensity()
Builds a ScalVolField giving the total electron density and returns it.

Specified by:
buildElectronDensity in class MeshedPlasma

getDistribs

public VolDistrib[] getDistribs()
Returns:
particle distributions