# Flow of fluid through a really tricky closed surface S (divergence theorem)

Considering a fluid whose velocity field is

$\vec{v}(x,y,z)= (y^{3}e^{-z^{2}} + x)\vec{i} + (ze^{x} + y^{2})\vec{j} + (cos(x^{2}+ y^{2}) +2z)\vec{k}$

Calculate the flow of fluid through the closed surface S comprises the border of the area bounded by the half-spheres $z = -\sqrt{4-x^{2}-y^{2}}$ and $z = \sqrt{9-x^{2}-y^{2}}$ and by the plan $z = 0$.

For the moment, I calculated the divergence of $\vec{v}$ to apply the divergence theorem in the volume of the cap between the half-spheres using cylindrical coordinates and I found a answer. But I'm not sure if I need to do something special in reason of the minus sign in the first half-sphere.

I'm afraid of doing something really wrong because I don't understand the divergence theorem really well. So any tip will be helpful.

• the spheres dont fit together, is it a non smooth surface ? – Rene Schipperus Aug 10 '14 at 15:50
• Probably not the best question to do if your new to divergence theorem, but have you calculated the divergence ? – Rene Schipperus Aug 10 '14 at 15:51
• Yes I did @Rene Schipperus. I found $div \ \vec{v} = 2z + 3$ – user78723 Aug 10 '14 at 16:00
• I think its $2y+3$, but ok just integrate this over the two half spheres. – Rene Schipperus Aug 10 '14 at 16:04
• @Rene Schipperus. I really don't know why I wrote 2z instead of the 2y :/ I found 38$\pi$. – user78723 Aug 10 '14 at 16:12

The Volume of Integration is created by the overlapping of two semi-spheres centered at the origin ($S_1$ being the upper sphere, and $S_2$ being the lower one).

$\nabla\cdot\vec{u}=1+2y+2=3+2y$

$\begin{eqnarray} \displaystyle\iint\limits_{\partial S_1\mathop\cup\partial S_2}\vec{v}\cdot\vec{n}\,\mathrm dS&=&\iiint\limits_{S_1\mathop\cup S_2}\nabla\cdot\vec{v}\,\mathrm dV\\ &=&\iiint\limits_{S_1}\nabla\cdot\vec{v}\,\mathrm dV+\iiint\limits_{S_2}\nabla\cdot\vec{v}\,\mathrm dV \end{eqnarray}$

SPOILER!

$\displaystyle\int\limits_0^3\int\limits_0^{\pi\over2}\int\limits_0^{2\pi}3\rho^2\sin(\phi)+2\rho^3\sin^2(\phi)\sin(\theta)\,\mathrm d\theta\,\mathrm d\phi\,\mathrm d\rho+\int\limits_0^2\int\limits_{\pi\over2}^\pi\int\limits_0^{2\pi}3\rho^2\sin(\phi)+2\rho^3\sin^2(\phi)\sin(\theta)\,\mathrm d\theta\,\mathrm d\phi\,\mathrm d\rho=70\pi$

• Do you see the two half-spheres overlapping each other above the $z = 0$ plane? – user78723 Aug 10 '14 at 17:17
• I guess that term is wrong, i meant that one half-sphere is above the other one, so it looks like a cartoon-ish spaceship. how-to-draw-funny-cartoons.com/image-files/… – Daniel Charry Aug 10 '14 at 17:26
• Ah, ok. I did one half-sphere above another like a half plum and I found $38\pi$ dreamstime.com/… – user78723 Aug 10 '14 at 18:18
• Well, your mistake is probably because you didn't see the minus sign on $z=-\sqrt{4-x^2-y^2}$ ... – Daniel Charry Aug 10 '14 at 18:25
• Not at all, but consider using the plain definition of a surface integral in this exercise. It would require the parameterizations of 3 different surfaces. – Daniel Charry Aug 10 '14 at 19:26