Refactor phi wall boundary conditions into species table - #1101
Conversation
…ement for species
manauref
left a comment
There was a problem hiding this comment.
This approach is not quite as modular as I expected. Specifically, rather than a gk_species_wall_potential.c file that calculated phi_wall lower AND upper, there should just be two calls to a gk_species_phi_wall_advance method in gk_species_apply_bc, right before the gk_species_sheath_advance, one for each of lower/upper.
The call to calculate phi_wall in the calc_field will also go away, since phi_wall is a BC property.
Additionally:
- I don't see why lines 356-364 in
gyrokinetic_multib.cshould be deleted. - L913 in
gyrokinetic_multib.cwill disappear after changes requested above. - The introduction of
struct gk_species_wall_potentialseems unnecessary at first, but let's wait (until after changes requested above) and see. It might be a good idea.
…ctions and update boundary condition applications
|
This has been refactored to be contained inside a Redundant code was removed from |
manauref
left a comment
There was a problem hiding this comment.
see 2 more requested edits below before you merge.
| gk_species_phi_wall_advance(gkyl_gyrokinetic_app *app, | ||
| const struct gk_species_wall_potential *wall, double tm) | ||
| { | ||
| if (wall->projector) { |
There was a problem hiding this comment.
as with other modules, since this _advance method is called in the time loop, remove this if-statement by creating a function pointer in the struct gk_species_wall_potential that gets allocated to an empty function if aux_profile is not given.
| gk_species_phi_wall_init(app, &gks->lower_bc[wall_dir], &gks->phi_wall_lo); | ||
| gk_species_phi_wall_init(app, &gks->upper_bc[wall_dir], &gks->phi_wall_up); |
There was a problem hiding this comment.
I think these should go around lines 880 and 940 I think
…pdate initialization in species
|
Wait why was this merged with only one approval?? |
|
It was merged with only 1 approval because it was merged into a branch, not into main |
|
oh my bad hahaha thanks! |
This is from sol 5.6 high. The parameter for the shetath potential function should be a property of the species, not the field, says Mana. This is because the sheath BC is a species BC, not a field BC.
This is behind my PR #997
Sol's notes