To have more flexibility, a custom routine for boundary conditions can be defined in the m_user.f90
file, which will override the above setting
call cfg_add_get(cfg, "field_electrode_grounded", field_electrode_grounded, &
"Whether electrode 1 is grounded or at the applied voltage")
call cfg_add_get(cfg, "field_electrode2_grounded", field_electrode2_grounded, &
"Whether electrode 2 is grounded or at the applied voltage")
call cfg_add_get(cfg, "field_rod_r0", rod_r0, &
"Electrode 1: first relative coordinate")
call cfg_add_get(cfg, "field_rod_r1", rod_r1, &
"Electrode 1: second relative coordinate")
call cfg_add_get(cfg, "field_rod2_r0", rod2_r0, &
"Electrode 2: first relative coordinate")
call cfg_add_get(cfg, "field_rod2_r1", rod2_r1, &
"Electrode 2: second relative coordinate")
call cfg_add_get(cfg, "field_rod_radius", rod_radius, &
"Electrode 1 radius (in m)")
call cfg_add_get(cfg, "field_rod2_radius", rod2_radius, &
"Electrode 2 radius (in m)")
call cfg_add_get(cfg, "cone_tip_radius", cone_tip_radius, &
"Electrode 1: tip radius (if conical)")
call cfg_add_get(cfg, "cone_length_frac", cone_length_frac, &
"Electrode 1: fraction of conical part (if conical)")
call cfg_add_get(cfg, "cone2_tip_radius", cone2_tip_radius, &
"Electrode 2: tip radius (if conical)")
call cfg_add_get(cfg, "cone2_length_frac", cone2_length_frac, &
"Electrode 2: fraction of conical part (if conical)")
rod_r0 = st_domain_origin + rod_r0 * st_domain_len
rod_r1 = st_domain_origin + rod_r1 * st_domain_len
rod2_r0 = st_domain_origin + rod2_r0 * st_domain_len
rod2_r1 = st_domain_origin + rod2_r1 * st_domain_len
electrode_type = "rod"
call cfg_add_get(cfg, "field_electrode_type", electrode_type, &
"Type of electrode (sphere, rod, rod_cone_top, rod_rod, user)")