Repository navigation
Can I specify the potential on embedded boundaries using a MultiFab instead of an analytical function? #6550
Unanswered
ShuLiu-Clock
asked this question in
Q&A
Replies: 1 comment 6 replies
|
How many parts do you have? Is the potential time dependent? One thing you could do it to save |
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Dear WarpX Community,
I am developing a 2D RZ code with floating potential on embedded boundaries (EB). The potential values differ across the cut cells (cells that intersect the EB). As far as I know, one way to update the EB potential is by using
set_potential_on_eb()with an analytical function. Currently, I update the potential by constructing a lengthy function that includes the calculated potential for each cut cell. The function I use to generate this analytical expression is shown below:The generated function consists of parts like

c5*(sqrt(x*x+y*y)>=c1 and sqrt(x*x+y*y)<c2 and z>=c3 and z<c4). While this does correctly update the potential, parsing such a long function is very time-consuming. Therefore, I am looking for alternative approaches.In the Amrex documentation, I found the following information:
This suggests that a MultiFab can be used to specify Dirichlet values on EB faces. My question is: Can I specify the potential on embedded boundaries using a MultiFab in WarpX? Alternatively, is there a Python interface to access the underlying
setEBDirichletroutine?Any guidance would be greatly appreciated.
Thank you.
All reactions