示例#1
0
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,
    )
示例#2
0
def test_1d_diffusion():
    assert_solves(
        MESH,
        Constant(DIFFUSIVITY),
        None,
        None,
        Expression(DIFFUSION_TERM, degree=4),
        EXACT,
        6.3e-4,
        6.3e-2,
    )
示例#3
0
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,
    )
示例#4
0
文件: test_3d.py 项目: pdelab/pyeafe
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,
    )
示例#5
0
文件: test_3d.py 项目: pdelab/pyeafe
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,
    )
示例#6
0
文件: test_3d.py 项目: pdelab/pyeafe
def test_3d_diffusion():
    assert_solves(
        MESH,
        Constant(DIFFUSIVITY),
        None,
        None,
        Expression(DIFFUSION_TERM, degree=4),
        EXACT,
        0.025,
        0.480,
    )
示例#7
0
文件: test_2d.py 项目: pdelab/pyeafe
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,
    )
示例#8
0
文件: test_2d.py 项目: pdelab/pyeafe
def test_2d_diffusion():
    assert_solves(
        MESH,
        Constant(DIFFUSIVITY),
        None,
        None,
        Expression(DIFFUSION_TERM, degree=4),
        EXACT,
        5.4e-3,
        2.2e-1,
    )
示例#9
0
文件: test_3d.py 项目: pdelab/pyeafe
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,
    )
示例#10
0
文件: test_2d.py 项目: pdelab/pyeafe
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,
    )