def test_1d_reaction(): assert_solves( MESH, Constant(DIFFUSIVITY), None, Constant(REACTIVITY), Expression(f"{DIFFUSION_TERM} + {REACTION_TERM}", degree=4), EXACT, 8.9e-4, 6.3e-2, )
def test_1d_diffusion(): assert_solves( MESH, Constant(DIFFUSIVITY), None, None, Expression(DIFFUSION_TERM, degree=4), EXACT, 6.3e-4, 6.3e-2, )
def test_1d_convection(): assert_solves( MESH, Constant(DIFFUSIVITY), Constant(CONVECTIVITY), None, Expression(f"{DIFFUSION_TERM} + {CONVECTION_TERM}", degree=4), EXACT, 1.1e-3, 6.3e-2, )
def test_3d_reaction(): assert_solves( MESH, Constant(DIFFUSIVITY), None, Constant(REACTIVITY), Expression(f"{DIFFUSION_TERM} + {REACTION_TERM}", degree=4), EXACT, 0.027, 0.481, )
def test_3d_convection(): assert_solves( MESH, Constant(DIFFUSIVITY), Constant(CONVECTIVITY), None, Expression(f"{DIFFUSION_TERM} + {CONVECTION_TERM}", degree=4), EXACT, 0.101, 0.766, )
def test_3d_diffusion(): assert_solves( MESH, Constant(DIFFUSIVITY), None, None, Expression(DIFFUSION_TERM, degree=4), EXACT, 0.025, 0.480, )
def test_2d_reaction(): assert_solves( MESH, Constant(DIFFUSIVITY), None, Constant(REACTIVITY), Expression(f"{DIFFUSION_TERM} + {REACTION_TERM}", degree=4), EXACT, 6.2e-3, 2.2e-1, )
def test_2d_diffusion(): assert_solves( MESH, Constant(DIFFUSIVITY), None, None, Expression(DIFFUSION_TERM, degree=4), EXACT, 5.4e-3, 2.2e-1, )
def test_3d_convection_reaction(): assert_solves( MESH, Constant(DIFFUSIVITY), Constant(CONVECTIVITY), Constant(REACTIVITY), Expression( f"{DIFFUSION_TERM} + {CONVECTION_TERM} + {REACTION_TERM}", degree=4, ), EXACT, 0.088, 0.679, )
def test_2d_convection_reaction(): assert_solves( MESH, Constant(DIFFUSIVITY), Constant(CONVECTIVITY), Constant(REACTIVITY), Expression( f"{DIFFUSION_TERM} + {CONVECTION_TERM} + {REACTION_TERM}", degree=4, ), EXACT, 8.5e-3, 2.2e-1, )