Implementation of average scheme and testing

New input variables to activate the average scheme.
Still only computing the mean, no the standard deviation.

Output checked  with ALPHIE Grid example. Looks good.

No impact on CPU time, although testing is still required.
This commit is contained in:
Jorge Gonzalez 2022-12-15 08:35:00 +01:00
commit 38d28887ff
3 changed files with 43 additions and 1 deletions

View file

@ -75,6 +75,11 @@ MODULE moduleInput
CALL readInject(config)
CALL checkStatus(config, "readInject")
!Read average scheme
CALL verboseError('Reading average scheme...')
CALL readAverage(config)
CALL checkStatus(config, "readAverage")
!Read parallel parameters
CALL verboseError('Reading Parallel configuration...')
CALL readParallel(config)
@ -1180,6 +1185,37 @@ MODULE moduleInput
END SUBROUTINE readInject
SUBROUTINE readAverage(config)
USE moduleAverage
USE moduleCaseParam, ONLY: tauMin
USE moduleMesh, ONLY: mesh
USE moduleSpecies, ONLY: nSpecies
IMPLICIT NONE
TYPE(json_file), INTENT(inout):: config
LOGICAL:: found
REAL(8):: tStart
INTEGER:: n
CALL config%info('average', found)
IF (found) THEN
useAverage = .TRUE.
CALL config%get('average.startTime', tStart, found)
IF (found) THEN
averageScheme%tStart = INT(tStart / tauMin)
END IF
ALLOCATE(averageScheme%mean(1:mesh%numNodes))
DO n = 1, mesh%numNodes
ALLOCATE(averageScheme%mean(n)%output(1:nSpecies))
END DO
END IF
END SUBROUTINE readAverage
!Reads the velocity distribution functions for each inject
SUBROUTINE readVelDistr(config, inj, object)
USE moduleErrors