I am solving 2 coupled PDEs in a single material with anisotropic physical property S =\begin{bmatrix} S_{xx} & 0 \\ 0 & S_{yy}\end{bmatrix}, all other physical properties are scalar constants. The region being a quarter of an annulus, with therefore 4 boundaries.
It is question of the heat equation \nabla \cdot \vec J_U=0 and the conservation of electrical charge in steady state: \nabla \cdot \vec J =0.
Where \vec J_U =-\kappa \nabla T + ST\vec J + V\vec J and \vec J =-\sigma \nabla V - \sigma S \nabla T. I am therefore solving for V and T with finite elements with a mixed element scheme. My goal is to build \vec J and \vec J_U once V and T are solved for, so that I can compute these fluxes along the boundaries.
The boundary conditions are a fixed temperature on 2 boundaries, i.e. Dirichlet boundary conditions for T on 2 sides. The material being thermally isolated, I also want natural Neumann boundary conditions for T on the remaining 2 sides, and I want no entering electric current on any side, which means \vec J has to be parallel to all boundaries. This translates as a complicated value of V on the boundaries, but which arenât enforced as neither Neumann nor Dirichlet b.c.s are far as I know. FEniCSx seems to be able to figure it out pretty well with the following weak form:
J_vector = -sigma * grad(volt) - sigma * S_tensor * grad(temp)
F_T = dot(-Îș * grad(temp), grad(u)) * dx + dot(sigma * temp * S_tensor* J_vector, grad(u)) * dx + dot(volt * J_vector, grad(u)) * dx
F_V = -dot(grad(v), sigma * grad(volt))*dx -dot(grad(v), sigma * S_tensor * grad(temp))*dx
weak_form = F_T + F_V
which I reached by doing \nabla \cdot \vec J_U = \nabla \cdot (-\kappa \nabla T) +\nabla \cdot (TS\vec J) + \nabla \cdot (V\vec J)=0, integrated by parts the 2nd and 3rd terms, assumed that the âtest functionâ u (which isnât really a test function in FEniCSx since I use a mixed element space) vanishes on the boundaries. This means I assumed \int _{\partial \Omega}uST\vec J \cdot \hat n ds = \int _{\partial \Omega}uV\vec J \cdot \hat n ds=0. I am not sure whether I can assume this⊠Hence me posting here.
And F_V is found from the 2nd PDEâs with a simple integration by parts.
I obtain a result that makes a lot of sense to me, it agrees pretty well to an approximate solution to this problem (but without the coupling between V and T). I believe the implementation is correct, but I am not 100% sure because of the fluxes I may have ignored by assuming the test functions to vanish on the boundaries.
Also, I do not quite understand what is going on when I do not specify any Neumann boundary conditions. âNaturalâ ones are assumes, yes, okay, but what does it mean here? Which flux(es) are zero on the boundaries if I do not provide any Neumann b.c.s ?
For information, the obtained \vec J is displayed on the picture below. It agrees almost perfectly with the expected one.
Here is V and some isolines. It seems like The isolines are perpendicular to the boundaries where no thermal boundary conditions have been applied.
And for completeness, here is T, so itâs pretty clear which boundaries have Dirichlet boundary conditions applied (the inner and outer radii).
Edit: I think I start to understand what happens regarding which fluxes are zero if I donât specify any boundary condition (neither Dirichlet nor Neumann). Here, since the gradient is perpendicular to isolines, it is evident that on the 2 boundaries without any boundary conditions, both \nabla T and \nabla V are parallel to the boundaries, meaning they have no normal component there.
The case of V is a bit more special than that of T because V has absolutely no boundary condition specified at all. The gradient of V is oblique to the curved boundaries where T is kept fixed, whereas \nabla T is perpendicular to these boundaries, which looks good to me.