Added the possibility to have different boundary conditions per species.
A boundary condition for each species must be indicated in the case file. This opens the door to use boundary conditions with different parameters (for example, a wall temperature, coefficients for reflection or absorption...) The examples included with the code have been updated accordently.
This commit is contained in:
parent
dc98fe9399
commit
2c3e25b40e
18 changed files with 19389 additions and 1174 deletions
|
|
@ -29,12 +29,15 @@ MODULE moduleInput
|
|||
CALL readOutput(config)
|
||||
|
||||
!Read species
|
||||
CALL verboseError('Reading species information...')
|
||||
CALL readSpecies(config)
|
||||
|
||||
!Read interactions between species
|
||||
CALL verboseError('Reading interaction between species...')
|
||||
CALL readInteractions(config)
|
||||
|
||||
!Read boundaries
|
||||
CALL verboseError('Reading boundary conditions...')
|
||||
CALL readBoundary(config)
|
||||
|
||||
!Read Geometry
|
||||
|
|
@ -332,26 +335,46 @@ MODULE moduleInput
|
|||
SUBROUTINE readBoundary(config)
|
||||
USE moduleBoundary
|
||||
USE moduleErrors
|
||||
USE moduleSpecies
|
||||
USE json_module
|
||||
IMPLICIT NONE
|
||||
|
||||
TYPE(json_file), INTENT(inout):: config
|
||||
CHARACTER(2):: istring
|
||||
CHARACTER(:), ALLOCATABLE:: object
|
||||
INTEGER:: i, s
|
||||
CHARACTER(2):: istring, sString
|
||||
CHARACTER(:), ALLOCATABLE:: object, bType
|
||||
LOGICAL:: found
|
||||
INTEGER:: i
|
||||
INTEGER:: nTypes
|
||||
|
||||
CALL config%info('boundary', found, n_children = nBoundary)
|
||||
ALLOCATE(boundary(1:nBoundary))
|
||||
DO i = 1, nBoundary
|
||||
WRITE(istring, '(i2)') i
|
||||
object = 'boundary(' // trim(istring) // ')'
|
||||
object = 'boundary(' // TRIM(istring) // ')'
|
||||
|
||||
ALLOCATE(boundaryGeneric:: boundary(i)%obj)
|
||||
boundary(i)%id = i
|
||||
CALL config%get(object // '.name', boundary(i)%name, found)
|
||||
CALL config%get(object // '.physicalSurface', boundary(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(boundary(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)
|
||||
SELECT CASE(bType)
|
||||
CASE('reflection')
|
||||
ALLOCATE(boundaryReflection:: boundary(i)%bTypes(s)%obj)
|
||||
|
||||
CALL config%get(object // '.type', boundary(i)%obj%boundaryType, found)
|
||||
CALL config%get(object // '.physicalSurface', boundary(i)%obj%physicalSurface, found)
|
||||
boundary(i)%obj%id = i
|
||||
CASE('absorption')
|
||||
ALLOCATE(boundaryAbsorption:: boundary(i)%bTypes(s)%obj)
|
||||
|
||||
CASE('axis')
|
||||
ALLOCATE(boundaryAxis:: boundary(i)%bTypes(s)%obj)
|
||||
|
||||
END SELECT
|
||||
|
||||
END DO
|
||||
|
||||
END DO
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue