Skip to content
Snippets Groups Projects
Commit f30ad2a3 authored by René Heß's avatar René Heß
Browse files

Add navier-stoke tests mimicing pdelab-howto

parent fa8b2a1b
No related branches found
No related tags found
No related merge requests found
__name = navierstokes_howto_2d_dg_quadrilateral_{__exec_suffix}
__exec_suffix = symdiff, numdiff | expand num
cells = 8 8
extension = 1. 1.
printmatrix = true
printresidual = false
[wrapper.vtkcompare]
name = {__name}
extension = vtu
[formcompiler]
numerical_jacobian = 0, 1 | expand num
# compare_l2errorsquared = 1e-8
# This example mimics the PDE of the pde-howto (after some
# adaptions). It can be used to compare residual evaluations and
# setting up the jacobi-matrix between the generated code and the
# pdelab operator.
cell = quadrilateral
P2 = VectorElement("DG", cell, 2)
P1 = FiniteElement("DG", cell, 1)
TH = P2 * P1
v, q = TestFunctions(TH)
u, p = TrialFunctions(TH)
x = SpatialCoordinate(cell)
g_v = as_vector((4*x[1]*(1.-x[1]), 0.0))
# bctype = conditional(x[0] < 1. - 1e-8, 1, 0)
# ds = ds(subdomain_id=1, subdomain_data=bctype)
n = FacetNormal(cell)('+')
eps = -1.0
sigma = 1.0
rho = 1.0
mu = 1.0
h_e = Min(CellVolume(cell)('+'), CellVolume(cell)('-')) / FacetArea(cell)
r = mu * inner(grad(u), grad(v))*dx \
- p*div(v)*dx \
- q*div(u)*dx \
+ rho * inner(grad(u)*u,v)*dx \
+ mu * inner(avg(grad(u))*n, jump(v))*dS \
+ mu / h_e * sigma * inner(jump(u), jump(v))*dS \
- mu * eps * inner(avg(grad(v))*n, jump(u))*dS \
- avg(p)*inner(jump(v), n)*dS \
- avg(q)*inner(jump(u), n)*dS \
- mu * inner(grad(u)*n, v)*ds \
+ mu / h_e * sigma * inner(u-g_v, v)*ds \
+ mu * eps * inner(grad(v)*n, u-g_v)*ds \
+ p*inner(v, n)*ds \
+ q*inner(u-g_v, n)*ds
forms = [r]
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment