I am using CG elements of order 5 for T and V, 2 unknowns of a ME space. The domain consists of 2 adjacent materials with a different property S.
I am interested to check the convergence rate of \vec J = -\sigma \nabla V -\sigma S \nabla T where \sigma is a scalar and S is a 2x2 matrix (tensor), and of \vec J_U = -\kappa \nabla T + TS\vec J. Where \kappa is a scalar.
Therefore of 2 quantities that involve first order spatial derivatives of the 2 unknowns (since I deal with their divergence, it’s actually 2nd order spatial derivatives… but still… that would make the expected value equal to 3?). From what I understand, the expected convergence rate (L2 norm) should be 4. I get 0.4.
Here is how I compute the norms:
J_expr = -sigma * grad(volt) - sigma * (Seebeck_tensor * grad(temp))
J_U_expr = -kappa * grad(temp) + temp * (Seebeck_tensor * J_expr) + volt * J_expr
qdeg = 2 * sim.input_parameters.deg + 4 # Where sim.input_parameters.deg is worth 5.
# L2 norm of div J
divJ_sq = assemble_scalar(form(inner(div(J_expr), div(J_expr)) * dx,
form_compiler_options={"quadrature_degree": qdeg}))
div_J_L2 = np.sqrt(divJ_sq)
# L2 norm of div J_U
divJU_sq = assemble_scalar(form(inner(div(J_U_expr), div(J_U_expr)) * dx,
form_compiler_options={"quadrature_degree": qdeg}))
div_J_U_L2 = np.sqrt(divJU_sq)
I get results that I think make sense… I am not sure whether I am not computing the convergence order correctly. And if it’s really 0.4, then what does this imply?
