Skip to content

Singularity in the domain #244

Answered by david-zwicker
noirchen asked this question in Q&A
Discussion options

You must be logged in to vote

It looks to me as if you want to use the laplace operator in spherical coordinates. If so, the situation might be simpler than you even thought. You can simply use a SphericalSymGrid, which implements the correct laplacian:

from pde import PDE, SphericalSymGrid, MemoryStorage, ScalarField, plot_kymograph

# Definition of the PDE
eq = PDE({"u": f"laplace(u)"}, bc=[{"derivative": 0}, {"value": 1}])

grid = SphericalSymGrid(1, 32)  # generate grid
field = ScalarField(grid, 0)  # generate initial condition

storage = MemoryStorage()  # store intermediate information of the simulation
res = eq.solve(field, 1, dt=0.001, adaptive=True, tracker=storage.tracker(0.01))  # solve the PDE

plot_kymograph

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@noirchen
Comment options

@outspeckle
Comment options

@david-zwicker
Comment options

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