determining pressure in a Stokes problem uniquely
Hi,
I am a beginner with Fenics and am shifting from Matlab. I have got a small program working to solve the linear Stokes equations with a Taylor-Hood element. As it is known that pressure is determined only upto a constant if only velocities are specified on the boundary, I used to set the pressure at a reference node (say the origin) to the desired value and obtain a unique solution when I worked with my own code.
In FEnics, I tried to do:
-------
def Pressure_level(x, on_boundary):
return on_boundary and abs(x[0]) < tol and abs(x[1]) < tol
bc = DirichletBC(
-------
which of course didnt work.
1.Could you please help me figure out how to do this is Fenics ?
2. In the demo program using Taylor-Hood, there are a couple of commands which I do not understand:
-------
print "Norm of velocity coefficient vector: %.15g" % v.vector(
print "Norm of pressure coefficient vector: %.15g" % p.vector(
-------
Could anyone tell me what exactly is the "coefficient vector" here ?
Thanks
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- Kristian B. Ølgaard
- Solved:
- Last query:
- Last reply: