Some progress

Fixed an issue with random integer numbers.
Cylindrical coordinates are not perfect yet:
  - Box (cylinder) with initial constant density loses particles at r =
    0
  - Injection density still low in r = 0
This commit is contained in:
Jorge Gonzalez 2024-07-06 19:14:44 +02:00
commit 626e970d82
5 changed files with 31 additions and 8 deletions

View file

@ -226,11 +226,6 @@ MODULE moduleMesh2DCyl
REAL(8):: p1(1:2), p2(1:2)
rnd = random()
! IF (self%r(1) == 0.D0 .OR. &
! self%r(2) == 0.D0) THEN
! rnd = rnd**(1.D0/3.D0)
!
! END IF
p1 = (/self%z(1), self%r(1) /)
p2 = (/self%z(2), self%r(2) /)

View file

@ -296,6 +296,20 @@ MODULE moduleMeshInputGmsh2
CLOSE(10)
! Adjust node volume at axis
SELECT CASE(self%geometry)
CASE("Cyl")
DO n = 1, numNodes
r = self%nodes(n)%obj%getCoordinates()
IF (r(2) == 0.D0) THEN
self%nodes(n)%obj%v = self%nodes(n)%obj%v * 2.0D0!2.0D0/3.0D0
END IF
END DO
END SELECT
!Call mesh connectivity
CALL self%connectMesh

View file

@ -495,6 +495,20 @@ MODULE moduleMeshInputVTU
END SELECT
END DO
! Adjust node volume at axis
SELECT CASE(self%geometry)
CASE("Cyl")
DO n = 1, numNodes
r = self%nodes(n)%obj%getCoordinates()
IF (r(2) == 0.D0) THEN
self%nodes(n)%obj%v = self%nodes(n)%obj%v * 2.0D0!2.0D0/3.0D0
END IF
END DO
END SELECT
!Call mesh connectivity
CALL self%connectMesh