Hallo
I have to deal with problems including surface tension. This forcing is proportional to the curvature of the interface. The treatment is as follows.
$\int_{\Gamma} w^{t} k \gamma d\Gamma = \int_{Gamma}\gamma t \cdot (t \cdot \nabla)w d\Gamma + b.t.$
Where k is the local vector curvature, w is the test function and $\gamma$ is the surface tension coefficient, t is the tangent vector to the interface.
The ufl code I wrote is as follows.
P0 = FiniteElement("DG",triangle,0)
P1 = FiniteElement("DG",triangle,0)
P2 = VectorElement("Lagrange",triangle,2)
V = MixedElement([P2,P1])
(s, ps) = TrialFunctions(V)
(w, qs) = TestFunctions(V)
gamma = Constant(triangle)
kmesh = Constant(triangle)
n = FacetNormal(triangle)
ss = Coefficient(P2)
pps = Coefficient(P1)
t=as_vector([n[1], -n[0]])
F = -(\
((kmesh*w[j].dx(k)*ss[j].dx(k)\
+kmesh*w[j].dx(k)*ss[k].dx(j)\
-w[i].dx(i)*pps\
-qs*ss[i].dx(i)))*dx\
-gamma*t[k]('+')*avg(w[j]).dx(k)*t[j]('+')*dS(2)\
)
J = -derivative(F,(ss, pps), (s, ps))
forms=[F, J]
The exact solution for a circular domain should be a jump in pressure that equals the surface tension coefficient $\gamma$, but I find spurious overshoots in pressure just in the cells close to the interface. Unfortunately I am not able to put her an image of them.
Thanks for any suggestion.
Hallo
Stefano