Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A new profile code 4 is implemented, for reading the beam particles from a particle raw h5 file of a OSIRIS or QuickPIC output. The example input deck is following.
{
"simulation" : !note
{
"nodes" : [32,1],
"indx" : 8,
"indy" : 8,
"indz" : 9,
"box" : {
"x" : [-4.0,4.0],
"y" : [-4.0,4.0],
"z" : [0.0,10.0]},
"boundary" : "conducting",
"n0" : 1.0e16,
"time" : 3062.,
"dt" : 2.0,
"nbeams" : 1,
"nspecies" : 1,
"dump_restart" : false,
"ndump_restart" : 4000,
"read_restart" : false,
"restart_timestep" : 1,
"iter" : 1,
"verbose" : 0
},
"beam" :
[
{
"evolution" : true,
"profile" : 4,
"npmax" : 4200000,
"q" : -1.0,
"m" : 1.0,
"file_name" : "driver.h5",
! format can be 0 (OSIRIS, 1,2,3 correspond to z,x,y) or 1 (QuickPIC, 1,2,3 correspond to x,y,z)
"format" : 1,
! The actual number of particles of a macro particle is (cell_volumnn0_per_cc1e6)q
! which should be constant between codes, thus
! q_ratio = (cell_volumn_in_old_simn0_in_old_sim)/(cell_volumn_in_new_sim*n0_in_new_sim)
! /raw_sampling_ratio.
"q_ratio" : 1.,
"offset" : [0.0,0.0,0.0],
! Offset in x, y, z. If the h5 has OSIRIS format, z in this simulation is offset_z - z in h5.
"quiet_start" : true,
"diag" :
[
{
"name" : ["charge"],
"ndump" : 0
},
{
"name" : ["charge"],
"ndump" : 10,
"slice" : [["xz", 129],["yz",129]]
},
{
"name" : ["raw"],
"ndump" : 10,
"sample" : 1
}
]
},
],
"species" :
[
{
"profile" : 0,
"ppc" : [2,2],
"q" : -1.0,
"m" : 1.0,
"density" : 1.0,
"longitudinal_profile" : "uniform",
"diag" :
[
{
"name" : ["charge", "jx"],
"ndump" : 0
},
{
"name" : ["charge"],
"ndump" : 10,
"slice" : [["xz", 129],["yz",129]]
}
]
}
],
"field" :
{
"diag" :
[
{
"name" : ["ex","ez"],
"ndump" : 0
},
{
"name" : ["ex","bx","ey","by","ez"],
"ndump" : 10,
"slice" : [["xz", 129],["yz", 129]]
}
]
}
}