Skip to content

Commit

Permalink
sievert instead of sieverts
Browse files Browse the repository at this point in the history
  • Loading branch information
RemDelaporteMathurin committed Nov 7, 2024
1 parent 941557e commit a81b602
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/festim/hydrogen_transport_problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -1356,7 +1356,7 @@ def create_formulation(self):
else:
if subdomain_0.material.solubility_law == "henry":
left = u_b / K_b
elif subdomain_0.material.solubility_law == "sieverts":
elif subdomain_0.material.solubility_law == "sievert":
left = (u_b / K_b) ** 2

Check warning on line 1360 in src/festim/hydrogen_transport_problem.py

View check run for this annotation

Codecov / codecov/patch

src/festim/hydrogen_transport_problem.py#L1359-L1360

Added lines #L1359 - L1360 were not covered by tests
else:
raise ValueError(

Check warning on line 1362 in src/festim/hydrogen_transport_problem.py

View check run for this annotation

Codecov / codecov/patch

src/festim/hydrogen_transport_problem.py#L1362

Added line #L1362 was not covered by tests
Expand All @@ -1365,7 +1365,7 @@ def create_formulation(self):

if subdomain_1.material.solubility_law == "henry":
right = u_t / K_t

Check warning on line 1367 in src/festim/hydrogen_transport_problem.py

View check run for this annotation

Codecov / codecov/patch

src/festim/hydrogen_transport_problem.py#L1367

Added line #L1367 was not covered by tests
elif subdomain_1.material.solubility_law == "sieverts":
elif subdomain_1.material.solubility_law == "sievert":
right = (u_t / K_t) ** 2
else:
raise ValueError(

Check warning on line 1371 in src/festim/hydrogen_transport_problem.py

View check run for this annotation

Codecov / codecov/patch

src/festim/hydrogen_transport_problem.py#L1371

Added line #L1371 was not covered by tests
Expand Down
10 changes: 6 additions & 4 deletions test/system_tests/test_multi_mat_penalty.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ def test_2_materials_2d_mms():
c_exact_top_ufl = (
lambda x: 3
+ ufl.sin(ufl.pi * (2 * x[1] + 0.5))
+ 0.7 * ufl.cos(2 * ufl.pi * x[0])
+ 0.1 * ufl.cos(2 * ufl.pi * x[0])
)
c_exact_top_np = (
lambda x: 3 + np.sin(np.pi * (2 * x[1] + 0.5)) + 0.7 * np.cos(2 * np.pi * x[0])
lambda x: 3 + np.sin(np.pi * (2 * x[1] + 0.5)) + 0.1 * np.cos(2 * np.pi * x[0])
)

def c_exact_bot_ufl(x):
Expand All @@ -96,7 +96,7 @@ def c_exact_bot_np(x):
material_top = F.Material(D_0=D_top, E_D=0, K_S_0=K_S_top, E_K_S=0)
material_bottom = F.Material(D_0=D_bot, E_D=0, K_S_0=K_S_bot, E_K_S=0)

material_top.solubility_law = "sieverts"
material_top.solubility_law = "sievert"
material_bottom.solubility_law = "henry"

top_domain = F.VolumeSubdomain(4, material=material_top)
Expand All @@ -111,7 +111,9 @@ def c_exact_bot_np(x):
bottom_surface,
]

my_model.interfaces = [F.Interface(5, (bottom_domain, top_domain), penalty_term=1)]
my_model.interfaces = [
F.Interface(5, (bottom_domain, top_domain), penalty_term=1),
]
my_model.surface_to_volume = {
top_surface: top_domain,
bottom_surface: bottom_domain,
Expand Down

0 comments on commit a81b602

Please sign in to comment.