I'm new to numerical modeling and trying to figure out how things work inside business codes.
Consider a 1D domain divided into small cells of width dx and at the East and West a Neumann conditions boundary is affected (zero flow in the East and constant in the West). In the center, we have an upward outgoing flow. Here is an illustration image:
The PDE governing this problem is given by the following:
PDE governing the problem and BC conditions
Questions
The model is in 1D and the flow w is done along the fictitious axis y. How do we define it as a boundary condition in our model?
Are the defined boundary conditions calculated independently of the PDEP or should they be incorporated into the discrete form of the EDP as below (example with q2)?
- I also question the correctness of the formulation of the condition on qa. Indeed, it is an outgoing flow towards the outside (thus according to the fictitious axis y). Is my way of writing it correct?
Thank you in advance!
EDIT: Pseudo-code
For all points contained in my domain except the well and boundary points:
Apply (1) S * du/dt = T * d2u/dx2 + w
At my well level (Neumann boundary condition)
Apply (2) S * du/dt = T * d2u/dx2 + q
At my boundary points (Left and rigth) -> Neumann condition
q = Tdu/dx -> discretize and replace it in (3)
(3) S * du/dt = T * d2u/dx2
Is it right?