Define a Monte-Carlo Source.
More...
#include <MCSource.hxx>
Define a Monte-Carlo Source.
Define a (abstract) MC particle source.
This source has to be added to the global gMURE pointer.
- See also
- MURE::SetSource or ConnectorPlugin::SetSource
- Author
- PTO
-
J.Hajnrych
- Version
- 1.0
◆ MCSource() [1/2]
MCSource::MCSource |
( |
double |
NPS = 10000 | ) |
|
Normal Constructor.
- Parameters
-
NPS | : number of source particles (default=10 000) |
◆ MCSource() [2/2]
MCSource::MCSource |
( |
const MCSource & |
s | ) |
|
◆ ~MCSource()
◆ Clone()
◆ GetKcode()
bool MCSource::GetKcode |
( |
| ) |
|
|
inline |
< returns true for KCODE calculation mode.
◆ GetNActiveCycle()
int MCSource::GetNActiveCycle |
( |
| ) |
|
|
inline |
<Returns number of active Kcode cycles
◆ GetNInactiveCycle()
int MCSource::GetNInactiveCycle |
( |
| ) |
|
|
inline |
<Returns number of inactive Kcode cycles
◆ GetNPS()
double MCSource::GetNPS |
( |
| ) |
|
|
inline |
< returns the number of source particles
◆ GetOriginalSourceFileName()
string MCSource::GetOriginalSourceFileName |
( |
| ) |
|
|
inline |
< set the name of the original input source file for kcode run
◆ GetPosition()
double * MCSource::GetPosition |
( |
| ) |
|
|
inline |
< returns the position of a point source
◆ GetSourceFileName()
string MCSource::GetSourceFileName |
( |
| ) |
|
|
inline |
< return the name of the input source file for kcode run
◆ GetStochasticVolumeSourceShape()
Shape_ptr MCSource::GetStochasticVolumeSourceShape |
( |
| ) |
|
|
inline |
get the source sphere for Stochastic Volume Source run
◆ IsStochasticVolumeSource()
bool MCSource::IsStochasticVolumeSource |
( |
| ) |
|
|
inline |
True if this is a Stochastic Volume Source run.
◆ IsUsePrevSource()
virtual bool MCSource::IsUsePrevSource |
( |
| ) |
|
|
inlinevirtual |
< return true if an old "s" file is used as MCNP source
◆ Print()
virtual string MCSource::Print |
( |
| ) |
|
|
pure virtual |
◆ SetEnergy()
void MCSource::SetEnergy |
( |
double |
E = 2.5e6 | ) |
|
Set the energy for a point source (in eV)
◆ SetExtern()
void MCSource::SetExtern |
( |
bool |
state = true | ) |
|
|
inline |
Say whether the source is extern or defined in MC input file. if set to "true", a external file is used (such as inps, source.mcnp, ...) else a SDEF card in used in the MCNP file. This can be used either in standard calculation either in KCODE calculation.
- Parameters
-
state | : if true an external source is used. |
◆ SetKcode()
void MCSource::SetKcode |
( |
int |
ActiveCycle = 100 , |
|
|
int |
InactiveCycle = 10 , |
|
|
double |
ExpectedKeff = 1. |
|
) |
| |
Set a criticallity source mode for MC.
- Parameters
-
ActiveCycle | : Number of active cycles for keff determination. |
InactiveCycle | : Number of inactive cycles that are skipped for source stabilization |
ExpectedKeff | : the expected value of keff. |
◆ SetNormal()
void MCSource::SetNormal |
( |
double |
nrm | ) |
|
|
inline |
< Set the normal direction of source (inward or outward)
◆ SetNPS()
void MCSource::SetNPS |
( |
double |
NPS = 10000 | ) |
|
|
inline |
< set the number of source particles (default=10 000).
◆ SetOriginalSourceFileName()
void MCSource::SetOriginalSourceFileName |
( |
string |
name | ) |
|
|
inline |
< set the name of the original input source file for kcode run
◆ SetPosition() [1/2]
void MCSource::SetPosition |
( |
double * |
pos = nullptr | ) |
|
set the position of a point source (in m)
◆ SetPosition() [2/2]
void MCSource::SetPosition |
( |
double |
x = 0 , |
|
|
double |
y = 0 , |
|
|
double |
z = 0 |
|
) |
| |
set the position of a point source (in m)
◆ SetSourceFileName()
void MCSource::SetSourceFileName |
( |
string |
name | ) |
|
|
inline |
< set the name of the input source file for kcode run
◆ SetStochasticVolumeSourceShape()
void MCSource::SetStochasticVolumeSourceShape |
( |
Shape_ptr |
TheShape | ) |
|
Set the shape of the outer most sphere for Stochastic Volume run.
◆ SetSurface()
void MCSource::SetSurface |
( |
Shape_ptr |
TheShape | ) |
|
|
virtual |
set the Surface number for a surface source.
Reimplemented in SerpentSource.
◆ SetUsePrevSource()
void MCSource::SetUsePrevSource |
( |
bool |
flag = true | ) |
|
|
inline |
< say whether or not to use an old "s" file
◆ SetWeight()
void MCSource::SetWeight |
( |
double |
wgt | ) |
|
|
inline |
< set the Source particle weight
◆ UsePreviousRunSource()
virtual void MCSource::UsePreviousRunSource |
( |
string |
FirstSource = "" | ) |
|
|
pure virtual |
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.
- Parameters
-
FirstSource | : name of the first source to use. If not specified, creates a default source. |
Implemented in MCNPSource, and SerpentSource.
◆ fActiveCycle
int MCSource::fActiveCycle |
|
protected |
number of active cycles in KCODE
◆ fEnergy
Energy of the Source (either a number or a bias)
◆ fExtern
whether the source is extern or defined in MCNP file
◆ fInactiveCycle
int MCSource::fInactiveCycle |
|
protected |
number of inactive cycles in KCODE
◆ fKcode
whether or not a KCODE is wanted
◆ fKeff
◆ fNormal
Normal direction (inward or outward) for particle source.
◆ fNPS
number of source particles
◆ fOriginalSourceFile
string MCSource::fOriginalSourceFile |
|
protected |
Name of the Original source file.
◆ fPosition
double* MCSource::fPosition |
|
protected |
Position of the point Source (if it is the case)
◆ fSourceFile
string MCSource::fSourceFile |
|
protected |
Name of the next source if using file source.
◆ fStochasticVolumeSource
bool MCSource::fStochasticVolumeSource |
|
protected |
◆ fStochasticVolumeSourceShape
Shape_ptr MCSource::fStochasticVolumeSourceShape |
|
protected |
◆ fSurfaceShape
Surface Shape for surface source (if it is the case)
◆ fUsePrevSource
bool MCSource::fUsePrevSource |
|
protected |
Whether MURE must use the preivous run source or not.
◆ fWeight
The documentation for this class was generated from the following files: