diff --git a/epoch1d/example_decks/ionisation.deck b/epoch1d/example_decks/ionisation.deck index 613355ee3..fdcdd53f5 100644 --- a/epoch1d/example_decks/ionisation.deck +++ b/epoch1d/example_decks/ionisation.deck @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/epoch1d/src/deck/deck_species_block.F90 b/epoch1d/src/deck/deck_species_block.F90 index 9558ce6d8..3084603ea 100644 --- a/epoch1d/src/deck/deck_species_block.F90 +++ b/epoch1d/src/deck/deck_species_block.F90 @@ -1226,14 +1226,16 @@ 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 @@ -1241,42 +1243,49 @@ SUBROUTINE read_ionisation_data(atomic_no, ion_state, ionise_num, & 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 diff --git a/epoch1d/src/physics_packages/collision_ionise.F90 b/epoch1d/src/physics_packages/collision_ionise.F90 index 138a250e2..60ab5ac75 100644 --- a/epoch1d/src/physics_packages/collision_ionise.F90 +++ b/epoch1d/src/physics_packages/collision_ionise.F90 @@ -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 diff --git a/epoch2d/example_decks/ionisation.deck b/epoch2d/example_decks/ionisation.deck index 970319f81..6849c9cf8 100644 --- a/epoch2d/example_decks/ionisation.deck +++ b/epoch2d/example_decks/ionisation.deck @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/epoch2d/src/deck/deck_species_block.F90 b/epoch2d/src/deck/deck_species_block.F90 index ac8a5cdd4..8bd38a00f 100644 --- a/epoch2d/src/deck/deck_species_block.F90 +++ b/epoch2d/src/deck/deck_species_block.F90 @@ -1232,14 +1232,16 @@ 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 @@ -1247,42 +1249,49 @@ SUBROUTINE read_ionisation_data(atomic_no, ion_state, ionise_num, & 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 diff --git a/epoch2d/src/physics_packages/collision_ionise.F90 b/epoch2d/src/physics_packages/collision_ionise.F90 index cfa56b79b..604407521 100644 --- a/epoch2d/src/physics_packages/collision_ionise.F90 +++ b/epoch2d/src/physics_packages/collision_ionise.F90 @@ -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 diff --git a/epoch3d/src/deck/deck_species_block.F90 b/epoch3d/src/deck/deck_species_block.F90 index bea9e8c58..faa973768 100644 --- a/epoch3d/src/deck/deck_species_block.F90 +++ b/epoch3d/src/deck/deck_species_block.F90 @@ -1238,14 +1238,16 @@ 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 @@ -1253,42 +1255,49 @@ SUBROUTINE read_ionisation_data(atomic_no, ion_state, ionise_num, & 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 diff --git a/epoch3d/src/physics_packages/collision_ionise.F90 b/epoch3d/src/physics_packages/collision_ionise.F90 index 2d867f213..94f059cda 100644 --- a/epoch3d/src/physics_packages/collision_ionise.F90 +++ b/epoch3d/src/physics_packages/collision_ionise.F90 @@ -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