Skip to content

Proper usage of model.predict for TimePDEs and boundary conditions #669

Answered by lululxvi
yklcs asked this question in Q&A
Discussion options

You must be logged in to vote

I am a little confused about your problem:

  • "periodic boundary condition y(0) = y(x)" should be y(-10, t) = y(10, t)? Your code is right bcl = dde.PeriodicBC(geomtime, 0, boundary_l), and you only need either bcl or bcr.
  • "zero boundary condition y(0) = y(x) = 0" should be y(-10, t) = y(10,t) = 0? Your code is right bc = dde.DirichletBC(geomtime, lambda x: np.zeros((len(x), 1)), lambda _, on_boundary: on_boundary)

Do you want to use one BC only or both BCs? If you use zero boundary condition on left and right boundary, then it is automatically periodic BC, right? (The PDE is third order, and thus you need 3 BCs?) Could you show some details why you think the BC doesn't work?

For the predi…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by lululxvi
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
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
Converted from issue

This discussion was converted from issue #669 on May 13, 2022 22:15.