azoth-engine 0.1.3__cp312-abi3-win_amd64.whl

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 (470) hide show
  1. azoth/__init__.py +146 -0
  2. azoth/_core.pyd +0 -0
  3. azoth/_core.pyi +7247 -0
  4. azoth/_data.py +88 -0
  5. azoth/_dispatch.py +235 -0
  6. azoth/_models_gen.py +394 -0
  7. azoth/_provenance_gen.py +3111 -0
  8. azoth/_registry_gen.py +1692 -0
  9. azoth/_rust_bridge.py +312 -0
  10. azoth/_rust_bridge_gen.py +8263 -0
  11. azoth/batch/__init__.py +36 -0
  12. azoth/batch/_core.py +429 -0
  13. azoth/batch/_result.py +133 -0
  14. azoth/batch/eos.py +2622 -0
  15. azoth/batch/hydraulics.py +485 -0
  16. azoth/batch/thermal.py +299 -0
  17. azoth/characterization/__init__.py +724 -0
  18. azoth/characterization/assembly.py +349 -0
  19. azoth/characterization/reference/__init__.py +47 -0
  20. azoth/characterization/reference/_combiner.py +584 -0
  21. azoth/characterization/reference/_unported.py +59 -0
  22. azoth/characterization/reference/assay_mass_fractions.py +144 -0
  23. azoth/characterization/reference/characterise_plus_fraction.py +143 -0
  24. azoth/characterization/reference/characterize_to_common_slate.py +172 -0
  25. azoth/characterization/reference/characterize_to_reference.py +236 -0
  26. azoth/characterization/reference/combine_reservoir_fluids.py +94 -0
  27. azoth/characterization/reference/delumping.py +246 -0
  28. azoth/characterization/reference/lumping.py +166 -0
  29. azoth/characterization/reference/oil_assay_derivation.py +249 -0
  30. azoth/characterization/reference/pedersen_plus_split.py +418 -0
  31. azoth/characterization/reference/set_heavy_tbp_to_plus.py +157 -0
  32. azoth/characterization/reference/tbp_closure.py +169 -0
  33. azoth/characterization/reference/tbp_cut_boundaries.py +145 -0
  34. azoth/characterization/reference/tbp_cut_properties.py +482 -0
  35. azoth/characterization/reference/tbp_density.py +89 -0
  36. azoth/characterization/reference/tbp_fraction_component.py +195 -0
  37. azoth/characterization/reference/tbp_grouping.py +109 -0
  38. azoth/characterization/reference/transfer_binary_interaction_parameters.py +149 -0
  39. azoth/characterization/reference/whitson_gamma_split.py +293 -0
  40. azoth/core/__init__.py +144 -0
  41. azoth/core/_bounds_gen.py +129 -0
  42. azoth/core/_units_gen.py +178 -0
  43. azoth/core/bridge_support.py +131 -0
  44. azoth/core/errors.py +182 -0
  45. azoth/core/numerics.py +65 -0
  46. azoth/core/provenance.py +136 -0
  47. azoth/core/range.py +275 -0
  48. azoth/core/record_outputs_gen.py +727 -0
  49. azoth/core/result.py +41 -0
  50. azoth/core/result_base.py +360 -0
  51. azoth/core/result_gen.py +9361 -0
  52. azoth/core/serialise.py +167 -0
  53. azoth/core/solver.py +314 -0
  54. azoth/core/units.py +361 -0
  55. azoth/core/warnings.py +75 -0
  56. azoth/eos/__init__.py +5683 -0
  57. azoth/eos/alpha_term.py +403 -0
  58. azoth/eos/components.py +3956 -0
  59. azoth/eos/cubic.py +191 -0
  60. azoth/eos/layers.py +396 -0
  61. azoth/eos/mixture.py +529 -0
  62. azoth/eos/reference/__init__.py +72 -0
  63. azoth/eos/reference/_association.py +1132 -0
  64. azoth/eos/reference/_cpa_phase.py +154 -0
  65. azoth/eos/reference/_electrolyte.py +155 -0
  66. azoth/eos/reference/_entropy_state.py +673 -0
  67. azoth/eos/reference/_eos_cg_data.py +13010 -0
  68. azoth/eos/reference/_flash_newton.py +203 -0
  69. azoth/eos/reference/_flash_property.py +878 -0
  70. azoth/eos/reference/_furst_dielectric.py +199 -0
  71. azoth/eos/reference/_furst_mixing.py +377 -0
  72. azoth/eos/reference/_furst_terms.py +696 -0
  73. azoth/eos/reference/_ge_phase.py +317 -0
  74. azoth/eos/reference/_gerg2008_data.py +7949 -0
  75. azoth/eos/reference/_heat_capacity.py +82 -0
  76. azoth/eos/reference/_henry.py +187 -0
  77. azoth/eos/reference/_hv_ge.py +103 -0
  78. azoth/eos/reference/_hydrate.py +377 -0
  79. azoth/eos/reference/_mixture_state.py +2137 -0
  80. azoth/eos/reference/_phase_boundary.py +273 -0
  81. azoth/eos/reference/_phase_boundary_temperature.py +208 -0
  82. azoth/eos/reference/_pitzer_catalog.py +446 -0
  83. azoth/eos/reference/_pitzer_electrostatic.py +150 -0
  84. azoth/eos/reference/_pitzer_phase.py +770 -0
  85. azoth/eos/reference/_solid_helmholtz.py +216 -0
  86. azoth/eos/reference/ammonia_phase.py +267 -0
  87. azoth/eos/reference/antoine_vapor_pressure.py +172 -0
  88. azoth/eos/reference/aqueous_viscosity.py +216 -0
  89. azoth/eos/reference/argon_solid_phase.py +255 -0
  90. azoth/eos/reference/barite_celestite_solid_solution.py +118 -0
  91. azoth/eos/reference/beggs_brill_segment.py +279 -0
  92. azoth/eos/reference/brine_mixing_scale_evaluator.py +160 -0
  93. azoth/eos/reference/bubble_pressure.py +64 -0
  94. azoth/eos/reference/bubble_temperature.py +66 -0
  95. azoth/eos/reference/bwrs_phase.py +462 -0
  96. azoth/eos/reference/calc_ionic_composition.py +162 -0
  97. azoth/eos/reference/capillary_dew_point.py +120 -0
  98. azoth/eos/reference/cdft_surface_tension.py +420 -0
  99. azoth/eos/reference/chapman_enskog_diffusivity.py +102 -0
  100. azoth/eos/reference/chung_conductivity.py +120 -0
  101. azoth/eos/reference/chung_viscosity.py +131 -0
  102. azoth/eos/reference/closed_loop_deposition_solver.py +212 -0
  103. azoth/eos/reference/co2_brine_phase_equilibrium.py +382 -0
  104. azoth/eos/reference/co2_phase.py +324 -0
  105. azoth/eos/reference/co2_water_diffusivity.py +55 -0
  106. azoth/eos/reference/costald_molar_volume.py +98 -0
  107. azoth/eos/reference/critical_point.py +389 -0
  108. azoth/eos/reference/de_waard_milliams_corrosion.py +180 -0
  109. azoth/eos/reference/desmukh_mather_phase.py +258 -0
  110. azoth/eos/reference/dew_pressure.py +65 -0
  111. azoth/eos/reference/dew_temperature.py +67 -0
  112. azoth/eos/reference/effective_diffusion.py +153 -0
  113. azoth/eos/reference/electrolyte_cpa_statoil_phase.py +105 -0
  114. azoth/eos/reference/electrolyte_scale_calculator.py +302 -0
  115. azoth/eos/reference/emulsion_viscosity.py +151 -0
  116. azoth/eos/reference/eos_cg_phase.py +403 -0
  117. azoth/eos/reference/equilibrium_sound_speed.py +417 -0
  118. azoth/eos/reference/erosion_prediction.py +257 -0
  119. azoth/eos/reference/filippov_conductivity.py +150 -0
  120. azoth/eos/reference/firozabadi_ramley_interface_tension.py +79 -0
  121. azoth/eos/reference/flowline_scale_profile.py +159 -0
  122. azoth/eos/reference/freezing_point.py +330 -0
  123. azoth/eos/reference/friction_theory_conductivity.py +210 -0
  124. azoth/eos/reference/friction_theory_viscosity.py +267 -0
  125. azoth/eos/reference/fuller_schettler_giddings_diffusivity.py +90 -0
  126. azoth/eos/reference/furst_electrolyte_mod2004_phase.py +101 -0
  127. azoth/eos/reference/furst_electrolyte_phase.py +101 -0
  128. azoth/eos/reference/ge_flash.py +263 -0
  129. azoth/eos/reference/ge_nrtl_flash.py +229 -0
  130. azoth/eos/reference/ge_nrtl_phase.py +139 -0
  131. azoth/eos/reference/ge_unifac_phase.py +157 -0
  132. azoth/eos/reference/ge_uniquac_phase.py +155 -0
  133. azoth/eos/reference/ge_van_laar_acid_phase.py +154 -0
  134. azoth/eos/reference/ge_wilson_phase.py +145 -0
  135. azoth/eos/reference/gerg2008_phase.py +358 -0
  136. azoth/eos/reference/gt_surface_tension.py +532 -0
  137. azoth/eos/reference/gt_surface_tension_simple.py +392 -0
  138. azoth/eos/reference/hayduk_minhas_diffusivity.py +80 -0
  139. azoth/eos/reference/heat_of_vaporization.py +71 -0
  140. azoth/eos/reference/helium_phase.py +324 -0
  141. azoth/eos/reference/hybrid_eos_ge_flash.py +673 -0
  142. azoth/eos/reference/hydrate_equilibrium_line.py +84 -0
  143. azoth/eos/reference/hydrate_formation_pressure.py +174 -0
  144. azoth/eos/reference/hydrate_formation_temperature.py +182 -0
  145. azoth/eos/reference/hydrate_fraction.py +217 -0
  146. azoth/eos/reference/hydrate_inhibitor_concentration.py +163 -0
  147. azoth/eos/reference/hydrate_inhibitor_wt.py +246 -0
  148. azoth/eos/reference/hydrate_risk_map.py +179 -0
  149. azoth/eos/reference/hydrogen_phase.py +443 -0
  150. azoth/eos/reference/iapws_henry_law.py +222 -0
  151. azoth/eos/reference/iapws_saturation_pressure.py +79 -0
  152. azoth/eos/reference/ideal_gas_cp.py +109 -0
  153. azoth/eos/reference/interface_properties.py +327 -0
  154. azoth/eos/reference/kent_eisenberg_phase.py +123 -0
  155. azoth/eos/reference/lgt_surface_tension.py +219 -0
  156. azoth/eos/reference/liquid_conductivity_polynom.py +103 -0
  157. azoth/eos/reference/liquid_heat_capacity.py +66 -0
  158. azoth/eos/reference/liquid_viscosity_pure.py +150 -0
  159. azoth/eos/reference/mason_saxena_conductivity.py +131 -0
  160. azoth/eos/reference/matcop5_prumr_alpha.py +83 -0
  161. azoth/eos/reference/matcop_alpha.py +50 -0
  162. azoth/eos/reference/matcop_pr_alpha.py +60 -0
  163. azoth/eos/reference/matcop_prumr_alpha.py +66 -0
  164. azoth/eos/reference/matcop_prumr_new_alpha.py +89 -0
  165. azoth/eos/reference/molar_enthalpy_entropy.py +235 -0
  166. azoth/eos/reference/mollerup_alpha.py +49 -0
  167. azoth/eos/reference/multi_mineral_scale_equilibrium.py +383 -0
  168. azoth/eos/reference/multiflash_stability_test.py +436 -0
  169. azoth/eos/reference/nitric_sulfuric_acid_vapor_pressure.py +102 -0
  170. azoth/eos/reference/nrtl_activity_coefficients.py +114 -0
  171. azoth/eos/reference/parachor_mixture_surface_tension.py +128 -0
  172. azoth/eos/reference/parachor_surface_tension.py +66 -0
  173. azoth/eos/reference/parahydrogen_solid_phase.py +197 -0
  174. azoth/eos/reference/pcsaft_rahmat_phase.py +632 -0
  175. azoth/eos/reference/ph_flash.py +113 -0
  176. azoth/eos/reference/phase_transport.py +278 -0
  177. azoth/eos/reference/pipe_beggs_and_brills.py +266 -0
  178. azoth/eos/reference/pipeline_cooldown.py +198 -0
  179. azoth/eos/reference/pitzer_hydrate_formation_pressure.py +169 -0
  180. azoth/eos/reference/pitzer_hydrate_formation_temperature.py +253 -0
  181. azoth/eos/reference/pitzer_phase.py +467 -0
  182. azoth/eos/reference/pitzer_scale_activity.py +231 -0
  183. azoth/eos/reference/pr78_kappa.py +53 -0
  184. azoth/eos/reference/pr_alpha_ab.py +103 -0
  185. azoth/eos/reference/pr_cpa_phase.py +55 -0
  186. azoth/eos/reference/pr_danesh_alpha.py +50 -0
  187. azoth/eos/reference/pr_delft1998_alpha.py +52 -0
  188. azoth/eos/reference/pr_departure.py +138 -0
  189. azoth/eos/reference/pr_gassem2001_alpha.py +54 -0
  190. azoth/eos/reference/pr_kappa.py +64 -0
  191. azoth/eos/reference/pr_lee_kesler_alpha.py +49 -0
  192. azoth/eos/reference/pr_mass_density.py +56 -0
  193. azoth/eos/reference/pr_molar_volume.py +78 -0
  194. azoth/eos/reference/pr_peneloux_shift.py +70 -0
  195. azoth/eos/reference/pr_z_factor.py +112 -0
  196. azoth/eos/reference/production_chemical_scale_scenario.py +438 -0
  197. azoth/eos/reference/prsv_kappa.py +78 -0
  198. azoth/eos/reference/ps_flash.py +114 -0
  199. azoth/eos/reference/pt_flash.py +325 -0
  200. azoth/eos/reference/pt_phase_envelope.py +559 -0
  201. azoth/eos/reference/pu_flash.py +66 -0
  202. azoth/eos/reference/pure_saturation.py +183 -0
  203. azoth/eos/reference/pv_flash.py +68 -0
  204. azoth/eos/reference/pv_reflux_flash.py +147 -0
  205. azoth/eos/reference/pvf_flash.py +165 -0
  206. azoth/eos/reference/rachford_rice.py +223 -0
  207. azoth/eos/reference/rachford_rice_binary.py +65 -0
  208. azoth/eos/reference/rackett_molar_volume.py +65 -0
  209. azoth/eos/reference/rk_alpha_ab.py +61 -0
  210. azoth/eos/reference/rk_departure.py +106 -0
  211. azoth/eos/reference/saft_vr_mie_phase.py +1141 -0
  212. azoth/eos/reference/salt_precipitation.py +191 -0
  213. azoth/eos/reference/saturate_with_water.py +228 -0
  214. azoth/eos/reference/scale_control_assessor.py +164 -0
  215. azoth/eos/reference/scale_deposition_accumulator.py +185 -0
  216. azoth/eos/reference/scale_inhibitor_performance.py +173 -0
  217. azoth/eos/reference/scale_kinetics.py +128 -0
  218. azoth/eos/reference/scale_mass.py +95 -0
  219. azoth/eos/reference/scale_prediction.py +448 -0
  220. azoth/eos/reference/scale_remediation_advisor.py +162 -0
  221. azoth/eos/reference/scale_saturation_ratio.py +185 -0
  222. azoth/eos/reference/schwartzentruber_alpha.py +54 -0
  223. azoth/eos/reference/siddiqi_lucas_diffusivity.py +77 -0
  224. azoth/eos/reference/solid_fugacity.py +122 -0
  225. azoth/eos/reference/soreide_whitson_alpha.py +93 -0
  226. azoth/eos/reference/soreide_whitson_phase.py +106 -0
  227. azoth/eos/reference/sound_speed.py +141 -0
  228. azoth/eos/reference/srk_alpha_ab.py +63 -0
  229. azoth/eos/reference/srk_cpa_phase.py +47 -0
  230. azoth/eos/reference/srk_departure.py +116 -0
  231. azoth/eos/reference/srk_kappa.py +53 -0
  232. azoth/eos/reference/srk_peneloux_shift.py +69 -0
  233. azoth/eos/reference/srk_z_factor.py +97 -0
  234. azoth/eos/reference/stability_test.py +268 -0
  235. azoth/eos/reference/stream_scale_analyzer.py +143 -0
  236. azoth/eos/reference/surf_cooldown.py +286 -0
  237. azoth/eos/reference/tbp_fraction_properties.py +120 -0
  238. azoth/eos/reference/th_flash.py +66 -0
  239. azoth/eos/reference/thermal_conductivity.py +297 -0
  240. azoth/eos/reference/tp_flash_saft.py +239 -0
  241. azoth/eos/reference/tp_multiflash.py +765 -0
  242. azoth/eos/reference/tp_multiflash_wax.py +180 -0
  243. azoth/eos/reference/tp_solid_flash.py +415 -0
  244. azoth/eos/reference/ts_flash.py +66 -0
  245. azoth/eos/reference/tu_flash.py +66 -0
  246. azoth/eos/reference/tv_flash.py +70 -0
  247. azoth/eos/reference/tv_fraction_flash.py +214 -0
  248. azoth/eos/reference/twu_kappa.py +46 -0
  249. azoth/eos/reference/twucoon_alpha.py +56 -0
  250. azoth/eos/reference/twucoon_param_alpha.py +49 -0
  251. azoth/eos/reference/twucoon_statoil_alpha.py +49 -0
  252. azoth/eos/reference/tyn_calus_diffusivity.py +69 -0
  253. azoth/eos/reference/umr_cpa_phase.py +115 -0
  254. azoth/eos/reference/umrpr_alpha.py +55 -0
  255. azoth/eos/reference/unifac_activity_coefficients.py +162 -0
  256. azoth/eos/reference/unifac_psrk_activity_coefficients.py +170 -0
  257. azoth/eos/reference/unifac_umrpru_activity_coefficients.py +220 -0
  258. azoth/eos/reference/uniquac_activity_coefficients.py +145 -0
  259. azoth/eos/reference/valve_scale_drift.py +113 -0
  260. azoth/eos/reference/van_laar_acid_activity_coefficients.py +197 -0
  261. azoth/eos/reference/vdw1f_mix_binary.py +73 -0
  262. azoth/eos/reference/vh_flash.py +74 -0
  263. azoth/eos/reference/viscosity.py +231 -0
  264. azoth/eos/reference/vs_flash.py +74 -0
  265. azoth/eos/reference/vu_flash.py +74 -0
  266. azoth/eos/reference/vu_flash_single_comp.py +175 -0
  267. azoth/eos/reference/water_compatibility.py +182 -0
  268. azoth/eos/reference/water_dew_point_line.py +92 -0
  269. azoth/eos/reference/water_dew_point_multiphase.py +163 -0
  270. azoth/eos/reference/water_dew_point_temperature.py +140 -0
  271. azoth/eos/reference/water_phase.py +419 -0
  272. azoth/eos/reference/wax_solid_fugacity.py +140 -0
  273. azoth/eos/reference/wilke_chang_diffusivity.py +75 -0
  274. azoth/eos/reference/wilke_viscosity.py +133 -0
  275. azoth/eos/reference/wilson_activity_coefficients.py +180 -0
  276. azoth/hydraulics/__init__.py +414 -0
  277. azoth/hydraulics/packing.py +255 -0
  278. azoth/hydraulics/reference/__init__.py +75 -0
  279. azoth/hydraulics/reference/choked_flow_area.py +104 -0
  280. azoth/hydraulics/reference/control_valve_cv.py +112 -0
  281. azoth/hydraulics/reference/crane_k_factors.py +86 -0
  282. azoth/hydraulics/reference/darcy_weisbach.py +150 -0
  283. azoth/hydraulics/reference/fittings.py +161 -0
  284. azoth/hydraulics/reference/friction_factor_colebrook.py +114 -0
  285. azoth/hydraulics/reference/friction_factor_haaland.py +80 -0
  286. azoth/hydraulics/reference/friction_factor_swamee_jain.py +68 -0
  287. azoth/hydraulics/reference/orifice_flow.py +92 -0
  288. azoth/hydraulics/reference/packing_hydraulics.py +366 -0
  289. azoth/hydraulics/reference/packing_sizing.py +206 -0
  290. azoth/hydraulics/reference/pump_power.py +88 -0
  291. azoth/hydraulics/reference/reynolds_number.py +83 -0
  292. azoth/hydraulics/reference/tray_hydraulics.py +567 -0
  293. azoth/keycard.py +1246 -0
  294. azoth/process/__init__.py +2783 -0
  295. azoth/process/flowsheet.py +392 -0
  296. azoth/process/kernels.py +182 -0
  297. azoth/process/layers.py +2995 -0
  298. azoth/process/reference/__init__.py +73 -0
  299. azoth/process/reference/_column_mesh.py +876 -0
  300. azoth/process/reference/_column_stage.py +461 -0
  301. azoth/process/reference/_phase_outlet.py +68 -0
  302. azoth/process/reference/_unported.py +89 -0
  303. azoth/process/reference/absorption_column.py +514 -0
  304. azoth/process/reference/anti_surge_recycle.py +287 -0
  305. azoth/process/reference/capacity.py +359 -0
  306. azoth/process/reference/component_splitter.py +135 -0
  307. azoth/process/reference/compressor.py +1059 -0
  308. azoth/process/reference/compressor_chart.py +669 -0
  309. azoth/process/reference/cooler.py +340 -0
  310. azoth/process/reference/designer.py +342 -0
  311. azoth/process/reference/distillation_column.py +2688 -0
  312. azoth/process/reference/ejector.py +725 -0
  313. azoth/process/reference/expander.py +405 -0
  314. azoth/process/reference/expander_chart.py +183 -0
  315. azoth/process/reference/filter.py +1254 -0
  316. azoth/process/reference/flare.py +390 -0
  317. azoth/process/reference/gas_scrubber.py +562 -0
  318. azoth/process/reference/gibbs_reactor.py +977 -0
  319. azoth/process/reference/heat_exchanger.py +1591 -0
  320. azoth/process/reference/heater.py +1469 -0
  321. azoth/process/reference/hem_release.py +534 -0
  322. azoth/process/reference/leak_blowdown.py +521 -0
  323. azoth/process/reference/manifold.py +166 -0
  324. azoth/process/reference/map_turbo_expander_compressor.py +276 -0
  325. azoth/process/reference/mechanical.py +408 -0
  326. azoth/process/reference/mixer.py +208 -0
  327. azoth/process/reference/packed_column.py +413 -0
  328. azoth/process/reference/pipe.py +540 -0
  329. azoth/process/reference/plug_flow_reactor.py +688 -0
  330. azoth/process/reference/pump.py +396 -0
  331. azoth/process/reference/pump_chart.py +315 -0
  332. azoth/process/reference/rate_based_packed_column.py +1382 -0
  333. azoth/process/reference/reactor_mechanical.py +312 -0
  334. azoth/process/reference/separator.py +1216 -0
  335. azoth/process/reference/separator_capacity_assessment.py +271 -0
  336. azoth/process/reference/separator_performance.py +1484 -0
  337. azoth/process/reference/shortcut_distillation_column.py +515 -0
  338. azoth/process/reference/splitter.py +576 -0
  339. azoth/process/reference/stirred_tank_reactor.py +333 -0
  340. azoth/process/reference/stripping_column.py +203 -0
  341. azoth/process/reference/surge_curve.py +239 -0
  342. azoth/process/reference/tank.py +128 -0
  343. azoth/process/reference/three_phase_separator.py +667 -0
  344. azoth/process/reference/throttling_valve.py +172 -0
  345. azoth/process/reference/turbo_expander_compressor.py +746 -0
  346. azoth/process/reference/valve_sizing.py +378 -0
  347. azoth/properties/__init__.py +75 -0
  348. azoth/properties/provider.py +185 -0
  349. azoth/py.typed +0 -0
  350. azoth/reactions/__init__.py +408 -0
  351. azoth/reactions/reference/__init__.py +24 -0
  352. azoth/reactions/reference/_diis.py +146 -0
  353. azoth/reactions/reference/_linalg.py +414 -0
  354. azoth/reactions/reference/_lp_seed.py +88 -0
  355. azoth/reactions/reference/_rand_solver.py +568 -0
  356. azoth/reactions/reference/_reactive_flash.py +689 -0
  357. azoth/reactions/reference/_reactive_ph_flash.py +170 -0
  358. azoth/reactions/reference/_reactive_stability.py +263 -0
  359. azoth/reactions/reference/_tables.py +264 -0
  360. azoth/reactions/reference/chemical_equilibrium.py +456 -0
  361. azoth/reactions/reference/equilibrium_constant.py +110 -0
  362. azoth/reactions/reference/kinetic_rate_law.py +158 -0
  363. azoth/reactions/reference/kinetics.py +317 -0
  364. azoth/reactions/reference/reactive_co2_brine_phase_equilibrium.py +324 -0
  365. azoth/reactions/reference/reactive_hybrid_eos_ge_flash.py +597 -0
  366. azoth/reactions/reference/reactive_ph_flash.py +204 -0
  367. azoth/reactions/reference/reactive_phase_equilibrium.py +479 -0
  368. azoth/reactions/reference/reactive_tp_flash.py +319 -0
  369. azoth/reactions/reference/reference_potentials.py +327 -0
  370. azoth/rgen/__init__.py +35 -0
  371. azoth/rgen/__main__.py +161 -0
  372. azoth/rgen/bundle.py +307 -0
  373. azoth/rgen/canonical.py +69 -0
  374. azoth/rgen/cases.py +211 -0
  375. azoth/rgen/compare.py +283 -0
  376. azoth/rgen/inputs.py +135 -0
  377. azoth/rgen/paths.py +55 -0
  378. azoth/rgen/payloads.py +183 -0
  379. azoth/rgen/policy.py +63 -0
  380. azoth/rgen/quality.py +94 -0
  381. azoth/rgen/runner.py +198 -0
  382. azoth/standards/__init__.py +41 -0
  383. azoth/standards/reference/iso6976.py +259 -0
  384. azoth/thermal/__init__.py +692 -0
  385. azoth/thermal/reference/__init__.py +38 -0
  386. azoth/thermal/reference/boiling_heat_transfer.py +426 -0
  387. azoth/thermal/reference/conduction_plane_wall.py +88 -0
  388. azoth/thermal/reference/fouling_model.py +305 -0
  389. azoth/thermal/reference/incremental_zone_analysis.py +461 -0
  390. azoth/thermal/reference/lmtd_correction_factor.py +172 -0
  391. azoth/thermal/reference/shah_condensation.py +198 -0
  392. azoth/thermal/reference/shell_and_tube_design.py +726 -0
  393. azoth/thermal/reference/shell_and_tube_rating.py +785 -0
  394. azoth/thermal/reference/shell_and_tube_vibration.py +277 -0
  395. azoth/thermal/reference/tema_standard.py +248 -0
  396. azoth/thermal/reference/tube_insert_model.py +209 -0
  397. azoth/thermal/reference/tube_materials.py +61 -0
  398. azoth/thermal/reference/two_phase_pressure_drop.py +377 -0
  399. azoth/thermal/reference/zone_rating.py +195 -0
  400. azoth_engine-0.1.3.dist-info/METADATA +247 -0
  401. azoth_engine-0.1.3.dist-info/RECORD +470 -0
  402. azoth_engine-0.1.3.dist-info/WHEEL +4 -0
  403. azoth_engine-0.1.3.dist-info/licenses/LICENSE +661 -0
  404. azoth_engine-0.1.3.dist-info/licenses/LICENSE-CC-BY-4.0 +396 -0
  405. azoth_engine-0.1.3.dist-info/sboms/azoth-python.cyclonedx.json +1787 -0
  406. data/characterization/plus_fraction.csv +196 -0
  407. data/components/COMPSALT.csv +23 -0
  408. data/components/PitzerParameters.csv +31 -0
  409. data/components/PitzerPhreeqc.csv +269 -0
  410. data/components/UNIFACGroupParam.csv +82 -0
  411. data/components/UNIFACInterParam.csv +65 -0
  412. data/components/UNIFACInterParamA_UMR.csv +65 -0
  413. data/components/UNIFACInterParamA_UMRMC.csv +71 -0
  414. data/components/UNIFACInterParamB.csv +65 -0
  415. data/components/UNIFACInterParamB_UMR.csv +65 -0
  416. data/components/UNIFACInterParamB_UMRMC.csv +71 -0
  417. data/components/UNIFACInterParamC.csv +65 -0
  418. data/components/UNIFACInterParamC_UMR.csv +65 -0
  419. data/components/UNIFACInterParamC_UMRMC.csv +71 -0
  420. data/components/UNIFACcomp.csv +113 -0
  421. data/components/UNIFACcompUMRPRU.csv +278 -0
  422. data/components/components.csv +349 -0
  423. data/components/furst_parameters.csv +117 -0
  424. data/components/kij.csv +958 -0
  425. data/components/mbwr32.csv +3 -0
  426. data/fittings/crane_k_factors.csv +41 -0
  427. data/fluids/air.csv +20 -0
  428. data/fluids/water.csv +20 -0
  429. data/heat_exchanger/tube_materials.csv +23 -0
  430. data/packing/packing.csv +29 -0
  431. data/reactions/REACTIONDATA.csv +48 -0
  432. data/reactions/REACTIONDATAKENTEISENBERG.csv +7 -0
  433. data/reactions/REACTIONDATAPITZER.csv +48 -0
  434. data/reactions/elements.csv +174 -0
  435. data/reactions/stoichiometry.csv +152 -0
  436. data/reactors/gibbs_reactor.csv +50 -0
  437. data/reactors/gibbs_reactor_coeffs.csv +16 -0
  438. data/scale/scale_remediation.csv +21 -0
  439. data/standards/iso6976.csv +41 -0
  440. specs/unit_ops/column/absorption_column.toml +91 -0
  441. specs/unit_ops/column/distillation_column.toml +162 -0
  442. specs/unit_ops/column/packed_column.toml +96 -0
  443. specs/unit_ops/column/rate_based_packed_column.toml +67 -0
  444. specs/unit_ops/column/shortcut_distillation_column.toml +55 -0
  445. specs/unit_ops/column/simple_absorber.toml +42 -0
  446. specs/unit_ops/column/stripping_column.toml +91 -0
  447. specs/unit_ops/heat_exchanger/heat_exchanger.toml +60 -0
  448. specs/unit_ops/machine/map_turbo_expander_compressor.toml +67 -0
  449. specs/unit_ops/machine/turbo_expander_compressor.toml +86 -0
  450. specs/unit_ops/mixer/component_splitter.toml +28 -0
  451. specs/unit_ops/mixer/mixer.toml +27 -0
  452. specs/unit_ops/mixer/splitter.toml +56 -0
  453. specs/unit_ops/reactor/gibbs_reactor.toml +42 -0
  454. specs/unit_ops/reactor/plug_flow_reactor.toml +104 -0
  455. specs/unit_ops/reactor/stirred_tank_reactor.toml +53 -0
  456. specs/unit_ops/separator/gas_scrubber.toml +42 -0
  457. specs/unit_ops/separator/separator.toml +42 -0
  458. specs/unit_ops/separator/three_phase_separator.toml +71 -0
  459. specs/unit_ops/two_port/compressor.toml +30 -0
  460. specs/unit_ops/two_port/cooler.toml +31 -0
  461. specs/unit_ops/two_port/ejector.toml +51 -0
  462. specs/unit_ops/two_port/expander.toml +33 -0
  463. specs/unit_ops/two_port/filter.toml +26 -0
  464. specs/unit_ops/two_port/heater.toml +37 -0
  465. specs/unit_ops/two_port/pipe.toml +34 -0
  466. specs/unit_ops/two_port/pump.toml +30 -0
  467. specs/unit_ops/two_port/throttling_valve.toml +26 -0
  468. specs/unit_ops/utility/flare.toml +22 -0
  469. specs/unit_ops/utility/manifold.toml +28 -0
  470. specs/unit_ops/utility/tank.toml +32 -0
azoth/__init__.py ADDED
@@ -0,0 +1,146 @@
1
+ """azoth - open, validated, citable chemical engineering calculations.
2
+
3
+ Every calculation ships with its equation, a source, the range in which it is
4
+ validated, its assumptions, a worked example and tests. The docs are generated
5
+ from the same machine-readable specs the code is generated from, so they cannot
6
+ drift apart.
7
+
8
+ # The idea worth knowing before anything else
9
+
10
+ Two things this library does differently from most engineering code, both of
11
+ which exist to stop a plausible-looking wrong number from being used:
12
+
13
+ **Warnings are not errors.** A value outside the range in which a correlation was
14
+ validated is still a value, and refusing to return it would be less useful than
15
+ returning it with a warning. What the library must never do is return it
16
+ silently. Check ``result.warnings``, or ``result.is_clean`` if you are willing to
17
+ see every caveat at once.
18
+
19
+ **A check that could not run is not a check that passed.** When an optional input
20
+ is missing, the range check that depends on it reports ``RANGE_CHECK_SKIPPED``
21
+ rather than quietly succeeding. "Checked and fine" and "never checked" are
22
+ different states and the API keeps them different.
23
+
24
+ # Start here
25
+
26
+ >>> import azoth
27
+ >>> q = azoth.ureg.Quantity
28
+ >>> r = azoth.hydraulics.reynolds_number(
29
+ ... q(998.0, "kg/m**3"), q(1.5, "m/s"), q(0.1, "m"), q(1.002e-3, "Pa*s")
30
+ ... )
31
+ >>> round(r.re, 1)
32
+ 149401.2
33
+ >>> str(r.regime)
34
+ 'turbulent'
35
+
36
+ # Warnings before you use a result
37
+
38
+ >>> r = azoth.hydraulics.darcy_weisbach(
39
+ ... 0.02, q(100.0, "m"), q(0.1, "m"), q(998.0, "kg/m**3"), q(1.5, "m/s")
40
+ ... )
41
+ >>> str(r.warnings[0].code)
42
+ 'RANGE_CHECK_SKIPPED'
43
+
44
+ # Not for design work yet
45
+
46
+ The fitting coefficients in ``data/fittings/crane_k_factors.csv`` are estimated
47
+ placeholder values, not engineering data. See that file's header; no warning on a
48
+ result announces the placeholder status.
49
+ """
50
+
51
+ from __future__ import annotations
52
+
53
+ import importlib
54
+ from typing import Any
55
+
56
+ from azoth import core
57
+ from azoth._dispatch import Backend, available, describe, extension, select, use_backend
58
+ from azoth.core.errors import (
59
+ AzothError,
60
+ InvalidInputError,
61
+ KeycardError,
62
+ OutOfRangeError,
63
+ PropertyUnavailableError,
64
+ SolverNotConvergedError,
65
+ UnitMismatchError,
66
+ UnknownFittingError,
67
+ UnverifiedCalculationError,
68
+ )
69
+ from azoth.core.result import FlowRegime
70
+ from azoth.core.units import Q, ureg
71
+ from azoth.core.warnings import Warning, WarningCode
72
+
73
+ __version__ = "0.1.3"
74
+
75
+ # Imported last: `azoth.hydraulics` pulls in the dispatch layer, which imports
76
+ # this package's submodules. Keeping it at the bottom means everything it needs
77
+ # is already bound. `process` is not in this list: it is the one namespace with
78
+ # no pure-Python reference, so importing it needs the compiled extension, and
79
+ # `import azoth` must not. It is imported lazily by `__getattr__` below.
80
+ from azoth import batch, characterization, eos, hydraulics, keycard, properties, reactions, thermal
81
+
82
+ __all__ = [
83
+ "AzothError",
84
+ "Backend",
85
+ "FlowRegime",
86
+ "InvalidInputError",
87
+ "KeycardError",
88
+ "OutOfRangeError",
89
+ "PropertyUnavailableError",
90
+ "Q",
91
+ "SolverNotConvergedError",
92
+ "UnitMismatchError",
93
+ "UnknownFittingError",
94
+ "UnverifiedCalculationError",
95
+ "Warning",
96
+ "WarningCode",
97
+ "__version__",
98
+ "available",
99
+ "backends",
100
+ "batch",
101
+ "characterization",
102
+ "core",
103
+ "describe",
104
+ "eos",
105
+ "extension",
106
+ "hydraulics",
107
+ "keycard",
108
+ "process",
109
+ "properties",
110
+ "reactions",
111
+ "select",
112
+ "thermal",
113
+ "ureg",
114
+ "use_backend",
115
+ ]
116
+
117
+
118
+ def __getattr__(name: str) -> Any:
119
+ """Import `azoth.process` on first use: it needs the compiled extension, and
120
+ `import azoth` must not (the docs generator imports azoth from source)."""
121
+ if name == "process":
122
+ module = importlib.import_module("azoth.process")
123
+ globals()[name] = module
124
+ return module
125
+ raise AttributeError(name)
126
+
127
+
128
+ def backends() -> frozenset[Backend]:
129
+ """Which implementations are available in this installation.
130
+
131
+ >>> import azoth
132
+ >>> sorted(azoth.backends())
133
+ ['python']
134
+ """
135
+ return available()
136
+
137
+
138
+ def active_backend() -> Backend:
139
+ """Which implementation calculations will actually use."""
140
+ return select()
141
+
142
+
143
+ def backend_info() -> dict[str, Any]:
144
+ """Diagnostics: what is available, what is selected, and whether the compiled
145
+ extension loaded. Useful in a bug report and in provenance metadata."""
146
+ return describe()
azoth/_core.pyd ADDED
Binary file