A Material constituing a Cell. More...
#include <Material.hxx>
Public Member Functions | |
Material () | |
Normal Constructor. More... | |
Material (int theNumber) | |
Special Constructor. More... | |
Material (const Material &m) | |
Copy constructor. More... | |
virtual | ~Material () |
Destructor. More... | |
virtual Material * | Copy () |
Copy a Material. More... | |
virtual Material * | Clone (double Temperature=-1) |
Clone a Material. More... | |
Nucleus & Proportion methods | |
void | AddNucleus (int Z, int A, double Proportion=1., ProportionUnitType ProportionUnit=kpMOL, string ModeratorCatgory="") |
Add a new Nucleus to the Material composition in the ground state. More... | |
void | AddNucleus (int Z, int A, int I, double Proportion, ProportionUnitType ProportionUnit=kpMOL, string ModeratorCatgory="") |
Add a new Nucleus to the Material composition. More... | |
void | AddNucleus (ZAI *zai, double Proportion=1., ProportionUnitType ProportionUnit=kpMOL, string ModeratorCatgory="") |
Add a new Nucleus to the Material composition. More... | |
void | AddNucleus (Nucleus_ptr nucleus, double Proportion=1., ProportionUnitType ProportionUnit=kpMOL) |
Add a new Nucleus to the Material composition. More... | |
vector< Nucleus_ptr > & | GetComposition () |
return the Composition vector More... | |
Nucleus_ptr | GetComposition (int i) |
return the Composition vector More... | |
void | SetComposition (vector< Nucleus_ptr > f) |
set the composition vector More... | |
Nucleus_ptr | GetNucleus (int Z, int A, int I=0) |
return the Nucleus Z,A,I More... | |
double | GetProportion (int i, ProportionUnitType ProportionUnit) |
void | SetProportion (int i, double proportion, ProportionUnitType ProportionUnit) |
Set the Proportion of the ith nucleus. More... | |
void | ResetProportion () |
set all proprtion to 0. More... | |
Material * | Mix (Material *M2, double part, ProportionUnitType ProportionUnit=kpMOL, Material *M3=0) |
Mix 2 Materials. More... | |
virtual vector< Material * > | Duplicate (int N, bool TrueClone=true) |
Duplicate material n times over. More... | |
void | Proportion2AtomCM3 () |
Convert proportion unit (kpMOL or kpMASS) in at/cm3. More... | |
ProportionUnitType | GetProportionUnit () |
return the proportion units More... | |
double | SumProportion () |
return the sum of Proportion of each nucleus More... | |
int | GetZAIIndex (ZAI *zai) |
Get the index of a given zai in the composition vector. Return -1 if not there. More... | |
int | GetZAIIndex (int Z, int A, int I) |
Get the index of a given zai in the composition vector. Return -1 if not there. More... | |
void | UpdateZAI (bool WithReactions=true, bool WithSF=true) |
Update all ZAI of material (With reactions&decays or just decays). More... | |
void | AddToGlobalNucleiVector () |
add all nuclei of this material to GlobalNucleiVector More... | |
void | AddZAIDaughters (ZAI *zai) |
add the daughters of zai in this with proportion=0 More... | |
Physical attributes methods | |
double | GetDensity (DensityUnitType DensityUnit) |
void | SetDensity (double Density, DensityUnitType DensityUnit=kdGCM3) |
Set the density. More... | |
DensityUnitType | GetDensityUnit () |
return the density units More... | |
double | GetTemperature () |
returns the temperature in K. More... | |
void | SetTemperature (double T=293.6) |
Set the temperature in K. More... | |
bool | HasModerator () |
Whether or not will this Material contains a Moderator. More... | |
double | MeanMolarMass () |
return the mean molar mass (in gram) More... | |
bool | IsFuel () |
return true if material has been declared as a Fuel More... | |
bool | IsModerator () |
return true if material has been declared as a moderator More... | |
bool | IsCladding () |
return true if material has been declared as a cladding More... | |
bool | IsCoolant () |
return true if material has been declared as a coolant More... | |
bool | IsWaterGap () |
return true if material has been declared as a water gap More... | |
bool | IsModeratorBox () |
return true if material has been declared as a moderator box More... | |
void | SetFuel (bool flag=true) |
declares material as a Fuel More... | |
void | SetModerator (bool flag=true) |
declares material as a moderator More... | |
void | SetCladding (bool flag=true) |
declares material as a cladding More... | |
void | SetCoolant (bool flag=true) |
declares material as a Coolant More... | |
void | SetWaterGap (bool flag=true) |
declares material as a WaterGap More... | |
void | SetModeratorBox (bool flag=true) |
declares material as a ModeratorBox More... | |
Printing methods | |
string | Print () |
Print the Material (and its Nuclei) in MCNP format. More... | |
string | PrintAll () |
string | PrintModerator () |
Print the MT card for moderator (e.g. grph.06t). More... | |
string | PrintCompositionInfo () |
void | ForbidPrint () |
Forbid Material print in MCNP. More... | |
void | EnablePrint () |
allow a Material print in MCNP. More... | |
void | SetPseudoMaterial () |
Define it as a pesudo material. More... | |
bool | IsPseudoMaterial () |
Is pesudo material. More... | |
bool | IsPrintable () |
wether or not the Material is printable More... | |
string | PrintDensityUnit (DensityUnitType DensityUnit=kdUNDEFINED) |
Pretty print of density units. More... | |
string | PrintProportionUnit (ProportionUnitType ProportionUnit=kpUNDEFINED) |
Pretty print of proportion units. More... | |
void | DumpMaterial (string filename="material.dat") |
Make a nuclear chart & ascii tree of the material & write them to disk. More... | |
void | DumpCompositionInfo (string name="CompInfo.dat") |
Write the full composition information to a file. More... | |
void | DumpMaterial (string Filename, double Mass, double Volume) |
Dump a material which can be open with MureGui -onlytox. More... | |
Miscellaneous methods | |
int | GetNumber () |
Returns the MCNP Material number. More... | |
void | SetNumber (int n) |
sets the MCNP Material number More... | |
void | SetDefaultXSExtension (string name) |
Set a default extension for all nuclei of the material. More... | |
string | GetDefaultXSExtension () |
return default extension for all nuclei of the material. More... | |
void | SetEvolution () |
Say that this Material will evolve. More... | |
bool | IsEvolving () |
Whether or not will this Material will evolve with the time. More... | |
bool | IsPerturbative () |
Whether the material is a virtual (perturbative) material. More... | |
void | SetPerturbative (bool flag=true) |
Whether the material is a virtual (perturbative) material. More... | |
void | SortCompositionByAmount () |
Sort the proportions/compositions in proportion order (highest first). More... | |
void | SortCompositionByMass () |
Sort the proportions/compositions in atomic mass order (highest first). More... | |
void | FindTotalSigmaPerNucleus () |
Find total cross-section. More... | |
Material * | GetFatherOfPseudoClone () |
returns the father ("original") of a pseudo clone More... | |
void | SetTemperatureEvolution (bool flag=true) |
set the Temperature evolution flag More... | |
bool | IsOutCore () |
wether or not the Material is evolving out of the core More... | |
Cell * | SetOutCore (int TheNumber, double TheVolume) |
return a out core cell of volume TheVolume and number TheNumber More... | |
void | SetMaterialName (string name) |
declares the name of the material (used when thermal coupling) More... | |
string | GetMaterialName () |
returns the name of material More... | |
void | ResetTree () |
Delete the fTree static attribute. More... | |
Protected Member Functions | |
Material (Material *m) | |
Private Constructor. More... | |
Protected Attributes | |
int | fNumber |
Number of the Material in MCNP file. More... | |
double | fDensity |
Density of the Material. More... | |
DensityUnitType | fDensityUnit |
Density unit (either g/cm3 (default), at/cm3 or at/barn.cm) More... | |
double | fTemperature |
Temperature (in K) at which the Material is used (to find the right MCNP code) More... | |
bool | fEvolution |
whether or not will this Material will evolve with the time More... | |
bool | fPerturbative |
whether this Material is a virtual (perturbative) material for MCNP input More... | |
string | fModeratorName |
Name of the moderator to be print in MT card (e.g. grph.06t) More... | |
string | fMaterialName |
Name of the material (uo2, water, ... used when thermal coupling) More... | |
string | fDefaultXSExtension |
Give a default extension to all nucleus. More... | |
bool | fUpdated |
true if ZAI have been updated (UpdateZAI) for evolution only More... | |
vector< Nucleus_ptr > | fComposition |
the Composition vector More... | |
vector< double > | fProportion |
the Proportion vector More... | |
ProportionUnitType | fProportionUnit |
Proportion vector unit (mol (default), at/barn.cm, at/cm3 or g/cm3) More... | |
map< int,map< int,map< int, int > > > | fIndex |
The index of the ZAI in the material composition. More... | |
Material * | fFatherOfPseudoClone |
the father to used in cell in case of Pseudo clone More... | |
bool | fTemperatureEvolution |
whether or not temperature will evolve More... | |
bool | fFuel |
whether or not this material is considered fuel. More... | |
bool | fModerator |
whether or not this material is considered moderator. More... | |
bool | fCladding |
whether or not this material is considered cladding. More... | |
bool | fCoolant |
whether or not this material is considered Coolant. More... | |
bool | fWaterGap |
whether or not this material is considered WaterGap. More... | |
bool | fModeratorBox |
whether or not this material is considered ModeratorBox. More... | |
bool | fPrintable |
whether or not material is printable in MCNP input file (default) More... | |
bool | fOutCore |
whether or not material is an Out core evolving material More... | |
bool | fPseudoMaterial |
Is the material a pseudomaterial? More... | |
Static Protected Attributes | |
static NucleiTree * | fTree =0 |
The whole chart of Nucleide. More... | |
A Material constituing a Cell.
Each time a Material is created it is declared to MURE class (via gMURE) except if a Material is created from a Clone of a non evolving one.
Default Proportion units are mol. Default Density unit is g/cm3. Legal unit values are:
Proportions are printed in mol in MCNP file and density in g/cm3. In the evolution, proportion units are at/cm3 and the density evolve according to the composition evolution (sum of proportion in at/cm3).
Default temperature is 293.6K.
Note: if density is not provided, it is calculated automatically if proportions are in atoms/barn.cm or atoms/cm3.
Material::Material | ( | ) |
Normal Constructor.
Default: theDensity=0, T=293.6K and Evolution=0.
Material::Material | ( | int | theNumber | ) |
Special Constructor.
Use when the geometry is not a MURE one but a standard MCNP(X) one Default: theDensity=0, T=293.6K and Evolution=0.
theNumber | : the number of the material used in the user provide MCNP(X) geometry |
Material::Material | ( | const Material & | m | ) |
Copy constructor.
|
virtual |
Destructor.
|
protected |
Private Constructor.
It is used by Material::Clone to copy non vector attributs
m | : the Material to be cloned |
void Material::AddNucleus | ( | int | Z, |
int | A, | ||
double | Proportion = 1. , |
||
ProportionUnitType | ProportionUnit = kpMOL , |
||
string | ModeratorCatgory = "" |
||
) |
Add a new Nucleus to the Material composition in the ground state.
If ModeratorCatgory is a non empty string, S(alpha,Beta) thermal treatment will be take into account in MCNP. This category is used in automatic moderator name assignement. H2O is for H in light water, D2O is for D in heavy water, H/Zr for H in ZrH, poly for polyethylene, BeO is for Be in Be oxyde, Be is for Be in Be metal and so on. If moderator name is given with Material::SetModeratorName(), the content of ModeratorCatgory is unused.
Z | : number of protons of nucleus |
A | : number of nucleons (A=0 means natural isotopes) |
Proportion | : proportion of Nucleus (to be used in a Composition) |
ProportionUnit | : unit of proportion of Nucleus (possible values are kpMOL, kpMASS, kpATCM3, kpATBCM) |
ModeratorCatgory | : The catergory of the moderator ("H2O", "D2O", "H/Zr", "poly","benz", "BeO", "Be", "Gr" or "Zr/H") |
void Material::AddNucleus | ( | int | Z, |
int | A, | ||
int | I, | ||
double | Proportion, | ||
ProportionUnitType | ProportionUnit = kpMOL , |
||
string | ModeratorCatgory = "" |
||
) |
Add a new Nucleus to the Material composition.
If ModeratorCatgory is a non empty string, S(alpha,Beta) thermal treatment will be take into account in MCNP. This category is used in automatic moderator name assignement. H2O is for H in light water, D2O is for D in heavy water, H/Zr for H in ZrH, poly for polyethylene, BeO is for Be in Be oxyde, Be is for Be in Be metal and so on. If moderator name is given with Material::SetModeratorName(), the content of ModeratorCatgory is unused.
Z | : number of protons of nucleus |
A | : number of nucleons (A=0 means natural isotopes) |
I | : Isomeric state (Ground State, ith excited) |
Proportion | : proportion of Nucleus (to be used in a Composition) |
ProportionUnit | : unit of proportion of Nucleus (possible values are kpMOL, kpMASS, kpATCM3, kpATBCM) |
ModeratorCatgory | : The catergory of the moderator ("H2O", "D2O", "H/Zr", "poly","benz", "BeO", "Be", "Gr" or "Zr/H") |
void Material::AddNucleus | ( | ZAI * | zai, |
double | Proportion = 1. , |
||
ProportionUnitType | ProportionUnit = kpMOL , |
||
string | ModeratorCatgory = "" |
||
) |
Add a new Nucleus to the Material composition.
If ModeratorCatgory is a non empty string, S(alpha,Beta) thermal treatment will be take into account in MCNP. This category is used in automatic moderator name assignement. H2O is for H in light water, D2O is for D in heavy water, H/Zr for H in ZrH, poly for polyethylene, BeO is for Be in Be oxyde, Be is for Be in Be metal and so on. If moderator name is given with Material::SetModeratorName(), the content of ModeratorCatgory is unused.
zai | : the zai of the nucleus |
Proportion | : proportion of Nucleus (to be used in a Composition) |
ProportionUnit | : unit of proportion of Nucleus (possible values are kpMOL, kpMASS, kpATCM3, kpATBCM) |
ModeratorCatgory | : The catergory of the moderator ("H2O", "D2O", "H/Zr", "poly","benz", "BeO", "Be", "Gr" or "Zr/H") |
void Material::AddNucleus | ( | Nucleus_ptr | nucleus, |
double | Proportion = 1. , |
||
ProportionUnitType | ProportionUnit = kpMOL |
||
) |
void Material::AddToGlobalNucleiVector | ( | ) |
add all nuclei of this material to GlobalNucleiVector
void Material::AddZAIDaughters | ( | ZAI * | zai | ) |
add the daughters of zai in this with proportion=0
|
virtual |
Clone a Material.
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.
Temperature | : if given, the new temperature (in K) of the clone, else the "original" temperature is used (see the warning above). |
Reimplemented in ControlMaterial.
|
virtual |
Copy a Material.
Because of inheritance, you must use this method instead of copy constructors.
Reimplemented in ControlMaterial.
void Material::DumpCompositionInfo | ( | string | name = "CompInfo.dat" | ) |
Write the full composition information to a file.
void Material::DumpMaterial | ( | string | filename = "material.dat" | ) |
Make a nuclear chart & ascii tree of the material & write them to disk.
void Material::DumpMaterial | ( | string | Filename, |
double | Mass, | ||
double | Volume | ||
) |
Dump a material which can be open with MureGui -onlytox.
|
virtual |
Duplicate material n times over.
|
inline |
allow a Material print in MCNP.
void Material::FindTotalSigmaPerNucleus | ( | ) |
Find total cross-section.
|
inline |
Forbid Material print in MCNP.
This allows on to used material only for input/output fuel without printing t in MCNP file.
|
inline |
return the Composition vector
|
inline |
return the Composition vector
|
inline |
return default extension for all nuclei of the material.
double Material::GetDensity | ( | DensityUnitType | DensityUnit | ) |
Returns the density of this Material in DensityUnit
|
inline |
return the density units
|
inline |
returns the father ("original") of a pseudo clone
|
inline |
returns the name of material
Nucleus_ptr Material::GetNucleus | ( | int | Z, |
int | A, | ||
int | I = 0 |
||
) |
return the Nucleus Z,A,I
|
inline |
Returns the MCNP Material number.
double Material::GetProportion | ( | int | i, |
ProportionUnitType | ProportionUnit | ||
) |
return the ith Proportion
|
inline |
return the proportion units
|
inline |
returns the temperature in K.
int Material::GetZAIIndex | ( | ZAI * | zai | ) |
Get the index of a given zai in the composition vector. Return -1 if not there.
int Material::GetZAIIndex | ( | int | Z, |
int | A, | ||
int | I | ||
) |
Get the index of a given zai in the composition vector. Return -1 if not there.
|
inline |
Whether or not will this Material contains a Moderator.
|
inline |
return true if material has been declared as a cladding
|
inline |
return true if material has been declared as a coolant
|
inline |
Whether or not will this Material will evolve with the time.
|
inline |
return true if material has been declared as a Fuel
|
inline |
return true if material has been declared as a moderator
|
inline |
return true if material has been declared as a moderator box
|
inline |
wether or not the Material is evolving out of the core
|
inline |
Whether the material is a virtual (perturbative) material.
|
inline |
wether or not the Material is printable
|
inline |
Is pesudo material.
|
inline |
return true if material has been declared as a water gap
double Material::MeanMolarMass | ( | ) |
return the mean molar mass (in gram)
Material * Material::Mix | ( | Material * | M2, |
double | part, | ||
ProportionUnitType | ProportionUnit = kpMOL , |
||
Material * | M3 = 0 |
||
) |
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).
string Material::Print | ( | ) |
Print the Material (and its Nuclei) in MCNP format.
A nucleus of a Materail is printed only if it is present in cross section databases and if it is significant: this means that N*Sigma_tot*Phi>epsilon...which has to be defined
string Material::PrintAll | ( | ) |
Print all nucleus (even if their proportion is null)
string Material::PrintCompositionInfo | ( | ) |
Print out material composition
string Material::PrintDensityUnit | ( | DensityUnitType | DensityUnit = kdUNDEFINED | ) |
Pretty print of density units.
DensityUnit | : unit of density (possible values are kdGCM3, kdATCM3 and kdATBCM) |
string Material::PrintModerator | ( | ) |
Print the MT card for moderator (e.g. grph.06t).
Note that the Material::SetModeratorName has to be called before.
string Material::PrintProportionUnit | ( | ProportionUnitType | ProportionUnit = kpUNDEFINED | ) |
Pretty print of proportion units.
ProportionUnit | : unit of proportion of Nucleus (possible values are kpMOL, kpMASS, kpATCM3, kpATBCM) |
void Material::Proportion2AtomCM3 | ( | ) |
Convert proportion unit (kpMOL or kpMASS) in at/cm3.
void Material::ResetProportion | ( | ) |
set all proprtion to 0.
|
inline |
Delete the fTree static attribute.
|
inline |
declares material as a cladding
|
inline |
set the composition vector
|
inline |
declares material as a Coolant
void Material::SetDefaultXSExtension | ( | string | name | ) |
Set a default extension for all nuclei of the material.
This is usefull if you don't have BaseSummary.dat file to find automatically the MCNP extension. See example Material_test.cxx
name | : extension name (e.g. ".60c") |
void Material::SetDensity | ( | double | Density, |
DensityUnitType | DensityUnit = kdGCM3 |
||
) |
Set the density.
Density | : the density in the specified units |
DensityUnit | : either kdGCM3 (g/cm3) (default), kdATCM3(at/cm3) or kdATBCM(at/barn.cm) |
void Material::SetEvolution | ( | ) |
Say that this Material will evolve.
|
inline |
declares material as a Fuel
|
inline |
declares the name of the material (used when thermal coupling)
|
inline |
declares material as a moderator
|
inline |
declares material as a ModeratorBox
|
inline |
sets the MCNP Material number
Cell * Material::SetOutCore | ( | int | TheNumber, |
double | TheVolume | ||
) |
return a out core cell of volume TheVolume and number TheNumber
|
inline |
Whether the material is a virtual (perturbative) material.
void Material::SetProportion | ( | int | i, |
double | proportion, | ||
ProportionUnitType | ProportionUnit | ||
) |
Set the Proportion of the ith nucleus.
Give units to proportion (% mol, % mass, at/barn.cm, at/cm3 or atoms). If any nuclides are already present in the material, Proportion vector is recalculated.
i | : index of the nucleus in the composition |
proportion | : the proportion of the nucleus |
ProportionUnit | : unit of proportion of Nucleus (possible values are kpMOL, kpMASS, kpATCM3, kpATBCM)Sets the ith proportion. |
void Material::SetPseudoMaterial | ( | ) |
Define it as a pesudo material.
void Material::SetTemperature | ( | double | T = 293.6 | ) |
Set the temperature in K.
void Material::SetTemperatureEvolution | ( | bool | flag = true | ) |
set the Temperature evolution flag
|
inline |
declares material as a WaterGap
void Material::SortCompositionByAmount | ( | ) |
Sort the proportions/compositions in proportion order (highest first).
void Material::SortCompositionByMass | ( | ) |
Sort the proportions/compositions in atomic mass order (highest first).
double Material::SumProportion | ( | ) |
return the sum of Proportion of each nucleus
void Material::UpdateZAI | ( | bool | WithReactions = true , |
bool | WithSF = true |
||
) |
Update all ZAI of material (With reactions&decays or just decays).
|
protected |
whether or not this material is considered cladding.
|
protected |
the Composition vector
|
protected |
whether or not this material is considered Coolant.
|
protected |
Give a default extension to all nucleus.
|
protected |
Density of the Material.
|
protected |
Density unit (either g/cm3 (default), at/cm3 or at/barn.cm)
|
protected |
whether or not will this Material will evolve with the time
|
protected |
the father to used in cell in case of Pseudo clone
|
protected |
whether or not this material is considered fuel.
|
protected |
The index of the ZAI in the material composition.
|
protected |
Name of the material (uo2, water, ... used when thermal coupling)
|
protected |
whether or not this material is considered moderator.
|
protected |
whether or not this material is considered ModeratorBox.
|
protected |
Name of the moderator to be print in MT card (e.g. grph.06t)
|
protected |
Number of the Material in MCNP file.
|
protected |
whether or not material is an Out core evolving material
|
protected |
whether this Material is a virtual (perturbative) material for MCNP input
|
protected |
whether or not material is printable in MCNP input file (default)
|
protected |
the Proportion vector
|
protected |
Proportion vector unit (mol (default), at/barn.cm, at/cm3 or g/cm3)
|
protected |
Is the material a pseudomaterial?
|
protected |
Temperature (in K) at which the Material is used (to find the right MCNP code)
|
protected |
whether or not temperature will evolve
|
staticprotected |
The whole chart of Nucleide.
|
protected |
true if ZAI have been updated (UpdateZAI) for evolution only
|
protected |
whether or not this material is considered WaterGap.