Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions epoch1d/example_decks/ionisation.deck
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ end:control
#
# use_collisions = T # Collisions must be on for collisional ionisation
# collisional_ionisation = T # Switches on collisional ionisation
# use_nanbu = T
#
# end:collisions

Expand All @@ -34,6 +35,7 @@ begin:constant
den_max = 10.0 * critical(omega)
den_preplasma = 1.0e18
len_scale = 5.0 * micron
ion_charge_state = 22 # Initial ionisation level of ions
end:constant


Expand All @@ -47,13 +49,15 @@ begin:species
name = Electron
charge = -1.0
mass = 1.0
number_density = den_max * ion_charge_state
nparticles = nx * 5
identify:electron
end:species


begin:species
name = Palladium
charge = 22.0
charge = ion_charge_state
atomic_no = 46
mass = 1836.2 * 105.0

Expand All @@ -67,13 +71,6 @@ begin:species
end:species


begin:species
name = Electron
number_density = number_density(Palladium) * 22.0
temperature = 1e6
end:species


begin:output

# Simulated time between output dumps
Expand Down
73 changes: 41 additions & 32 deletions epoch1d/src/deck/deck_species_block.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1226,57 +1226,66 @@ SUBROUTINE read_ionisation_data(atomic_no, ion_state, ionise_num, &
LOGICAL :: exists

IF (atomic_no < 1 .OR. atomic_no > 100) THEN
DO iu = 1, nio_units ! Print to stdout and to file
io = io_units(iu)
WRITE(io,*) ''
WRITE(io,*) '*** ERROR ***'
WRITE(io,*) 'Ionising species must have an atomic number between'
WRITE(io,*) '1 and 100'
WRITE(io,*) ''
END DO
IF (rank == 0) THEN
DO iu = 1, nio_units ! Print to stdout and to file
io = io_units(iu)
WRITE(io,*) ''
WRITE(io,*) '*** ERROR ***'
WRITE(io,*) 'Ionising species must have an atomic number between'
WRITE(io,*) '1 and 100'
WRITE(io,*) ''
END DO
END IF
CALL abort_code(c_err_bad_value)
END IF

! Check if the tables can be seen, issue warning if not
INQUIRE(FILE=TRIM(physics_table_location) // '/ionisation_energies.table', &
EXIST=exists)
IF (.NOT.exists) THEN
DO iu = 1, nio_units ! Print to stdout and to file
io = io_units(iu)
WRITE(io,*) ''
WRITE(io,*) '*** ERROR ***'
WRITE(io,*) 'Unable to find the file:'
WRITE(io,*) TRIM(physics_table_location) // '/ionisation_energies.table'
WRITE(io,*) ''
END DO
IF (rank == 0) THEN
DO iu = 1, nio_units ! Print to stdout and to file
io = io_units(iu)
WRITE(io,*) ''
WRITE(io,*) '*** ERROR ***'
WRITE(io,*) 'Unable to find the file:'
WRITE(io,*) TRIM(physics_table_location) &
// '/ionisation_energies.table'
WRITE(io,*) ''
END DO
END IF
CALL abort_code(c_err_io_error)
END IF

INQUIRE(FILE=TRIM(physics_table_location) // '/ion_l.table', &
EXIST=exists)
IF (.NOT.exists) THEN
DO iu = 1, nio_units ! Print to stdout and to file
io = io_units(iu)
WRITE(io,*) ''
WRITE(io,*) '*** ERROR ***'
WRITE(io,*) 'Unable to find the file:'
WRITE(io,*) TRIM(physics_table_location) // '/ion_l.table'
WRITE(io,*) ''
END DO
IF (rank == 0) THEN
DO iu = 1, nio_units ! Print to stdout and to file
io = io_units(iu)
WRITE(io,*) ''
WRITE(io,*) '*** ERROR ***'
WRITE(io,*) 'Unable to find the file:'
WRITE(io,*) TRIM(physics_table_location) // '/ion_l.table'
WRITE(io,*) ''
END DO
END IF
CALL abort_code(c_err_io_error)
END IF

INQUIRE(FILE=TRIM(physics_table_location) // '/ion_n.table', &
EXIST=exists)
IF (.NOT.exists) THEN
DO iu = 1, nio_units ! Print to stdout and to file
io = io_units(iu)
WRITE(io,*) ''
WRITE(io,*) '*** ERROR ***'
WRITE(io,*) 'Unable to find the file:'
WRITE(io,*) TRIM(physics_table_location) // '/ion_n.table'
WRITE(io,*) ''
END DO
IF (rank == 0) THEN
DO iu = 1, nio_units ! Print to stdout and to file
io = io_units(iu)
WRITE(io,*) ''
WRITE(io,*) '*** ERROR ***'
WRITE(io,*) 'Unable to find the file:'
WRITE(io,*) TRIM(physics_table_location) // '/ion_n.table'
WRITE(io,*) ''
END DO
END IF
CALL abort_code(c_err_io_error)
END IF

Expand Down
20 changes: 11 additions & 9 deletions epoch1d/src/physics_packages/collision_ionise.F90
Original file line number Diff line number Diff line change
Expand Up @@ -636,15 +636,17 @@ SUBROUTINE get_electron_data_from_file(atomic_no, ion_state, binding_energy, &
INQUIRE(FILE=TRIM(physics_table_location) &
//'/binding_energy/be_'//z_string, EXIST=exists)
IF (.NOT.exists) THEN
DO iu = 1, nio_units ! Print to stdout and to file
io = io_units(iu)
WRITE(io,*) ''
WRITE(io,*) '*** ERROR ***'
WRITE(io,*) 'Unable to find the file:'
WRITE(io,*) TRIM(physics_table_location) &
//'/binding_energy/be_'//z_string
WRITE(io,*) ''
END DO
IF (rank == 0) THEN
DO iu = 1, nio_units ! Print to stdout and to file
io = io_units(iu)
WRITE(io,*) ''
WRITE(io,*) '*** ERROR ***'
WRITE(io,*) 'Unable to find the file:'
WRITE(io,*) TRIM(physics_table_location) &
//'/binding_energy/be_'//z_string
WRITE(io,*) ''
END DO
END IF
CALL abort_code(c_err_io_error)
END IF

Expand Down
11 changes: 4 additions & 7 deletions epoch2d/example_decks/ionisation.deck
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ end:control
#
# use_collisions = T # Collisions must be on for collisional ionisation
# collisional_ionisation = T # Switches on collisional ionisation
# use_nanbu = T
#
# end:collisions

Expand All @@ -37,6 +38,7 @@ begin:constant
den_max = 10.0 * critical(omega)
den_preplasma = 1.0e18
len_scale = 5.0 * micron
ion_charge_state = 22 # Initial ionisation level of ions
end:constant


Expand All @@ -52,7 +54,9 @@ begin:species
name = Electron
charge = -1.0
mass = 1.0
number_density = den_max * ion_charge_state
nparticles = nx * ny * 5
identify:electron
end:species


Expand All @@ -72,13 +76,6 @@ begin:species
end:species


begin:species
name = Electron
number_density = number_density(Palladium) * 22.0
temperature = 1e6
end:species


begin:output

# Simulated time between output dumps
Expand Down
73 changes: 41 additions & 32 deletions epoch2d/src/deck/deck_species_block.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1232,57 +1232,66 @@ SUBROUTINE read_ionisation_data(atomic_no, ion_state, ionise_num, &
LOGICAL :: exists

IF (atomic_no < 1 .OR. atomic_no > 100) THEN
DO iu = 1, nio_units ! Print to stdout and to file
io = io_units(iu)
WRITE(io,*) ''
WRITE(io,*) '*** ERROR ***'
WRITE(io,*) 'Ionising species must have an atomic number between'
WRITE(io,*) '1 and 100'
WRITE(io,*) ''
END DO
IF (rank == 0) THEN
DO iu = 1, nio_units ! Print to stdout and to file
io = io_units(iu)
WRITE(io,*) ''
WRITE(io,*) '*** ERROR ***'
WRITE(io,*) 'Ionising species must have an atomic number between'
WRITE(io,*) '1 and 100'
WRITE(io,*) ''
END DO
END IF
CALL abort_code(c_err_bad_value)
END IF

! Check if the tables can be seen, issue warning if not
INQUIRE(FILE=TRIM(physics_table_location) // '/ionisation_energies.table', &
EXIST=exists)
IF (.NOT.exists) THEN
DO iu = 1, nio_units ! Print to stdout and to file
io = io_units(iu)
WRITE(io,*) ''
WRITE(io,*) '*** ERROR ***'
WRITE(io,*) 'Unable to find the file:'
WRITE(io,*) TRIM(physics_table_location) // '/ionisation_energies.table'
WRITE(io,*) ''
END DO
IF (rank == 0) THEN
DO iu = 1, nio_units ! Print to stdout and to file
io = io_units(iu)
WRITE(io,*) ''
WRITE(io,*) '*** ERROR ***'
WRITE(io,*) 'Unable to find the file:'
WRITE(io,*) TRIM(physics_table_location) &
// '/ionisation_energies.table'
WRITE(io,*) ''
END DO
END IF
CALL abort_code(c_err_io_error)
END IF

INQUIRE(FILE=TRIM(physics_table_location) // '/ion_l.table', &
EXIST=exists)
IF (.NOT.exists) THEN
DO iu = 1, nio_units ! Print to stdout and to file
io = io_units(iu)
WRITE(io,*) ''
WRITE(io,*) '*** ERROR ***'
WRITE(io,*) 'Unable to find the file:'
WRITE(io,*) TRIM(physics_table_location) // '/ion_l.table'
WRITE(io,*) ''
END DO
IF (rank == 0) THEN
DO iu = 1, nio_units ! Print to stdout and to file
io = io_units(iu)
WRITE(io,*) ''
WRITE(io,*) '*** ERROR ***'
WRITE(io,*) 'Unable to find the file:'
WRITE(io,*) TRIM(physics_table_location) // '/ion_l.table'
WRITE(io,*) ''
END DO
END IF
CALL abort_code(c_err_io_error)
END IF

INQUIRE(FILE=TRIM(physics_table_location) // '/ion_n.table', &
EXIST=exists)
IF (.NOT.exists) THEN
DO iu = 1, nio_units ! Print to stdout and to file
io = io_units(iu)
WRITE(io,*) ''
WRITE(io,*) '*** ERROR ***'
WRITE(io,*) 'Unable to find the file:'
WRITE(io,*) TRIM(physics_table_location) // '/ion_n.table'
WRITE(io,*) ''
END DO
IF (rank == 0) THEN
DO iu = 1, nio_units ! Print to stdout and to file
io = io_units(iu)
WRITE(io,*) ''
WRITE(io,*) '*** ERROR ***'
WRITE(io,*) 'Unable to find the file:'
WRITE(io,*) TRIM(physics_table_location) // '/ion_n.table'
WRITE(io,*) ''
END DO
END IF
CALL abort_code(c_err_io_error)
END IF

Expand Down
20 changes: 11 additions & 9 deletions epoch2d/src/physics_packages/collision_ionise.F90
Original file line number Diff line number Diff line change
Expand Up @@ -636,15 +636,17 @@ SUBROUTINE get_electron_data_from_file(atomic_no, ion_state, binding_energy, &
INQUIRE(FILE=TRIM(physics_table_location) &
//'/binding_energy/be_'//z_string, EXIST=exists)
IF (.NOT.exists) THEN
DO iu = 1, nio_units ! Print to stdout and to file
io = io_units(iu)
WRITE(io,*) ''
WRITE(io,*) '*** ERROR ***'
WRITE(io,*) 'Unable to find the file:'
WRITE(io,*) TRIM(physics_table_location) &
//'/binding_energy/be_'//z_string
WRITE(io,*) ''
END DO
IF (rank == 0) THEN
DO iu = 1, nio_units ! Print to stdout and to file
io = io_units(iu)
WRITE(io,*) ''
WRITE(io,*) '*** ERROR ***'
WRITE(io,*) 'Unable to find the file:'
WRITE(io,*) TRIM(physics_table_location) &
//'/binding_energy/be_'//z_string
WRITE(io,*) ''
END DO
END IF
CALL abort_code(c_err_io_error)
END IF

Expand Down
Loading