spis.Vol.VolDistrib
Class VolDistrib

java.lang.Object
  extended byspis.Vol.VolDistrib.VolDistrib
Direct Known Subclasses:
VolDistribWithIO

public abstract class VolDistrib
extends java.lang.Object

Class Name : VolDistrib (generic Volume Distribution)
Project ref : SPIS project
File name : VolDistrib.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 : generic abstract Volume Distribution.
It stores the particle distribution at the desired accuracy level:
it can be a full velocity distribution function (PIC model) or only its moments (fluid approach)
All Volume Distribution classes must be derived from this class.
Pointers to surface fluxes of particles into and out of this volume distribution are also stored:
- selfInFlux: internally-generated incoming fluxes, which can be considered as part of this distribution (typically boundary fluxes generating this particle distribution), they are not externally updated since considered as static (a sampling is done at most)
- inFlux: externally-generated incoming fluxes, which are coming from other objects (typically secondary electrons form SC, ion source from SC...), they are externally updated by the external objects (mostly the spacecraft) before each iteration (although this updating or not, for inFlux or selfInFlux, is external to this class, hence uncontrolled, and can indeed be coded differently)
- scOutFlux: flux of particles steming from this volume distribution onto the spacecraft
- bdOutFlux: flux of particles steming from this volume distribution onto external boundaries
NB: depending on the subtype of the incoming fluxes and the volume distribution, the incoming fluxes can be re-sampled or not, see derived VolDistrib sub-classes.
Since some of these fluxes can be inexistent (no influx, outflux to be discarded) it is allowed not to declare them:
- they are not requested in the constructors and are set to null or 0-dimension array
- use the setters (setInFlux...) to declare the ones needed

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
private  boolean implicitDensity
          Is the density of this population implicit, i.e. not to be added to other densities for Poisson solving, because it is already (implicitely) taken into account in Poisson non linear solver (set by default to false
private  java.lang.String name
          Name of this distribution (optional)
private  Part particleType
          Type of particles contained in this distribution in case one type only is allowed (remains null if several different types are allowed)
protected  VolMesh vm
          Volume Mesh on which the distribution "lives"
 
Constructor Summary
VolDistrib(VolMesh volMesh)
          default constructor.
 
Method Summary
abstract  float assessLargestDt()
           
protected  void checkMomentConsistentWithOrder(VolField mom, int order)
          Checks the moment sub-type (ScalVolField or VectVolField) is consistent with the moment order
abstract  boolean containsOnly(Part particletype)
           
 void getMoment(VolField mom, int order)
          charge, mass, normalised and deviation flags omitted: they are set to their default value, 0
 void getMoment(VolField mom, int order, int charge)
          mass, normalised and deviation flags omitted: they are set to their default value, 0
abstract  void getMoment(VolField mom, int order, int charge, int mass)
          normalised and deviation flags omitted: they are set to their default value, 0
 void getMoment(VolField mom, int order, int charge, int mass, int normalised)
          deviation flag omitted: it is set to its default value, 0
 void getMoment(VolField mom, int order, int charge, int mass, int normalised, int deviation)
          Provides the moments of the distribution (order=0 => number density, 1 => momentum density, 2 => energy density...).
 java.lang.String getName()
           
 Part getParticleType()
           
 VolMesh getVm()
           
 boolean isDensityImplicit()
          if true the density of this population is implicit, i.e. not to be added to other densities for Poisson solving, because it is already (implicitely) taken into account in Poisson non linear solver
abstract  boolean mayContain(Part particletype)
           
abstract  void move(float dt)
          Time integration of the particle distribution over the duration dt.
 void setImplicitDensity(boolean b)
          if set to true the density of this population is implicit, i.e. not to be added to other densities for Poisson solving, because it is already (implicitely) taken into account in Poisson non linear solver
 void setName(java.lang.String string)
           
 void setParticleType(Part part)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

vm

protected VolMesh vm
Volume Mesh on which the distribution "lives"


implicitDensity

private boolean implicitDensity
Is the density of this population implicit, i.e. not to be added to other densities for Poisson solving, because it is already (implicitely) taken into account in Poisson non linear solver (set by default to false


name

private java.lang.String name
Name of this distribution (optional)


particleType

private Part particleType
Type of particles contained in this distribution in case one type only is allowed (remains null if several different types are allowed)

Constructor Detail

VolDistrib

public VolDistrib(VolMesh volMesh)
default constructor.

Method Detail

move

public abstract void move(float dt)
Time integration of the particle distribution over the duration dt.
Data are needed to integrate particle movement, but they should be passed to the dervived classes in their constructors, not in this routine, which must remain generic.
Typical inputs are the incoming flux and the E and B fields. Typical outputs are the outgoing flux and the update of the particle description (internally stored, specialisation dependent).

See Also:
VolDistribWithIO

assessLargestDt

public abstract float assessLargestDt()
Returns:
the largest acceptable time step dt for time integration

getMoment

public void getMoment(VolField mom,
                      int order,
                      int charge,
                      int mass,
                      int normalised,
                      int deviation)
Provides the moments of the distribution (order=0 => number density, 1 => momentum density, 2 => energy density...).
Depending on the class specialisation the moment is obtained directly or by averaging over particles.
Parameters are (last parameters can be omitted with default 0, cf. other routine interfaces):
- order: moment order (0 -> number density, 1 -> velocity density...)
- charge: if 1, multiplies by particle charge (if 0 does not)
- mass: if 1, multiplies by particle mass (if 0 does not)
- normalised: if 1, normalises by number density (order 0 moment with all zero parameters)
- deviation: if 1, substracts average velocity from microscopic velocities (relevant for order 2 or more only)
Exemples:
- getMoment(ScalVolField mom, 0, 0, 0, 0, 0): particle number density
- getMoment(ScalVolField mom, 0, 1, 0, 0, 0): charge density
- getMoment(VectVolField mom, 1, 0, 1, 0, 0): momentum density
- getMoment(ScalVolField mom, 2, 0, 1, 0, 0): kinetic energy density
- getMoment(ScalVolField mom, 2, 0, 1, 1, 0): average kinetic energy
- getMoment(ScalVolField mom, 2, 0, 1, 1, 1): average temperature
NB: for order 2 moments, since no tensorial fields of order 2 exist for now (would-be-TensorVolField), the self-contracted tensor is provided.


getMoment

public void getMoment(VolField mom,
                      int order,
                      int charge,
                      int mass,
                      int normalised)
deviation flag omitted: it is set to its default value, 0

See Also:
getMoment(VolField, int, int, int, int, int)

getMoment

public abstract void getMoment(VolField mom,
                               int order,
                               int charge,
                               int mass)
normalised and deviation flags omitted: they are set to their default value, 0

See Also:
getMoment(VolField, int, int, int, int, int)

getMoment

public void getMoment(VolField mom,
                      int order,
                      int charge)
mass, normalised and deviation flags omitted: they are set to their default value, 0

See Also:
getMoment(VolField, int, int, int, int, int)

getMoment

public void getMoment(VolField mom,
                      int order)
charge, mass, normalised and deviation flags omitted: they are set to their default value, 0

See Also:
getMoment(VolField, int, int, int, int, int)

checkMomentConsistentWithOrder

protected void checkMomentConsistentWithOrder(VolField mom,
                                              int order)
Checks the moment sub-type (ScalVolField or VectVolField) is consistent with the moment order

Parameters:
mom - moment
order - moment order

containsOnly

public abstract boolean containsOnly(Part particletype)
Parameters:
particletype -
Returns:
true if this VolDistrib only contains this type of particles

mayContain

public abstract boolean mayContain(Part particletype)
Parameters:
particletype -
Returns:
true if this VolDistrib may contain this type of particles (among others, or not)

getVm

public VolMesh getVm()

isDensityImplicit

public boolean isDensityImplicit()
if true the density of this population is implicit, i.e. not to be added to other densities for Poisson solving, because it is already (implicitely) taken into account in Poisson non linear solver

Returns:

setImplicitDensity

public void setImplicitDensity(boolean b)
if set to true the density of this population is implicit, i.e. not to be added to other densities for Poisson solving, because it is already (implicitely) taken into account in Poisson non linear solver

Parameters:
b -

getName

public java.lang.String getName()
Returns:

getParticleType

public Part getParticleType()
Returns:

setName

public void setName(java.lang.String string)
Parameters:
string -

setParticleType

public void setParticleType(Part part)
Parameters:
part -