I think I have it

So the radius for the volume integral in the nodes has to be set with a
1/4 3/4 ratio to match the change in volume as the radius changes along
the volume.

This has a bigger impact close to the edge.

Still unsure if this is the "right" thing to do, but at least it works
okay (it seems).
This commit is contained in:
Jorge Gonzalez 2024-07-11 17:40:57 +02:00
commit 72dd3c9073

View file

@ -247,7 +247,7 @@ MODULE moduleMesh2DCyl
!QUAD FUNCTIONS !QUAD FUNCTIONS
!Init element !Init element
SUBROUTINE initCellQuad2DCyl(self, n, p, nodes) SUBROUTINE initCellQuad2DCyl(self, n, p, nodes)
USE moduleRefParam USE moduleRefParam, ONLY: L_ref
IMPLICIT NONE IMPLICIT NONE
CLASS(meshCell2DCylQuad), INTENT(out):: self CLASS(meshCell2DCylQuad), INTENT(out):: self
@ -594,17 +594,17 @@ MODULE moduleMesh2DCyl
r = DOT_PRODUCT(fPsi,self%r) r = DOT_PRODUCT(fPsi,self%r)
!Computes total volume of the cell !Computes total volume of the cell
self%volume = r*detJ*PI8 !2*pi * 4 (weight of 1 point 2D-Gaussian integral) self%volume = r*detJ*PI8 !2*pi * 4 (weight of 1 point 2D-Gaussian integral)
!Computes volume per node !Computes volume per node. Change the radius point to calculate the area to improve accuracy near the axis.
Xi = (/-5.D-1, -5.D-1, 0.D0/) Xi = (/-5.D-1, -0.25D0, 0.D0/)
r = self%gatherF(Xi, 4, self%r) r = self%gatherF(Xi, 4, self%r)
self%n1%v = self%n1%v + fPsi(1)*r*detJ*PI8 self%n1%v = self%n1%v + fPsi(1)*r*detJ*PI8
Xi = (/ 5.D-1, -5.D-1, 0.D0/) Xi = (/ 5.D-1, -0.25D0, 0.D0/)
r = self%gatherF(Xi, 4, self%r) r = self%gatherF(Xi, 4, self%r)
self%n2%v = self%n2%v + fPsi(2)*r*detJ*PI8 self%n2%v = self%n2%v + fPsi(2)*r*detJ*PI8
Xi = (/ 5.D-1, 5.D-1, 0.D0/) Xi = (/ 5.D-1, 0.75D0, 0.D0/)
r = self%gatherF(Xi, 4, self%r) r = self%gatherF(Xi, 4, self%r)
self%n3%v = self%n3%v + fPsi(3)*r*detJ*PI8 self%n3%v = self%n3%v + fPsi(3)*r*detJ*PI8
Xi = (/-5.D-1, 5.D-1, 0.D0/) Xi = (/-5.D-1, 0.75D0, 0.D0/)
r = self%gatherF(Xi, 4, self%r) r = self%gatherF(Xi, 4, self%r)
self%n4%v = self%n4%v + fPsi(4)*r*detJ*PI8 self%n4%v = self%n4%v + fPsi(4)*r*detJ*PI8