Supported Config File Sections - epicf/ef GitHub Wiki

Minimal working config file. It defines a domain without particles. If you run the program with it, you'll get an hdf5 file with empty spatial mesh. It is ini-format with # for comments.

[TimeGrid]
total_time = 1.0e-8
time_step_size = 1.0e-9
time_save_step = 1.0e-9

[SpatialMesh]
grid_x_size = 5.0
grid_x_step = 0.5
grid_y_size = 5.0
grid_y_step = 0.5
grid_z_size = 15.0
grid_z_step = 1.5

[ParticleInteractionModel]
# 'noninteracting' or 'PIC'; without quotes
particle_interaction_model = noninteracting
# particle_interaction_model = PIC

[BoundaryConditions]
boundary_phi_left = 0.0 
boundary_phi_right = 0.0
boundary_phi_bottom = 0.0
boundary_phi_top = 0.0
boundary_phi_near = 0.0
boundary_phi_far = 0.0	

[OutputFilename]
# No quotes; no spaces till end of line
output_filename_prefix = example_
output_filename_suffix = .h5

It is possible to add several particle sources. Different geometries are supported.

[ParticleSourceCylinder.cathode_emitter]
initial_number_of_particles = 5000
particles_to_generate_each_step = 5000
cylinder_axis_start_x = 2.5
cylinder_axis_start_y = 2.5
cylinder_axis_start_z = 0.51
cylinder_axis_end_x = 2.5
cylinder_axis_end_y = 2.5
cylinder_axis_end_z = 0.52
cylinder_radius = 0.5
mean_momentum_x = 0
mean_momentum_y = 0
mean_momentum_z = 6.641e-15
temperature = 0.0
charge = -1.799e-6
mass = 3.672e-24

[ParticleSourceBox.cathode_emitter]
initial_number_of_particles = 50
particles_to_generate_each_step = 50
box_x_left = 0.175
box_x_right = 0.125
box_y_bottom = 0.6
box_y_top = 1.4
box_z_near = 0.11
box_z_far = 0.12
mean_momentum_x = 0
mean_momentum_y = 0
mean_momentum_z = 8.85e-17
temperature = 0.0
charge = -2.398e-08
mass = 4.89e-26

It is possible to add inner regions that absorb particles on collisions and act as conductors under potential. Several geometrical primitives are supported: cylinder, tube, box and sphere.

[InnerRegionCylinder.cylinder]
potential = 1.0
cylinder_axis_start_x = 2.0
cylinder_axis_start_y = 2.0
cylinder_axis_start_z = 0.1
cylinder_axis_end_x = 2.0
cylinder_axis_end_y = 2.0
cylinder_axis_end_z = 0.5
cylinder_radius = 0.5

[InnerRegionTube.tube]
potential = 0.0
tube_axis_start_x = 0.2
tube_axis_start_y = 0.2
tube_axis_start_z = 0.04
tube_axis_end_x = 0.2
tube_axis_end_y = 0.2
tube_axis_end_z = 1.76
tube_inner_radius = 0.10
tube_outer_radius = 0.18

[InnerRegionBox.anode]
potential = +0.36667
box_x_left = 5.99
box_x_right = 0.01
box_y_bottom = 0.01
box_y_top = 5.99
box_z_near = 0.9
box_z_far = 0.98

[InnerRegionSphere.sphere]
potential = 3.0
sphere_origin_x = 5.0
sphere_origin_y = 5.0
sphere_origin_z = 5.0
sphere_radius = 0.5

Uniform magnetic field in some direction is possible to add:

[ExternalMagneticField]
magnetic_field_x = 0.0
magnetic_field_y = 0.0
magnetic_field_z = 40000
speed_of_light = 3.0e10

In dev-branch:
Uniform electric and magnetic fields:

[ExternalMagneticFieldUniform.mgn_uni]
magnetic_field_x = 0.0
magnetic_field_y = 0.0
magnetic_field_z = 500

[ExternalElectricFieldUniform.el_uni]
electric_field_x = 0.0
electric_field_y = 0.0
electric_field_z = 100

(no need to specify speed of light for magnetic field; it is hardcoded)

Analytical expressions for B(x,y,z,t) and E(x,y,z,t) can be specified:

[ExternalMagneticFieldTinyexpr.mgn_tiny]
magnetic_field_x = x + y + z + t
magnetic_field_y = t^2
magnetic_field_z = 100 * ( sin(x) + cos(y) )

[ExternalElectricFieldTinyexpr.el_tiny]
electric_field_x = x * y * z * t
electric_field_y = t^3
electric_field_z = 100 * ( tan(x) + exp(y) )