Rework of injection of particles with a special focus in 2DCyl to ensure an homogeneous distribution. #51
4 changed files with 11 additions and 1 deletions
New injection based on surface to all geometries.
WARNING: 3DCart still not working (too tired to calculate things and I'm
not ussing it...)
commit
cb92462f36
|
|
@ -104,6 +104,7 @@ MODULE moduleMesh1DCart
|
||||||
USE moduleSpecies
|
USE moduleSpecies
|
||||||
USE moduleBoundary
|
USE moduleBoundary
|
||||||
USE moduleErrors
|
USE moduleErrors
|
||||||
|
USE moduleRefParam, ONLY: L_ref
|
||||||
IMPLICIT NONE
|
IMPLICIT NONE
|
||||||
|
|
||||||
CLASS(meshEdge1DCart), INTENT(out):: self
|
CLASS(meshEdge1DCart), INTENT(out):: self
|
||||||
|
|
@ -122,6 +123,8 @@ MODULE moduleMesh1DCart
|
||||||
|
|
||||||
self%x = r1(1)
|
self%x = r1(1)
|
||||||
|
|
||||||
|
self%surface = 1.D0 / L_ref**2
|
||||||
|
|
||||||
self%normal = (/ 1.D0, 0.D0, 0.D0 /)
|
self%normal = (/ 1.D0, 0.D0, 0.D0 /)
|
||||||
|
|
||||||
!Boundary index
|
!Boundary index
|
||||||
|
|
|
||||||
|
|
@ -104,6 +104,7 @@ MODULE moduleMesh1DRad
|
||||||
USE moduleSpecies
|
USE moduleSpecies
|
||||||
USE moduleBoundary
|
USE moduleBoundary
|
||||||
USE moduleErrors
|
USE moduleErrors
|
||||||
|
USE moduleRefParam, ONLY: L_ref
|
||||||
IMPLICIT NONE
|
IMPLICIT NONE
|
||||||
|
|
||||||
CLASS(meshEdge1DRad), INTENT(out):: self
|
CLASS(meshEdge1DRad), INTENT(out):: self
|
||||||
|
|
@ -122,6 +123,8 @@ MODULE moduleMesh1DRad
|
||||||
|
|
||||||
self%r = r1(1)
|
self%r = r1(1)
|
||||||
|
|
||||||
|
self%surface = 1.D0 / L_ref**2
|
||||||
|
|
||||||
self%normal = (/ 1.D0, 0.D0, 0.D0 /)
|
self%normal = (/ 1.D0, 0.D0, 0.D0 /)
|
||||||
|
|
||||||
!Boundary index
|
!Boundary index
|
||||||
|
|
|
||||||
|
|
@ -144,6 +144,7 @@ MODULE moduleMesh2DCart
|
||||||
USE moduleSpecies
|
USE moduleSpecies
|
||||||
USE moduleBoundary
|
USE moduleBoundary
|
||||||
USE moduleErrors
|
USE moduleErrors
|
||||||
|
USE moduleRefParam, ONLY: L_ref
|
||||||
IMPLICIT NONE
|
IMPLICIT NONE
|
||||||
|
|
||||||
CLASS(meshEdge2DCart), INTENT(out):: self
|
CLASS(meshEdge2DCart), INTENT(out):: self
|
||||||
|
|
@ -163,7 +164,7 @@ MODULE moduleMesh2DCart
|
||||||
r2 = self%n2%getCoordinates()
|
r2 = self%n2%getCoordinates()
|
||||||
self%x = (/r1(1), r2(1)/)
|
self%x = (/r1(1), r2(1)/)
|
||||||
self%y = (/r1(2), r2(2)/)
|
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
|
!Normal vector
|
||||||
self%normal = (/ -(self%y(2)-self%y(1)), &
|
self%normal = (/ -(self%y(2)-self%y(1)), &
|
||||||
self%x(2)-self%x(1) , &
|
self%x(2)-self%x(1) , &
|
||||||
|
|
|
||||||
|
|
@ -109,6 +109,7 @@ MODULE moduleMesh3DCart
|
||||||
USE moduleBoundary
|
USE moduleBoundary
|
||||||
USE moduleErrors
|
USE moduleErrors
|
||||||
USE moduleMath
|
USE moduleMath
|
||||||
|
USE moduleRefParam, ONLY: L_ref
|
||||||
IMPLICIT NONE
|
IMPLICIT NONE
|
||||||
|
|
||||||
CLASS(meshEdge3DCartTria), INTENT(out):: self
|
CLASS(meshEdge3DCartTria), INTENT(out):: self
|
||||||
|
|
@ -142,6 +143,8 @@ MODULE moduleMesh3DCart
|
||||||
self%normal = crossProduct(vec1, vec2)
|
self%normal = crossProduct(vec1, vec2)
|
||||||
self%normal = normalize(self%normal)
|
self%normal = normalize(self%normal)
|
||||||
|
|
||||||
|
self%surface = 1.D0/L_ref**2 !TODO: FIX THIS WHEN MOVING TO 3D
|
||||||
|
|
||||||
!Boundary index
|
!Boundary index
|
||||||
self%boundary => boundary(bt)
|
self%boundary => boundary(bt)
|
||||||
ALLOCATE(self%fBoundary(1:nSpecies))
|
ALLOCATE(self%fBoundary(1:nSpecies))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue