I have a question about the node model NodeVolume. NodeVolume is the control volume of a node, right? When I sum up all the NodeVolume, the result should be equal to the volume of the geometric model.
I tried this in the example diode_2d and diode_3d which DEVSIM provided. In 2D example, the geometry is a square with side length 1e-5 which area is 1e-10. And the sum of NodeVolume turns out right.
In the 3D example, the geometry is a cube with side length 1e-5 which volume is 1e-15. But the sum of NodeVolume is 1.1278697942240103e-15.
I tried other 2D examples as well. It turns out that the sum of NodeVolume is not always equal to the volume (or area) of the geometric model. Maybe my understanding of NodeVolume is wrong?
The examples I tried are cap2d DEVSIM provided and a mos2d example in the previous posts.
This is a tetrahedral element in the devsim example diode_3d which is generated by gmsh. The green patch is ElementEdgeCouple of one edge. The blue dots are centers of four triangles respectively, and the red dot is the center of this tetrahedron. It can be seen in the figure that the center of tetrahedron is outside the element and the center of some triangle is outside the triangle as well.
Thanks for reporting this issue. This is understood to be an issue with the quality of the mesh. You are correct that it is due to the calculation of the center of the element being outside.
If you are seeing this in 2D, I am hoping the NodeVolume calculation is very close to the volume of the whole device structure. This may be due to limits of the precision, and I would be interested in seeing the differences you are observing.