Reorganization of boundaries Particles
This commit is contained in:
parent
891da162cc
commit
d680112764
1 changed files with 123 additions and 106 deletions
|
|
@ -663,50 +663,6 @@ MODULE moduleMesh
|
||||||
|
|
||||||
end type boundaryParticleGeneric
|
end type boundaryParticleGeneric
|
||||||
|
|
||||||
interface
|
|
||||||
! Init interfaces
|
|
||||||
! wallTemeprature
|
|
||||||
module subroutine wallTemperature_init(boundary, T, c)
|
|
||||||
CLASS(boundaryParticleGeneric), ALLOCATABLE, INTENT(inout):: boundary
|
|
||||||
REAL(8), INTENT(in):: T, c !Wall temperature and specific heat
|
|
||||||
|
|
||||||
end subroutine wallTemperature_init
|
|
||||||
|
|
||||||
module subroutine ionization_init(boundary, mImpact, m0, n0, v0, T0, ion, effTime, crossSection, eThreshold, electronSecondary)
|
|
||||||
class(boundaryParticleGeneric), allocatable, intent(inout):: boundary
|
|
||||||
real(8), intent(in):: mImpact
|
|
||||||
real(8), intent(in):: m0, n0, v0(1:3), T0 !Neutral properties
|
|
||||||
integer, intent(in):: ion
|
|
||||||
real(8), intent(in):: effTime
|
|
||||||
character(:), allocatable, intent(in):: crossSection
|
|
||||||
real(8), intent(in):: eThreshold
|
|
||||||
integer, optional, intent(in):: electronSecondary
|
|
||||||
|
|
||||||
end subroutine ionization_init
|
|
||||||
|
|
||||||
! quasiNeutrality
|
|
||||||
module subroutine quasiNeutrality_init(boundary, s_incident)
|
|
||||||
class(boundaryParticleGeneric), allocatable, intent(inout):: boundary
|
|
||||||
integer, intent(in):: s_incident
|
|
||||||
|
|
||||||
end subroutine quasiNeutrality_init
|
|
||||||
|
|
||||||
! outflowAdaptive
|
|
||||||
module subroutine outflowAdaptive_init(boundary, s_incident)
|
|
||||||
class(boundaryParticleGeneric), allocatable, intent(inout):: boundary
|
|
||||||
integer, intent(in):: s_incident
|
|
||||||
|
|
||||||
end subroutine outflowAdaptive_init
|
|
||||||
|
|
||||||
! Get the index of the species from its name
|
|
||||||
module function boundaryParticleName_to_Index(boundaryName) result(bp)
|
|
||||||
character(:), allocatable:: boundaryName
|
|
||||||
integer:: bp
|
|
||||||
|
|
||||||
end function boundaryParticleName_to_Index
|
|
||||||
|
|
||||||
end interface
|
|
||||||
|
|
||||||
abstract interface
|
abstract interface
|
||||||
! Apply the effects of the boundary to the particle
|
! Apply the effects of the boundary to the particle
|
||||||
subroutine applyParticle_interface(self, edge, part)
|
subroutine applyParticle_interface(self, edge, part)
|
||||||
|
|
@ -745,6 +701,18 @@ MODULE moduleMesh
|
||||||
|
|
||||||
END TYPE boundaryReflection
|
END TYPE boundaryReflection
|
||||||
|
|
||||||
|
interface
|
||||||
|
module subroutine reflection_apply(self, edge, part)
|
||||||
|
use moduleSpecies
|
||||||
|
|
||||||
|
class(boundaryReflection), intent(inout):: self
|
||||||
|
class(meshEdge), intent(inout):: edge
|
||||||
|
class(particle), intent(inout):: part
|
||||||
|
|
||||||
|
end subroutine reflection_apply
|
||||||
|
|
||||||
|
end interface
|
||||||
|
|
||||||
!Absorption boundary
|
!Absorption boundary
|
||||||
TYPE, PUBLIC, EXTENDS(boundaryParticleGeneric):: boundaryAbsorption
|
TYPE, PUBLIC, EXTENDS(boundaryParticleGeneric):: boundaryAbsorption
|
||||||
CONTAINS
|
CONTAINS
|
||||||
|
|
@ -752,6 +720,18 @@ MODULE moduleMesh
|
||||||
|
|
||||||
END TYPE boundaryAbsorption
|
END TYPE boundaryAbsorption
|
||||||
|
|
||||||
|
interface
|
||||||
|
module subroutine absorption_apply(self, edge, part)
|
||||||
|
use moduleSpecies
|
||||||
|
|
||||||
|
class(boundaryAbsorption), intent(inout):: self
|
||||||
|
class(meshEdge), intent(inout):: edge
|
||||||
|
class(particle), intent(inout):: part
|
||||||
|
|
||||||
|
end subroutine absorption_apply
|
||||||
|
|
||||||
|
end interface
|
||||||
|
|
||||||
!Transparent boundary
|
!Transparent boundary
|
||||||
TYPE, PUBLIC, EXTENDS(boundaryParticleGeneric):: boundaryTransparent
|
TYPE, PUBLIC, EXTENDS(boundaryParticleGeneric):: boundaryTransparent
|
||||||
CONTAINS
|
CONTAINS
|
||||||
|
|
@ -759,6 +739,18 @@ MODULE moduleMesh
|
||||||
|
|
||||||
END TYPE boundaryTransparent
|
END TYPE boundaryTransparent
|
||||||
|
|
||||||
|
interface
|
||||||
|
module subroutine transparent_apply(self, edge, part)
|
||||||
|
use moduleSpecies
|
||||||
|
|
||||||
|
class(boundaryTransparent), intent(inout):: self
|
||||||
|
class(meshEdge), intent(inout):: edge
|
||||||
|
class(particle), intent(inout):: part
|
||||||
|
|
||||||
|
end subroutine transparent_apply
|
||||||
|
|
||||||
|
end interface
|
||||||
|
|
||||||
!Symmetry axis
|
!Symmetry axis
|
||||||
TYPE, PUBLIC, EXTENDS(boundaryParticleGeneric):: boundaryAxis
|
TYPE, PUBLIC, EXTENDS(boundaryParticleGeneric):: boundaryAxis
|
||||||
CONTAINS
|
CONTAINS
|
||||||
|
|
@ -766,6 +758,18 @@ MODULE moduleMesh
|
||||||
|
|
||||||
END TYPE boundaryAxis
|
END TYPE boundaryAxis
|
||||||
|
|
||||||
|
interface
|
||||||
|
module subroutine symmetryAxis_apply(self, edge, part)
|
||||||
|
use moduleSpecies
|
||||||
|
|
||||||
|
class(boundaryAxis), intent(inout):: self
|
||||||
|
class(meshEdge), intent(inout):: edge
|
||||||
|
class(particle), intent(inout):: part
|
||||||
|
|
||||||
|
end subroutine symmetryAxis_apply
|
||||||
|
|
||||||
|
end interface
|
||||||
|
|
||||||
!Wall Temperature boundary
|
!Wall Temperature boundary
|
||||||
TYPE, PUBLIC, EXTENDS(boundaryParticleGeneric):: boundaryWallTemperature
|
TYPE, PUBLIC, EXTENDS(boundaryParticleGeneric):: boundaryWallTemperature
|
||||||
!Thermal velocity of the wall: square root(Wall temperature X specific heat)
|
!Thermal velocity of the wall: square root(Wall temperature X specific heat)
|
||||||
|
|
@ -775,6 +779,24 @@ MODULE moduleMesh
|
||||||
|
|
||||||
END TYPE boundaryWallTemperature
|
END TYPE boundaryWallTemperature
|
||||||
|
|
||||||
|
interface
|
||||||
|
module subroutine wallTemperature_init(boundary, T, c)
|
||||||
|
CLASS(boundaryParticleGeneric), ALLOCATABLE, INTENT(inout):: boundary
|
||||||
|
REAL(8), INTENT(in):: T, c !Wall temperature and specific heat
|
||||||
|
|
||||||
|
end subroutine wallTemperature_init
|
||||||
|
|
||||||
|
module subroutine wallTemperature_apply(self, edge, part)
|
||||||
|
use moduleSpecies
|
||||||
|
|
||||||
|
class(boundaryWallTemperature), intent(inout):: self
|
||||||
|
class(meshEdge), intent(inout):: edge
|
||||||
|
class(particle), intent(inout):: part
|
||||||
|
|
||||||
|
end subroutine wallTemperature_apply
|
||||||
|
|
||||||
|
end interface
|
||||||
|
|
||||||
!Ionization boundary
|
!Ionization boundary
|
||||||
TYPE, PUBLIC, EXTENDS(boundaryParticleGeneric):: boundaryIonization
|
TYPE, PUBLIC, EXTENDS(boundaryParticleGeneric):: boundaryIonization
|
||||||
REAL(8):: m0, n0, v0(1:3), vTh !Properties of background neutrals.
|
REAL(8):: m0, n0, v0(1:3), vTh !Properties of background neutrals.
|
||||||
|
|
@ -791,6 +813,30 @@ MODULE moduleMesh
|
||||||
|
|
||||||
END TYPE boundaryIonization
|
END TYPE boundaryIonization
|
||||||
|
|
||||||
|
interface
|
||||||
|
module subroutine ionization_init(boundary, mImpact, m0, n0, v0, T0, ion, effTime, crossSection, eThreshold, electronSecondary)
|
||||||
|
class(boundaryParticleGeneric), allocatable, intent(inout):: boundary
|
||||||
|
real(8), intent(in):: mImpact
|
||||||
|
real(8), intent(in):: m0, n0, v0(1:3), T0 !Neutral properties
|
||||||
|
integer, intent(in):: ion
|
||||||
|
real(8), intent(in):: effTime
|
||||||
|
character(:), allocatable, intent(in):: crossSection
|
||||||
|
real(8), intent(in):: eThreshold
|
||||||
|
integer, optional, intent(in):: electronSecondary
|
||||||
|
|
||||||
|
end subroutine ionization_init
|
||||||
|
|
||||||
|
module subroutine ionization_apply(self, edge, part)
|
||||||
|
use moduleSpecies
|
||||||
|
|
||||||
|
class(boundaryIonization), intent(inout):: self
|
||||||
|
class(meshEdge), intent(inout):: edge
|
||||||
|
class(particle), intent(inout):: part
|
||||||
|
|
||||||
|
end subroutine ionization_apply
|
||||||
|
|
||||||
|
end interface
|
||||||
|
|
||||||
! Ensures quasi-neutrality by changing the reflection coefficient
|
! Ensures quasi-neutrality by changing the reflection coefficient
|
||||||
type, public, extends(boundaryParticleGeneric):: boundaryQuasiNeutrality
|
type, public, extends(boundaryParticleGeneric):: boundaryQuasiNeutrality
|
||||||
real(8), allocatable:: alpha(:) ! Reflection parameter
|
real(8), allocatable:: alpha(:) ! Reflection parameter
|
||||||
|
|
@ -801,6 +847,24 @@ MODULE moduleMesh
|
||||||
|
|
||||||
end type boundaryQuasiNeutrality
|
end type boundaryQuasiNeutrality
|
||||||
|
|
||||||
|
interface
|
||||||
|
module subroutine quasiNeutrality_init(boundary, s_incident)
|
||||||
|
class(boundaryParticleGeneric), allocatable, intent(inout):: boundary
|
||||||
|
integer, intent(in):: s_incident
|
||||||
|
|
||||||
|
end subroutine quasiNeutrality_init
|
||||||
|
|
||||||
|
module subroutine quasiNeutrality_apply(self, edge, part)
|
||||||
|
use moduleSpecies
|
||||||
|
|
||||||
|
class(boundaryQuasiNeutrality), intent(inout):: self
|
||||||
|
class(meshEdge), intent(inout):: edge
|
||||||
|
class(particle), intent(inout):: part
|
||||||
|
|
||||||
|
end subroutine quasiNeutrality_apply
|
||||||
|
|
||||||
|
end interface
|
||||||
|
|
||||||
!Boundary for quasi-neutral outflow adjusting reflection coefficient
|
!Boundary for quasi-neutral outflow adjusting reflection coefficient
|
||||||
type, public, extends(boundaryParticleGeneric):: boundaryOutflowAdaptive
|
type, public, extends(boundaryParticleGeneric):: boundaryOutflowAdaptive
|
||||||
real(8), allocatable:: velocity_shift(:)
|
real(8), allocatable:: velocity_shift(:)
|
||||||
|
|
@ -812,68 +876,11 @@ MODULE moduleMesh
|
||||||
end type boundaryOutflowAdaptive
|
end type boundaryOutflowAdaptive
|
||||||
|
|
||||||
interface
|
interface
|
||||||
module subroutine reflection_apply(self, edge, part)
|
module subroutine outflowAdaptive_init(boundary, s_incident)
|
||||||
use moduleSpecies
|
class(boundaryParticleGeneric), allocatable, intent(inout):: boundary
|
||||||
|
integer, intent(in):: s_incident
|
||||||
|
|
||||||
class(boundaryReflection), intent(inout):: self
|
end subroutine outflowAdaptive_init
|
||||||
class(meshEdge), intent(inout):: edge
|
|
||||||
class(particle), intent(inout):: part
|
|
||||||
|
|
||||||
end subroutine reflection_apply
|
|
||||||
|
|
||||||
module subroutine absorption_apply(self, edge, part)
|
|
||||||
use moduleSpecies
|
|
||||||
|
|
||||||
class(boundaryAbsorption), intent(inout):: self
|
|
||||||
class(meshEdge), intent(inout):: edge
|
|
||||||
class(particle), intent(inout):: part
|
|
||||||
|
|
||||||
end subroutine absorption_apply
|
|
||||||
|
|
||||||
module subroutine transparent_apply(self, edge, part)
|
|
||||||
use moduleSpecies
|
|
||||||
|
|
||||||
class(boundaryTransparent), intent(inout):: self
|
|
||||||
class(meshEdge), intent(inout):: edge
|
|
||||||
class(particle), intent(inout):: part
|
|
||||||
|
|
||||||
end subroutine transparent_apply
|
|
||||||
|
|
||||||
module subroutine symmetryAxis_apply(self, edge, part)
|
|
||||||
use moduleSpecies
|
|
||||||
|
|
||||||
class(boundaryAxis), intent(inout):: self
|
|
||||||
class(meshEdge), intent(inout):: edge
|
|
||||||
class(particle), intent(inout):: part
|
|
||||||
|
|
||||||
end subroutine symmetryAxis_apply
|
|
||||||
|
|
||||||
module subroutine wallTemperature_apply(self, edge, part)
|
|
||||||
use moduleSpecies
|
|
||||||
|
|
||||||
class(boundaryWallTemperature), intent(inout):: self
|
|
||||||
class(meshEdge), intent(inout):: edge
|
|
||||||
class(particle), intent(inout):: part
|
|
||||||
|
|
||||||
end subroutine wallTemperature_apply
|
|
||||||
|
|
||||||
module subroutine ionization_apply(self, edge, part)
|
|
||||||
use moduleSpecies
|
|
||||||
|
|
||||||
class(boundaryIonization), intent(inout):: self
|
|
||||||
class(meshEdge), intent(inout):: edge
|
|
||||||
class(particle), intent(inout):: part
|
|
||||||
|
|
||||||
end subroutine ionization_apply
|
|
||||||
|
|
||||||
module subroutine quasiNeutrality_apply(self, edge, part)
|
|
||||||
use moduleSpecies
|
|
||||||
|
|
||||||
class(boundaryQuasiNeutrality), intent(inout):: self
|
|
||||||
class(meshEdge), intent(inout):: edge
|
|
||||||
class(particle), intent(inout):: part
|
|
||||||
|
|
||||||
end subroutine quasiNeutrality_apply
|
|
||||||
|
|
||||||
module subroutine outflowAdaptive_apply(self, edge, part)
|
module subroutine outflowAdaptive_apply(self, edge, part)
|
||||||
use moduleSpecies
|
use moduleSpecies
|
||||||
|
|
@ -884,7 +891,10 @@ MODULE moduleMesh
|
||||||
|
|
||||||
end subroutine outflowAdaptive_apply
|
end subroutine outflowAdaptive_apply
|
||||||
|
|
||||||
! Generic basic boundary conditions to use internally in the code
|
end interface
|
||||||
|
|
||||||
|
! Generic basic boundary conditions to use internally in the code
|
||||||
|
interface
|
||||||
module subroutine genericReflection(edge, part)
|
module subroutine genericReflection(edge, part)
|
||||||
use moduleSpecies
|
use moduleSpecies
|
||||||
|
|
||||||
|
|
@ -927,6 +937,13 @@ MODULE moduleMesh
|
||||||
type(boundaryParticleCont), allocatable, target:: boundariesParticle(:)
|
type(boundaryParticleCont), allocatable, target:: boundariesParticle(:)
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
! Get the index of the species from its name
|
||||||
|
module function boundaryParticleName_to_Index(boundaryName) result(bp)
|
||||||
|
character(:), allocatable:: boundaryName
|
||||||
|
integer:: bp
|
||||||
|
|
||||||
|
end function boundaryParticleName_to_Index
|
||||||
|
|
||||||
! Update the particle boundary models
|
! Update the particle boundary models
|
||||||
module subroutine boundariesParticle_update()
|
module subroutine boundariesParticle_update()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue