Still not working

Trying to have a very simple volume per node assuming a rectangle and
the density at the axis it higher than it should (kinda like when using
the more accurate volume calculation).

This is still weird. I also suspect that the size of the first cell in
the axis will also affect this...
This commit is contained in:
Jorge Gonzalez 2024-07-09 21:25:30 +02:00
commit 11831a973d

View file

@ -582,6 +582,8 @@ MODULE moduleMesh2DCyl
REAL(8):: detJ
REAL(8):: fPsi(1:4)
REAL(8):: dPsi(1:3, 1:4), pDer(1:3, 1:3)
REAL(8):: corrUp, corrDown
REAL(8):: dZ, r2, r1
self%volume = 0.D0
@ -593,12 +595,20 @@ MODULE moduleMesh2DCyl
fPsi = self%fPsi(Xi, 4)
r = DOT_PRODUCT(fPsi,self%r)
!Computes total volume of the cell
self%volume = r*detJ*PI8 !4*2*pi
self%volume = r*detJ*PI8 !2*pi * 4 (weight of 1 point 2D-Gaussian integral)
!Computes volume per node
self%n1%v = self%n1%v + fPsi(1)*self%volume
self%n2%v = self%n2%v + fPsi(2)*self%volume
self%n3%v = self%n3%v + fPsi(3)*self%volume
self%n4%v = self%n4%v + fPsi(4)*self%volume
! self%n1%v = self%n1%v + fPsi(1)*self%volume
! self%n2%v = self%n2%v + fPsi(2)*self%volume
! self%n3%v = self%n3%v + fPsi(3)*self%volume
! self%n4%v = self%n4%v + fPsi(4)*self%volume
dZ = MAXVAL(self%z) - MIN(self%z)
r2 = MAXVAL(self%r)
r1 = MINVAL(self%r)
self%n1%v = self%n1%v + dZ/2.D0 * PI * ( r2**2 - 3.0D0*r1**2 + 2.0D0*r2*r1)*0.25D0
self%n2%v = self%n2%v + dZ/2.D0 * PI * ( r2**2 - 3.0D0*r1**2 + 2.0D0*r2*r1)*0.25D0
self%n3%v = self%n3%v + dZ/2.D0 * PI * (3.0D0*r2**2 - r1**2 - 2.0D0*r2*r1)*0.25D0
self%n4%v = self%n4%v + dZ/2.D0 * PI * (3.0D0*r2**2 - r1**2 - 2.0D0*r2*r1)*0.25D0
END SUBROUTINE volumeQuad