Skeleton for new injection type

This commit is contained in:
Jorge Gonzalez 2026-03-31 19:21:03 +02:00
commit d3f1f0808e
3 changed files with 37 additions and 2 deletions

View file

@ -1432,6 +1432,7 @@ MODULE moduleInput
REAL(8), ALLOCATABLE:: temperature(:), normal(:)
REAL(8):: flow
CHARACTER(:), ALLOCATABLE:: units
character(:), allocatable:: type
INTEGER:: physicalSurface
INTEGER:: particlesPerEdge
INTEGER:: sp
@ -1457,11 +1458,16 @@ MODULE moduleInput
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, sp, physicalSurface, particlesPerEdge)
CALL inject(i)%init(i, v, normal, temperature, flow, units, type, sp, physicalSurface, particlesPerEdge)
CALL readVelDistr(config, inject(i), object)