diff --git a/runs/0D_Argon/input.json b/runs/0D_Argon/input.json index 5defe89..a089fbb 100644 --- a/runs/0D_Argon/input.json +++ b/runs/0D_Argon/input.json @@ -4,7 +4,7 @@ "path": "./runs/0D_Argon/", "triggerOutput": 1, "numColl": true, - "folder": "test" + "folder": "output" }, "reference": { "density": 1.0e16, diff --git a/runs/0D_Argon/output/input.json b/runs/0D_Argon/output/input.json deleted file mode 100644 index 5defe89..0000000 --- a/runs/0D_Argon/output/input.json +++ /dev/null @@ -1,49 +0,0 @@ - -{ - "output": { - "path": "./runs/0D_Argon/", - "triggerOutput": 1, - "numColl": true, - "folder": "test" - }, - "reference": { - "density": 1.0e16, - "mass": 6.633e-26, - "temperature": 11604.0, - "radius": 1.88e-10 - }, - "geometry": { - "dimension": 0, - "volume": 1e-11 - }, - "species": [ - {"name": "Argon+", "type": "charged", "mass": 6.633e-26, "charge": 1.0, "weight": 1.0e0}, - {"name": "Argon", "type": "neutral", "mass": 6.633e-26, "weight": 1.0e0} - ], - "solver": { - "tau": [1.0e-3, 1.0e-3], - "finalTime": 1.0e0, - "initial": [ - {"species": "Argon+", "file": "Argon+_Initial.dat"}, - {"species": "Argon", "file": "Argon_Initial.dat"} - ] - }, - "interactions": { - "folderCollisions": "./data/collisions/", - "collisions": [ - {"species_i": "Argon", "species_j": "Argon", - "cTypes": [ - {"type": "elastic", "crossSection": "EL_Ar-Ar.dat"} - ]}, - {"species_i": "Argon+", "species_j": "Argon", - "cTypes": [ - {"type": "elastic", "crossSection": "EL_Ar-Ar.dat"} - ]} - ] - }, - "parallel": { - "OpenMP":{ - "nThreads": 4 - } - } -} diff --git a/src/modules/init/moduleInput.f90 b/src/modules/init/moduleInput.f90 index d0be049..6dac14c 100644 --- a/src/modules/init/moduleInput.f90 +++ b/src/modules/init/moduleInput.f90 @@ -491,7 +491,8 @@ MODULE moduleInput CALL config%get(object // '.cpuTime', timeOutput, found) CALL config%get(object // '.numColl', collOutput, found) - CALL config%get(object // '.EMField', emOutput, found) + CALL config%get(object // '.EMField', emOutput, found) + call config%get(object // '.boundaryParticle', boundaryParticleOutput, found) CALL config%get(object // '.triggerCPUTime', triggerCPUTime, found) IF (.NOT. found) THEN diff --git a/src/modules/mesh/inout/text/moduleMeshOutputText.f90 b/src/modules/mesh/inout/text/moduleMeshOutputText.f90 index cd8f04c..7f95788 100644 --- a/src/modules/mesh/inout/text/moduleMeshOutputText.f90 +++ b/src/modules/mesh/inout/text/moduleMeshOutputText.f90 @@ -134,7 +134,7 @@ module moduleMeshOutputText do s = 1, nSpecies fileName = formatFileName(prefix, species(s)%obj%name, 'csv', timeStep) call informFileCreation(fileName) - open (fileID, file = path // folder // '/' // fileName) + open (fileID, file = generateFilePath(fileName)) write(fileID, '(5(A,","),A)') '"Position (m)"', & '"Density (m^-3)"', & @@ -166,7 +166,7 @@ module moduleMeshOutputText if (collOutput) then fileName = formatFileName(prefix, 'Collisions', 'csv', timeStep) call informFileCreation(fileName) - open (fileID, file = path // folder // '/' // fileName) + open (fileID, file = generateFilePath(fileName)) write(fileID, '(A)', advance='no') "Cell" do k = 1, nCollPairs @@ -201,7 +201,7 @@ module moduleMeshOutputText if (emOutput) then fileName = formatFileName(prefix, 'EMField', 'csv', timeStep) call informFileCreation(fileName) - open (fileID, file = path // folder // '/' // fileName) + open (fileID, file = generateFilePath(fileName)) write(fileID, '(8(A,","),A)') '"Position (m)"', & '"Potential (V)"', & @@ -232,7 +232,7 @@ module moduleMeshOutputText do s = 1, nSpecies fileNameMean = formatFileName('Average_mean', species(s)%obj%name, 'csv') call informFileCreation(fileNameMean) - open (fileIDMean, file = path // folder // '/' // fileNameMean) + open (fileIDMean, file = generateFilePath(fileNameMean)) write(fileIDMean, '(5(A,","),A)') '"Position (m)"', & '"Density, mean (m^-3)"', & @@ -241,7 +241,7 @@ module moduleMeshOutputText fileNameDeviation = formatFileName('Average_deviation', species(s)%obj%name, 'csv') call informFileCreation(fileNameDeviation) - open (fileIDDeviation, file = path // folder // '/' // fileNameDeviation) + open (fileIDDeviation, file = generateFilePath(fileNameDeviation)) write(fileIDDeviation, '(5(A,","),A)') '"Position (m)"', & '"Density, deviation (m^-3)"', & diff --git a/src/modules/moduleProbe.f90 b/src/modules/moduleProbe.f90 index 1e1339e..9cbc2f9 100644 --- a/src/modules/moduleProbe.f90 +++ b/src/modules/moduleProbe.f90 @@ -208,7 +208,7 @@ MODULE moduleProbe WRITE(pstring, "(I3.3)") self%id fileName='Probe_' // tstring// '_f_' // pstring // '.dat' WRITE(*, "(6X,A15,A)") "Creating file: ", fileName - OPEN (10, file = path // folder // '/' // fileName) + OPEN (10, file = generateFilePath(fileName)) WRITE(10, "(A1, 1X, A)") "# ", self%species%name WRITE(10, "(A6, 3(ES15.6E3), A2)") "# r = ", self%r(:)*L_ref, " m" WRITE(10, "(A6, ES15.6E3, A2)") "# t = ", REAL(timeStep)*tauMin*ti_ref, " s" @@ -216,10 +216,10 @@ MODULE moduleProbe DO i = 1, self%nv(1) DO j = 1, self%nv(2) DO k = 1, self%nv(3) - WRITE(10, "(4(ES20.6E3))") self%vi(i)*v_ref, & - self%vj(j)*v_ref, & - self%vk(k)*v_ref, & - self%f(i, j, k) + WRITE(10, "(4("//fmtReal//"))") self%vi(i)*v_ref, & + self%vj(j)*v_ref, & + self%vk(k)*v_ref, & + self%f(i, j, k) END DO WRITE(10, *) diff --git a/src/modules/output/moduleOutput.f90 b/src/modules/output/moduleOutput.f90 index 78e9b5e..ad1f5f3 100644 --- a/src/modules/output/moduleOutput.f90 +++ b/src/modules/output/moduleOutput.f90 @@ -257,7 +257,7 @@ MODULE moduleOutput IF (timeOutput) THEN IF (PRESENT(first)) THEN IF (first) THEN - OPEN(20, file = path // folder // '/' // fileName, action = 'write') + OPEN(20, file = generateFilePath(fileName), action = 'write') WRITE(20, "(A1, 8X, A1, 9X, A1, 7(A20))") "#","t","n","total (s)","push (s)","reset (s)", & "collision (s)","coulomb (s)", & "weighting (s)","EMField (s)" @@ -268,7 +268,7 @@ MODULE moduleOutput END IF - OPEN(20, file = path // folder // '/' // fileName, position = 'append', action = 'write') + OPEN(20, file = generateFilePath(fileName), position = 'append', action = 'write') WRITE (20, "(I10, I10, 7(ES20.6E3))") timeStep, nPartOld, tStep, tPush, tReset, tColl, tCoul, tWeight, tEMField diff --git a/src/modules/solver/moduleSolver.f90 b/src/modules/solver/moduleSolver.f90 index 1fb48f9..ccea2d7 100644 --- a/src/modules/solver/moduleSolver.f90 +++ b/src/modules/solver/moduleSolver.f90 @@ -536,7 +536,7 @@ MODULE moduleSolver IF (ASSOCIATED(meshForMCC)) CALL meshForMCC%printColl() CALL mesh%printEM() - ! Output of boundaries. TODO: Add an if + ! Output of boundaries call boundariesParticle_write() WRITE(*, "(5X,A21,I10,A1,I10)") "t/tFinal: ", timeStep, "/", tFinal