conflux.FPYEngine
Public modules.
Classes
Class to handle all the Fission Nuclide Information. |
|
Class to save all fission product nuclides and their information. |
|
Build a fission reactor model with dictionary of all FPYs from all added `FissionIstp`s. (maybe obsolete) |
Module Contents
- class conflux.FPYEngine.FissionIstp(Z, A, Ei, DB='ENDF', IFPY=False)
Bases:
conflux.Basic.SpectrumClass to handle all the Fission Nuclide Information.
- Z: int
The atomic number of isotope
- A: int
The atomic mass of isotope
- Ei: float
Incident neutron energy
- IFPY: bool = False
Whether to calculate independent fission product yields
- FPYlist: dict
Dictionary of cumulative or independent fission yields {“FPZAI”, FPNuclide}
- _DBtitle
Dictionary of the two fission databases included in CONFLUX (can be downloaded using the file in the aux folder)
- LoadFissionDB(Ei=None, DB='ENDF')
Load fission product yeilds with given incident neutron energy.
- Parameters:
Ei (float) – The incident neutron energy to ignite fission
DB (string, optional) – filename or names of default fission product databases, defaults to ‘ENDF’, alternative default DB is ‘JEFF’
- LoadCovariance(DB='ENDF', percent=True)
Read the prepackaged covariance csv file and calculate covariance matrix of fission product yields. This function should only be called after loading the fission DB for neutrino.
- Parameters:
DB (string, optional) – filename or names of default covariance of fission product, defaults to ‘ENDF’, alternative default DB is ‘JEFF’
percent (bool, optional) – let the function know whether the value in the data is percentage or fractional, defaults to True
- LoadCorrelation(DB='ENDF')
Read the prepackaged correlation csv file and calculate covariance matrix of fission product yields. This function should only be called after loading the fission DB for neutrino.
- Parameters:
DB (string, optional) – filename or names of default correlation of fission product, defaults to ‘ENDF’, alternative default DB is ‘JEFF’
- CalcCovariance()
Calculate the covariance matrix from inputted correlation information. This function is automatically called by
conflux.FPYEngine.FissionIsotope.LoadCovariance().
- CalcBetaSpectra(betaSpectraDB, processMissing=False, time=0, modelunc=True, silent=False)
Calculate the summed beta/neutrino spectrum of this fission isotope.
- Parameters:
betaSpectraDB (
conflux.BetaEngine.BetaEngine) – the input beta engine that already calculated beta spectra from a given beta databaseprocessMissing (bool, optional) – Determine whether to include assummed spectrum calculated for missing branches in the beta database, defaults to False
time (float, optional) – The time stamp (unit: second) of the IFP calculation. If time < 0, or the optional input is ignored, the engine will calculate neutrino spectra with CFP
modelunc (bool, optional) – Determine whether to include beta modeling uncertainty, defaults to True
silent (bool, optional) – whether to disable the tqdm output, defaults to False
- class conflux.FPYEngine.FPNuclide(FPZAI, y, yerr)
Class to save all fission product nuclides and their information.
- Parameters:
FPZAI (int) – The identity of the fission products, contain Z, A, and isomeric state combined as Z*10000+A*10+I
y (float) – The yeild of the fission product
yerr (float) – The uncertainty of yield
- Z
- A
- N
- isomer
- FPZAI
- y
- cov
- corr
- yerr
- Contribute(fraction, d_fraction=0)
Add the fission yield of this nuclide to the total fission yield (called by the obsolete FissionModel class).
- Parameters:
fraction (float) – The fractional contribution of this fission product to the overall reactor model
d_fraction (TYPE, optional) – uncertainty of fraction, defaults to 0
- AddCovariance(newNuclide)
Add covariance relative to another fission product.
- Parameters:
newNuclide (
conflux.FPYEngine.FPNuclide) – another fission product
- class conflux.FPYEngine.FissionModel(W=1.0)
Build a fission reactor model with dictionary of all FPYs from all added `FissionIstp`s. (maybe obsolete)
Attributes
- FPYlist(dictionary)
A dictionary of fission product yields. contains FissionIstps
- W(int)
The weight of this fission model
Methods
- AddContribution(isotope, Ei, fraction, d_fraction=0, IFP=False):
Add all the daughter fission products associated with the given isotope into the FPYlist
- AddIstp(Z, A, fraction, isomer=0, d_frac=0.0):
Add a specific fission product isotope into the FPYlist
- CustomCovariance(DBname, percent = False, rel = False):
Method to load a customized covariance matrix into the model
- GetNuclide(ZAI):
return nuclide ZAI < (ZAI = Atomic number, Atomic mass, Isomer number)
- SaveToFile(filename):
save the Fission Product yields into a CSV file.
- DrawBranches(figname):
Draw the branch fractions of associated with this fission model.
- FPYlist
- W = 1.0
- AddContribution(isotope, fraction, d_frac=0.0)
Add the FPYs of a fission isotope into the the list of FPYs in the model
- Parameters:
isotope (FissionIstp) : The fission isotope whose products you want to add to the model. Ei (float) : The neutron energy that is causing the fissions to occur (0.0, 0.4/0.5, 14) fraction (float) : The fractional contribution that this isotope has on the overall model d_frac (float) : The uncertainty in the contribution IFP (boolean) : determines whether to include the independant fission products in the model
- Returns:
None
- AddIstp(Z, A, fraction, isomer=0, d_frac=0.0)
Adds a specific beta decaying isotope to the list of FPYs
- Parameters:
Z (int) : The isotopes atomic number A (int) : The isotopes atomic weight fraction (float) : the fractional contribution this isotope has on the model isomer (int) : The isomeric number of this isotope d_frac (float) : The uncertainty in the fractional contribution
- Returns:
None
- CustomCovariance(DBname, percent=False, rel=False)
Loads a user defined covariance matrix into the model. The loading of the covariance matrix into the model is very similar to the FissionIstp method LoadCovarianceDB
- Parameters:
DBname (String) : The path to the user defined covariance csv file. has the format “/path/to/file” percent (boolean) : Determines whether the covarainces are relative or absolute rel (boolean) : Determines whether the product of the yields of each pair of isotopes is a value, or 1
- Returns:
None
- GetNuclide(ZAI)
Returns the nuclide information based on its’ ZAI number
- Parameters:
ZAI (int) : The ZAI number of the nuclide
- Returns:
self.FPYlist[ZAI] (FissionNuclide) : The FissionNuclide associated with that ZAI number
- SaveToFile(filename)
A function that saves all FPYs into a CSV file for external use
- Parameters:
filename (String) : The filename of the csv file you want to save
- Returns:
None
- DrawBranches(figname)
Draw a histogram of the branch fractions for the model
- Parameters:
figname (String) : The name of the image that will get generated
- Returns:
None