spis.Vol.VolDistrib
Class PICVolDistrib

java.lang.Object
  extended byspis.Vol.VolDistrib.VolDistrib
      extended byspis.Vol.VolDistrib.VolDistribWithIO
          extended byspis.Vol.VolDistrib.PICVolDistrib

public class PICVolDistrib
extends VolDistribWithIO

Class Name : PICVolDistrib (PIC Volume Distribution)
Project ref : SPIS project
File name : PICVolDistrib.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 : Particle_In-Cell (PIC) Volume Distribution.
The particle distribution is kinetic through Monte-Carlo sampling.

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  PICSurfDistrib bsd
          temporary sampled surface fluxes (stored as object variables and not local variables to avoid costs due to frequent memory allocations)
private  FloatScalTable fst
          temporary FloatScalTable (stored as an object variable and not a local variable to avoid costs due to frequent memory allocations)
private  PartList pl
          particle list for distribution storage
private  PICSurfDistrib scsd
          temporary sampled surface fluxes (stored as object variables and not local variables to avoid costs due to frequent memory allocations)
private  SpaceVectTable svt
          temporary SpaceVectTable (stored as an object variable and not a local variable to avoid costs due to frequent memory allocations)
private  VeloVectTable vvt
          temporary VeloVectTables (stored as object variables and not local variables to avoid costs due to frequent memory allocations)
private  VeloVectTable vvt2
          temporary VeloVectTables (stored as object variables and not local variables to avoid costs due to frequent memory allocations)
 
Fields inherited from class spis.Vol.VolDistrib.VolDistribWithIO
allInFlux, B, bdOutFlux, E, eField, inFlux, scOutFlux, selfInFlux
 
Fields inherited from class spis.Vol.VolDistrib.VolDistrib
vm
 
Constructor Summary
PICVolDistrib(GlobalParameter[] globalParams, LocalParameter[] localParams, java.lang.String option, VolMesh vm, VectVolField E, VectVolField B)
          Constructor based on UI-defined parameters NB: not used for now, the UI-defined parameters are currently extracted before the call of the PICVolDistrib constructor
PICVolDistrib(VolMesh vm, float dens, float[] velo, float temp, Part particleType, VectVolField E, VectVolField B)
          Quick constructor, initialises particles in volume (generates homogeneous sample) and the incoming flux as SelfInFlux (with its sampler)
PICVolDistrib(VolMesh vm, PartList partList, MatterBC selfInFlux_, MatterBC inFlux_, SurfDistrib scOutFlux_, SurfDistrib bdOutFlux_, EField E_, VectVolField B_)
          Default constructor with IO data, with the electric field defined as a physical EField (including solver).
PICVolDistrib(VolMesh vm, PartList partList, MatterBC selfInFlux_, MatterBC inFlux_, SurfDistrib scOutFlux_, SurfDistrib bdOutFlux_, VectVolField E_, VectVolField B_)
          Default constructor with IO data
PICVolDistrib(VolMesh vm, PartList partList, VectVolField E, VectVolField B)
          Default constructor without IO data (in/out fluxes, E-B fields): use setters to define the ones needed (most of them can remain null, as initialised by this constructor, if not needed).
PICVolDistrib(VolMesh vm, VectVolField E, VectVolField B)
          Constructor with minimal data: a default RichParlist will be defined, no IO data will be defined, use setters to define the ones needed (most of them can remain null, as initialised by this constructor, if not needed).
 
Method Summary
 float assessLargestDt()
          No upper limit for time integration time step for analytical distributions
 void buildMostAccurateScOutFlux()
          Builds the most accurate outgoing flux onto spacecraft.
 boolean containsOnly(Part particleType)
           
 void getMoment(VolField mom, int order, int charge, int mass)
          normalised and deviation flags omitted: they are set to their default value, 0
 PartList getPartList()
           
 void init()
          intialisation routine, invoked by constructors
 void injectAllInFlux(float dt)
          Injects all the incoming fluxes (in allInFlux) into this list with an amount of particles corresponding to the time dt.
 boolean mayContain(Part particleType)
           
 void move(float dt)
          Time integration of the particle distribution over the duration dt.
 
Methods inherited from class spis.Vol.VolDistrib.VolDistribWithIO
buildAllInFlux, getB, getBdOutFlux, getE, getInFlux, getScOutFlux, getSelfInFlux, setB, setBdOutFlux, setE, setInFlux, setScOutFlux, setSelfInFlux
 
Methods inherited from class spis.Vol.VolDistrib.VolDistrib
checkMomentConsistentWithOrder, getMoment, getMoment, getMoment, getMoment, getName, getParticleType, getVm, isDensityImplicit, setImplicitDensity, setName, setParticleType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pl

private PartList pl
particle list for distribution storage


vvt

private VeloVectTable vvt
temporary VeloVectTables (stored as object variables and not local variables to avoid costs due to frequent memory allocations)


vvt2

private VeloVectTable vvt2
temporary VeloVectTables (stored as object variables and not local variables to avoid costs due to frequent memory allocations)


svt

private SpaceVectTable svt
temporary SpaceVectTable (stored as an object variable and not a local variable to avoid costs due to frequent memory allocations)


fst

private FloatScalTable fst
temporary FloatScalTable (stored as an object variable and not a local variable to avoid costs due to frequent memory allocations)


bsd

private PICSurfDistrib bsd
temporary sampled surface fluxes (stored as object variables and not local variables to avoid costs due to frequent memory allocations)


scsd

private PICSurfDistrib scsd
temporary sampled surface fluxes (stored as object variables and not local variables to avoid costs due to frequent memory allocations)

Constructor Detail

PICVolDistrib

public PICVolDistrib(VolMesh vm,
                     PartList partList,
                     MatterBC selfInFlux_,
                     MatterBC inFlux_,
                     SurfDistrib scOutFlux_,
                     SurfDistrib bdOutFlux_,
                     VectVolField E_,
                     VectVolField B_)
Default constructor with IO data

Parameters:
vm - volume mesh
partList - particle list
selfInFlux_ - self-generated incoming flux (e.g. plasma source)
inFlux_ - externally-generated incoming flux (e.g. source on SC)
scOutFlux_ - outgoing flux to SC
bdOutFlux_ - outgoing flux to external boundary
E_ - electric field
B_ - magnetic field

PICVolDistrib

public PICVolDistrib(VolMesh vm,
                     PartList partList,
                     MatterBC selfInFlux_,
                     MatterBC inFlux_,
                     SurfDistrib scOutFlux_,
                     SurfDistrib bdOutFlux_,
                     EField E_,
                     VectVolField B_)
Default constructor with IO data, with the electric field defined as a physical EField (including solver).
It allows to request the local electric field computation from an EField rather than a VolField => better physical interpolation (e.g. taking into account the specificity of wires) instead of the basic linear interpolation done for a VolField (done by the VolMesh object indeed).

Parameters:
vm - volume mesh
partList - particle list
selfInFlux_ - self-generated incoming flux (e.g. plasma source)
inFlux_ - externally-generated incoming flux (e.g. source on SC)
scOutFlux_ - outgoing flux to SC
bdOutFlux_ - outgoing flux to external boundary
E_ - electric field as an EField
B_ - magnetic field

PICVolDistrib

public PICVolDistrib(VolMesh vm,
                     PartList partList,
                     VectVolField E,
                     VectVolField B)
Default constructor without IO data (in/out fluxes, E-B fields): use setters to define the ones needed (most of them can remain null, as initialised by this constructor, if not needed).

Parameters:
vm - volume mesh
partList - particle list
E - pointer to the electric field (for trajectory integration)
B - pointer to magnetic field

PICVolDistrib

public PICVolDistrib(VolMesh vm,
                     VectVolField E,
                     VectVolField B)
Constructor with minimal data: a default RichParlist will be defined, no IO data will be defined, use setters to define the ones needed (most of them can remain null, as initialised by this constructor, if not needed).

Parameters:
vm - volume mesh

PICVolDistrib

public PICVolDistrib(VolMesh vm,
                     float dens,
                     float[] velo,
                     float temp,
                     Part particleType,
                     VectVolField E,
                     VectVolField B)
Quick constructor, initialises particles in volume (generates homogeneous sample) and the incoming flux as SelfInFlux (with its sampler)

Parameters:
vm - volume mesh
dens - particle density
velo - particle velocity
temp - particle temperature
particleType - particle type

PICVolDistrib

public PICVolDistrib(GlobalParameter[] globalParams,
                     LocalParameter[] localParams,
                     java.lang.String option,
                     VolMesh vm,
                     VectVolField E,
                     VectVolField B)
Constructor based on UI-defined parameters NB: not used for now, the UI-defined parameters are currently extracted before the call of the PICVolDistrib constructor

Parameters:
globalParams -
localParams -
option -
vm -
E -
B -
See Also:
VolDistribWithIO for specification of this type of constructor
Method Detail

init

public void init()
intialisation routine, invoked by constructors


move

public void move(float dt)
Time integration of the particle distribution over the duration dt.
Basic leapfog method, exact to second order for electric force integration, only to first order for magnetic force.
Possible improvements:
- improve magnetic force computation to obtain 2nd order accuracy (in dt) for magnetic force also
- subcycling: requires the assessment of a largest admittable local dt, based on local plasma frequency

Specified by:
move in class VolDistrib
See Also:
VolDistribWithIO

injectAllInFlux

public void injectAllInFlux(float dt)
Injects all the incoming fluxes (in allInFlux) into this list with an amount of particles corresponding to the time dt.

Parameters:
dt -

assessLargestDt

public float assessLargestDt()
No upper limit for time integration time step for analytical distributions

Specified by:
assessLargestDt in class VolDistrib
Returns:
the largest acceptable time step dt for time integration: + infinity

getMoment

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

Specified by:
getMoment in class VolDistrib
See Also:
VolDistrib.getMoment(VolField, int, int, int, int, int)

containsOnly

public boolean containsOnly(Part particleType)
Specified by:
containsOnly in class VolDistrib
Parameters:
particleType -
Returns:
true if this VolDistrib only contains this type of particles

mayContain

public boolean mayContain(Part particleType)
Specified by:
mayContain in class VolDistrib
Parameters:
particleType -
Returns:
true if this VolDistrib may contain this type of particles (among others, or not)

buildMostAccurateScOutFlux

public void buildMostAccurateScOutFlux()
Description copied from class: VolDistribWithIO
Builds the most accurate outgoing flux onto spacecraft. It shall e.g. be a PICSurfDistrib for a PICVolDistrib, a LocalMaxwellSurfDistrib for a GlobalMaxwellSurfDistrib...

Specified by:
buildMostAccurateScOutFlux in class VolDistribWithIO

getPartList

public PartList getPartList()