Skeleton for new injection type
This commit is contained in:
parent
555ebd6771
commit
d3f1f0808e
3 changed files with 37 additions and 2 deletions
|
|
@ -71,6 +71,9 @@ PROGRAM fpakc
|
||||||
! Update EM boundary models
|
! Update EM boundary models
|
||||||
call boundariesEM_update()
|
call boundariesEM_update()
|
||||||
|
|
||||||
|
! Update injects
|
||||||
|
call updateInjects
|
||||||
|
|
||||||
!Checks if a species needs to me moved in this iteration
|
!Checks if a species needs to me moved in this iteration
|
||||||
CALL solver%updatePushSpecies()
|
CALL solver%updatePushSpecies()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1432,6 +1432,7 @@ MODULE moduleInput
|
||||||
REAL(8), ALLOCATABLE:: temperature(:), normal(:)
|
REAL(8), ALLOCATABLE:: temperature(:), normal(:)
|
||||||
REAL(8):: flow
|
REAL(8):: flow
|
||||||
CHARACTER(:), ALLOCATABLE:: units
|
CHARACTER(:), ALLOCATABLE:: units
|
||||||
|
character(:), allocatable:: type
|
||||||
INTEGER:: physicalSurface
|
INTEGER:: physicalSurface
|
||||||
INTEGER:: particlesPerEdge
|
INTEGER:: particlesPerEdge
|
||||||
INTEGER:: sp
|
INTEGER:: sp
|
||||||
|
|
@ -1457,11 +1458,16 @@ MODULE moduleInput
|
||||||
END IF
|
END IF
|
||||||
CALL config%get(object // '.flow', flow, found)
|
CALL config%get(object // '.flow', flow, found)
|
||||||
CALL config%get(object // '.units', units, found)
|
CALL config%get(object // '.units', units, found)
|
||||||
|
CALL config%get(object // '.type', type, found)
|
||||||
|
if (.not. found) then
|
||||||
|
! If no type is found, assume constant injection of particles
|
||||||
|
type = 'constant'
|
||||||
|
end if
|
||||||
CALL config%get(object // '.physicalSurface', physicalSurface, found)
|
CALL config%get(object // '.physicalSurface', physicalSurface, found)
|
||||||
particlesPerEdge = 0
|
particlesPerEdge = 0
|
||||||
CALL config%get(object // '.particlesPerEdge', particlesPerEdge, found)
|
CALL config%get(object // '.particlesPerEdge', particlesPerEdge, found)
|
||||||
|
|
||||||
CALL inject(i)%init(i, v, normal, temperature, flow, units, sp, physicalSurface, particlesPerEdge)
|
CALL inject(i)%init(i, v, normal, temperature, flow, units, type, sp, physicalSurface, particlesPerEdge)
|
||||||
|
|
||||||
CALL readVelDistr(config, inject(i), object)
|
CALL readVelDistr(config, inject(i), object)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ MODULE moduleInject
|
||||||
LOGICAL:: fixDirection !The injection of particles has a fix direction defined by n
|
LOGICAL:: fixDirection !The injection of particles has a fix direction defined by n
|
||||||
INTEGER:: nParticles !Number of particles to introduce each time step
|
INTEGER:: nParticles !Number of particles to introduce each time step
|
||||||
CLASS(speciesGeneric), POINTER:: species !Species of injection
|
CLASS(speciesGeneric), POINTER:: species !Species of injection
|
||||||
|
character(:), allocatable:: type
|
||||||
INTEGER:: nEdges
|
INTEGER:: nEdges
|
||||||
type(meshEdgePointer), allocatable:: edges(:)
|
type(meshEdgePointer), allocatable:: edges(:)
|
||||||
INTEGER, ALLOCATABLE:: particlesPerEdge(:) ! Particles per edge
|
INTEGER, ALLOCATABLE:: particlesPerEdge(:) ! Particles per edge
|
||||||
|
|
@ -31,7 +32,7 @@ MODULE moduleInject
|
||||||
|
|
||||||
CONTAINS
|
CONTAINS
|
||||||
!Initialize an injection of particles
|
!Initialize an injection of particles
|
||||||
SUBROUTINE initInject(self, i, v, n, temperature, flow, units, sp, ps, particlesPerEdge)
|
SUBROUTINE initInject(self, i, v, n, temperature, flow, units, type, sp, ps, particlesPerEdge)
|
||||||
USE moduleMesh
|
USE moduleMesh
|
||||||
USE moduleRefParam
|
USE moduleRefParam
|
||||||
USE moduleConstParam
|
USE moduleConstParam
|
||||||
|
|
@ -48,6 +49,7 @@ MODULE moduleInject
|
||||||
REAL(8):: tauInject
|
REAL(8):: tauInject
|
||||||
REAL(8), INTENT(in):: flow
|
REAL(8), INTENT(in):: flow
|
||||||
CHARACTER(:), ALLOCATABLE, INTENT(in):: units
|
CHARACTER(:), ALLOCATABLE, INTENT(in):: units
|
||||||
|
character(:), allocatable, intent(in):: type
|
||||||
INTEGER:: e
|
INTEGER:: e
|
||||||
REAL(8):: fluxPerStep = 0.D0
|
REAL(8):: fluxPerStep = 0.D0
|
||||||
|
|
||||||
|
|
@ -143,6 +145,14 @@ MODULE moduleInject
|
||||||
!Scale particles for different species steps
|
!Scale particles for different species steps
|
||||||
IF (self%nParticles == 0) CALL criticalError("The number of particles for inject is 0.", 'initInject')
|
IF (self%nParticles == 0) CALL criticalError("The number of particles for inject is 0.", 'initInject')
|
||||||
|
|
||||||
|
! Assign type to inject
|
||||||
|
select case(type)
|
||||||
|
case ('constant', 'quasiNeutral')
|
||||||
|
self%type = type
|
||||||
|
case default
|
||||||
|
call criticalError('No injection type ' // type // ' defined', 'initInject')
|
||||||
|
end select
|
||||||
|
|
||||||
END SUBROUTINE initInject
|
END SUBROUTINE initInject
|
||||||
|
|
||||||
!Injection of particles
|
!Injection of particles
|
||||||
|
|
@ -176,6 +186,22 @@ MODULE moduleInject
|
||||||
|
|
||||||
END SUBROUTINE doInjects
|
END SUBROUTINE doInjects
|
||||||
|
|
||||||
|
! Update the value of injects
|
||||||
|
subroutine updateInjects()
|
||||||
|
implicit none
|
||||||
|
|
||||||
|
integer:: i
|
||||||
|
|
||||||
|
do i = 1, nInject
|
||||||
|
select case(inject(i)%type)
|
||||||
|
case ('quasiNeutral')
|
||||||
|
print*, "Calculating quasi-neutrality"
|
||||||
|
|
||||||
|
end select
|
||||||
|
end do
|
||||||
|
|
||||||
|
end subroutine updateInjects
|
||||||
|
|
||||||
SUBROUTINE initVelDistMaxwellian(velDist, temperature, m)
|
SUBROUTINE initVelDistMaxwellian(velDist, temperature, m)
|
||||||
IMPLICIT NONE
|
IMPLICIT NONE
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue