Trying to organise output better
This commit is contained in:
parent
c01f0bd381
commit
0109dc2f06
11 changed files with 196 additions and 192 deletions
|
|
@ -15,22 +15,24 @@ MODULE moduleMeshOutput0D
|
|||
CHARACTER(:), ALLOCATABLE:: fileName
|
||||
|
||||
DO i = 1, nSpecies
|
||||
fileName='OUTPUT_' // species(i)%obj%name // '.dat'
|
||||
fileName = formatFileName('Output', species(i)%obj%name, 'csv')
|
||||
IF (timeStep == 0) THEN
|
||||
OPEN(20, file = path // folder // '/' // fileName, action = 'write')
|
||||
WRITE(20, "(A1, 14X, A5, A20, 40X, A20, 2(A20))") "#","t (s)","density (m^-3)", "velocity (m/s)", &
|
||||
"pressure (Pa)", "temperature (K)"
|
||||
WRITE(*, "(6X,A15,A)") "Creating file: ", fileName
|
||||
OPEN(20, file = generateFilePath(fileName), action = 'write')
|
||||
WRITE(20, "(*("//fmtColStr//"))")'"t (s)"','"density (m^-3)"', &
|
||||
'"velocity (m/s):0"', '"velocity (m/s):1"', '"velocity (m/s):2"', &
|
||||
'"pressure (Pa)"', &
|
||||
'"temperature (K)"'
|
||||
call informFileCreation(fileName)
|
||||
CLOSE(20)
|
||||
|
||||
END IF
|
||||
|
||||
OPEN(20, file = path // folder // '/' // fileName, position = 'append', action = 'write')
|
||||
OPEN(20, file = generateFilePath(fileName), position = 'append', action = 'write')
|
||||
CALL calculateOutput(self%nodes(1)%obj%output(i), output, self%nodes(1)%obj%v, species(i)%obj)
|
||||
WRITE(20, "(7(ES20.6E3))") REAL(timeStep)*tauMin*ti_ref, output%density, &
|
||||
output%velocity, &
|
||||
output%pressure, &
|
||||
output%temperature
|
||||
WRITE(20, "(*("//fmtColReal//"))") REAL(timeStep)*tauMin*ti_ref, output%density, &
|
||||
output%velocity, &
|
||||
output%pressure, &
|
||||
output%temperature
|
||||
CLOSE(20)
|
||||
|
||||
END DO
|
||||
|
|
@ -51,15 +53,15 @@ MODULE moduleMeshOutput0D
|
|||
|
||||
fileName='OUTPUT_Collisions.dat'
|
||||
IF (timeStep == tInitial) THEN
|
||||
OPEN(20, file = path // folder // '/' // fileName, action = 'write')
|
||||
OPEN(20, file = generateFilePath(fileName), action = 'write')
|
||||
WRITE(20, "(A1, 14X, A5, A20)") "#","t (s)","collisions"
|
||||
WRITE(*, "(6X,A15,A)") "Creating file: ", fileName
|
||||
call informFileCreation(fileName)
|
||||
CLOSE(20)
|
||||
|
||||
END IF
|
||||
|
||||
OPEN(20, file = path // folder // '/' // fileName, position = 'append', action = 'write')
|
||||
WRITE(20, "(ES20.6E3, 10I20)") REAL(timeStep)*tauMin*ti_ref, (self%cells(1)%obj%tallyColl(k)%tally, k=1,nCollPairs)
|
||||
OPEN(20, file = generateFilePath(fileName), position = 'append', action = 'write')
|
||||
WRITE(20, "("//fmtReal//", 10I20)") REAL(timeStep)*tauMin*ti_ref, (self%cells(1)%obj%tallyColl(k)%tally, k=1,nCollPairs)
|
||||
CLOSE(20)
|
||||
|
||||
END SUBROUTINE printColl0D
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue