1

Using this code I get an error like boundary condition in consistency. how to solve this issue and solve this nonlinear system. I am not sure about the B.C. AND I.C., in question it's given as u=v=0 at y=0 and u= constant if y= inf. How to construct boundary conditions when the question has only that conditions?

Clear[u, v, ν, pde1, pde2]
pde1 = D[u[x, y], x] + D[v[x, y], y] == 0;
pde2 = u[x, y]*D[u[x, y], x] + v[x, y]*D[u[x, y], y] == ν*D[u[x, y], {y, 2}];
ic = {u[x, 0] == 0, v[x, 0] == 0};
bc = {u[0, y] == 1, v[0, y] == 0};
ν = 1;
sol = NDSolve[{pde1, pde2, ic, bc}, {u, v}, {x, 0, 1}, {y, 0, 1}]
xzczd
  • 65,995
  • 9
  • 163
  • 468
FDMEM
  • 19
  • 6
  • 4
  • NDsolve should be NDSolve. 2. v[x, 1000] = 0 should be v[x, 1000] == 0, remember to Clear[v] to remove the pollution. 3. You're setting option for NDSolve blindly, MethodOfLines is for time-dependent PDE. 4. When FEM is used, b.c. involving derivative cannot be used, see this post for more info: https://mathematica.stackexchange.com/q/224812/1871
  • – xzczd Oct 29 '22 at 04:15
  • Your simplification for Navier-stokes equation looks unusual, is it from certain literature? If so, can you add the reference?
  • – xzczd Oct 29 '22 at 05:07
  • 1
    No, because I don't think that'll help you learning Mathematica efficiently. (Nasser has provided quite a bit of code sample under your first question but your code are still full of simple mistakes, aren't you? ) Please settle down and first learn the basics of Mathematica. Coding blindly won't save your day. If you insist, at least first correct those simple mistakes mentioned in my previous comments and update your question, and answer the question in my last comment. – xzczd Oct 29 '22 at 06:13
  • I just corrected all mistakes. The code was running but some errors will be shown. (I'm new here so within the minimum time I wish to learn lots of things, so in the hurrying race I made some mistakes so sorry for that sir) Please help me like your student. – FDMEM Oct 29 '22 at 10:45
  • 3
    As asked above, your system looks unusual, it's a variant of 2D static Navier-stokes equation for incompressible flow (by removing the pressure term and modifying the viscosity term). Are you sure it's correct? (Creating PDE casually can easily lead to unsolvable problem. ) Is it from certain literature? If so, can you add the reference? – xzczd Oct 29 '22 at 11:05
  • This is Prandtl equation described for instance in the paper On the ill-posedness of the Prandtl equation on https://www.researchgate.net/publication/24168973_On_the_ill-posedness_of_the_Prandtl_equation . Since it has singularity at x=0, y=0 it can't be solved with Mathematica FEM due to "The minimal damping factor of 1/10000 has been reached". But we can solve it with FDM, with colocation method and with LDG as well. – Alex Trounev Oct 31 '22 at 04:47
  • May I know how the FDM work here. – FDMEM Nov 02 '22 at 06:47