RemDelaporteMathurin / 3-MOT

3-MOT is a multi-physics software relying on FEniCS.
3 stars 1 forks source link

The fluxes don't seem to be right #25

Closed RemDelaporteMathurin closed 6 years ago

RemDelaporteMathurin commented 6 years ago

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

RemDelaporteMathurin commented 6 years ago

Open a new branch named test_fluxes to investigate.

RemDelaporteMathurin commented 6 years ago

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 screenshot 2018-08-09_09-50-55

Here are the experiments I ran Flux calculation.zip