First Implementation of Tria elements in 2D Cylindrical space.

Reading of this type of element needs to be implemented.

Fixed a bug in which the L_ref (reference length) was not correctly
being calculated for neutral solver.
This commit is contained in:
Jorge Gonzalez 2020-11-18 10:32:18 +01:00
commit 20dc4d4012
5 changed files with 750 additions and 253 deletions

View file

@ -56,7 +56,7 @@ MODULE moduleEM
elField = 0.D0 elField = 0.D0
xi = part%xLog xi = part%xi
elField = mesh%vols(part%e_p)%obj%gatherEF(xi) elField = mesh%vols(part%e_p)%obj%gatherEF(xi)

View file

@ -86,8 +86,8 @@ MODULE moduleInput
v_ref = DSQRT(kb*T_ref/m_ref) !reference velocity v_ref = DSQRT(kb*T_ref/m_ref) !reference velocity
!TODO: Make this solver dependent !TODO: Make this solver dependent
IF (found_r) THEN IF (found_r) THEN
L_ref = 1.D0/(sigma_ref*n_ref) !mean free path
sigma_ref = PI*(r_ref+r_ref)**2 !reference cross section sigma_ref = PI*(r_ref+r_ref)**2 !reference cross section
L_ref = 1.D0/(sigma_ref*n_ref) !mean free path
ELSE ELSE
L_ref = DSQRT(kb*T_ref*eps_0/n_ref)/qe !Debye length L_ref = DSQRT(kb*T_ref*eps_0/n_ref)/qe !Debye length
@ -483,7 +483,6 @@ MODULE moduleInput
CALL inject(i)%init(i, v, normal, T, flow, units, pt, physicalSurface) CALL inject(i)%init(i, v, normal, T, flow, units, pt, physicalSurface)
END DO END DO
PRINT *, inject(:)%nParticles
!Allocate array for injected particles !Allocate array for injected particles
IF (nPartInj > 0) THEN IF (nPartInj > 0) THEN

View file

@ -130,8 +130,11 @@ MODULE moduleMesh
PROCEDURE(gatherEF_interface), DEFERRED, PASS:: gatherEF PROCEDURE(gatherEF_interface), DEFERRED, PASS:: gatherEF
PROCEDURE(getNodesVol_interface), DEFERRED, PASS:: getNodes PROCEDURE(getNodesVol_interface), DEFERRED, PASS:: getNodes
PROCEDURE(elemF_interface), DEFERRED, PASS:: elemF PROCEDURE(elemF_interface), DEFERRED, PASS:: elemF
PROCEDURE(collision_interface), DEFERRED, PASS:: collision
PROCEDURE(findCell_interface), DEFERRED, PASS:: findCell PROCEDURE(findCell_interface), DEFERRED, PASS:: findCell
PROCEDURE(phy2log_interface), DEFERRED, PASS:: phy2log
PROCEDURE(inside_interface), DEFERRED, NOPASS:: inside
PROCEDURE(nextElement_interface), DEFERRED, PASS:: nextElement
PROCEDURE(collision_interface), DEFERRED, PASS:: collision
PROCEDURE(resetOutput_interface), DEFERRED, PASS:: resetOutput PROCEDURE(resetOutput_interface), DEFERRED, PASS:: resetOutput
END TYPE meshVol END TYPE meshVol
@ -164,7 +167,6 @@ MODULE moduleMesh
END FUNCTION gatherEF_interface END FUNCTION gatherEF_interface
PURE FUNCTION getNodesVol_interface(self) RESULT(n) PURE FUNCTION getNodesVol_interface(self) RESULT(n)
IMPORT:: meshVol IMPORT:: meshVol
CLASS(meshVol), INTENT(in):: self CLASS(meshVol), INTENT(in):: self
INTEGER, ALLOCATABLE:: n(:) INTEGER, ALLOCATABLE:: n(:)
@ -172,7 +174,6 @@ MODULE moduleMesh
END FUNCTION getNodesVol_interface END FUNCTION getNodesVol_interface
PURE FUNCTION elemF_interface(self, source) RESULT(localF) PURE FUNCTION elemF_interface(self, source) RESULT(localF)
IMPORT:: meshVol IMPORT:: meshVol
CLASS(meshVol), INTENT(in):: self CLASS(meshVol), INTENT(in):: self
REAL(8), INTENT(in):: source(1:) REAL(8), INTENT(in):: source(1:)
@ -180,11 +181,13 @@ MODULE moduleMesh
END FUNCTION elemF_interface END FUNCTION elemF_interface
SUBROUTINE collision_interface(self) SUBROUTINE nextElement_interface(self, xi, nextElement)
IMPORT:: meshVol IMPORT:: meshVol
CLASS(meshVol), INTENT(inout):: self CLASS(meshVol), INTENT(in):: self
REAL(8), INTENT(in):: xi(1:3)
CLASS(*), POINTER, INTENT(out):: nextElement
END SUBROUTINE collision_interface END SUBROUTINE nextElement_interface
SUBROUTINE findCell_interface(self, part, oldCell) SUBROUTINE findCell_interface(self, part, oldCell)
USE moduleSpecies USE moduleSpecies
@ -196,6 +199,27 @@ MODULE moduleMesh
END SUBROUTINE findCell_interface END SUBROUTINE findCell_interface
PURE FUNCTION phy2log_interface(self,r) RESULT(xN)
IMPORT:: meshVol
CLASS(meshVol), INTENT(in):: self
REAL(8), INTENT(in):: r(1:3)
REAL(8):: xN(1:3)
END FUNCTION phy2log_interface
PURE FUNCTION inside_interface(xi) RESULT(ins)
IMPORT:: meshVol
REAL(8), INTENT(in):: xi(1:3)
LOGICAL:: ins
END FUNCTION inside_interface
SUBROUTINE collision_interface(self)
IMPORT:: meshVol
CLASS(meshVol), INTENT(inout):: self
END SUBROUTINE collision_interface
SUBROUTINE resetOutput_interface(self) SUBROUTINE resetOutput_interface(self)
IMPORT:: meshVol IMPORT:: meshVol
CLASS(meshVol), INTENT(inout):: self CLASS(meshVol), INTENT(inout):: self

File diff suppressed because it is too large Load diff

View file

@ -31,7 +31,7 @@ MODULE moduleSpecies
REAL(8):: v(1:3) !Velocity REAL(8):: v(1:3) !Velocity
INTEGER:: pt !Particle species id INTEGER:: pt !Particle species id
INTEGER:: e_p !Index of element in which the particle is located INTEGER:: e_p !Index of element in which the particle is located
REAL(8):: xLog(1:3) !Logical coordinates of particle in element e_p. REAL(8):: xi(1:3) !Logical coordinates of particle in element e_p.
LOGICAL:: n_in !Flag that indicates if a particle is in the domain LOGICAL:: n_in !Flag that indicates if a particle is in the domain
REAL(8):: weight=0.D0 !weight of particle REAL(8):: weight=0.D0 !weight of particle
REAL(8):: qm = 0.D0 !charge over mass REAL(8):: qm = 0.D0 !charge over mass