MURE
|
#include <MCNPSource.hxx>
Public Member Functions | |
MCNPSource (double NPS=10000) | |
Normal Constructor. | |
MCNPSource (const MCNPSource &s) | |
Copy Constructor. | |
MCSource * | Clone () override |
Clone method. | |
~MCNPSource () override | |
destructor | |
void | UsePreviousRunSource (string FirstSource="") override |
use a previous kcode source for mcnp. | |
void | SetEnergy (string E) |
void | SetEXT (string EXT) |
void | SetEXT (double ext) |
void | SetCEL (int cel) |
void | SetVEC (double i=0, double j=0, double k=0) |
Set the reference vector for DIR. | |
void | SetVEC (string vec) |
set reference vector in a string as "i j k" | |
void | SetAXS (double i=0, double j=0, double k=0) |
Set the reference vector for EXT and RAD. | |
void | SetAXS (string axs) |
void | SetX (string x) |
void | SetY (string y) |
void | SetZ (string z) |
void | AddBias (string bias) |
add a bias to the bias vector | |
void | SetDirection (string dir) |
void | SetRadius (string rad) |
void | SetParticleType (int particle) |
int | GetParticleType () |
void | SetParticleDistribution (string ParticleDistribution) |
void | SetDistribution (string D) |
void | SetKSRC () |
void | SetSSR () |
bool | GetSSR () |
void | AddPosition (double *pos) |
Add a position to the KSRC position vector (in m) | |
void | AddPosition (double x, double y, double z) |
Add a position to the KSRC position vector (in m) | |
void | SetKSRCPosition (int i, double *pos) |
string | Print () override |
Print the MCNP source (into MNCP input file). | |
void | AddTubeSource (MathTube *tube, string TubeParticleEnergy="1e6") |
void | AddTubeSource (MathTube *tube, Spectrum *spectrum) |
void | UseThisEnergyDistribution (Spectrum *spectrum, int SourceDistributionNum=800) |
string | PrintTubeSource () |
Print a Tube Source in MCNP. | |
void | SetSurfaceNumber (int num) |
void | SetEnergy (double E=2.5e6) |
Set the energy for a point source (in eV) | |
![]() | |
MCSource (double NPS=10000) | |
Normal Constructor. | |
MCSource (const MCSource &s) | |
Copy Constructor. | |
virtual MCSource * | Clone ()=0 |
Clone method. | |
virtual | ~MCSource () |
destructor | |
void | SetNPS (double NPS=10000) |
double | GetNPS () |
void | SetEnergy (double E=2.5e6) |
Set the energy for a point source (in eV) | |
void | SetPosition (double *pos=nullptr) |
set the position of a point source (in m) | |
void | SetPosition (double x=0, double y=0, double z=0) |
set the position of a point source (in m) | |
double * | GetPosition () |
virtual void | SetSurface (Shape_ptr TheShape) |
set the Surface number for a surface source. | |
void | SetNormal (double nrm) |
void | SetWeight (double wgt) |
void | SetExtern (bool state=true) |
void | SetKcode (int ActiveCycle=100, int InactiveCycle=10, double ExpectedKeff=1.) |
bool | GetKcode () |
int | GetNActiveCycle () |
int | GetNInactiveCycle () |
virtual string | Print ()=0 |
Print the MC source (into MC transport code input file). | |
virtual void | UsePreviousRunSource (string FirstSource="")=0 |
use a previous kcode source for mcnp. | |
virtual bool | IsUsePrevSource () |
void | SetUsePrevSource (bool flag=true) |
string | GetSourceFileName () |
void | SetSourceFileName (string name) |
void | SetOriginalSourceFileName (string name) |
string | GetOriginalSourceFileName () |
bool | IsStochasticVolumeSource () |
True if this is a Stochastic Volume Source run. | |
void | SetStochasticVolumeSourceShape (Shape_ptr TheShape) |
Set the shape of the outer most sphere for Stochastic Volume run. | |
Shape_ptr | GetStochasticVolumeSourceShape () |
get the source sphere for Stochastic Volume Source run | |
Private Attributes | |
int | fParticleType |
particle type for the source (1=neutron) | |
int | fSurfaceNumber |
particle type for the source (1=neutron) | |
string | fDirection |
direction bias | |
string | fRadius |
direction bias | |
string | fDistribution |
source distribution (use with bias) | |
string | fEXT |
Cell case:distance from POS along AXS Surface Case:cosine of angle from AXS. | |
string | X |
string | Y |
string | Z |
vector< string > | fVEC |
Reference vector for DIR. | |
vector< string > | fAXS |
Reference vector for ext and rad. | |
vector< string > | fBias |
vector of bias | |
int | fCEL |
bool | fKSRC |
whether or not a KSRC source is wanted | |
bool | fSSR |
whether or not a surface source read is wanted | |
string | fParticleDistribution |
if not only one particle | |
vector< double * > | fKSRCposition |
KSRC position vector. | |
vector< MathTube * > | fSourceTube |
vector of Tube for <> sources | |
vector< string > | fTubeParticleEnergy |
vector of "energies" of each source tube (double or distribution) | |
vector< Spectrum * > | fTubeParticleSpectrum |
vector of energy spectrum if the source uses Spectrum | |
vector< double > | fSourceTubeRelIntensities |
vector< Cell * > | fTubeCell |
Additional Inherited Members | |
![]() | |
double | fNPS |
number of source particles | |
string | fEnergy |
Energy of the Source (either a number or a bias) | |
double * | fPosition |
Position of the point Source (if it is the case) | |
Shape_ptr | fSurfaceShape |
Surface Shape for surface source (if it is the case) | |
double | fNormal |
Normal direction (inward or outward) for particle source. | |
double | fWeight |
weight of the source | |
bool | fExtern |
whether the source is extern or defined in MCNP file | |
bool | fKcode |
whether or not a KCODE is wanted | |
int | fActiveCycle |
number of active cycles in KCODE | |
int | fInactiveCycle |
number of inactive cycles in KCODE | |
double | fKeff |
expected Keff in KCODE | |
string | fSourceFile |
Name of the next source if using file source. | |
string | fOriginalSourceFile |
Name of the Original source file. | |
bool | fUsePrevSource |
Whether MURE must use the preivous run source or not. | |
bool | fStochasticVolumeSource |
Shape_ptr | fStochasticVolumeSourceShape |
Define a MCNP Source.
This source has to be added to the global gMURE pointer.
MCNPSource::MCNPSource | ( | double | NPS = 10000 | ) |
Normal Constructor.
NPS | : number of source particles (default=10 000) |
MCNPSource::MCNPSource | ( | const MCNPSource & | s | ) |
Copy Constructor.
|
override |
destructor
void MCNPSource::AddBias | ( | string | bias | ) |
add a bias to the bias vector
void MCNPSource::AddPosition | ( | double * | pos | ) |
Add a position to the KSRC position vector (in m)
void MCNPSource::AddPosition | ( | double | x, |
double | y, | ||
double | z | ||
) |
Add a position to the KSRC position vector (in m)
Add a isotropic volumetric Tube source. It allows to define an uniform volumic source in Tube(s).Usefull to define sources in an assembly. The first use was to calculated gamma bremmstralung from Beta Decay.
You CANNOT use in the same code AddTubeSource(MathTube*, string) and AddTubeSource(MathTube*, Spectrum*).
tube | : the Tube used to define the source shape |
spectrum | : must be either NeutronSpectrum,GammaSpectrum or BetaSpectrum to define the particle and it energy spectrum |
void MCNPSource::AddTubeSource | ( | MathTube * | tube, |
string | TubeParticleEnergy = "1e6" |
||
) |
Add a isotropic volumetric Tube source. It allows to define an uniform volumic source in Tube(s).Usefull to define sources in an assembly. The first use was to calculated gamma bremmstralung from Beta Decay.
You CANNOT use in the same code AddTubeSource(MathTube*, string) and AddTubeSource(MathTube*, Spectrum*).
tube | : the Tube used to define the source shape |
TubeParticleEnergy | : a string containing either a double for mono-energy neutrons, either a source distribution "Dxxx" where xxx is an int. In that case, the user MUST provide via MCNPSource::AddBias() the description of this distribution. |
|
inlineoverridevirtual |
|
inline |
< get the Particletype (1=n,9=H,...)
|
inline |
< Surface Source Reading
|
overridevirtual |
string MCNPSource::PrintTubeSource | ( | ) |
Print a Tube Source in MCNP.
void MCNPSource::SetAXS | ( | double | i = 0 , |
double | j = 0 , |
||
double | k = 0 |
||
) |
Set the reference vector for EXT and RAD.
void MCNPSource::SetAXS | ( | string | axs | ) |
void MCNPSource::SetCEL | ( | int | cel | ) |
|
inline |
< set the direction bias
|
inline |
Set the source distribution. In MCNP, one can define source with distributions ; each distribution is associated with source probability and/or source information. This probabilities and information have to be defined in MCNPSource::AddBias(). For example:
Rem: one can specify also any cards of a SDEF line (such as AXS x y z, ...).
D | : the source distribution. |
void MCSource::SetEnergy | ( | double | E = 2.5e6 | ) |
Set the energy for a point source (in eV)
|
inline |
< Set the source energy (using bias)
void MCNPSource::SetEXT | ( | double | ext | ) |
|
inline |
< See fEXT description
|
inline |
Set KSRC source for MCNP. It allows to suppress SDEF card and specify multipoint source position. See MCNPSource::AddPosition()
|
inline |
< Allow to modify a KSRC point source position
|
inline |
< set the Particle Distibution if more than one particle type
|
inline |
< set the Particletype (1=n,9=H,...)
|
inline |
< set the Radius bias
|
inline |
< Surface Source Reading
|
inline |
< Set the surface number
void MCNPSource::SetVEC | ( | double | i = 0 , |
double | j = 0 , |
||
double | k = 0 |
||
) |
Set the reference vector for DIR.
void MCNPSource::SetVEC | ( | string | vec | ) |
set reference vector in a string as "i j k"
|
inline |
|
inline |
|
inline |
|
overridevirtual |
use a previous kcode source for mcnp.
Tells MCSource to use for the next MC run the fission source obtained from a previous critical run. In an evolution, each MC step is done using the source from the previous MC step (or the input "s" file provide by the user). This can be used to reduce inactive cycle in critical calculation, starting from an already converge fission source.
FirstSource | : name of the first source to use. If not specified, creates a default source. |
Implements MCSource.
void MCNPSource::UseThisEnergyDistribution | ( | Spectrum * | spectrum, |
int | SourceDistributionNum = 800 |
||
) |
Use a spectrum as an energy distribution. It allows to use your spectrum object (BetaSpectrum,GammaSpectrum,or NeutronSpectrum) as a MCNP energy distribution
spectrum | : must be either NeutronSpectrum,GammaSpectrum or BetaSpectrum |
SourceDistributionNum | : the MCNP source distribution number used in D, SI,SP, ... cards |
|
private |
Reference vector for ext and rad.
|
private |
vector of bias
|
private |
|
private |
direction bias
|
private |
source distribution (use with bias)
|
private |
Cell case:distance from POS along AXS Surface Case:cosine of angle from AXS.
|
private |
whether or not a KSRC source is wanted
|
private |
KSRC position vector.
|
private |
if not only one particle
|
private |
particle type for the source (1=neutron)
|
private |
direction bias
|
private |
vector of Tube for <> sources
|
private |
|
private |
whether or not a surface source read is wanted
|
private |
particle type for the source (1=neutron)
|
private |
|
private |
vector of "energies" of each source tube (double or distribution)
|
private |
vector of energy spectrum if the source uses Spectrum
|
private |
Reference vector for DIR.
|
private |
|
private |
|
private |