Skip to content

Is it possible to impose only a left boundary condition? #351

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

You must be logged in to vote

You are correct that py-pde always requires boundary conditions on both sides since this was most natural for the use cases for which we developed the package. However, if you use one-sided approximations in the finite-difference scheme (e.g., forward or backward derivatives), one of the boundary condition will not be used, so you can set it to an arbitrary value. It might be a good idea to use absurdly large values or even np.nan to ensure that the boundary condition does not spill into the simulation.

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
6 replies
@david-zwicker
Comment options

@HannoSpreeuw
Comment options

@NiklasHohmann
Comment options

@david-zwicker
Comment options

@NiklasHohmann
Comment options

Answer selected by HannoSpreeuw
Comment options

You must be logged in to vote
1 reply
@david-zwicker
Comment options

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