MURE
Loading...
Searching...
No Matches
List of all members
LatticeCell Class Reference

A LatticeCell is used to fill a cell with universes.. More...

#include <LatticeCell.hxx>

Inheritance diagram for LatticeCell:
Cell

Public Member Functions

Constructors
 LatticeCell (Shape_ptr theLatticeGenerator, Material *theMaterial=nullptr, int theImportance=1, double theTemperature=- 1)
 Normal constructor.
 
 LatticeCell (const LatticeCell &c)
 Copy constructor.
 
CellClone () override
 
 ~LatticeCell () override
 destructor
 
Lattice definition methods.
void SetNumberOfLatticeElement (int Nx, int Ny, int Nz=1)
 Definition of the Lattice size (number of elements).
 
int GetNumberOfLatticeElement_X ()
 
int GetNumberOfLatticeElement_Y ()
 
int GetNumberOfLatticeElement_Z ()
 
void SetLatticeRange (int Xmin=0, int Xmax=0, int Ymin=0, int Ymax=0, int Zmin=0, int Zmax=0)
 Definition of the Lattice range (extension).
 
vector< vector< int > > & GetLatticeElementRange ()
 Get the Lattice range vector.
 
int GetMinLatticeRange_X ()
 
int GetMaxLatticeRange_X ()
 
int GetMinLatticeRange_Y ()
 
int GetMaxLatticeRange_Y ()
 
int GetMinLatticeRange_Z ()
 
int GetMaxLatticeRange_Z ()
 
Filling lattice methods
int FillLattice (int Universe, int *Pos=nullptr, int Trans=0)
 Fill a Cell Lattice with Universe.
 
int FillLattice (Shape_ptr theShape, int *Pos=nullptr, int OldUniverse=0, int Trans=0)
 Fill a Cell Lattice with Shape_ptr.
 
int FillLattice (PinCell *Pin, int *Pos=nullptr, int Trans=0)
 Fill a Cell Lattice with a PinCell.
 
- Public Member Functions inherited from Cell
 Cell (Shape_ptr theShape, Material *theMaterial=nullptr, int theImportance=1, double theTemperature=- 10)
 Normal constructor.
 
 Cell (int theNumber, Material *theMaterial, double theVolume, int theImportance=1, double theTemperature=- 10)
 Special Constructor.
 
 Cell (Material *theMaterial, int theNumber, double theVolume, double theTemperature)
 used for OutCore virtual cells
 
 Cell (const Cell &c)
 Copy constructor.
 
virtual CellClone ()
 
virtual ~Cell ()
 destructor
 
void SetShape (Shape_ptr theShape)
 
Shape_ptr GetShape ()
 
void SetMaterial (Material *theMaterial)
 set the Material constituing the Cell
 
MaterialGetMaterial ()
 
void SetTemperature (double T)
 set the temperature (in K) to T
 
double GetTemperature ()
 
void SetImportance (int imp)
 Set all the MC Cell importance (imp card)
 
void SetImportance (int part, int imp)
 
vector< int > & GetImportance ()
 
vector< string > & GetParticle ()
 
void AddParticle (string Part, int Imp)
 add a particle type Part (N, P or E) and its importance
 
int GetNumber ()
 
void SetNumber (int Number)
 
void SetGlobalImportance (int imp)
 
int GetGlobalImportance ()
 
double GetVolume ()
 Get the Volume of a Cell.
 
void SetVolume (double V)
 Set Cell volume.
 
double GetMass ()
 Get Cell mass.
 
void SetComment (string Comment="")
 
string GetComment ()
 
void AddSpatialVariable (string name, double value)
 Add spatial variables to a Cell.
 
vector< string > & GetSpatialVariableNames ()
 
vector< double > & GetSpatialVariables ()
 
bool IsSpatialVariable (string name)
 Returns if spatial variable "name" is defined.
 
double GetSpatialVariable (string name)
 Returns value of spatial variable "name".
 
CellLikeBut (Cell *InsertionCell, Transformation *Transfo)
 Create new cloned cell, identical but with Translate/Rotate.
 
void SetLikeNumber (int Number)
 
int GetLikeNumber ()
 
void SetTransformation (Transformation *TR)
 
TransformationGetTransformation ()
 
void ExcludeCell (Cell *ACell)
 
bool IsLikeBut ()
 
vector< Cell * > & GetExcludedCellVector ()
 
bool IsEvolving ()
 
void SetEvolutiveSystem (EvolutiveSystem *es)
 
EvolutiveSystemGetEvolutiveSystem ()
 
void SetTallyNumber (int num)
 
int GetTallyNumber ()
 
void SetTallyBinNumber (int num)
 
int GetTallyBinNumber ()
 
void SetMultiplicatorTallyNumber (int num)
 
int GetMultiplicatorTallyNumber ()
 
void SetMultiplicatorTallyBinNumber (int num)
 
int GetMultiplicatorTallyBinNumber ()
 
void SetMultiplicatorTallyU8Number (int num)
 
int GetMultiplicatorTallyU8Number ()
 
void SetMultiplicatorTallyU8BinNumber (int num)
 
int GetMultiplicatorTallyU8BinNumber ()
 
void SetFlux (double phi)
 
void SetMCFlux (ValErr_t phi)
 
double GetFlux ()
 
ValErr_t GetMCFlux ()
 
void BuildMultiGroupFlux ()
 Build the group flux for multigroup run.
 
void SetMultiGroupFlux (int i, ValErr_t Flux)
 
ValErr_t GetMultiGroupFlux (int i)
 
vector< ValErr_t > & GetMultiGroupFlux ()
 
int GetNEnergyGroup ()
 
void SetEnergyGroup (vector< float > &nrj)
 
vector< float > & GetEnergyGroups ()
 
void SetTrueCell ()
 
bool GetTrueCell ()
 
void SetGlobalTallyNumber (int num)
 
int GetGlobalTallyNumber ()
 
void SetCellAbsorptions (ValErr_t rate)
 
void SetCellN2N (ValErr_t rate)
 
void SetCellN3N (ValErr_t rate)
 
void SetCellFissions (ValErr_t rate)
 
void SetCellNuFissions (ValErr_t rate)
 
void SetCellNu (ValErr_t rate)
 
void SetControlRate (Reaction r, ValErr_t rate)
 
void SetControlRate (int ReactionCode, ValErr_t rate)
 
ValErr_t GetCellAbsorptions ()
 
ValErr_t GetCellN2N ()
 
ValErr_t GetCellN3N ()
 
ValErr_t GetCellFissions ()
 
ValErr_t GetCellNuFissions ()
 
ValErr_t GetCellNu ()
 
ValErr_t GetControlRate (Reaction r)
 
ValErr_t GetControlRate (int ReactionCode)
 
bool IsFissile ()
 return true when a Cell contains a fissile Nucleus
 
bool IsControlRod ()
 
void SetControlRod (double InitialLength, bool flag=true)
 give the initial length of a Control Rod
 
void SetControlRodLength (double l)
 
double GetControlRodLength ()
 
bool IsFuel ()
 
bool IsModerator ()
 
void SetFuel (bool flag=true)
 
void SetModerator (bool flag=true)
 
void SetZone (int z)
 
int GetZone ()
 
void SetZlevel (int z)
 
int GetZlevel ()
 
void SetGuideTubeCoolant ()
 
bool IsGuideTubeCoolant ()
 
double GetLocalKeff ()
 Calculate the value of Keff unique to this cell from reaction rates and surrounding fluxes.
 
void AddBetaCollector (BetaCollector *BC)
 
bool IsVirtual ()
 
bool IsFromPinCell ()
 
void SetFromPinCell (bool flag)
 
bool IsAPinCell ()
 
bool IsPrintable ()
 
void SetPrintable (bool flag)
 
void SetTHLevelPosition (int level)
 
int GetTHLevelPosition ()
 
void SetTHZonePosition (int zone)
 
int GetTHZonePosition ()
 
void AddToNuNSigmaFisPhi (double Value)
 
void SetNuNSigmaFisPhi (double Value)
 
double GetNuNSigmaFisPhi ()
 
void SetNSigmaFisPhiOfNucleus (int i, double Value)
 
double GetNSigmaFisPhiOfNucleus (int i)
 
vector< double > GetNSigmaFisPhiOfAllNucleus ()
 

Miscellaneous methods

vector< vector< int > > fLatticeRange
 the lattice range if exists
 
vector< vector< vector< int > > > fLattice
 the lattice array containing universe number
 
vector< vector< vector< int > > > fTransLattice
 the lattice array containing transformation number
 
int fNx
 number of element along X
 
int fNy
 number of element along Y
 
int fNz
 number of element along Z
 
bool fIsInit
 Whether or not fLattice has been initialiazed.
 
bool fIsFilled
 Whether or not fLattice has been filled.
 
vector< double > fOrigin
 the lattice origin (i.e. of the ShapeGenerator)
 
vector< double > GetPitch ()
 Returns a pitch vector of the Lattice.
 
vector< double > GetOrigin () const
 
int GetUniverse () override
 
vector< vector< vector< int > > > & GetLattice ()
 
vector< vector< int > > & GetLatticeRange ()
 
vector< vector< vector< int > > > & GetTransLattice ()
 
int GetLattice (int *Pos)
 Returns the content of the Lattice at the given position Pos (i.e. the universe number)
 
bool IsLatticeFullyFilled ()
 verify that all lattice elements have been filled ; print a warning if not.
 
void InitLattice ()
 initialize fLattice &fTransLattice vector
 

Additional Inherited Members

- Protected Member Functions inherited from Cell
 Cell ()
 
- Protected Attributes inherited from Cell
int fNumber
 MC Number of the Cell.
 
Shape_ptr fShape
 Shape of the Cell.
 
MaterialfMaterial
 Material constituing the Cell.
 
double fTemperature
 Temperature (in K) of the Cell.
 
double fFlux
 Flux in the cell.
 
ValErr_t fMCFlux
 Flux in the cell.
 
int fGlobalImportance
 vector of Importance in the Cell for the coresponding particle
 
vector< int > fImportance
 vector of Importance in the Cell for the coresponding particle
 
vector< string > fParticle
 vector of Particle
 
string fComment
 Cell comment (to be written in MC file)
 
double fVolume
 the Cell Volume
 
bool fEvolving
 Whether or not the cell material is evolving.
 
double fMass
 mass of the cell.
 
double fNatoms
 Number of nuclei in the cell.
 
EvolutiveSystemfEvolutiveSystem
 If the cell is evolving, then this is its corresponding evolutive system.
 
int fTallyNum
 Tally Number for flux calculation (evolution)
 
int fTallyBinNum
 Tally Bin Number for flux calculation (evolution)
 
int fGlobalTallyNum
 Tally use for global reaction rates (on boron, control rod, ...) (fms)
 
int fMultiplicatorTallyNum
 Tally Number for flux calculation (evolution)
 
int fMultiplicatorTallyBinNum
 Tally Bin Number for flux calculation (evolution)
 
int fMultiplicatorTallyU8Num
 Tally Number for flux calculation (evolution)
 
int fMultiplicatorTallyU8BinNum
 
vector< double > fSpatialVariables
 Information on the cell's spatial position.
 
vector< string > fSpatialVariableNames
 Names of the spatial variables (e.g assemblyx, crayon#, ringradius)
 
bool fIsTrueCell
 true for True cell (fms)
 
vector< BetaCollector * > fCellBetaCollectors
 vector of gathered beta emitters at different time steps
 
ValErr_t fCellAbsorptions
 absorption rate of the cell
 
ValErr_t fCellN2N
 (n, 2n) rate of the cell
 
ValErr_t fCellN3N
 (n, 2n) rate of the cell
 
ValErr_t fCellNuFissions
 nu*fission rate of the cell
 
ValErr_t fCellFissions
 fission rate of the cell
 
ValErr_t fCellNu
 fission rate of the cell
 
map< Reaction, ValErr_t, EqualReactionfControlRate
 cell reaction rates when evolution is controled by ControlMaterial
 
bool fCellCanFission
 a fissile material as been put in the Cell
 
vector< double > fCellGlobalRatesVector
 contains duplicates
 
int *** fTransLattice
 the lattice array containing transformation number
 
bool fControlRod
 Whether or not the cell is a control rod.
 
double fControlRodLength
 Whether or not the cell is a control rod.
 
bool fIsLikeBut
 Flag to say that new cell is like cell X, but put somewhere else.
 
int fLikeNumber
 The cell that it is copied from.
 
TransformationfTransformation
 The Transformation that applies to this like but cell.
 
vector< Cell * > fExcludedCells
 Vector of all the other LikeBut cells inside this one.
 
bool fFuel
 whether or not this cell has is fuel material.
 
bool fModerator
 whether or not this has moderator material.
 
bool fGuideTubeCoolant
 Attribute to declare a guide tube cell containing the same coolant as neighbour cells.
 
bool fVirtual
 whether it is a true MURE cell or a virtual (user define MC geometry).
 
int fZlevel
 The Z level of this cell, need for thermal coupling.
 
int fZone
 Attribute to declare a group of cells to be in the same zone.
 
int fTHLevelPosition
 explicit spatial level position of a cell (used for thermal-hydraulics)
 
int fTHZonePosition
 explicit spatial zone position (arbitrary) of a cell (used for thermal-hydraulics)
 
double fLocalKeff
 The local Keff of this cell.
 
vector< ValErr_t > fPhiE
 The multigroup flux in case of multigroup run.
 
vector< float > fEnergyGroups
 array of the energy groups
 
int fNEnergyGroup
 Number of groups.
 
double fNuNSigmaFisPhiTotalOfCell
 Nutot*N*sigmafis*Flux of all nucleus in the cell.
 
vector< double > fNSigmaFisPhiOfNucleus
 N*sigmafis*Flux of a nucleus in a cell.
 
bool fIsPrintable
 if the Cell can be printed in the MC input file
 
bool fIsFromPinCell
 if the Cell is a PinCell associated cell
 
bool fIsAPinCell
 if the Cell is not a Cell but a PinCell
 

Detailed Description

A LatticeCell is used to fill a cell with universes..

LatticeCell allow to define lattice, both for MCNP &Serpent. The philosophy of this class follow more the MCNP version. MCNP suuports only parallepipedic and hexagonal lattice whereas Serpent also support circular lattice. This latter one is not yet implement in MURE.

A lattice generator (a shape) is use to build the lattice ; its sizes, position and shape type define the lattice mesh (center, pitch, ...). This generator it put (after setting a universe number) in the filled Shape (a Core, ...).

The lattice is then fill by universes (or a Shape with a uiverse, or PinCell).

TO BE NOTICED: for explicit lattice, Serpent &MCNP required that range of the lattice is large enough to cover the whole filled Shape (a Core, ...).

Author
PTO
J. Hajnrych
Version
1.0
See also
User Guide

Constructor & Destructor Documentation

◆ LatticeCell() [1/2]

LatticeCell::LatticeCell ( Shape_ptr  theLatticeGenerator,
Material theMaterial = nullptr,
int  theImportance = 1,
double  theTemperature = - 1 
)

Normal constructor.

Define a Lattice that will be used to fill an other cell. The theLatticeGenerator must have a universe number before any "put in" operator. Example:

...
Shape_ptr Core(new Tube(H, R));
Shape_ptr theLatticeGenerator(new Brick("infinite", Hx, Hy));
theLatticeGenerator->SetUniverse();
theLatticeGenerator>>Core;
PinCell *pin=new PinCell();
pin->Addlayer(r, Material_Fuel);
pin->SetSurroundingMaterial(Material_Water);
LatticeCell *lattice=new LatticeCell(theLatticeGenerator);
lattice->FillLattice(pin);
Cell *core=new Cell(Core);
...
A Cell is composed from a Shape and a Material.
Definition Cell.hxx:84
Cell()
Definition Cell.cxx:39
A LatticeCell is used to fill a cell with universes..
Definition LatticeCell.hxx:69
int FillLattice(int Universe, int *Pos=nullptr, int Trans=0)
Fill a Cell Lattice with Universe.
Definition LatticeCell.cxx:207
PinCell class allows to create cylindrical cell set included as Matrioshka.
Definition PinCell.hxx:53
void SetSurroundingMaterial(Material *mat, double Volume=- 1)
Definition PinCell.cxx:178

Default: a void Shape_ptr at 293.6K with importance 1. if Material is specified and the cell temperature is not, the cell temperature is taken from the material

Parameters
theLatticeGenerator: the Shape of the Cell (either an Hexagon or a Brick).
theMaterial: the Material constituing the Cell
theImportance: Importance in the Cell: all particles importance are set to theImportance
theTemperature: Temperature (in K) of the Cell

◆ LatticeCell() [2/2]

LatticeCell::LatticeCell ( const LatticeCell c)

Copy constructor.

◆ ~LatticeCell()

LatticeCell::~LatticeCell ( )
overridedefault

destructor

Member Function Documentation

◆ Clone()

Cell * LatticeCell::Clone ( )
inlineoverridevirtual

< clone method.

Reimplemented from Cell.

◆ FillLattice() [1/3]

int LatticeCell::FillLattice ( int  Universe,
int *  Pos = nullptr,
int  Trans = 0 
)

Fill a Cell Lattice with Universe.

Returns Universe;

Parameters
Universe: the universe filling the lattice
Pos: the (i, j, k) index position in the lattice ; if Pos=0, all the Lattice is filled with that Universe.
Trans: a transformation number may be added

◆ FillLattice() [2/3]

int LatticeCell::FillLattice ( PinCell Pin,
int *  Pos = nullptr,
int  Trans = 0 
)

Fill a Cell Lattice with a PinCell.

Returns the filling universe;

Parameters
Pin: Fills the Lattice with the pin cell's universe.
Pos: the (i, j, k) index position in the lattice ; if Pos=0, all the Lattice is filled with theShape's universe.
Trans: a transformation number may be added

◆ FillLattice() [3/3]

int LatticeCell::FillLattice ( Shape_ptr  theShape,
int *  Pos = nullptr,
int  OldUniverse = 0,
int  Trans = 0 
)

Fill a Cell Lattice with Shape_ptr.

Returns the filling universe;

Parameters
theShape: Fills the Lattice with theShape's universe. if theShape'universe is 0, give a new universe to theShape.
Pos: the (i, j, k) index position in the lattice ; if Pos=0, all the Lattice is filled with theShape's universe.
OldUniverse: if OldUniverse>0, gives OldUniverse to theShape;
Trans: a transformation number may be added

◆ GetLattice() [1/2]

vector< vector< vector< int > > > & LatticeCell::GetLattice ( )
inline

< Returns the Lattice Matrix

◆ GetLattice() [2/2]

int LatticeCell::GetLattice ( int *  Pos)

Returns the content of the Lattice at the given position Pos (i.e. the universe number)

◆ GetLatticeElementRange()

vector< vector< int > > & LatticeCell::GetLatticeElementRange ( )
inline

Get the Lattice range vector.

It is an array of 3x2 ; the first dimension refers to coordinate (0=X, ...) and the second to the min [0] and max [1] range.

◆ GetLatticeRange()

vector< vector< int > > & LatticeCell::GetLatticeRange ( )
inline

< Returns the Lattice Range

◆ GetMaxLatticeRange_X()

int LatticeCell::GetMaxLatticeRange_X ( )
inline

< return the x-max range value of the lattice

◆ GetMaxLatticeRange_Y()

int LatticeCell::GetMaxLatticeRange_Y ( )
inline

< return the y-max range value of the lattice

◆ GetMaxLatticeRange_Z()

int LatticeCell::GetMaxLatticeRange_Z ( )
inline

< return the z-max range value of the lattice

◆ GetMinLatticeRange_X()

int LatticeCell::GetMinLatticeRange_X ( )
inline

< return the x-min range value of the lattice

◆ GetMinLatticeRange_Y()

int LatticeCell::GetMinLatticeRange_Y ( )
inline

< return the y-min range value of the lattice

◆ GetMinLatticeRange_Z()

int LatticeCell::GetMinLatticeRange_Z ( )
inline

< return the z-min range value of the lattice

◆ GetNumberOfLatticeElement_X()

int LatticeCell::GetNumberOfLatticeElement_X ( )
inline

< Number of lattice elements in the x direction

◆ GetNumberOfLatticeElement_Y()

int LatticeCell::GetNumberOfLatticeElement_Y ( )
inline

< Number of lattice elements in the y direction

◆ GetNumberOfLatticeElement_Z()

int LatticeCell::GetNumberOfLatticeElement_Z ( )
inline

< Number of lattice elements in the z direction

◆ GetOrigin()

vector< double > LatticeCell::GetOrigin ( ) const
inline

< return the origin of the lattice (i.e. of the ShapeGenerator)

◆ GetPitch()

vector< double > LatticeCell::GetPitch ( )

Returns a pitch vector of the Lattice.

For hexagonal or square lattice, the pitch vector has only 1 dimension. For general parallelepipedic Lattice, GetPitch()[0] is the pitch along X, GetPitch()[1] is the pitch along Y, ...

◆ GetTransLattice()

vector< vector< vector< int > > > & LatticeCell::GetTransLattice ( )
inline

< Returns the Lattice Matrix Transformation

◆ GetUniverse()

int LatticeCell::GetUniverse ( )
inlineoverridevirtual

< returns the MC Universe Number of the Cell

Reimplemented from Cell.

◆ InitLattice()

void LatticeCell::InitLattice ( )
private

initialize fLattice &fTransLattice vector

◆ IsLatticeFullyFilled()

bool LatticeCell::IsLatticeFullyFilled ( )

verify that all lattice elements have been filled ; print a warning if not.

◆ SetLatticeRange()

void LatticeCell::SetLatticeRange ( int  Xmin = 0,
int  Xmax = 0,
int  Ymin = 0,
int  Ymax = 0,
int  Zmin = 0,
int  Zmax = 0 
)

Definition of the Lattice range (extension).

The number of element along the axis X is then fNx=(Xmax-Xmin)+1 ; and so on for other axis.

Parameters
Xmin: minimum extension of X-Lattice
Xmax: maximum extension of X-Lattice
Ymin: minimum extension of Y-Lattice
Ymax: maximum extension of Y-Lattice
Zmin: minimum extension of Z-Lattice
Zmax: maximum extension of Z-Lattice

◆ SetNumberOfLatticeElement()

void LatticeCell::SetNumberOfLatticeElement ( int  Nx,
int  Ny,
int  Nz = 1 
)

Definition of the Lattice size (number of elements).

Calling this method, define a lattice from -Ni/2 to Ni/2 extension along the axis i if Ni is odd and a lattice with extension from -Ni/2 to Ni/2-1 extension along the axis i if Ni is even.

Parameters
Nx: number of element along X
Ny: number of element along Y
Nz: number of element along Z

Member Data Documentation

◆ fIsFilled

bool LatticeCell::fIsFilled
private

Whether or not fLattice has been filled.

◆ fIsInit

bool LatticeCell::fIsInit
private

Whether or not fLattice has been initialiazed.

◆ fLattice

vector< vector < vector < int > > > LatticeCell::fLattice
private

the lattice array containing universe number

◆ fLatticeRange

vector< vector < int > > LatticeCell::fLatticeRange
private

the lattice range if exists

◆ fNx

int LatticeCell::fNx
private

number of element along X

◆ fNy

int LatticeCell::fNy
private

number of element along Y

◆ fNz

int LatticeCell::fNz
private

number of element along Z

◆ fOrigin

vector< double > LatticeCell::fOrigin
private

the lattice origin (i.e. of the ShapeGenerator)

◆ fTransLattice

vector< vector < vector < int > > > LatticeCell::fTransLattice
private

the lattice array containing transformation number


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

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