Fix the value at a point

Dear all,

How can I prescribe a value at a fixed point in FreeFEM++? For example, fix the velocity to be zero at the centre of a rotating disc; or fix the pressure at the reference point for a flow problem?

Thanks in advance!

Best,
Yongxing.

1 Like

Suppos that the indix of your node is N
Then the velocity Vh in this point :

Vh[][N]=the disered value

Thank you Daoudi,
How can I know the node index N? Sorry if this is silly question, I am just new to FreeFEM.
Best,
Yongxing.

I tried a simply test:

u[][10]=10;
solving the FEM problem
cout<<u[][10]<endl;

Unfortunately,
The value is rewritten after soling the system equations.

Sorry for the late
Suppos that your :
stiffness Matrix is A
Mass Matrix is M
Forces vector is b (Right hand)
Solution vector is u
Then for your specific value p1 ( indix p)

u(p)=the specific value;

  1. b=b - (A(p,:)+M(p,:))*u // ( like a dirichlet condition s)

  2. delete the row p of matrices A and M
    Solve the system u[]=(A+M)-^1*b

Thank you very much Daoudi.
Yongxing.