Compare commits
No commits in common. "8c8c6409f6db713f70655318d2d148263997e496" and "3083e20ff7ca72d9a43e6f5145ccab02f1dc6516" have entirely different histories.
8c8c6409f6
...
3083e20ff7
2 changed files with 2 additions and 98 deletions
|
|
@ -4,23 +4,11 @@ module moduleMeshOutputText
|
||||||
subroutine writeSpeciesOutput(self, fileID, speciesIndex)
|
subroutine writeSpeciesOutput(self, fileID, speciesIndex)
|
||||||
use moduleMesh
|
use moduleMesh
|
||||||
use moduleOutput
|
use moduleOutput
|
||||||
use moduleRefParam, only: L_ref
|
|
||||||
implicit none
|
implicit none
|
||||||
|
|
||||||
class(meshParticles), INTENT(in):: self
|
class(meshParticles), INTENT(in):: self
|
||||||
integer, intent(in):: fileID
|
integer, intent(in):: fileID
|
||||||
integer, intent(in):: speciesIndex
|
integer, intent(in):: speciesIndex
|
||||||
type(outputFormat):: output
|
|
||||||
real(8):: r(1:3)
|
|
||||||
integer:: n
|
|
||||||
|
|
||||||
do n = 1, self%numNodes
|
|
||||||
call calculateOutput(self%nodes(n)%obj%output(speciesIndex), output, self%nodes(n)%obj%v, species(speciesIndex)%obj)
|
|
||||||
r = self%nodes(n)%obj%getCoordinates()
|
|
||||||
|
|
||||||
write(fileID, '(5(ES0.6E3,","),ES0.6E3)') r(1)*L_ref, output%density, output%velocity, output%temperature
|
|
||||||
|
|
||||||
end do
|
|
||||||
|
|
||||||
end subroutine writeSpeciesOutput
|
end subroutine writeSpeciesOutput
|
||||||
|
|
||||||
|
|
@ -36,119 +24,35 @@ module moduleMeshOutputText
|
||||||
|
|
||||||
subroutine writeEMOutput(self, fileID)
|
subroutine writeEMOutput(self, fileID)
|
||||||
use moduleMesh
|
use moduleMesh
|
||||||
use moduleRefParam, only: L_ref, Volt_ref, B_ref, EF_ref
|
use moduleRefParam
|
||||||
implicit none
|
implicit none
|
||||||
|
|
||||||
class(meshParticles), intent(in):: self
|
class(meshParticles), intent(in):: self
|
||||||
integer, intent(in):: fileID
|
integer, intent(in):: fileID
|
||||||
integer:: n, c
|
|
||||||
real(8):: r(1:3), Xi(1:3)
|
|
||||||
|
|
||||||
do n = 1, self%numNodes
|
|
||||||
r = self%nodes(n)%obj%getCoordinates()
|
|
||||||
if (n == self%numNodes) then
|
|
||||||
Xi = (/ 1.D0, 0.D0, 0.D0 /)
|
|
||||||
c = self%numNodes - 1
|
|
||||||
|
|
||||||
else
|
|
||||||
Xi = (/ 0.D0, 0.D0, 0.D0 /)
|
|
||||||
c = n
|
|
||||||
|
|
||||||
end if
|
|
||||||
|
|
||||||
associate(output => self%nodes(n)%obj%emData)
|
|
||||||
write(fileID, '(7(ES0.6E3,","),ES0.6E3)') r(1)*L_ref, &
|
|
||||||
output%phi*Volt_ref, &
|
|
||||||
self%cells(c)%obj%gatherElectricField(Xi)*EF_ref, &
|
|
||||||
output%B*B_ref
|
|
||||||
|
|
||||||
end associate
|
|
||||||
|
|
||||||
end do
|
|
||||||
|
|
||||||
end subroutine writeEMOutput
|
end subroutine writeEMOutput
|
||||||
|
|
||||||
subroutine printOutputText(self)
|
subroutine printOutputText(self)
|
||||||
use moduleMesh
|
use moduleMesh
|
||||||
use moduleSpecies
|
|
||||||
use moduleMeshInoutCommon
|
|
||||||
use moduleCaseParam, ONLY: timeStep
|
|
||||||
implicit none
|
implicit none
|
||||||
|
|
||||||
class(meshParticles), intent(in):: self
|
class(meshParticles), intent(in):: self
|
||||||
|
|
||||||
INTEGER:: s, fileID
|
|
||||||
character(:), allocatable:: fileName
|
|
||||||
|
|
||||||
fileID = 60
|
|
||||||
|
|
||||||
do s = 1, nSpecies
|
|
||||||
fileName = formatFileName(prefix, species(s)%obj%name, 'csv', timeStep)
|
|
||||||
write(*, "(6X,A15,A)") "Creating file: ", fileName
|
|
||||||
open (fileID, file = path // folder // '/' // fileName)
|
|
||||||
|
|
||||||
write(fileID, '(5(A,","),A)') 'Position (m)', &
|
|
||||||
'Density (m^-3)', &
|
|
||||||
'Velocity (m s^-1):0', 'Velocity (m s^-1):1', 'Velocity (m s^-1):2', &
|
|
||||||
'Temperature (K)'
|
|
||||||
|
|
||||||
call writeSpeciesOutput(self, fileID, s)
|
|
||||||
|
|
||||||
close(fileID)
|
|
||||||
|
|
||||||
end do
|
|
||||||
|
|
||||||
end subroutine printOutputText
|
end subroutine printOutputText
|
||||||
|
|
||||||
subroutine printCollText(self)
|
subroutine printCollText(self)
|
||||||
use moduleMesh
|
use moduleMesh
|
||||||
use moduleOutput
|
|
||||||
use moduleMeshInoutCommon
|
|
||||||
use moduleCaseParam, only: timeStep
|
|
||||||
implicit none
|
implicit none
|
||||||
|
|
||||||
class(meshGeneric), intent(in):: self
|
class(meshGeneric), intent(in):: self
|
||||||
integer:: fileID
|
|
||||||
character(:), allocatable:: fileName
|
|
||||||
|
|
||||||
fileID = 62
|
|
||||||
|
|
||||||
if (collOutput) then
|
|
||||||
fileName = formatFileName(prefix, 'Collisions', 'csv', timeStep)
|
|
||||||
write(*, "(6X,A15,A)") "Creating file: ", fileName
|
|
||||||
open (fileID, file = path // folder // '/' // fileName)
|
|
||||||
|
|
||||||
end if
|
|
||||||
|
|
||||||
end subroutine printCollText
|
end subroutine printCollText
|
||||||
|
|
||||||
subroutine printEMText(self)
|
subroutine printEMText(self)
|
||||||
use moduleMesh
|
use moduleMesh
|
||||||
use moduleMeshInoutCommon
|
|
||||||
use moduleCaseParam, only: timeStep
|
|
||||||
implicit none
|
implicit none
|
||||||
|
|
||||||
class(meshParticles), intent(in):: self
|
class(meshParticles), intent(in):: self
|
||||||
integer:: fileID
|
|
||||||
character(:), allocatable:: fileName
|
|
||||||
|
|
||||||
fileID = 64
|
|
||||||
|
|
||||||
if (emOutput) then
|
|
||||||
fileName = formatFileName(prefix, 'EMField', 'csv', timeStep)
|
|
||||||
write(*, "(6X,A15,A)") "Creating file: ", fileName
|
|
||||||
open (fileID, file = path // folder // '/' // fileName)
|
|
||||||
|
|
||||||
write(fileID, '(8(A,","),A)') 'Position (m)', &
|
|
||||||
'Potential (V)', &
|
|
||||||
'Electric Field (V m^-1):0', 'Electric Field (V m^-1):1', 'Electric Field (V m^-1):2', &
|
|
||||||
'Magnetic Field (T):0', 'Magnetic Field (T):1', 'Magnetic Field (T):2'
|
|
||||||
|
|
||||||
call writeEMOutput(self, fileID)
|
|
||||||
|
|
||||||
close(fileID)
|
|
||||||
|
|
||||||
end if
|
|
||||||
|
|
||||||
end subroutine printEMText
|
end subroutine printEMText
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ MODULE moduleMeshOutputVTU
|
||||||
|
|
||||||
WRITE(fileID,"(A)") '<?xml version="1.0"?>'
|
WRITE(fileID,"(A)") '<?xml version="1.0"?>'
|
||||||
WRITE(fileID,"(2X, A)") '<VTKFile type="UnstructuredGrid">'
|
WRITE(fileID,"(2X, A)") '<VTKFile type="UnstructuredGrid">'
|
||||||
WRITE(fileID,"(4X, A)") '<UnstructuredGrid>'
|
WRITE(fileID,"(4X, A,ES20.6E3,A)") '<UnstructuredGrid>'
|
||||||
WRITE(fileID,"(6X, A, I10, A, I10, A)") '<Piece NumberOfPoints="', nNodes, '" NumberOfCells="', nCells, '">'
|
WRITE(fileID,"(6X, A, I10, A, I10, A)") '<Piece NumberOfPoints="', nNodes, '" NumberOfCells="', nCells, '">'
|
||||||
|
|
||||||
END SUBROUTINE writeHeader
|
END SUBROUTINE writeHeader
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue