MURE
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
SerpentSource Class Reference

Define a Serpent Source. More...

#include <SerpentSource.hxx>

Inheritance diagram for SerpentSource:
MCSource

Public Member Functions

 SerpentSource (double NPS=10000)
 Normal Constructor.
 
 SerpentSource (const SerpentSource &s)
 Copy Constructor.
 
MCSourceClone () override
 Clone method.
 
 ~SerpentSource () override
 destructor
 
void UsePreviousRunSource (string FirstSource="") override
 use a previous kcode source for serpent.
 
void SetSurface (Shape_ptr TheShape) override
 set the Surface number for a surface source.
 
void SetCell (Cell *TheCell)
 
string Print () override
 Print the Serpent source (into Serpent input file).
 
void SaveSourceInFile (string FileToSaveSource)
 
- Public Member Functions inherited from MCSource
 MCSource (double NPS=10000)
 Normal Constructor.
 
 MCSource (const MCSource &s)
 Copy Constructor.
 
virtual MCSourceClone ()=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
 

Protected Attributes

bool fSaveCurrentSource
 Whether MURE must save the source distribution of the current run in a file.
 
string fFileToSaveSource
 Name of the file in which the source of the current run will be saved.
 
int fCellNumber
 
- Protected Attributes inherited from MCSource
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
 

Detailed Description

Define a Serpent Source.

This source has to be added to the global gMURE pointer.

See also
MURE::SetSource
Author
J. Hajnrych
PTO
Version
1.0

Constructor & Destructor Documentation

◆ SerpentSource() [1/2]

SerpentSource::SerpentSource ( double  NPS = 10000)

Normal Constructor.

Parameters
NPS: number of source particles (default=10 000)

◆ SerpentSource() [2/2]

SerpentSource::SerpentSource ( const SerpentSource s)

Copy Constructor.

◆ ~SerpentSource()

SerpentSource::~SerpentSource ( )
overridedefault

destructor

Member Function Documentation

◆ Clone()

MCSource * SerpentSource::Clone ( )
inlineoverridevirtual

Clone method.

< Clone method

Implements MCSource.

◆ Print()

string SerpentSource::Print ( )
overridevirtual

Print the Serpent source (into Serpent input file).

Say whether the source is extern or defined in Sepent file. if set to "true", a external file is used (such as inps, source.mcnp, ...) else a "src" card in used in the serpent file. return false because it is not possible in Serpent

Implements MCSource.

◆ SaveSourceInFile()

void SerpentSource::SaveSourceInFile ( string  FileToSaveSource)

Create a Source file that can be used afterwards with UsePreviousRunSource(). The source is made from the positions of all fissions occured during the active cycles. The path given in argmuent is from where SMURE is run, not from where the serpent input files are.

◆ SetCell()

void SerpentSource::SetCell ( Cell TheCell)
inline

< set the cell number for a volume source.

◆ SetSurface()

void SerpentSource::SetSurface ( Shape_ptr  TheShape)
overridevirtual

set the Surface number for a surface source.

Reimplemented from MCSource.

◆ UsePreviousRunSource()

void SerpentSource::UsePreviousRunSource ( string  FirstSource = "")
overridevirtual

use a previous kcode source for serpent.

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.

Implements MCSource.

Member Data Documentation

◆ fCellNumber

int SerpentSource::fCellNumber
protected

◆ fFileToSaveSource

string SerpentSource::fFileToSaveSource
protected

Name of the file in which the source of the current run will be saved.

◆ fSaveCurrentSource

bool SerpentSource::fSaveCurrentSource
protected

Whether MURE must save the source distribution of the current run in a file.


The documentation for this class was generated from the following files:

MURE Project, documentation generated by Doxygen 1.9.7 - Fri Jan 19 2024