Why the magnetic flux is not zero? If $\vec{\mathbf B}=B\vec{\mathbf a}_z$, compute the magnetic flux passing through a hemisphere of radius $R$ centered at the origin and bounded by the plane $z=0$.


Solution
The hemisphere and the circular disc of radius $R$ form a closed surface, as illustrated in the figure; therefore, the flux passing through the hemisphere  must be exactly equal to the flux passing through the disc.
The flux passing through the disc is
$$\Phi=\int_S\vec{\mathbf B}\cdot\mathrm d\vec{\mathbf s}=
\int\limits_0^R\int\limits_0^{2\pi}B\rho\,\mathrm d\rho\,\mathrm d\phi
=\pi R^2B$$
The reader is encouraged to verify this result by integrating over the surface of the hemisphere.

According to Maxwell's equations the magnetic flux over a closed surface must be zero, why in this case does not happen?
 A: According to Maxwell's equations the magnetic flux over a closed surface must be zero.
In this case the hemispherical surface in question is not a closed surface, it is an open surface.
If we consider the closed surface (the hemispherical section And the circular base)
the total flux passing through will be zero.
Using this information it is clear that the flux leaving thought the hemisphere will be equal in magnitude and opposite in sign to the flux entering through the circular base.
A: The flux through the closed hemisphere is zero, 
$$\Phi_{\mathrm{hemi}}+\Phi_{\mathrm{disk}} = 0.$$
This allows us to find the flux through the hemisphere knowing the (more easily calculable) flux through the disk,
$$\Phi_{\mathrm{hemi}} = -\Phi_{\mathrm{disk}}.$$
A: the net flux is always zero , and it's satisfies the Maxwell equation , in the answer firstly the flux through disc has been calculated next using the fact that the net flux must be zero we can conclude the flux of hemisphere must be equal to the flux though the disc but with opposite sign namely : flux through hemisphere + flux through disc = 0 
