First implementation of ionization boundary. Still some work to do.

This commit is contained in:
Jorge Gonzalez 2021-03-20 13:08:01 +01:00
commit 8cf50cda68
11 changed files with 247 additions and 105 deletions

View file

@ -1,4 +1,5 @@
MODULE moduleBoundary
USE moduleTable
!Generic type for boundaries
TYPE, PUBLIC:: boundaryGeneric
@ -24,7 +25,7 @@ MODULE moduleBoundary
END TYPE boundaryTransparent
!Transparent boundary
!Wall Temperature boundary
TYPE, PUBLIC, EXTENDS(boundaryGeneric):: boundaryWallTemperature
!Thermal velocity of the wall: square root(Wall temperature X specific heat)
REAL(8):: vTh
@ -32,6 +33,18 @@ MODULE moduleBoundary
END TYPE boundaryWallTemperature
!Ionization boundary
TYPE, PUBLIC, EXTENDS(boundaryGeneric):: boundaryIonization
REAL(8):: m0, n0, v0(1:3), T0 !Properties of background neutrals.
INTEGER:: sp !Ion species
TYPE(table1D):: crossSection
REAL(8):: eThreshold
REAL(8):: deltaV
CONTAINS
END TYPE boundaryIonization
!Symmetry axis
TYPE, PUBLIC, EXTENDS(boundaryGeneric):: boundaryAxis
CONTAINS
@ -86,4 +99,34 @@ MODULE moduleBoundary
END SUBROUTINE initWallTemperature
SUBROUTINE initIonization(boundary, m0, n0, v0, T0, speciesID, crossSection, eThreshold)
USE moduleRefParam
USE moduleSpecies
USE moduleCaseParam
USE moduleConstParam
IMPLICIT NONE
CLASS(boundaryGeneric), ALLOCATABLE, INTENT(out):: boundary
REAL(8), INTENT(in):: m0, n0, v0(1:3), T0
INTEGER:: speciesID
CHARACTER(:), ALLOCATABLE, INTENT(in):: crossSection
REAL(8), INTENT(in):: eThreshold
ALLOCATE(boundaryIonization:: boundary)
SELECT TYPE(boundary)
TYPE IS(boundaryIonization)
boundary%m0 = m0 / m_ref
boundary%n0 = n0
boundary%v0 = v0 / v_ref
boundary%T0 = T0 / T_ref
boundary%sp = speciesID
CALL boundary%crossSection%init(crossSection)
CALL boundary%crossSection%convert(eV2J/(m_ref*v_ref**2), 1.D0/L_ref**2)
boundary%eThreshold = eThreshold*eV2J/(m_ref*v_ref**2)
END SELECT
END SUBROUTINE initIonization
END MODULE moduleBoundary