You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to use your package to solve an equation of the form
d/dt P = d2/dx2 P + d/dx( F(x,y) P) + d/dy (G(x,y) P)
with Dirichlet BC. However, I am struggling writing the flux function mainly because the "Laplacian" only applies to the x variable. Can you give me a hint please?
Thank you
The text was updated successfully, but these errors were encountered:
Ok, this is a good situation as otherwise the method as implemented now probably wouldn't converge.
You have two cases: x parallel and y parallel. You can identify them as follows using the edge endpoint coordinates edge[:,1] and edge[:,2]
x parallel: edge[1,1]== edge[1,2]
y parallel:` edge[2,1]== edge[2,2]
Third case is the "diagonal" cas which you can safely ignore.
You can use exact comparison here as the coordinates come from the arrays at the input.
The you have convection-diffusion in the x direction which can be discretied by an upwind flux, and pure convection in y direction which can be discretized by a Godunov flux. I can give some more hints on these , just ask.
Note that these fluxes introduce artificial diffusion which in particular would smear sharp fronts, so you should carefully judge the accuracy of the results. Central difference variants on finer grids may provide a more accurate alternative.
If things don't work out properly with this package (which focuses on elliptic and parabolic problems), you may try Trixi.jl which is oriented at hyperbolic problems so it has more methods for the situation of vanishing diffusion.
Hi,
I would like to use your package to solve an equation of the form
d/dt P = d2/dx2 P + d/dx( F(x,y) P) + d/dy (G(x,y) P)
with Dirichlet BC. However, I am struggling writing the flux function mainly because the "Laplacian" only applies to the x variable. Can you give me a hint please?
Thank you
The text was updated successfully, but these errors were encountered: