Changing now boundaries
This commit is contained in:
parent
58e2fa7566
commit
c78d92fa7d
3 changed files with 170 additions and 128 deletions
|
|
@ -803,15 +803,7 @@ MODULE moduleInput
|
|||
TYPE(json_file), INTENT(inout):: config
|
||||
INTEGER:: i, s
|
||||
CHARACTER(2):: iString, sString
|
||||
CHARACTER(:), ALLOCATABLE:: object, bType
|
||||
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
|
||||
CHARACTER(:), ALLOCATABLE:: object
|
||||
LOGICAL:: found
|
||||
INTEGER:: nTypes
|
||||
|
||||
|
|
@ -821,86 +813,7 @@ MODULE moduleInput
|
|||
WRITE(iString, '(i2)') i
|
||||
object = 'boundary(' // TRIM(iString) // ')'
|
||||
|
||||
boundaries(i)%n = i
|
||||
CALL config%get(object // '.name', boundaries(i)%name, found)
|
||||
CALL config%get(object // '.physicalSurface', boundaries(i)%physicalSurface, found)
|
||||
CALL config%info(object // '.bTypes', found, n_children = nTypes)
|
||||
IF (nTypes /= nSpecies) CALL criticalError('Not enough boundary types defined in ' // object, 'readBoundary')
|
||||
ALLOCATE(boundaries(i)%bTypes(1:nSpecies))
|
||||
DO s = 1, nSpecies
|
||||
WRITE(sString,'(i2)') s
|
||||
object = 'boundary(' // TRIM(iString) // ').bTypes(' // TRIM(sString) // ')'
|
||||
CALL config%get(object // '.type', bType, found)
|
||||
associate(bound => boundaries(i)%bTypes(s)%obj)
|
||||
SELECT CASE(bType)
|
||||
CASE('reflection')
|
||||
ALLOCATE(boundaryReflection:: bound)
|
||||
|
||||
CASE('absorption')
|
||||
ALLOCATE(boundaryAbsorption:: bound)
|
||||
|
||||
CASE('transparent')
|
||||
ALLOCATE(boundaryTransparent:: bound)
|
||||
|
||||
CASE('axis')
|
||||
ALLOCATE(boundaryAxis:: bound)
|
||||
|
||||
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(bound, 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) THEN
|
||||
m0 = species(s)%obj%m*m_ref
|
||||
END IF
|
||||
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(bound, species(s)%obj%m, m0, n0, v0, T0, &
|
||||
speciesID, effTime, crossSection, eThreshold,electronSecondaryID)
|
||||
|
||||
|
||||
ELSE
|
||||
CALL initIonization(bound, species(s)%obj%m, m0, n0, v0, T0, &
|
||||
speciesID, effTime, crossSection, eThreshold)
|
||||
|
||||
END IF
|
||||
|
||||
case('quasiNeutrality')
|
||||
call initQuasiNeutrality(bound)
|
||||
|
||||
CASE DEFAULT
|
||||
CALL criticalError('Boundary type ' // bType // ' undefined', 'readBoundary')
|
||||
|
||||
END SELECT
|
||||
end associate
|
||||
|
||||
END DO
|
||||
call boundaries(i)%init(config, object, i)
|
||||
|
||||
END DO
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue