Rework of injection of particles with a special focus in 2DCyl to ensure an homogeneous distribution. #51

Merged
JorgeGonz merged 22 commits from issue/injection2DCyl into development 2024-07-11 18:51:43 +02:00
4 changed files with 11 additions and 1 deletions
Showing only changes of commit cb92462f36 - Show all commits

New injection based on surface to all geometries.

WARNING: 3DCart still not working (too tired to calculate things and I'm
    not ussing it...)
Jorge Gonzalez 2024-07-10 21:55:45 +02:00

View file

@ -104,6 +104,7 @@ MODULE moduleMesh1DCart
USE moduleSpecies
USE moduleBoundary
USE moduleErrors
USE moduleRefParam, ONLY: L_ref
IMPLICIT NONE
CLASS(meshEdge1DCart), INTENT(out):: self
@ -122,6 +123,8 @@ MODULE moduleMesh1DCart
self%x = r1(1)
self%surface = 1.D0 / L_ref**2
self%normal = (/ 1.D0, 0.D0, 0.D0 /)
!Boundary index

View file

@ -104,6 +104,7 @@ MODULE moduleMesh1DRad
USE moduleSpecies
USE moduleBoundary
USE moduleErrors
USE moduleRefParam, ONLY: L_ref
IMPLICIT NONE
CLASS(meshEdge1DRad), INTENT(out):: self
@ -122,6 +123,8 @@ MODULE moduleMesh1DRad
self%r = r1(1)
self%surface = 1.D0 / L_ref**2
self%normal = (/ 1.D0, 0.D0, 0.D0 /)
!Boundary index

View file

@ -144,6 +144,7 @@ MODULE moduleMesh2DCart
USE moduleSpecies
USE moduleBoundary
USE moduleErrors
USE moduleRefParam, ONLY: L_ref
IMPLICIT NONE
CLASS(meshEdge2DCart), INTENT(out):: self
@ -163,7 +164,7 @@ MODULE moduleMesh2DCart
r2 = self%n2%getCoordinates()
self%x = (/r1(1), r2(1)/)
self%y = (/r1(2), r2(2)/)
self%weight = 1.D0
self%surface = SQRT((self%x(2) - self%x(1))**2 + (self%y(2) - self%y(1))**2) / L_ref
!Normal vector
self%normal = (/ -(self%y(2)-self%y(1)), &
self%x(2)-self%x(1) , &

View file

@ -109,6 +109,7 @@ MODULE moduleMesh3DCart
USE moduleBoundary
USE moduleErrors
USE moduleMath
USE moduleRefParam, ONLY: L_ref
IMPLICIT NONE
CLASS(meshEdge3DCartTria), INTENT(out):: self
@ -142,6 +143,8 @@ MODULE moduleMesh3DCart
self%normal = crossProduct(vec1, vec2)
self%normal = normalize(self%normal)
self%surface = 1.D0/L_ref**2 !TODO: FIX THIS WHEN MOVING TO 3D
!Boundary index
self%boundary => boundary(bt)
ALLOCATE(self%fBoundary(1:nSpecies))