# Is the weak form on this book about a level set FSI problem wrong?

I'm trying to repeat a level set FSI problem on the book <Level Set Methods for Fluid-Structure Interaction>, on the page 89, the provided freefem code define a weak form of the discretized equation

the algorithm is the $$F$$ is defined as $$F=\operatorname{div}\left(E^{\prime}(|\nabla \varphi|)|\nabla \varphi|\left(\mathbb{I}-\frac{\nabla \varphi \otimes \nabla \varphi}{|\nabla \varphi|^2}\right) \frac{1}{\varepsilon} \zeta\left(\frac{\varphi}{\varepsilon}\right)\right)$$ which can be rewritten as $$F=\nabla\left(E(|\nabla \varphi|) \frac{1}{\varepsilon} \zeta\left(\frac{\varphi}{\varepsilon}\right)\right)-\operatorname{div}\left(E^{\prime}(|\nabla \varphi|)|\nabla \varphi| n \otimes n \frac{1}{\varepsilon} \zeta\left(\frac{\varphi}{\varepsilon}\right)\right)$$ as mentioned at 3.15 on page 61, I believe that the gradient term can be fully absorbed into pressure p, hence we only need to deal with $$-\operatorname{div}\left(E^{\prime}(|\nabla \varphi|)|\nabla \varphi| n \otimes n \frac{1}{\varepsilon} \zeta\left(\frac{\varphi}{\varepsilon}\right)\right)$$ but after deriving the weak form on my own by using the definition of tensor product of two vector(i,j-th element of a tensor b is $$a_{i}b_{j}$$) and high dimensional divergence theorem, I find out that the correct weak form should be

    + int2d(Th)(Ep(nabla)*(-dx(phi)*dx(phi)*dx(v1)-dx(phi)
*dy(phi)*(dx(v2)+dy(v1))-dy(phi)*dy(phi)*dy(v2))/nabla*zet)


but the actual code provided on the book is

// Elastic tensor
+ int2d(Th)(Ep(nabla)*(dy(phi)*dy(phi)*dx(v1)-dx(phi)
*dy(phi)*(dx(v2)+dy(v1))+dx(phi)*dx(phi)*dy(v2))/
nabla*zet)


the sign is not the same as mine, and it is dy(phi)*dy(phi)*dx(v1) not dx(phi)*dx(phi)*dx(v1) , I wonder where is wrong, could anyone help me?thank you very much.

• I didn't do the math, but a common technique is to integrate by parts twice especially if the discretization allows for some symmetry afterwards (finite volume and discontinuous FEMs for example.) You can try doing that, maybe that helps Nov 11, 2023 at 4:33