← Back to team overview

dolfin team mailing list archive

Re: [Question #110717]: Normal vector jump along the boundary

 

Kaspar Müller wrote:
New question #110717 on DOLFIN:
https://answers.launchpad.net/dolfin/+question/110717

I'm solving an extended heat flow problem. I have the following ufl- file:

-------------------------------------------------------------------------------
cell = triangle

Heatflux = VectorElement("Lagrange", "triangle", 3)
Temperature = FiniteElement("DG", "triangle", 1)
ME = Heatflux + Temperature
(r, kappa) = TestFunctions(ME)
(s, theta) = TrialFunctions(ME)

alpha_2 = 2.0
alpha_3 = 2.0

thetaR = Function(Temperature)
thetaL = Function(Temperature)
thetaC = Function(Temperature)

uR = Function(Temperature)
uL = Function(Temperature)
uC = Function(Temperature)

n = cell.n
t = as_vector([n[1],-n[0]])

s_n = dot(s,n)
s_t = dot(s,t)
r_n = dot(r,n)
r_t = dot(r,t)
# Bilinear form
a =   kappa*div(s)*dx \
\
    + dot(r,s)*dx \
\
    - div(r)*theta*dx \
\
    + inner(grad(r),grad(s))*dx \
    + (1/alpha_2)*r_n*s_n*ds(0) + (1/alpha_2)*r_n*s_n*ds(2) \
    + (1/alpha_2)*r_n*s_n*ds(3) \
    - r_n* dot(grad(s)*n,n)*ds(0) - r_n* dot(grad(s)*n,n)*ds(2) \
    - r_n* dot(grad(s)*n,n)*ds(3) \
    - r_t* alpha_3*s_t*ds(0) - r_t* alpha_3*s_t*ds(2) \
    - r_t* alpha_3*s_t*ds(3)
# Linear form
L = - r_n*thetaR*ds(3) - r_n*thetaL*ds(2) - r_n*thetaC*ds(0) \
--------------------------------------------------------------------------------

The computational domain is a square with a cylinder inside. The cylinder is marked with 0. Upper and lower walls are marked with 1, the left wall with 2 and the right wall with 3. The heat flows from the hotter cylinder to the left and right. There is no heat flux over the upper and lower walls.
The problem is, that the temperature is oscillating on the cylinder. It seems like that the normal and tangential components in the boundary integrals are causing the problem, since the normal vector on the boundary of the cylinder is jumping as it is depicted in http://www.dealii.org/6.2.1/doxygen/deal.II/no_normal_flux_1.png.
If I refine the cylinder I still have some oscillations. Is there another way to deal with this problem?

Best,
Kaspar



Check for the drag force computation in: http://bazaar.launchpad.net/~unicorn-core/unicorn/unstable/files/head:/ucsolver/icns/

The function normal is the vertex defined normal from NodeNormal class. That should solve your problem.

murtazo





References