Consider, for concreteness, the finite element (FE) method applied to stationary heat conduction in a domain $\Omega \subset \mathbb{R}^3$. Let the heat flux (thermal energy per unit area and time) be denoted by $\mathbf{q}$, and let the source term (applied thermal energy per unit volume and time) be denoted by $Q$. The strong form of the equation is simply given by the balance law $$1) \nabla \cdot \mathbf{q}=Q.$$ Suppose that we prescribe Neumann conditions on the whole boundary, i.e. $\mathbf{q}\cdot \mathbf{n} = g$ on $\partial \Omega$, where $\mathbf{n}$ denotes the outward unit normal, and $g$ denotes some function defined on $\Omega$. Integrating the conservation law 1) over $\Omega$ and using Gauss' theorem along with the boundary conditions, shows that $g$ and $Q$ must be related according to $$2)\int_\Omega QdV =\int_{\partial \Omega}gdA.$$ Consider now the FE formulation of 1). Let's assume a constitutive relation $\mathbf{q} = -\mathbf{D}\nabla T$, where $\mathbf{D}$ denotes the constitutive matrix and $T$ the temperature field. Let $\mathbf{N} = [N_1 \ ... \ N_n]$ denote the global shapefunction vector. The FE formulation then takes the form $$3)\mathbf{K}\mathbf{a}=\mathbf{f}_b+\mathbf{f}_l=\mathbf{f},$$ where $\mathbf{K}$ is the stiffness matrix given by $$4)\mathbf{K} = \int_{\Omega}(\nabla \mathbf{N})^T\mathbf{D}(\nabla \mathbf{N})dV$$ and we have the boundary force vector $\mathbf{f}_b$ and the load force vector $\mathbf{f}_l$, given by $$5)\mathbf{f}_b = -\int_{\partial \Omega}\mathbf{N}^TgdA $$ and $$6)\mathbf{f}_l = \int_{\Omega}\mathbf{N}^TQdV, $$ respectively.
Question 1
My first question, which was not really addressed in the book I'm using, concerns how the integrals in 4), 5) and 6) are actually defined. The shape functions are of course only defined on the elements in the FE mesh, whose domain we can call $M$. If our elements have straight boundaries but $\Omega$ does not have a straight boundary, then $M \neq \Omega$ and $\partial M \neq \partial \Omega$. Therefore, the integrals in 4), 5) and 6) should really be written as $$4')\mathbf{K} = \int_{M}(\nabla \mathbf{N})^T\mathbf{D}(\nabla \mathbf{N})dV,$$ $$5')\mathbf{f}_b = -\int_{\partial M}\mathbf{N}^TgdA $$ and $$6')\mathbf{f}_l = \int_{M}\mathbf{N}^TQdV, $$ respectively. However, then another issue appears. While the integrals in 4') and 6') are well-defined, since $M \subset \Omega$ and $Q$ is defined on $\Omega$, the integral in 5') is not well-defined a-priori, since $\partial M \not\subset \partial \Omega$ while $g$ is defined on $\partial \Omega$. Say for example that $\Omega$ is the quarter ball $\Omega = \{(x,y,z)|x^2+y^2+z^2 \leq 1, x,y,z, \geq 0\}$ and that we use a single element in the form of a tetrahedron, so that $M$ is the tetrahedron with vertices $(0,0,0),(1,0,0),(0,1,0)$ and $(0,0,1)$. Then the "spherical part" $(\partial\Omega)_s =\{(x,y,z)|x^2+y^2+z^2=1\}\cap \partial \Omega$ of $\partial\Omega$ does not coincide with the corresponding face $(\partial M)_s = \{(x,y,z)|x+y+z=1\}\cap \partial M$ of $\partial M$. If $g$ is constant, it probably makes sense to define $\mathbf{f}_b$ as $$5'')\mathbf{f}_b = -g\int_{\partial M}\mathbf{N}^TdA \ (\mathrm{for} \ g \ \mathrm{constant}).$$ However, say that we have defined $g$ on $(\partial \Omega)_s$ by $g|_{(\partial \Omega)_s} = \sqrt{x^2+y^2+z^2-0.9}$, which is well defined. However, we cannot just use the same "formula" $g(x,y,z) = \sqrt{x^2+y^2+z^2-0.9}$ when integrating over $(\partial M)_s$ since e.g. at the point $(1/3,1/3,1/3)$ the argument of the square root becomes negative. In this case, how should one then actually define the integral $-\int_{(\partial M)_s}\mathbf{N}^TgdA$?
Question 2
My second question concerns conservation laws in the FE method, and connects to the issues raised in the first question. In the book that I am using, the authors claim that the FE method exactly reproduces the conservation law in 1). They note that the shape functions satisfy the identity $$7) \sum_{i=1}^n N_i = 1.$$ If we define a total force vector $\mathbf{f}$ by $\mathbf{f}=\mathbf{f}_b+\mathbf{f}_l$ and use equation 7), then from 2), 5) and 6) we obtain $$8)\sum_{i=1}^n f_i = 0. $$
However, as we discussed above, we cannot actually use 5) and 6) to calculate $\mathbf{f}_b$ and $\mathbf{f}_l$, but we must rather use 5') and 6'). Doing so, the relation 8) will of course no longer hold. I argued this point in a course I took based on the aforementioned book, and the reply I got (unless I misunderstood it) was that the FE method does indeed exactly implement the conservation law 1). However, based on the arguments just presented, I don't see how that can be the case.
Thus, my question is whether the FE method does indeed correctly implement the conservation law 1), and if so, how?
The short answer is yes, your intuition is correct, I would also have argued if someone had said the same thing. The approximation of a non polytopal domain by a straight mesh/ triangulation is called a "variational crime", due to the fact that consistency/ Galerkin orthogonality properties are violated.
Unfortunately your experience is very common in finite element literature and my colleague referred to this as the "smooth polygon" assumption, where an author assumes a domain is smooth, so that nice properties hold for the PDE, but then they consider example PDEs on a polytopal domain, so that it can be meshed exactly. For example IF the domain is polytopal, then the deduction is correct, and the conservation law can be replicated.
Otherwise, one must use modified finite element spaces, either by using a curvilear mesh, or a straight edge Triangulation that uses nonaffine maps to define the finite element space. Also, in the special case where $Q$ and $g$ are constant, then it can be conserved, as the source functions are then geometry independent.
Something else that also seems to have been overlooked is that the pure Neumann problem is singular, since any constant fuction is in the kernel of the operator. To overcome this, either a lagrange multiplier should be used (and therefore the variational formulation changes, and so the conservation law won't be replicated), or one has to modify the basis functions so that they integrate to zero (so that the FE solution integrates to zero, and we remove the singularity). If this is the case, then we lose the property $\sum N_i=1$, and the main deduction cannot be made.
Update: It seems that majoritively, your question is about what I have referred to as a "variational crime" in the inexact approximation of the computational domain, rather than necessarily the violation of a conservation law. I will try to summarise a few points:
Variational crime: - generally corresponds to any case in which the variational form is inexact. Polytopal approximation of a curved domain is one such example, but also so is e.g. numerical integration which ubiquitous in FEM and many other applications as it allows for the efficient and accurate approximation of integrals. See e.g. these lecture notes: https://people.maths.ox.ac.uk/suli/fem.pdf
Accuracy: In the case of the polytopal approximation of a curved domain, e.g., the unit disk, one will notice a cap on convergence rates, I have observed in many cases that if one approximates the unit disk with a simplicial mesh, even when the solution is smooth, the convergence rates are capped at $O(h^2)$
Literature: a good bit of the original literature is from the 70s & 80s:
Capturing the domain exactly:
Christine Bernardi: Optimal Finite-Element Interpolation on Curved Domains, https://www.jstor.org/stable/2157925
Scott, L. Ridgway: Finite element techniques for curved boundaries, https://dspace.mit.edu/handle/1721.1/12182
Isoparametric (polynomial) domain approximation: Optimal Isoparametric Finite Elements and Error Estimates for Domains Involving Curved Boundaries, M. Lenoir, https://www.jstor.org/stable/2157524.
I can also shamelessly plug some of my own work here:
Another point to consider here: if your true domain is not convex, the polytopal approximation could lie both inside and outside of the true domain.