0

I have a 2d PDE and NDSolve returns a solution that takes negative values but I want the function to be positive

     f[x,y]>=0 

everywhere. How do I include this simple constraint?

VN23
  • 123
  • 4
  • The sign of the solution will be defined by the initial and boundary conditions and the range over which you integrate. Therefore, you have to adjust these to get a solution with f>0. – Daniel Huber Mar 05 '21 at 10:35
  • is there no way of including this constraint? – VN23 Mar 05 '21 at 10:39
  • You are not free to specify this. It is given be the afore mentioned parameters and of course the equation. Another question would be, if you are searching these parameters. – Daniel Huber Mar 05 '21 at 10:44
  • its a physical problem, I understand its not a mathematically 100% well-posed PDE but I dont think NDSolve is so strict – VN23 Mar 05 '21 at 10:52
  • If physics requests f>0, then I think either the equations or inital/boundary conditions are wrong. And it is also possible that you have a problem with numerical stability. And of course the possibility exists, that you are on the brink to detect new physics. – Daniel Huber Mar 05 '21 at 10:56
  • 2
    @VN23 Also we can't tell you nothing without PDE, boundary conditions and code you try to solve your problem with. – Alex Trounev Mar 05 '21 at 13:33

0 Answers0