From e985f0b2142b5b418f0308cb1a7d5fd96cb54838 Mon Sep 17 00:00:00 2001 From: RemDelaporteMathurin Date: Wed, 9 Oct 2024 16:15:57 -0400 Subject: [PATCH] black formatted --- h_transport_materials/property.py | 12 ++------ .../property_database/FeCrAl/__init__.py | 1 - .../property_database/FeCrAl/apmt/apmt.py | 6 ++-- .../FeCrAl/fe22cr5al/__init__.py | 1 - .../FeCrAl/fe22cr5al/fe22cr5al.py | 6 ++-- .../FeCrAl/oxidized_1605/__init__.py | 1 - .../FeCrAl/oxidized_1605/oxidized_1605.py | 6 ++-- .../property_database/FeCrAl/t35y/__init__.py | 1 - .../property_database/FeCrAl/t35y/t35y.py | 6 ++-- .../property_database/FeCrAl/t54y/__init__.py | 1 - .../property_database/FeCrAl/t54y/t54y.py | 6 ++-- .../FeCrAl/thermacore/__init__.py | 1 - .../FeCrAl/thermacore/thermacore.py | 6 ++-- .../FeCrAl/thermacore_oxidized/__init__.py | 1 - .../thermacore_oxidized.py | 6 ++-- .../eurofer_97/eurofer_97.py | 18 ++---------- .../property_database/flinak/flinak.py | 4 +-- .../property_database/molybdenum.py | 2 +- .../property_database/palladium_copper.py | 29 ++++++++++--------- .../property_database/ss_304/__init__.py | 1 - .../property_database/tzm.py | 2 +- 21 files changed, 46 insertions(+), 71 deletions(-) diff --git a/h_transport_materials/property.py b/h_transport_materials/property.py index 64fc421c..709a8ad3 100644 --- a/h_transport_materials/property.py +++ b/h_transport_materials/property.py @@ -619,12 +619,8 @@ def data_y(self, value): self._data_y = value def set_law_from_quantity(self, quantity): - sievert_units = ( - ureg.particle * ureg.meter**-1 * ureg.second**-1 * ureg.Pa**-0.5 - ) - henry_units = ( - ureg.particle * ureg.meter**-1 * ureg.second**-1 * ureg.Pa**-1 - ) + sievert_units = ureg.particle * ureg.meter**-1 * ureg.second**-1 * ureg.Pa**-0.5 + henry_units = ureg.particle * ureg.meter**-1 * ureg.second**-1 * ureg.Pa**-1 if quantity.check(sievert_units): self.law = "sievert" elif quantity.check(henry_units): @@ -637,9 +633,7 @@ def set_law_from_quantity(self, quantity): @property def units(self): if self.law == "sievert": - return ( - ureg.particle * ureg.meter**-1 * ureg.second**-1 * ureg.Pa**-0.5 - ) + return ureg.particle * ureg.meter**-1 * ureg.second**-1 * ureg.Pa**-0.5 elif self.law == "henry": return ureg.particle * ureg.meter**-1 * ureg.second**-1 * ureg.Pa**-1 diff --git a/h_transport_materials/property_database/FeCrAl/__init__.py b/h_transport_materials/property_database/FeCrAl/__init__.py index b43cc631..7704e8d3 100644 --- a/h_transport_materials/property_database/FeCrAl/__init__.py +++ b/h_transport_materials/property_database/FeCrAl/__init__.py @@ -5,4 +5,3 @@ from . import t54y from . import thermacore from . import thermacore_oxidized - diff --git a/h_transport_materials/property_database/FeCrAl/apmt/apmt.py b/h_transport_materials/property_database/FeCrAl/apmt/apmt.py index 1f199690..07de0010 100644 --- a/h_transport_materials/property_database/FeCrAl/apmt/apmt.py +++ b/h_transport_materials/property_database/FeCrAl/apmt/apmt.py @@ -1,7 +1,7 @@ import h_transport_materials as htm from h_transport_materials import ( Permeability, -) +) import numpy as np u = htm.ureg @@ -12,8 +12,8 @@ ) Hu_perm = Permeability( - data_T=(1000 / data[:,0]) * u.K, - data_y=data[:,1] * u.mol * u.m**(-1) * u.s**(-1) * u.MPa**(-0.5), + data_T=(1000 / data[:, 0]) * u.K, + data_y=data[:, 1] * u.mol * u.m ** (-1) * u.s ** (-1) * u.MPa ** (-0.5), source="hu_hydrogen_2015", isotope="H", note="Figure 6", diff --git a/h_transport_materials/property_database/FeCrAl/fe22cr5al/__init__.py b/h_transport_materials/property_database/FeCrAl/fe22cr5al/__init__.py index d6c699b3..6086a48b 100644 --- a/h_transport_materials/property_database/FeCrAl/fe22cr5al/__init__.py +++ b/h_transport_materials/property_database/FeCrAl/fe22cr5al/__init__.py @@ -1,2 +1 @@ from . import fe22cr5al - diff --git a/h_transport_materials/property_database/FeCrAl/fe22cr5al/fe22cr5al.py b/h_transport_materials/property_database/FeCrAl/fe22cr5al/fe22cr5al.py index fb92e627..c9a80555 100644 --- a/h_transport_materials/property_database/FeCrAl/fe22cr5al/fe22cr5al.py +++ b/h_transport_materials/property_database/FeCrAl/fe22cr5al/fe22cr5al.py @@ -1,7 +1,7 @@ import h_transport_materials as htm from h_transport_materials import ( Permeability, -) +) import numpy as np u = htm.ureg @@ -12,8 +12,8 @@ ) xu_perm = Permeability( - data_T=(1000 / data[:,0]) * u.K, - data_y=data[:,1] * u.mol * u.m**(-1) * u.s**(-1) * u.Pa**(-.5), + data_T=(1000 / data[:, 0]) * u.K, + data_y=data[:, 1] * u.mol * u.m ** (-1) * u.s ** (-1) * u.Pa ** (-0.5), source="xu_studies_2016", isotope="D", note="Figure 1, oxidised", diff --git a/h_transport_materials/property_database/FeCrAl/oxidized_1605/__init__.py b/h_transport_materials/property_database/FeCrAl/oxidized_1605/__init__.py index d212d270..13807a2e 100644 --- a/h_transport_materials/property_database/FeCrAl/oxidized_1605/__init__.py +++ b/h_transport_materials/property_database/FeCrAl/oxidized_1605/__init__.py @@ -1,2 +1 @@ from . import oxidized_1605 - diff --git a/h_transport_materials/property_database/FeCrAl/oxidized_1605/oxidized_1605.py b/h_transport_materials/property_database/FeCrAl/oxidized_1605/oxidized_1605.py index 970f00a5..527511e1 100644 --- a/h_transport_materials/property_database/FeCrAl/oxidized_1605/oxidized_1605.py +++ b/h_transport_materials/property_database/FeCrAl/oxidized_1605/oxidized_1605.py @@ -1,7 +1,7 @@ import h_transport_materials as htm from h_transport_materials import ( Permeability, -) +) import numpy as np u = htm.ureg @@ -12,8 +12,8 @@ ) ash_perm = Permeability( - data_T=(1000 / data[:,0]) * u.K, - data_y=data[:,1] * u.micromol * u.m**(-1) * u.s**(-1) * u.kPa**(-.5), + data_T=(1000 / data[:, 0]) * u.K, + data_y=data[:, 1] * u.micromol * u.m ** (-1) * u.s ** (-1) * u.kPa ** (-0.5), source="ashdown_alloy_1980", isotope="H", ) diff --git a/h_transport_materials/property_database/FeCrAl/t35y/__init__.py b/h_transport_materials/property_database/FeCrAl/t35y/__init__.py index d7f3ca5e..0bcc1997 100644 --- a/h_transport_materials/property_database/FeCrAl/t35y/__init__.py +++ b/h_transport_materials/property_database/FeCrAl/t35y/__init__.py @@ -1,2 +1 @@ from . import t35y - diff --git a/h_transport_materials/property_database/FeCrAl/t35y/t35y.py b/h_transport_materials/property_database/FeCrAl/t35y/t35y.py index 5ad775d5..89ba2116 100644 --- a/h_transport_materials/property_database/FeCrAl/t35y/t35y.py +++ b/h_transport_materials/property_database/FeCrAl/t35y/t35y.py @@ -1,7 +1,7 @@ import h_transport_materials as htm from h_transport_materials import ( Permeability, -) +) import numpy as np u = htm.ureg @@ -12,8 +12,8 @@ ) Hu_perm = Permeability( - data_T=(1000 / data[:,0]) * u.K, - data_y=data[:,1] * u.mol * u.m**(-1) * u.s**(-1) * u.MPa**(-.5), + data_T=(1000 / data[:, 0]) * u.K, + data_y=data[:, 1] * u.mol * u.m ** (-1) * u.s ** (-1) * u.MPa ** (-0.5), source="hu_hydrogen_2015", isotope="H", note="Figure 6", diff --git a/h_transport_materials/property_database/FeCrAl/t54y/__init__.py b/h_transport_materials/property_database/FeCrAl/t54y/__init__.py index 2b03860e..40902a2b 100644 --- a/h_transport_materials/property_database/FeCrAl/t54y/__init__.py +++ b/h_transport_materials/property_database/FeCrAl/t54y/__init__.py @@ -1,2 +1 @@ from . import t54y - diff --git a/h_transport_materials/property_database/FeCrAl/t54y/t54y.py b/h_transport_materials/property_database/FeCrAl/t54y/t54y.py index 9b847b72..e82201e9 100644 --- a/h_transport_materials/property_database/FeCrAl/t54y/t54y.py +++ b/h_transport_materials/property_database/FeCrAl/t54y/t54y.py @@ -1,7 +1,7 @@ import h_transport_materials as htm from h_transport_materials import ( Permeability, -) +) import numpy as np u = htm.ureg @@ -12,8 +12,8 @@ ) Hu_perm = Permeability( - data_T=(1000 / data[:,0]) * u.K, - data_y=data[:,1] * u.mol * u.m**(-1) * u.s**(-1) * u.MPa**(-.5), + data_T=(1000 / data[:, 0]) * u.K, + data_y=data[:, 1] * u.mol * u.m ** (-1) * u.s ** (-1) * u.MPa ** (-0.5), source="hu_hydrogen_2015", isotope="H", note="Figure 6", diff --git a/h_transport_materials/property_database/FeCrAl/thermacore/__init__.py b/h_transport_materials/property_database/FeCrAl/thermacore/__init__.py index ff4bc76f..7364aa0a 100644 --- a/h_transport_materials/property_database/FeCrAl/thermacore/__init__.py +++ b/h_transport_materials/property_database/FeCrAl/thermacore/__init__.py @@ -1,2 +1 @@ from . import thermacore - diff --git a/h_transport_materials/property_database/FeCrAl/thermacore/thermacore.py b/h_transport_materials/property_database/FeCrAl/thermacore/thermacore.py index 5cf7784c..0349712d 100644 --- a/h_transport_materials/property_database/FeCrAl/thermacore/thermacore.py +++ b/h_transport_materials/property_database/FeCrAl/thermacore/thermacore.py @@ -1,7 +1,7 @@ import h_transport_materials as htm from h_transport_materials import ( Permeability, -) +) import numpy as np u = htm.ureg @@ -12,8 +12,8 @@ ) van_perm = Permeability( - data_T=(1000 / data[:,0]) * u.K, - data_y=data[:,1] * u.micromol * u.m**(-1) * u.s**(-1) * u.kPa**(-.5), + data_T=(1000 / data[:, 0]) * u.K, + data_y=data[:, 1] * u.micromol * u.m ** (-1) * u.s ** (-1) * u.kPa ** (-0.5), source="vandeventer_hydrogen_1980", isotope="H", note="Figure 2", diff --git a/h_transport_materials/property_database/FeCrAl/thermacore_oxidized/__init__.py b/h_transport_materials/property_database/FeCrAl/thermacore_oxidized/__init__.py index 83db5516..4c2458f8 100644 --- a/h_transport_materials/property_database/FeCrAl/thermacore_oxidized/__init__.py +++ b/h_transport_materials/property_database/FeCrAl/thermacore_oxidized/__init__.py @@ -1,2 +1 @@ from . import thermacore_oxidized - diff --git a/h_transport_materials/property_database/FeCrAl/thermacore_oxidized/thermacore_oxidized.py b/h_transport_materials/property_database/FeCrAl/thermacore_oxidized/thermacore_oxidized.py index 394f1248..40d41e0c 100644 --- a/h_transport_materials/property_database/FeCrAl/thermacore_oxidized/thermacore_oxidized.py +++ b/h_transport_materials/property_database/FeCrAl/thermacore_oxidized/thermacore_oxidized.py @@ -1,7 +1,7 @@ import h_transport_materials as htm from h_transport_materials import ( Permeability, -) +) import numpy as np u = htm.ureg @@ -12,8 +12,8 @@ ) van_perm = Permeability( - data_T=(1000 / data[:,0]) * u.K, - data_y=data[:,1] * u.micromol * u.m**(-1) * u.s**(-1) * u.kPa**(-.5), + data_T=(1000 / data[:, 0]) * u.K, + data_y=data[:, 1] * u.micromol * u.m ** (-1) * u.s ** (-1) * u.kPa ** (-0.5), source="vandeventer_hydrogen_1980", isotope="H", note="Figure 2", diff --git a/h_transport_materials/property_database/eurofer_97/eurofer_97.py b/h_transport_materials/property_database/eurofer_97/eurofer_97.py index 4526f0d5..bdee4ab1 100644 --- a/h_transport_materials/property_database/eurofer_97/eurofer_97.py +++ b/h_transport_materials/property_database/eurofer_97/eurofer_97.py @@ -8,11 +8,7 @@ aiello_permeability_H = Permeability( data_T=1000 / aiello_permeability_data["H"]["x"] * u.K, - data_y=aiello_permeability_data["H"]["y"] - * u.mol - * u.m**-1 - * u.Pa**-0.5 - * u.s**-1, + data_y=aiello_permeability_data["H"]["y"] * u.mol * u.m**-1 * u.Pa**-0.5 * u.s**-1, source="aiello_hydrogen_2002", isotope="H", note="in the paper, only the 3 hottest points are fitted to measure lattice diffusion only", @@ -21,11 +17,7 @@ aiello_permeability_D = Permeability( data_T=1000 / aiello_permeability_data["D"]["x"] * u.K, - data_y=aiello_permeability_data["D"]["y"] - * u.mol - * u.m**-1 - * u.Pa**-0.5 - * u.s**-1, + data_y=aiello_permeability_data["D"]["y"] * u.mol * u.m**-1 * u.Pa**-0.5 * u.s**-1, source="aiello_hydrogen_2002", isotope="D", note="in the paper, only the 3 hottest points are fitted to measure lattice diffusion only", @@ -92,11 +84,7 @@ esteban_permeability = Permeability( data_T=1000 / esteban_permeability_data[:, 0] * u.K, - data_y=esteban_permeability_data[:, 1] - * u.mol - * u.m**-1 - * u.Pa**-0.5 - * u.s**-1, + data_y=esteban_permeability_data[:, 1] * u.mol * u.m**-1 * u.Pa**-0.5 * u.s**-1, source="esteban_hydrogen_2007", isotope="H", ) diff --git a/h_transport_materials/property_database/flinak/flinak.py b/h_transport_materials/property_database/flinak/flinak.py index 9c55c733..65825400 100644 --- a/h_transport_materials/property_database/flinak/flinak.py +++ b/h_transport_materials/property_database/flinak/flinak.py @@ -47,9 +47,7 @@ ) data_nakamura_sol_flinak_T = 1 / data_nakamura["sol_flinakx"] * u.K -data_nakamura_sol_flinak_y = ( - data_nakamura["sol_flinaky"] * u.mol * u.m**-3 * u.Pa**-1 -) +data_nakamura_sol_flinak_y = data_nakamura["sol_flinaky"] * u.mol * u.m**-3 * u.Pa**-1 nakamura_solubility_h = Solubility( data_T=data_nakamura_sol_flinak_T, data_y=data_nakamura_sol_flinak_y, diff --git a/h_transport_materials/property_database/molybdenum.py b/h_transport_materials/property_database/molybdenum.py index 3f442d70..901f9c42 100644 --- a/h_transport_materials/property_database/molybdenum.py +++ b/h_transport_materials/property_database/molybdenum.py @@ -67,7 +67,7 @@ tanabe_solubility, katsuta_solubility, frauenfelder_permeability, - guthrie_permeability + guthrie_permeability, ] for prop in properties: diff --git a/h_transport_materials/property_database/palladium_copper.py b/h_transport_materials/property_database/palladium_copper.py index ff5ee9e1..32128ab7 100644 --- a/h_transport_materials/property_database/palladium_copper.py +++ b/h_transport_materials/property_database/palladium_copper.py @@ -2,19 +2,22 @@ from h_transport_materials import ( Permeability, Diffusivity, -) +) import numpy as np u = htm.ureg -li_data_T = np.array( - [ - 350, - 375, - 400, - 425, - ] -) * u.degC +li_data_T = ( + np.array( + [ + 350, + 375, + 400, + 425, + ] + ) + * u.degC +) li_data_y = ( np.array( @@ -25,9 +28,9 @@ 1.60e-8, ] ) - * u.mol - * u.m**-1 - * u.Pa**-0.5 + * u.mol + * u.m**-1 + * u.Pa**-0.5 * u.s**-1 ) @@ -36,7 +39,7 @@ data_y=li_data_y, source="li_low_2023", isotope="H", - note="SI Table 1 (supporting information)" + note="SI Table 1 (supporting information)", ) piper_diffusivity_h = Diffusivity( diff --git a/h_transport_materials/property_database/ss_304/__init__.py b/h_transport_materials/property_database/ss_304/__init__.py index 3a05405b..b1e0b7e3 100644 --- a/h_transport_materials/property_database/ss_304/__init__.py +++ b/h_transport_materials/property_database/ss_304/__init__.py @@ -1,2 +1 @@ from . import ss_304 - diff --git a/h_transport_materials/property_database/tzm.py b/h_transport_materials/property_database/tzm.py index 4b21905e..868908a3 100644 --- a/h_transport_materials/property_database/tzm.py +++ b/h_transport_materials/property_database/tzm.py @@ -5,7 +5,7 @@ Solubility, DissociationCoeff, RecombinationCoeff, -) +) import numpy as np u = htm.ureg