The program reads the case but stops while doind the simulation
This commit is contained in:
parent
be9b7be280
commit
31f0b510bc
5 changed files with 224 additions and 215 deletions
|
|
@ -25,115 +25,11 @@ submodule(moduleMesh) boundaryParticle
|
|||
|
||||
end function boundaryParticleName_to_Index
|
||||
|
||||
module subroutine initBoundaryParticle(self, config, object, b)
|
||||
use json_module
|
||||
use moduleRefParam, only: m_ref
|
||||
use moduleConstParam, only: me
|
||||
use moduleErrors, only: criticalError
|
||||
implicit none
|
||||
|
||||
class(boundaryParticleGeneric), allocatable, intent(out):: self
|
||||
type(json_file), intent(inout):: config
|
||||
character(:), allocatable, intent(in):: object
|
||||
integer, intent(in):: b
|
||||
character(:), allocatable:: bType
|
||||
logical:: found
|
||||
real(8):: Tw, cw !Wall temperature and specific heat
|
||||
!neutral Properties
|
||||
real(8):: m0, n0, T0
|
||||
real(8), dimension(:), allocatable:: v0
|
||||
real(8):: effTime
|
||||
real(8):: eThreshold !Energy threshold
|
||||
integer:: speciesID, electronSecondaryID
|
||||
character(:), allocatable:: speciesName, crossSection, electronSecondary
|
||||
|
||||
self%n = b
|
||||
CALL config%get(object // '.name', self%name, found)
|
||||
if (.not. found) then
|
||||
call criticalError('Required parameter "name" for EM boundary condition not found', &
|
||||
'initBoundaryParticle')
|
||||
|
||||
end if
|
||||
|
||||
CALL config%get(object // '.type', bType, found)
|
||||
if (.not. found) then
|
||||
call criticalError('Required parameter "type" for EM boundary condition not found', &
|
||||
'initBoundaryParticle')
|
||||
|
||||
end if
|
||||
|
||||
SELECT CASE(bType)
|
||||
CASE('reflection')
|
||||
ALLOCATE(boundaryReflection:: self)
|
||||
|
||||
CASE('absorption')
|
||||
ALLOCATE(boundaryAbsorption:: self)
|
||||
|
||||
CASE('transparent')
|
||||
ALLOCATE(boundaryTransparent:: self)
|
||||
|
||||
CASE('axis')
|
||||
ALLOCATE(boundaryAxis:: self)
|
||||
|
||||
CASE('wallTemperature')
|
||||
CALL config%get(object // '.temperature', Tw, found)
|
||||
IF (.NOT. found) CALL criticalError("temperature not found for wallTemperature boundary type", 'readBoundary')
|
||||
CALL config%get(object // '.specificHeat', cw, found)
|
||||
IF (.NOT. found) CALL criticalError("specificHeat not found for wallTemperature boundary type", 'readBoundary')
|
||||
|
||||
CALL initWallTemperature(self, Tw, cw)
|
||||
|
||||
CASE('ionization')
|
||||
!Neutral parameters
|
||||
CALL config%get(object // '.neutral.ion', speciesName, found)
|
||||
IF (.NOT. found) CALL criticalError("missing parameter 'ion' for neutrals in ionization", 'readBoundary')
|
||||
speciesID = speciesName2Index(speciesName)
|
||||
CALL config%get(object // '.neutral.mass', m0, found)
|
||||
IF (.NOT. found) CALL criticalError("missing parameter 'mass' for neutrals in ionization", 'readBoundary')
|
||||
CALL config%get(object // '.neutral.density', n0, found)
|
||||
IF (.NOT. found) CALL criticalError("missing parameter 'density' for neutrals in ionization", 'readBoundary')
|
||||
CALL config%get(object // '.neutral.velocity', v0, found)
|
||||
IF (.NOT. found) CALL criticalError("missing parameter 'velocity' for neutrals in ionization", 'readBoundary')
|
||||
CALL config%get(object // '.neutral.temperature', T0, found)
|
||||
IF (.NOT. found) CALL criticalError("missing parameter 'temperature' for neutrals in ionization", 'readBoundary')
|
||||
|
||||
CALL config%get(object // '.effectiveTime', effTime, found)
|
||||
IF (.NOT. found) CALL criticalError("missing parameter 'effectiveTime' for ionization", 'readBoundary')
|
||||
|
||||
CALL config%get(object // '.energyThreshold', eThreshold, found)
|
||||
IF (.NOT. found) CALL criticalError("missing parameter 'eThreshold' in ionization", 'readBoundary')
|
||||
|
||||
CALL config%get(object // '.crossSection', crossSection, found)
|
||||
IF (.NOT. found) CALL criticalError("missing parameter 'crossSection' for neutrals in ionization", 'readBoundary')
|
||||
|
||||
CALL config%get(object // '.electronSecondary', electronSecondary, found)
|
||||
electronSecondaryID = speciesName2Index(electronSecondary)
|
||||
IF (found) THEN
|
||||
CALL initIonization(self, me/m_ref, m0, n0, v0, T0, &
|
||||
speciesID, effTime, crossSection, eThreshold,electronSecondaryID)
|
||||
|
||||
|
||||
ELSE
|
||||
CALL initIonization(self, me/m_ref, m0, n0, v0, T0, &
|
||||
speciesID, effTime, crossSection, eThreshold)
|
||||
|
||||
END IF
|
||||
|
||||
case('quasiNeutrality')
|
||||
call initQuasiNeutrality(self)
|
||||
|
||||
CASE DEFAULT
|
||||
CALL criticalError('Boundary type ' // bType // ' undefined', 'readBoundary')
|
||||
|
||||
END SELECT
|
||||
|
||||
end subroutine initBoundaryParticle
|
||||
|
||||
SUBROUTINE initWallTemperature(boundary, T, c)
|
||||
module SUBROUTINE initWallTemperature(boundary, T, c)
|
||||
USE moduleRefParam
|
||||
IMPLICIT NONE
|
||||
|
||||
CLASS(boundaryParticleGeneric), ALLOCATABLE, INTENT(out):: boundary
|
||||
CLASS(boundaryParticleGeneric), ALLOCATABLE, INTENT(inout):: boundary
|
||||
REAL(8), INTENT(in):: T, c !Wall temperature and specific heat
|
||||
REAL(8):: vTh
|
||||
|
||||
|
|
@ -148,22 +44,22 @@ submodule(moduleMesh) boundaryParticle
|
|||
|
||||
END SUBROUTINE initWallTemperature
|
||||
|
||||
SUBROUTINE initIonization(boundary, mImpact, m0, n0, v0, T0, ion, effTime, crossSection, eThreshold, electronSecondary)
|
||||
USE moduleRefParam
|
||||
USE moduleSpecies
|
||||
USE moduleCaseParam
|
||||
USE moduleConstParam
|
||||
USE moduleErrors, only: criticalError
|
||||
IMPLICIT NONE
|
||||
module SUBROUTINE initIonization(boundary, mImpact, m0, n0, v0, T0, ion, effTime, crossSection, eThreshold, electronSecondary)
|
||||
use moduleRefParam
|
||||
use moduleSpecies
|
||||
use moduleCaseParam
|
||||
use moduleConstParam
|
||||
use moduleErrors, only: criticalError
|
||||
implicit none
|
||||
|
||||
CLASS(boundaryParticleGeneric), ALLOCATABLE, INTENT(out):: boundary
|
||||
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
|
||||
INTEGER, OPTIONAL, INTENT(in):: electronSecondary
|
||||
REAL(8):: effTime
|
||||
CHARACTER(:), ALLOCATABLE, INTENT(in):: crossSection
|
||||
REAL(8), INTENT(in):: eThreshold
|
||||
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
|
||||
|
||||
ALLOCATE(boundaryIonization:: boundary)
|
||||
|
||||
|
|
@ -199,10 +95,10 @@ submodule(moduleMesh) boundaryParticle
|
|||
|
||||
END SUBROUTINE initIonization
|
||||
|
||||
subroutine initQuasiNeutrality(boundary)
|
||||
module subroutine initQuasiNeutrality(boundary)
|
||||
implicit none
|
||||
|
||||
class(boundaryParticleGeneric), allocatable, intent(out):: boundary
|
||||
class(boundaryParticleGeneric), allocatable, intent(inout):: boundary
|
||||
integer:: e, et
|
||||
|
||||
allocate(boundaryQuasiNeutrality:: boundary)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue