diff --git a/src/festim/hydrogen_transport_problem.py b/src/festim/hydrogen_transport_problem.py index 8ef9ad1f4..fca1e1300 100644 --- a/src/festim/hydrogen_transport_problem.py +++ b/src/festim/hydrogen_transport_problem.py @@ -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 else: raise ValueError( @@ -1365,7 +1365,7 @@ def create_formulation(self): if subdomain_1.material.solubility_law == "henry": right = u_t / K_t - elif subdomain_1.material.solubility_law == "sieverts": + elif subdomain_1.material.solubility_law == "sievert": right = (u_t / K_t) ** 2 else: raise ValueError( diff --git a/test/system_tests/test_multi_mat_penalty.py b/test/system_tests/test_multi_mat_penalty.py index 2898f8092..0aa406914 100644 --- a/test/system_tests/test_multi_mat_penalty.py +++ b/test/system_tests/test_multi_mat_penalty.py @@ -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): @@ -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) @@ -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,