t4_geom_convert.Kernel.Composition package

Submodules

t4_geom_convert.Kernel.Composition.Abundances module

The module containing the Abundances class.

class t4_geom_convert.Kernel.Composition.Abundances.Abundances(isotopes, atom_fracs)

Bases: object

A class that represents a set of isotopes, along with their abundances.

t4_geom_convert.Kernel.Composition.CCompositionMCNP module

class t4_geom_convert.Kernel.Composition.CCompositionMCNP.CCompositionMCNP(l_materialCompositionParameters)

Bases: object

Class which permit to access precisely to the information of the part material of the block DATA

t4_geom_convert.Kernel.Composition.CCompositionT4 module

class t4_geom_convert.Kernel.Composition.CCompositionT4.CCompositionT4(p_typeDensity, p_material, p_valueOfDensity, l_listMaterialComposition, nb_atom)

Bases: object

Class which permits to objectify each element of the T4 file.

t4_geom_convert.Kernel.Composition.CDictCompositionMCNP module

class t4_geom_convert.Kernel.Composition.CDictCompositionMCNP.CDictCompositionMCNP(mcnpParser)

Bases: MutableMapping

Class inheriting of abstract class MutableMapping and listing material composition from MCNP.

t4_geom_convert.Kernel.Composition.CompositionConversionMCNPToT4 module

t4_geom_convert.Kernel.Composition.CompositionConversionMCNPToT4.compositionConversionMCNPToT4(mcnp_parser)

Function that transforms the dictionary of the composition from MCNP into a dictionary of the composition for T4.

t4_geom_convert.Kernel.Composition.CompositionConversionMCNPToT4.str_fabs(number_str)

Remove the leading minus sign (if any) from a string representing a number. It behaves in a very similar way to str(fabs(float(number_str))), except that it preserves the representation of number_str (precision, scientific notation, etc.). The input parameter must represent a valid float.

Parameters:

number_str (str) – a number, as a string

Returns:

the absolute value of the number represented by number_str

Examples:

>>> str_fabs('-1.5')
'1.5'
>>> str_fabs('-1e-30')
'1e-30'
>>> str_fabs('-1.0e24')
'1.0e24'
>>> str_fabs('56.5')
'56.5'
>>> str_fabs('   -44  ')  # spaces are tolerated
'44'

t4_geom_convert.Kernel.Composition.ConstructCompositionT4 module

t4_geom_convert.Kernel.Composition.ConstructCompositionT4.constructCompositionT4(mcnp_parser, dic_cell_mcnp)

Function changing the tuple from compositionConversionMCNPToT4 in instance of the VolumeT4 class.

t4_geom_convert.Kernel.Composition.ConstructCompositionT4.extract_isotopes_fractions(isotopes)

Extract the list of isotopes and the respective fractions from the MCNP parsed composition.

t4_geom_convert.Kernel.Composition.ConstructCompositionT4.rescale_fractions(fractions, concentration)

Rescale the given atomic fractions so that the total concentration equals the given value.

Parameters:
  • fractions (list((str, str))) – list of (isotope, fraction) pairs, as strings

  • concentration (float) – the total concentration

Returns:

a list of (isotope, concentration) pairs, as strings

Return type:

list((str, str))

t4_geom_convert.Kernel.Composition.ConvertIsotope module

t4_geom_convert.Kernel.Composition.ConvertIsotope.convert_isotope(isotope_id)

Function that takes a string and returns a tuple of enum and string.

t4_geom_convert.Kernel.Composition.EIsotopeAtomicNumberMCNP module

class t4_geom_convert.Kernel.Composition.EIsotopeAtomicNumberMCNP.EIsotopeAtomicNumber(value)

Bases: Enum

An enumeration.

1 = 1
10 = 10
100 = 100
101 = 101
102 = 102
103 = 103
104 = 104
105 = 105
106 = 106
107 = 107
108 = 108
109 = 109
11 = 11
110 = 110
111 = 111
112 = 112
113 = 113
114 = 114
115 = 115
116 = 116
117 = 117
118 = 118
12 = 12
13 = 13
14 = 14
15 = 15
16 = 16
17 = 17
18 = 18
19 = 19
2 = 2
20 = 20
21 = 21
22 = 22
23 = 23
24 = 24
25 = 25
26 = 26
27 = 27
28 = 28
29 = 29
3 = 3
30 = 30
31 = 31
32 = 32
33 = 33
34 = 34
35 = 35
36 = 36
37 = 37
38 = 38
39 = 39
4 = 4
40 = 40
41 = 41
42 = 42
43 = 43
44 = 44
45 = 45
46 = 46
47 = 47
48 = 48
49 = 49
5 = 5
50 = 50
51 = 51
52 = 52
53 = 53
54 = 54
55 = 55
56 = 56
57 = 57
58 = 58
59 = 59
6 = 6
60 = 60
61 = 61
62 = 62
63 = 63
64 = 64
65 = 65
66 = 66
67 = 67
68 = 68
69 = 69
7 = 7
70 = 70
71 = 71
72 = 72
73 = 73
74 = 74
75 = 75
76 = 76
77 = 77
78 = 78
79 = 79
8 = 8
80 = 80
81 = 81
82 = 82
83 = 83
84 = 84
85 = 85
86 = 86
87 = 87
88 = 88
89 = 89
9 = 9
90 = 90
91 = 91
92 = 92
93 = 93
94 = 94
95 = 95
96 = 96
97 = 97
98 = 98
99 = 99

t4_geom_convert.Kernel.Composition.EIsotopeNameElementT4 module

class t4_geom_convert.Kernel.Composition.EIsotopeNameElementT4.EIsotopeNameElement(value)

Bases: Enum

An enumeration.

AC = 89
AG = 47
AL = 13
AM = 95
AR = 18
AS = 33
AT = 85
AU = 79
B = 5
BA = 56
BE = 4
BH = 107
BI = 83
BK = 97
BR = 35
C = 6
CA = 20
CD = 48
CE = 58
CF = 98
CL = 17
CM = 96
CN = 112
CO = 27
CR = 24
CS = 55
CU = 29
DB = 105
DS = 110
DY = 66
ER = 68
ES = 99
EU = 63
F = 9
FE = 26
FL = 114
FM = 100
FR = 87
GA = 31
GD = 64
GE = 32
H = 1
HE = 2
HF = 72
HG = 80
HO = 67
HS = 108
I = 53
IN = 49
IR = 77
K = 19
KR = 36
LA = 57
LI = 3
LR = 103
LU = 71
LV = 116
MC = 115
MD = 101
MG = 12
MN = 25
MO = 42
MT = 109
N = 7
NA = 11
NB = 41
ND = 60
NE = 10
NH = 113
NI = 28
NO = 102
NP = 93
O = 8
OG = 118
OS = 76
P = 15
PA = 91
PB = 82
PD = 46
PM = 61
PO = 84
PR = 59
PT = 78
PU = 94
RA = 88
RB = 37
RE = 75
RF = 104
RG = 111
RH = 45
RN = 86
RU = 44
S = 16
SB = 51
SC = 21
SE = 34
SG = 106
SI = 14
SM = 62
SN = 50
SR = 38
TA = 73
TB = 65
TC = 43
TE = 52
TH = 90
TI = 22
TL = 81
TM = 69
TS = 117
U = 92
V = 23
W = 74
XE = 54
Y = 39
YB = 70
ZN = 30
ZR = 40

Module contents