Implementing output for injects. Cleaning code
This commit is contained in:
parent
f400bd46eb
commit
04cd9dffc6
10 changed files with 283 additions and 169 deletions
|
|
@ -628,6 +628,7 @@ MODULE moduleInput
|
|||
USE moduleMesh
|
||||
USE moduleCaseParam
|
||||
USE moduleRefParam
|
||||
use moduleOutput, only: collOutput
|
||||
USE OMP_LIB
|
||||
USE json_module
|
||||
IMPLICIT NONE
|
||||
|
|
@ -1426,50 +1427,17 @@ MODULE moduleInput
|
|||
CHARACTER(2):: iString
|
||||
CHARACTER(:), ALLOCATABLE:: object
|
||||
LOGICAL:: found
|
||||
CHARACTER(:), ALLOCATABLE:: speciesName
|
||||
CHARACTER(:), ALLOCATABLE:: name
|
||||
REAL(8):: v
|
||||
REAL(8), ALLOCATABLE:: temperature(:), normal(:)
|
||||
REAL(8):: flow
|
||||
CHARACTER(:), ALLOCATABLE:: units
|
||||
character(:), allocatable:: type
|
||||
INTEGER:: physicalSurface
|
||||
INTEGER:: particlesPerEdge
|
||||
INTEGER:: sp
|
||||
|
||||
CALL config%info('inject', found, n_children = nInject)
|
||||
ALLOCATE(inject(1:nInject))
|
||||
ALLOCATE(injects(1:nInject))
|
||||
nPartInj = 0
|
||||
DO i = 1, nInject
|
||||
WRITE(iString, '(i2)') i
|
||||
object = 'inject(' // trim(iString) // ')'
|
||||
|
||||
!Find species
|
||||
CALL config%get(object // '.species', speciesName, found)
|
||||
sp = speciesName2Index(speciesName)
|
||||
CALL initInject(injects(i)%obj, i, object, config)
|
||||
|
||||
CALL config%get(object // '.name', name, found)
|
||||
CALL config%get(object // '.v', v, found)
|
||||
CALL config%get(object // '.T', temperature, found)
|
||||
CALL config%get(object // '.n', normal, found)
|
||||
IF (.NOT. found) THEN
|
||||
ALLOCATE(normal(1:3))
|
||||
normal = 0.D0
|
||||
END IF
|
||||
CALL config%get(object // '.flow', flow, found)
|
||||
CALL config%get(object // '.units', units, found)
|
||||
CALL config%get(object // '.type', type, found)
|
||||
if (.not. found) then
|
||||
! If no type is found, assume constant injection of particles
|
||||
type = 'constant'
|
||||
end if
|
||||
CALL config%get(object // '.physicalSurface', physicalSurface, found)
|
||||
particlesPerEdge = 0
|
||||
CALL config%get(object // '.particlesPerEdge', particlesPerEdge, found)
|
||||
|
||||
CALL inject(i)%init(i, v, normal, temperature, flow, units, type, sp, physicalSurface, particlesPerEdge)
|
||||
|
||||
CALL readVelDistr(config, inject(i), object)
|
||||
CALL readVelDistr(config, injects(i)%obj, object)
|
||||
|
||||
END DO
|
||||
|
||||
|
|
@ -1528,7 +1496,7 @@ MODULE moduleInput
|
|||
IMPLICIT NONE
|
||||
|
||||
TYPE(json_file), INTENT(inout):: config
|
||||
TYPE(injectGeneric), INTENT(inout):: inj
|
||||
class(injectGeneric), INTENT(inout):: inj
|
||||
CHARACTER(:), ALLOCATABLE, INTENT(in):: object
|
||||
INTEGER:: i
|
||||
CHARACTER(2):: iString
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue