TDCRPy 2.18.2__tar.gz → 2.18.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. {tdcrpy-2.18.2/TDCRPy.egg-info → tdcrpy-2.18.3}/PKG-INFO +1 -1
  2. {tdcrpy-2.18.2 → tdcrpy-2.18.3/TDCRPy.egg-info}/PKG-INFO +1 -1
  3. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/setup.py +1 -1
  4. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/TDCR_model_lib.py +22 -25
  5. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/LICENCE.md +0 -0
  6. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/MANIFEST.in +0 -0
  7. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/README.md +0 -0
  8. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/TDCRPy.egg-info/SOURCES.txt +0 -0
  9. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/TDCRPy.egg-info/dependency_links.txt +0 -0
  10. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/TDCRPy.egg-info/requires.txt +0 -0
  11. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/TDCRPy.egg-info/top_level.txt +0 -0
  12. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/setup.cfg +0 -0
  13. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/MCNP-MATRIX/Spectra_for_analytical_model/dep_spectrum_C-14.txt +0 -0
  14. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/MCNP-MATRIX/Spectra_for_analytical_model/dep_spectrum_Ca-45.txt +0 -0
  15. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/MCNP-MATRIX/Spectra_for_analytical_model/dep_spectrum_Co-60.txt +0 -0
  16. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/MCNP-MATRIX/Spectra_for_analytical_model/dep_spectrum_H-3.txt +0 -0
  17. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/MCNP-MATRIX/Spectra_for_analytical_model/dep_spectrum_Ni-63.txt +0 -0
  18. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/MCNP-MATRIX/Spectra_for_analytical_model/dep_spectrum_P-32.txt +0 -0
  19. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/MCNP-MATRIX/Spectra_for_analytical_model/dep_spectrum_Pm-147.txt +0 -0
  20. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/MCNP-MATRIX/Spectra_for_analytical_model/dep_spectrum_Pu-241.txt +0 -0
  21. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/MCNP-MATRIX/Spectra_for_analytical_model/dep_spectrum_S-35.txt +0 -0
  22. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/MCNP-MATRIX/Spectra_for_analytical_model/dep_spectrum_Sr-89.txt +0 -0
  23. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/MCNP-MATRIX/Spectra_for_analytical_model/dep_spectrum_Sr-90.txt +0 -0
  24. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/MCNP-MATRIX/Spectra_for_analytical_model/dep_spectrum_Tc-99.txt +0 -0
  25. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/MCNP-MATRIX/Spectra_for_analytical_model/dep_spectrum_Zr-93.txt +0 -0
  26. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/MCNP-MATRIX/matrice/fichier/E_depose.txt +0 -0
  27. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_10ml-beta-_1_200k.txt +0 -0
  28. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_10ml-beta-_2000_10000k.txt +0 -0
  29. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_10ml-beta-_200_2000k.txt +0 -0
  30. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_10ml-photon_1_200k.txt +0 -0
  31. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_10ml-photon_2000_10000k.txt +0 -0
  32. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_10ml-photon_200_2000k.txt +0 -0
  33. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_13ml-beta-_1_200k.txt +0 -0
  34. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_13ml-beta-_2000_10000k.txt +0 -0
  35. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_13ml-beta-_200_2000k.txt +0 -0
  36. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_13ml-photon_1_200k.txt +0 -0
  37. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_13ml-photon_2000_10000k.txt +0 -0
  38. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_13ml-photon_200_2000k.txt +0 -0
  39. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_16ml-beta-_1_200k.txt +0 -0
  40. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_16ml-beta-_2000_10000k.txt +0 -0
  41. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_16ml-beta-_200_2000k.txt +0 -0
  42. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_16ml-photon_1_200k.txt +0 -0
  43. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_16ml-photon_2000_10000k.txt +0 -0
  44. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_16ml-photon_200_2000k.txt +0 -0
  45. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/Micelle/2nmfaq01.csv +0 -0
  46. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/Micelle/faq01.csv +0 -0
  47. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/Quenching/QuenchEnergyAlpha_0.015.txt +0 -0
  48. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/Quenching/QuenchEnergyAlpha_1.1e-05.txt +0 -0
  49. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/Quenching/QuenchEnergyAlpha_1.2e-05.txt +0 -0
  50. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/Quenching/QuenchEnergyAlpha_1.3e-05.txt +0 -0
  51. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/Quenching/QuenchEnergyAlpha_1.4e-05.txt +0 -0
  52. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/Quenching/QuenchEnergyAlpha_1.5e-05.txt +0 -0
  53. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/Quenching/QuenchEnergyAlpha_1e-05.txt +0 -0
  54. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/Quenching/QuenchEnergyAlpha_6e-06.txt +0 -0
  55. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/Quenching/QuenchEnergyAlpha_7e-06.txt +0 -0
  56. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/Quenching/QuenchEnergyAlpha_8e-06.txt +0 -0
  57. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/Quenching/QuenchEnergyAlpha_9e-06.txt +0 -0
  58. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/Quenching/QuenchEnergyElectron_0.006.txt +0 -0
  59. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/Quenching/QuenchEnergyElectron_0.007.txt +0 -0
  60. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/Quenching/QuenchEnergyElectron_0.008.txt +0 -0
  61. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/Quenching/QuenchEnergyElectron_0.009.txt +0 -0
  62. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/Quenching/QuenchEnergyElectron_0.01.txt +0 -0
  63. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/Quenching/QuenchEnergyElectron_0.011.txt +0 -0
  64. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/Quenching/QuenchEnergyElectron_0.012.txt +0 -0
  65. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/Quenching/QuenchEnergyElectron_0.013.txt +0 -0
  66. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/Quenching/QuenchEnergyElectron_0.014.txt +0 -0
  67. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/Quenching/QuenchEnergyElectron_0.015.txt +0 -0
  68. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/Quenching/TandataUG.txt +0 -0
  69. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/Quenching/alpha_toulene.txt +0 -0
  70. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/Quenching/inputVecteurAlpha.txt +0 -0
  71. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/Quenching/inputVecteurElectron.txt +0 -0
  72. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/TDCRPy.py +0 -0
  73. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/TDCRPy1.py +0 -0
  74. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/TDCRoptimize.py +0 -0
  75. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/__init__.py +0 -0
  76. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/config.toml +0 -0
  77. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/configDefault.toml +0 -0
  78. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/decayData/All-nuclides_BetaShape.zip +0 -0
  79. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/decayData/All-nuclides_Ensdf.zip +0 -0
  80. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/decayData/All-nuclides_PenNuc.zip +0 -0
  81. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/decayData/atom-ENDF-VII0.zip +0 -0
  82. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/decayData/photo-ENDF.zip +0 -0
  83. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/docs/_build/html/genindex.html +0 -0
  84. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/docs/_build/html/index.html +0 -0
  85. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/docs/_build/html/search.html +0 -0
  86. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/docs/_build/html/source/modules.html +0 -0
  87. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/docs/_build/html/source/tdcrpy.html +0 -0
  88. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/test/__init__.py +0 -0
  89. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/test/test_tdcrpy.py +0 -0
  90. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/test2.py +0 -0
  91. {tdcrpy-2.18.2 → tdcrpy-2.18.3}/tdcrpy/test_randomGen.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: TDCRPy
3
- Version: 2.18.2
3
+ Version: 2.18.3
4
4
  Summary: TDCR model
5
5
  Home-page: https://pypi.org/project/TDCRPy/
6
6
  Author: RomainCoulon (Romain Coulon)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: TDCRPy
3
- Version: 2.18.2
3
+ Version: 2.18.3
4
4
  Summary: TDCR model
5
5
  Home-page: https://pypi.org/project/TDCRPy/
6
6
  Author: RomainCoulon (Romain Coulon)
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
  import codecs
3
3
  import os
4
4
 
5
- VERSION = "2.18.2"
5
+ VERSION = "2.18.3"
6
6
 
7
7
  DESCRIPTION = "TDCR model"
8
8
 
@@ -182,7 +182,7 @@ COCKTAIL_DATA = {
182
182
  def calculate_aqueous_fractions(solvantType, conc_mol_L):
183
183
  """
184
184
  Calculates the mass fractions (w_i) of the aqueous phase based on
185
- the solvent type (HCl, HNO3, or Water) and concentration.
185
+ the solvent type (HCl, HNO3, NaOH, or Water) and concentration.
186
186
  """
187
187
  # Default to pure water if no type specified
188
188
  if not solvantType or solvantType == "False" or solvantType == "None" or solvantType == "Water":
@@ -197,42 +197,38 @@ def calculate_aqueous_fractions(solvantType, conc_mol_L):
197
197
  MW_O = ATOMIC_WEIGHTS['O']
198
198
  MW_N = ATOMIC_WEIGHTS['N']
199
199
  MW_Cl = ATOMIC_WEIGHTS['Cl']
200
+ MW_Na = ATOMIC_WEIGHTS.get('Na', 22.990) # Fetch Sodium
200
201
 
201
202
  MW_Water = 2*MW_H + MW_O
202
203
 
203
- # Calculate Acid contributions
204
+ # Calculate Solute (Acid/Base) contributions
204
205
  if solvantType == "HCl":
205
- MW_Acid = MW_H + MW_Cl
206
- # Elements in Acid molecule: 1 H, 1 Cl
207
- acid_elements = {'H': 1 * MW_H / MW_Acid, 'Cl': 1 * MW_Cl / MW_Acid}
206
+ MW_Solute = MW_H + MW_Cl
207
+ solute_elements = {'H': 1 * MW_H / MW_Solute, 'Cl': 1 * MW_Cl / MW_Solute}
208
208
 
209
209
  elif solvantType == "HNO3":
210
- MW_Acid = MW_H + MW_N + 3*MW_O
211
- # Elements in Acid molecule: 1 H, 1 N, 3 O
212
- acid_elements = {'H': 1 * MW_H / MW_Acid, 'N': 1 * MW_N / MW_Acid, 'O': 3 * MW_O / MW_Acid}
210
+ MW_Solute = MW_H + MW_N + 3*MW_O
211
+ solute_elements = {'H': 1 * MW_H / MW_Solute, 'N': 1 * MW_N / MW_Solute, 'O': 3 * MW_O / MW_Solute}
212
+
213
+ elif solvantType == "NaOH":
214
+ MW_Solute = MW_Na + MW_O + MW_H
215
+ solute_elements = {'Na': 1 * MW_Na / MW_Solute, 'O': 1 * MW_O / MW_Solute, 'H': 1 * MW_H / MW_Solute}
216
+
213
217
  else:
214
218
  # Fallback to water if unknown string
215
219
  return COCKTAIL_DATA['Water']['w']
216
220
 
217
221
  # Mixing Calculation (Approximate Density ~ 1000 g/L for the solution base)
218
- # Mass of Acid in 1 L = Conc (mol/L) * MW_Acid (g/mol)
219
- mass_acid = conc * MW_Acid
220
-
221
- # Approximation: Assume total mass of 1L solution is roughly 1000g + mass_acid (or simply 1000g total).
222
- # Standard LSC approximation: 1L of dilute acid ~ 1000g total mass.
223
- # Mass of water = Total Mass - Mass Acid.
224
- # We will assume a baseline density of 1.0 kg/L for the conversion unless high conc.
222
+ mass_solute = conc * MW_Solute
225
223
  total_mass_solution = 1000.0
226
224
 
227
- # Safety clamp: if acid mass > total mass (impossible physical conc), return pure acid
228
- if mass_acid >= total_mass_solution:
229
- mass_water = 0
230
- w_acid = 1.0
225
+ # Safety clamp
226
+ if mass_solute >= total_mass_solution:
227
+ w_solute = 1.0
231
228
  else:
232
- mass_water = total_mass_solution - mass_acid
233
- w_acid = mass_acid / total_mass_solution
229
+ w_solute = mass_solute / total_mass_solution
234
230
 
235
- w_water = 1.0 - w_acid
231
+ w_water = 1.0 - w_solute
236
232
 
237
233
  # Combine Elements
238
234
  w_aqueous = {}
@@ -244,12 +240,13 @@ def calculate_aqueous_fractions(solvantType, conc_mol_L):
244
240
  w_aqueous['H'] = w_water * w_H_water
245
241
  w_aqueous['O'] = w_water * w_O_water
246
242
 
247
- # 2. Contribution from Acid
248
- for el, w_el_in_acid in acid_elements.items():
249
- w_aqueous[el] = w_aqueous.get(el, 0.0) + (w_acid * w_el_in_acid)
243
+ # 2. Contribution from Solute
244
+ for el, w_el_in_solute in solute_elements.items():
245
+ w_aqueous[el] = w_aqueous.get(el, 0.0) + (w_solute * w_el_in_solute)
250
246
 
251
247
  # Normalize to ensure sum is exactly 1.0
252
248
  return normalizeDic(w_aqueous)
249
+
253
250
  # print(calculate_aqueous_fractions("HCl", 0.1))
254
251
 
255
252
  def calculate_lsc_mixture_properties(cocktail_name, aqueous_mass_fraction, solvantType, solvantConc):
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes