Hello - I am simulating the linear advection equation with a nonlinear autonomous vector field f(x,y) (as opposed to a constant velocity which is usually assumed). For this situation, I need to assign zero Dirichlet boundary values at inflow points on the boundary i.e., those points on the boundary where the vector field points inwards. Mathematically, the inflow points can be found out by picking those points on the boundary that have a negative vector dot product between the vector field f and the unit normal (unormal). So logically, we need an if statement inside the boundary conditions i.e., if the dot product of the two vectors is < 0 for the point under consideration, then assign value(v)=0, otherwise do not assign any boundary conditions. The outflow points for this problem (points where the dot product is > 0) is automatically determined by the solution (since the solution flows out eventually, we cannot specify values on the outflow points, otherwise the problem will be ill-posed).
FlexPDE does not allow the use of if statements withing the boundary condition part of the code. So I would really appreciate it if anybody could help me with this special type of boundary assignment.
Currently, I calculate the inflow points separately on a sheet of paper and then assign zero values to those points. I would like to automate the assignment using an if then else statement.
Thanks.
Rajeev
