spis.Util.List
Class Sampling

java.lang.Object
  extended byspis.Util.List.Sampling

public class Sampling
extends java.lang.Object

Class Name : Sampling
Project ref : SPIS project
File name : Sampling.java
File type : class
Copyright : ONERA, 2 Av. E. Belin, 31055 Toulouse cedex, France http://www.onecert.fr
Status : under development
Creation : Mar 3, 2004
Modification :

Description : Container of static utilies for sampling
(Maxwellian generators...)

Versions and anomalies correction :

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


Version:
0.1
Author:
JF Roussel

Constructor Summary
Sampling()
           
 
Method Summary
static void generateMaxwellian(float[] velo, float vTh, VeloVectTable veloT, int n)
          generates a Maxwellian velocity sample of size n
static void generateMaxwellian(float vTh, float[] v)
          generates one Maxwellian velocity sample
static void generateTwoMaxwellianSamples(float vTh, float[] x)
          Generates two random velocity samples following a Maxwellian law
static void generateVnMaxwellian(float vTh, float[] v)
          generates one sample following v.normal*Maxwellian law (flux distribution of a Maxwellian through a surface, i.e. a Lambertian).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Sampling

public Sampling()
Method Detail

generateMaxwellian

public static void generateMaxwellian(float[] velo,
                                      float vTh,
                                      VeloVectTable veloT,
                                      int n)
generates a Maxwellian velocity sample of size n

Parameters:
velo - macroscopic velocity (average) of the Maxwellian (input)
vTh - thermal velocity (sqrt(kB*t/m)) (input)
veloT - particle microscopic velocity (output)
n - number of samples to generate (output)

generateMaxwellian

public static void generateMaxwellian(float vTh,
                                      float[] v)
generates one Maxwellian velocity sample

Parameters:
vTh - thermal velocity (sqrt(kB*t/m)) (input)
v - particle microscopic velocity dimension 2 and 3 supported (output)

generateVnMaxwellian

public static void generateVnMaxwellian(float vTh,
                                        float[] v)
generates one sample following v.normal*Maxwellian law (flux distribution of a Maxwellian through a surface, i.e. a Lambertian). The normal to the surface is assumed = {1,0,0}, hence v[0] is the normal velocity (generated positive).

Parameters:
vTh - thermal velocity (sqrt(kB*t/m)) (input)
v - particle microscopic velocity vector of dimension 2 and 3 supported (output)

generateTwoMaxwellianSamples

public static void generateTwoMaxwellianSamples(float vTh,
                                                float[] x)
Generates two random velocity samples following a Maxwellian law

Parameters:
vTh - thermal velocity (sqrt(kB*t/m)) (input)
x - result array (output in x[0] and x[1]