Hi,
I am trying to solve the Navier-Stokes equations with an external force that is perpendicular to the velocity. Firstly I defined a fespace of it and made function f on the fespace:
fespace Fh(Th, P2dc); Fh fu = k*u, fv = k*v;
k is defined on a P0 fespace, and u and v are the velocity defined on a P2 fespace. When I included it in the Navier-Stokes equation and solved it, it would show that “velocity too high”, and got a wrong value.
problem navierstokes ( [u, v, p], [uh, vh, ph]) = int2d(Th) ( rho * u * uh / dt ) - int2d(Th) ( rho * convect ([uold,vold], -dt, uold) * uh / dt ) + int2d(Th) ( rho * v * vh / dt ) - int2d(Th) ( rho * convect ([uold,vold], -dt, vold) * vh / dt ) + int2d(Th) ( nu * dx(u) * dx(uh) + nu * dy(u) * dy(uh) ) + int2d(Th) ( nu * dx(v) * dx(vh) + nu * dy(v) * dy(vh) ) + int2d(Th) ( fu * uh) + int2d(Th) ( fv * vh) - int2d(Th) ( p * dx(uh) ) - int2d(Th) ( p * dy(vh) ) + int2d(Th) ( dx(u) * ph + dy(v) * ph ) - int1d(Th, c4) ( nu * dx(u) * N.x * uh + nu * dy(u) * N.y * uh ) - int1d(Th, c4) ( nu * dx(v) * N.x * vh + nu * dy(v) * N.y * vh ) + on ( c1, c3, u=0.0, v=0.0 ) + on ( c4, u=uin, v=0);
But when I directly included k*u in the Navier-Stokes equation, it can run the simulation.
+ int2d(Th) ( k * u * uh) + int2d(Th) ( k * v * vh)
Can I ask why there is this problem? And what I can do if I want to use the fespace function for the force?
Thanks in advance!