Hi,
I am interesting with time depend Stokes problem, and to solve this problem used Chorin projecton method. Now I would like to compute error estimate for the Time depend Stokes problem with initial velocity and homogeneous Dirichlet boundary conditions. For implementitation I used no-sleep condition for velocity and inflow and outflow Dirichlet conditions for pressure. Could somebody help me with computing next error estimate:
||u_exact - u_t||_l^∞([L^2(0mega)]^d) (Infinity norm based on L^2 norm)
Here is part of my code for this computing:
1. First I define L^2 norm:
def errornormL2(ue_fun, u_h, Ve):
u_h_Ve = interpolate(u_h, Ve)
u_e_Ve = interpolate(ue_fun, Ve)
e_Ve = Function(Ve)
e_Ve.vector()[:] = u_e_Ve.vector().array() - u_h_Ve.vector().array()
error = e_Ve**2*dx
return sqrt(assemble(error, mesh=Ve.mesh())), e_Ve
2. Then l^infinity in time loop:
Eu1_Linf = 0.0
ue_fun.t=t
Eu1_new, e_Ve = errornormL2(ue_fun, u1, V1)
Eu1_Linf = max(Eu1_new, Eu1_Linf)
here: V1 = VectorFunctionSpace(mesh, "Lagrange", 5)
and u1 is solution os given problem.
Thanks a lot in advance