Closed RemDelaporteMathurin closed 6 years ago
Open a new branch named test_fluxes to investigate.
Okay: the fluxes are perfect. The error comes from the mesh refinement and this is intrinsic to FEM. If we calculate fluxes once steady state is reached, the fluxes are fine. But if the gradient is to strong, some values go negatives and eventually the fluxes are wrong. For example, if your initial value is 0 and you set a DC boundary condition of 1 on a boundary, you will have an infinite gradient and thus what French call "Oreilles de lapin" as shown below. The solution for a short time, goes above 1 which is not possible in physics. To avoid this, the mesh has to be refined at the edges. The thing is: even at quality 2 I still have these oreilles de lapin. I would need more power @anthonyhollingsworth ;D
Here are the experiments I ran Flux calculation.zip
This should be investigated. When applying a flux (Neuman) (1W/m2 for instance) on a surface and then trying to calculate it in post-processing, the values don't match.
Tests to run
I
flux=-thermal_conductivity*assemble(dot(grad(T),n)*ds(i))
,n
being the normal vector