Merge branch 'issue/initialInput' into 'development'

Small modification in input for initial case.

See merge request JorgeGonz/fpakc!17
This commit is contained in:
Jorge Gonzalez 2021-04-15 07:49:04 +00:00
commit 0d2e62421d
3 changed files with 17 additions and 15 deletions

Binary file not shown.

View file

@ -633,9 +633,9 @@ make
Determines initial values for the species. Determines initial values for the species.
Required values are: Required values are:
\begin{itemize} \begin{itemize}
\item \textbf{speciesName}: Character. \item \textbf{species}: Character.
Name of species as defined in the object \textbf{species}. Name of species as defined in the object \textbf{species}.
\item \textbf{initialState}: Character. \item \textbf{file}: Character.
Output file from previous run used as an initial state for the species. Output file from previous run used as an initial state for the species.
The file format must be the same as in \textbf{geometry.meshType} The file format must be the same as in \textbf{geometry.meshType}
Initial particles are assumed to have a Maxwellian distribution. Initial particles are assumed to have a Maxwellian distribution.
@ -671,7 +671,7 @@ make
\item \textbf{type}: Character. \item \textbf{type}: Character.
Collision type. Collision type.
Accepted values are \textbf{elastic}, \textbf{chargeExchange}, \textbf{ionization} and \textbf{recombination}. Accepted values are \textbf{elastic}, \textbf{chargeExchange}, \textbf{ionization} and \textbf{recombination}.
Please refer to Sec. \ref{ssec:collisions} for a description of the different collision types. Please refer to Sec.~\ref{ssec:collisions} for a description of the different collision types.
\item \textbf{crossSection}: Character. \item \textbf{crossSection}: Character.
File in \textbf{interactions.folderCollisions} that contains the cross section data as a 1D table of relative energy (in $\unit{eV}$) and cross section (in $\unit{m^-2}$). File in \textbf{interactions.folderCollisions} that contains the cross section data as a 1D table of relative energy (in $\unit{eV}$) and cross section (in $\unit{m^-2}$).
\item \textbf{energyThreshold}: Real. \item \textbf{energyThreshold}: Real.

View file

@ -10,6 +10,7 @@ MODULE moduleInput
USE moduleErrors USE moduleErrors
USE moduleBoundary USE moduleBoundary
USE moduleInject USE moduleInject
USE moduleOutput
IMPLICIT NONE IMPLICIT NONE
CHARACTER(:), ALLOCATABLE, INTENT(in):: inputFile CHARACTER(:), ALLOCATABLE, INTENT(in):: inputFile
@ -68,6 +69,9 @@ MODULE moduleInput
CALL readParallel(config) CALL readParallel(config)
CALL checkStatus(config, "readParallel") CALL checkStatus(config, "readParallel")
!If everything is correct, creates the output folder
CALL EXECUTE_COMMAND_LINE('mkdir ' // path // folder )
END SUBROUTINE readConfig END SUBROUTINE readConfig
!Checks the status of the JSON case file and, if failed, exits the execution. !Checks the status of the JSON case file and, if failed, exits the execution.
@ -218,6 +222,7 @@ MODULE moduleInput
!Read initial state for species !Read initial state for species
CALL verboseError('Reading Initial state...') CALL verboseError('Reading Initial state...')
CALL readInitial(config) CALL readInitial(config)
CALL checkStatus(config, "readInitial")
END SUBROUTINE readCase END SUBROUTINE readCase
@ -262,9 +267,9 @@ MODULE moduleInput
DO i = 1, nInitial DO i = 1, nInitial
WRITE(iString, '(I2)') i WRITE(iString, '(I2)') i
object = 'case.initial(' // iString // ')' object = 'case.initial(' // iString // ')'
CALL config%get(object // '.speciesName', spName, found) CALL config%get(object // '.species', spName, found)
sp = speciesName2Index(spName) sp = speciesName2Index(spName)
CALL config%get(object // '.initialState', spFile, found) CALL config%get(object // '.file', spFile, found)
!Reads node values at the nodes !Reads node values at the nodes
filename = path // spFile filename = path // spFile
CALL mesh%readInitial(sp, filename, density, velocity, temperature) CALL mesh%readInitial(sp, filename, density, velocity, temperature)
@ -419,9 +424,6 @@ MODULE moduleInput
folder = folder // date_now(1:4) // '-' // date_now(5:6) // '-' // date_now(7:8) // '_' & folder = folder // date_now(1:4) // '-' // date_now(5:6) // '-' // date_now(7:8) // '_' &
// time_now(1:2) // '.' // time_now(3:4) // '.' // time_now(5:6) // time_now(1:2) // '.' // time_now(3:4) // '.' // time_now(5:6)
!Creates the folder
CALL EXECUTE_COMMAND_LINE('mkdir ' // path // folder )
CALL config%get(object // '.cpuTime', timeOutput, found) CALL config%get(object // '.cpuTime', timeOutput, found)
CALL config%get(object // '.numColl', collOutput, found) CALL config%get(object // '.numColl', collOutput, found)
CALL config%get(object // '.EMField', emOutput, found) CALL config%get(object // '.EMField', emOutput, found)