I want to make a python code for advection diffusion equation on a square. 0-Dirichlet BC on three sides and 0-Numann on one. If you have done this, could you please explain it briefly? Thank you
You will have to introduce a ghost boundary to apply Neumann boundary condition along the 4th boundary. Make sure that the scheme applied along the boundary should be of the same order to that of the scheme used for interior nodes.
You will have to introduce a ghost boundary to apply Neumann boundary condition along the 4th boundary. Make sure that the scheme applied along the boundary should be of the same order to that of the scheme used for interior nodes.
The practical implementation depends on the formulation you use. In case of finite difference, you discretize the Neumann condition at the boundary with a forward/backward and insert the expression into the equation at the node close to the boundary.
Conversely, in a FV formulation you could prescribe directly the flux if the face is coincident with the boundary