Skip to content

Commit

Permalink
black formatted
Browse files Browse the repository at this point in the history
  • Loading branch information
RemDelaporteMathurin committed Oct 9, 2024
1 parent ed04baa commit e985f0b
Show file tree
Hide file tree
Showing 21 changed files with 46 additions and 71 deletions.
12 changes: 3 additions & 9 deletions h_transport_materials/property.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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

Expand Down
1 change: 0 additions & 1 deletion h_transport_materials/property_database/FeCrAl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@
from . import t54y
from . import thermacore
from . import thermacore_oxidized

6 changes: 3 additions & 3 deletions h_transport_materials/property_database/FeCrAl/apmt/apmt.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import h_transport_materials as htm
from h_transport_materials import (
Permeability,
)
)
import numpy as np

u = htm.ureg
Expand All @@ -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",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
from . import fe22cr5al

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import h_transport_materials as htm
from h_transport_materials import (
Permeability,
)
)
import numpy as np

u = htm.ureg
Expand All @@ -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",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
from . import oxidized_1605

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import h_transport_materials as htm
from h_transport_materials import (
Permeability,
)
)
import numpy as np

u = htm.ureg
Expand All @@ -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",
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
from . import t35y

6 changes: 3 additions & 3 deletions h_transport_materials/property_database/FeCrAl/t35y/t35y.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import h_transport_materials as htm
from h_transport_materials import (
Permeability,
)
)
import numpy as np

u = htm.ureg
Expand All @@ -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",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
from . import t54y

6 changes: 3 additions & 3 deletions h_transport_materials/property_database/FeCrAl/t54y/t54y.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import h_transport_materials as htm
from h_transport_materials import (
Permeability,
)
)
import numpy as np

u = htm.ureg
Expand All @@ -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",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
from . import thermacore

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import h_transport_materials as htm
from h_transport_materials import (
Permeability,
)
)
import numpy as np

u = htm.ureg
Expand All @@ -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",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
from . import thermacore_oxidized

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import h_transport_materials as htm
from h_transport_materials import (
Permeability,
)
)
import numpy as np

u = htm.ureg
Expand All @@ -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",
Expand Down
18 changes: 3 additions & 15 deletions h_transport_materials/property_database/eurofer_97/eurofer_97.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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",
)
Expand Down
4 changes: 1 addition & 3 deletions h_transport_materials/property_database/flinak/flinak.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion h_transport_materials/property_database/molybdenum.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
tanabe_solubility,
katsuta_solubility,
frauenfelder_permeability,
guthrie_permeability
guthrie_permeability,
]

for prop in properties:
Expand Down
29 changes: 16 additions & 13 deletions h_transport_materials/property_database/palladium_copper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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
)

Expand All @@ -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(
Expand Down
1 change: 0 additions & 1 deletion h_transport_materials/property_database/ss_304/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
from . import ss_304

2 changes: 1 addition & 1 deletion h_transport_materials/property_database/tzm.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Solubility,
DissociationCoeff,
RecombinationCoeff,
)
)
import numpy as np

u = htm.ureg
Expand Down

0 comments on commit e985f0b

Please sign in to comment.