Skip to content

Bc for multiple pde's #79

Answered by s133314
s133314 asked this question in Q&A
Mar 17, 2021 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

Aah I found the solution while reading another post and a bit more in the documentation. I shouldn't use bc but bc_ops.
The PDE would be defined as such than:

eq = pde.PDE({'c0': f"-{u[0]}*get_x(gradient(c0)) + {d[0]}*laplace(c0) - {k[0]}*c0",
              'c1': f"-{u[1]}*get_x(gradient(c1)) + {d[1]}*laplace(c1) - 2*{k[1]}*c1"},
             user_funcs={"get_x": lambda arr: arr[0]}, 
             bc_ops={"c0:*": [{"value": bc_c0},  {"derivative": 0.0}],
                     "c1:*": [{"value": bc_c1},  {"derivative": 0.0}]})

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@sashahexe
Comment options

@s133314
Comment options

Answer selected by s133314
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants