Directly specifying electric field boundary condition #567
Replies: 2 comments 14 replies
|
Short answer: The values will be overwritten. The MHD diagrams here are applicable: https://github.com/PrincetonUniversity/athena/wiki/Code-Structure The face-centered electric fields are calculated via the Riemann solver in The diagrams are a bit out of date (though it doesn't affect this issue). You can always check the actual dependencies of the tasks in (Crawling through the dependencies can be a bit tedious. This is perhaps why no one has had the time to write a robust way of diagramming the task flow automatically, and I haven't manually remade the diagrams in quite a long time.) Modifying electric fields, like modifying hydrodynamical fluxes, is not particularly supported by the code. That said, if you really want, this should be doable, and perhaps has been done by others, but it will require writing some code outside the usual safe places for user modifications. |
|
@msbc do you recall if you had any issues with AMR when you were overwriting the electric field to zero? When I have been using AMR with (especially with small block sizes) I am seeing what look like block boundary artifacts. Plotting the elecrtric field values from the register (e.x1e etc.) and comparing to my "desired" values, there are deviations even though the former is specified directly from the latter with the exact same data extents. @c-white I am thinking this could be something to do with block synchronisation, or refinement and derefinement. Is there any danger that edge-centered electric field values specified according to Matt's suggestion (below) could be altered after the ComputeCornerE? There doesn't seem to be anything odd going on in the TimeIntegratorTaskList::IntegrateField or the Field::CT functions, but I'm unfamiliar with the stage weights and how they affect the field update on shared boundaries with different refinements. `if (pmb->loc.lx1==0) { }` |
Uh oh!
There was an error while loading. Please reload this page.
Has anyone implemented an electric field boundary condition through directly specifying electric field values e.g. in corners within the CT algorithm? There seems to be direct access to the electric field register i.e. pmb->pfileld->e.x1e etc. but I am wondering if this is overridden by the CT algorithm? I couldn't see a flow diagram including CT in the programmer guide. I suppose it is done as part of the flux solve routine and so it will override whatever is put in the boundary function?
All reactions