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

A ControlMaterial. More...

#include <ControlMaterial.hxx>

Inheritance diagram for ControlMaterial:
Material

Public Member Functions

 ControlMaterial ()
 Normal Constructor.
 
 ControlMaterial (int theNumber)
 Special Constructor.
 
 ControlMaterial (const ControlMaterial &m)
 Copy constructor.
 
 ControlMaterial (const Material &m)
 Copy constructor.
 
 ~ControlMaterial () override
 Destructor.
 
MaterialCopy () override
 Correct copy method. Use instead of copy constructor!
 
void AddTheControlNucleus (int Z, int A, double Proportion, ProportionUnitType ProportionUnit=kpMOL)
 Add the nucleus chosen as the control nucleus (tallies are taken for it)
 
MaterialClone (double Temperature=- 1) override
 Clone a ControlMaterial.
 
vector< int > & GetControlIndex ()
 
vector< Reaction > & GetControlReactions ()
 
void AddControlReaction (int code)
 add a reaction code (ENSDF) to be tallied
 
void AddControlReaction (Reaction r)
 
ControlMaterialMix (Material *M2, double part, ProportionUnitType ProportionUnit)
 Mix 2 Materials.
 
vector< Material * > Duplicate (int N, bool TrueClone=true) override
 Duplicate material n times over.
 
void CopyMaterialControl (ControlMaterial *m)
 
- Public Member Functions inherited from Material
 Material ()
 Normal Constructor.
 
 Material (int theNumber)
 Special Constructor.
 
 Material (const Material &m)
 Copy constructor.
 
virtual ~Material ()
 Destructor.
 
virtual MaterialCopy ()
 Copy a Material.
 
virtual MaterialClone (double Temperature=- 1)
 Clone a Material.
 
void AddNucleus (int Z, int A, double Proportion=1., ProportionUnitType ProportionUnit=kpMOL, string ModeratorCategory="")
 Add a new Nucleus to the Material composition in the ground state.
 
void AddNucleus (int Z, int A, int I, double Proportion, ProportionUnitType ProportionUnit=kpMOL, string ModeratorCategory="")
 Add a new Nucleus to the Material composition.
 
void AddNucleus (ZAI *zai, double Proportion=1., ProportionUnitType ProportionUnit=kpMOL, string ModeratorCategory="")
 Add a new Nucleus to the Material composition.
 
void AddNucleus (Nucleus_ptr nucleus, double Proportion=1., ProportionUnitType ProportionUnit=kpMOL)
 Add a new Nucleus to the Material composition.
 
vector< Nucleus_ptr > & GetComposition ()
 
Nucleus_ptr GetComposition (int i)
 
void SetComposition (vector< Nucleus_ptr > f)
 
Nucleus_ptr GetNucleus (int Z, int A, int I=0)
 return the Nucleus Z, A, I
 
double GetProportion (int i, ProportionUnitType ProportionUnit)
 
void SetProportion (int i, double proportion, ProportionUnitType ProportionUnit)
 Set the Proportion of the ith nucleus.
 
void ResetProportion ()
 set all proprtion to 0.
 
MaterialMix (Material *M2, double part, ProportionUnitType ProportionUnit=kpMOL)
 Mix 2 Materials.
 
void Proportion2AtomCM3 ()
 Convert proportion unit (kpMOL or kpMASS) in at/cm3.
 
ProportionUnitType GetProportionUnit ()
 
double SumProportion ()
 return the sum of Proportion of each nucleus
 
int GetZAIIndex (ZAI *zai)
 Get the index of a given zai in the composition vector. Return -1 if not there.
 
int GetZAIIndex (int Z, int A, int I)
 Get the index of a given zai in the composition vector. Return -1 if not there.
 
void UpdateZAI (bool WithReactions=true, bool WithSF=true)
 Update all ZAI of material (With reactions&decays or just decays).
 
void AddToGlobalNucleiVector ()
 add all nuclei of this material to GlobalNucleiVector
 
void AddZAIDaughters (ZAI *zai)
 add the daughters of zai in this with proportion=0
 
void CFAddElement (int Z, double p)
 
void CFAddElement (double h, int Z, double p)
 
void CFAddElement (double h, string Z, double p)
 
void CFAddElement (string Z, double p)
 
void CFAddElementNucleus (int Z, int A, int I, double frac, ProportionUnitType unit)
 
void CFAddElementNucleus (int Z, int A, double frac, ProportionUnitType unit)
 
void CFCalculateMaterial ()
 
void CFSetDensity (double dens, DensityUnitType unit)
 
double GetDensity (DensityUnitType DensityUnit)
 
void SetDensity (double Density, DensityUnitType DensityUnit=kdGCM3)
 Set the density.
 
DensityUnitType GetDensityUnit ()
 
double GetTemperature ()
 
void SetTemperature (double T=293.6)
 Set the temperature in K.
 
bool HasModerator ()
 
void SetModeratorName (string name)
 
string GetModeratorName ()
 
double MeanMolarMass ()
 return the mean molar mass (in gram)
 
bool IsFuel ()
 
bool IsModerator ()
 
bool IsCladding ()
 
bool IsCoolant ()
 
bool IsCoolantGap ()
 
bool IsModeratorBox ()
 
bool IsControlMaterial ()
 
void SetFuel (bool flag=true)
 
void SetModerator (bool flag=true)
 
void SetCladding (bool flag=true)
 
void SetCoolant (bool flag=true)
 
void SetCoolantGap (bool flag=true)
 
void SetModeratorBox (bool flag=true)
 
string PrintAll ()
 Print the Material (and its Nuclei) in MCNP format.
 
string PrintCompositionInfo ()
 
void ForbidPrint ()
 Forbid Material print in MCNP.
 
void EnablePrint ()
 
void SetPseudoMaterial ()
 Define a pesudo material.
 
bool IsPseudoMaterial ()
 
bool IsPrintable ()
 
string PrintDensityUnit (DensityUnitType DensityUnit=kdUNDEFINED)
 Pretty print of density units.
 
string PrintProportionUnit (ProportionUnitType ProportionUnit=kpUNDEFINED)
 Pretty print of proportion units.
 
void DumpMaterial (string filename="material.dat")
 Make a nuclear chart &ascii tree of the material &write them to disk.
 
void DumpCompositionInfo (string name="CompInfo.dat")
 Write the full composition information to a file.
 
void DumpMaterial (string Filename, double Mass, double Volume)
 Dump a material which can be open with MureGui -onlytox.
 
int GetNumber ()
 
void SetNumber (int n)
 
void SetDefaultXSExtension (string name)
 Set a default extension for all nuclei of the material.
 
string GetDefaultXSExtension ()
 
void SetEvolution ()
 Say that this Material will evolve.
 
bool IsEvolving ()
 
bool IsPerturbative ()
 
void SetPerturbative (bool flag=true)
 
void SortCompositionByAmount ()
 Sort the proportions/compositions in proportion order (highest first).
 
void SortCompositionByMass ()
 Sort the proportions/compositions in atomic mass order (highest first).
 
void FindTotalSigmaPerNucleus ()
 Find total cross-section.
 
MaterialGetFatherOfPseudoClone ()
 
void SetTemperatureEvolution (bool flag=true)
 set the Temperature evolution flag
 
bool IsOutCore ()
 
CellSetOutCore (int TheNumber, double TheVolume)
 return a out core cell of volume TheVolume and number TheNumber
 
void SetMaterialName (string name)
 
string GetMaterialName ()
 
void SetIsPerturbativeTallyMaterial (bool f=true)
 
bool IsPerturbativeTallyMaterial ()
 
bool IsZAIInTree (ZAI *zai)
 
bool IsZAIInTree (int Z, int A, int I)
 
ZAIGetZAIInTree (ZAI *zai)
 
ZAIGetZAIInTree (int Z, int A, int I)
 

Private Member Functions

 ControlMaterial (ControlMaterial *m)
 kind of Copy constructor called by clone.
 

Private Attributes

vector< int > fControlIndex
 Indices of the control nuclei in the composition vector.
 
vector< ReactionfControlReactions
 Reactions which are to be tallied.
 

Additional Inherited Members

- Protected Member Functions inherited from Material
 Material (Material *m)
 Private Constructor.
 
- Protected Attributes inherited from Material
int fNumber
 Number of the Material in MCNP file.
 
double fDensity
 Density of the Material.
 
DensityUnitType fDensityUnit
 Density unit (either g/cm3 (default), at/cm3 or at/barn.cm)
 
ProportionUnitType fProportionUnit
 Proportion vector unit (mol (default), at/barn.cm, at/cm3 or g/cm3)
 
double fTemperature
 Temperature (in K) at which the Material is used (to find the right MCNP code)
 
bool fEvolution
 whether or not will this Material will evolve with the time
 
bool fTemperatureEvolution
 whether or not temperature will evolve
 
bool fPerturbative
 whether this Material is a virtual (perturbative) material for MCNP input
 
string fModeratorName
 Name of the moderator to be print in MT card (e.g. grph.06t)
 
string fMaterialName
 Name of the material (uo2, water, ... used when thermal coupling)
 
string fDefaultXSExtension
 Give a default extension to all nucleus.
 
bool fUpdated
 true if ZAI have been updated (UpdateZAI) for evolution only
 
vector< Nucleus_ptrfComposition
 the Composition vector
 
vector< double > fProportion
 the Proportion vector
 
map< int, map< int, map< int, int > > > fIndex
 The index of the ZAI in the material composition.
 
MaterialfFatherOfPseudoClone
 the father to used in cell in case of Pseudo clone
 
bool fFuel
 whether or not this material is considered fuel.
 
bool fModerator
 whether or not this material is considered moderator.
 
bool fModeratorBox
 whether or not this material is considered ModeratorBox.
 
bool fCladding
 whether or not this material is considered cladding.
 
bool fCoolant
 whether or not this material is considered Coolant.
 
bool fCoolantGap
 whether or not this material is considered WaterGap.
 
bool fPrintable
 whether or not material is printable in MCNP input file (default)
 
bool fOutCore
 whether or not material is an Out core evolving material
 
bool fPseudoMaterial
 Is the material a pseudomaterial?
 
bool fControlMaterial
 This is a control material (e.g. for poison)
 
bool fIsPerturbativeTallyMaterial
 
vector< int > CFElements
 
vector< double > CFps
 
vector< double > CFhs
 
vector< vector< ZAI * > > CFIsotopes
 
vector< vector< double > > CFIsotopeProportions
 
vector< double > CFElementMolarMass
 
vector< double > CFElementRho
 
vector< ProportionUnitTypeCFPropElement
 
double fCFMeanMolarMass
 
double CFDensity
 
DensityUnitType CFDensityUnit
 

Detailed Description

A ControlMaterial.

ControlMaterial allows to control Evolution via tallies of a material, e.g. poison control or fissile content control. Appropriate EvolutionControl has to be used or defined, as well as reactions used for tallying.

Author
Frantisek Havluj
PTO
Version
0.1

Constructor & Destructor Documentation

◆ ControlMaterial() [1/5]

ControlMaterial::ControlMaterial ( )

Normal Constructor.

◆ ControlMaterial() [2/5]

ControlMaterial::ControlMaterial ( int  theNumber)

Special Constructor.

Use when the geometry is not a MURE one but a standard MCNP(X) one

Parameters
theNumber: the number of the material used in the user provide MCNP(X) geometry

◆ ControlMaterial() [3/5]

ControlMaterial::ControlMaterial ( const ControlMaterial m)

Copy constructor.

◆ ControlMaterial() [4/5]

ControlMaterial::ControlMaterial ( const Material m)

Copy constructor.

◆ ~ControlMaterial()

ControlMaterial::~ControlMaterial ( )
override

Destructor.

◆ ControlMaterial() [5/5]

ControlMaterial::ControlMaterial ( ControlMaterial m)
private

kind of Copy constructor called by clone.

Member Function Documentation

◆ AddControlReaction() [1/2]

void ControlMaterial::AddControlReaction ( int  code)

add a reaction code (ENSDF) to be tallied

◆ AddControlReaction() [2/2]

void ControlMaterial::AddControlReaction ( Reaction  r)

add a reaction to be tallied

◆ AddTheControlNucleus()

void ControlMaterial::AddTheControlNucleus ( int  Z,
int  A,
double  Proportion,
ProportionUnitType  ProportionUnit = kpMOL 
)

Add the nucleus chosen as the control nucleus (tallies are taken for it)

This method adds the nucleus as a control one. More control nuclei can be defined. Tallies are taken for control nucleus and their amount in the control material is adjusted. accordingly to their reaction rates etc. (e.g. for poison, these are the poison nuclei - B-10 and B-11, because although B-11 is not important as an absorber, it's proportion has to be modified along with B-10 proportion).

◆ Clone()

Material * ControlMaterial::Clone ( double  Temperature = - 1)
overridevirtual

Clone a ControlMaterial.

 This method acts in 2 different ways depending on:

 - (1) The Material is an evolving one and/or the Temperature argument >=0
 - (2) The Material is not evolving and the Temperature argument <0.

In case (1) the clone is a real clone with same nuclei, proportion, ... (except Temperature if it is specified in argument).

In case (2) the clone is just used in cells with the new density (set with Material::SetDensity or in the argument of Clone).

WARNING: on a clone Material the used of Material::SetTemperature() may be miss understanding: If the Material has been clone in the case (1) it is not a problem ; but in case (2), because nuclei are not duplicated, this has no effect.

Parameters
Temperature: if given, the new temperature (in K) of the clone, else the "original" temperature is used (see the warning above).

Reimplemented from Material.

◆ Copy()

Material * ControlMaterial::Copy ( )
overridevirtual

Correct copy method. Use instead of copy constructor!

Reimplemented from Material.

◆ CopyMaterialControl()

void ControlMaterial::CopyMaterialControl ( ControlMaterial m)

◆ Duplicate()

vector< Material * > ControlMaterial::Duplicate ( int  N,
bool  TrueClone = true 
)
overridevirtual

Duplicate material n times over.

Reimplemented from Material.

◆ GetControlIndex()

vector< int > & ControlMaterial::GetControlIndex ( )
inline

< returns the index list of the control nuclei in the composition vector

◆ GetControlReactions()

vector< Reaction > & ControlMaterial::GetControlReactions ( )
inline

< returns the index list of the control nuclei in the composition vector

◆ Mix()

ControlMaterial * ControlMaterial::Mix ( Material M2,
double  part,
ProportionUnitType  ProportionUnit 
)

Mix 2 Materials.

Material M2 is mixed with "this" to produced a new Material M3 with proportion M3=part*M2+(1-part)*this. It is assumed that M2 and this are only used for the mixture ; thus they will not be printed (Material::IsPrintable() is false).

Parameters
M2: the Material to be mixed with this
part: the part of M2 used for mixing (50% => part=0.5)
ProportionUnit: the unit of part used in the mixing (i.e., mol, mass, ...)

Member Data Documentation

◆ fControlIndex

vector< int > ControlMaterial::fControlIndex
private

Indices of the control nuclei in the composition vector.

◆ fControlReactions

vector< Reaction > ControlMaterial::fControlReactions
private

Reactions which are to be tallied.


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

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