# How to define normal constraints on the inclined plane

Hello, in my model there is a constraint on a tilted plane (which is not parallel to the x,y,z coordinates) and I want to constrain its normal displacement, but i don’t know how to implemented. I noticed the ‘mpc’ maybe helpful to my question, but i can’t find the example about my question. Is there anyone can help me?

1 Like

Thank you very much for the case of control law to Dirichlet conditions！And I have two more questions:

1. If I have multiple MPCS, how applying them like bcs=[bc1,bc2,…,bcn] to solve the LinearProblem (mecha_forml, mecha_formr, mpc, bcs=bcs, petsc_options=petsc_options).
Such as: mpcs=[mpc1,mpc2,…,mpcn];
where, mpc1 = MultiPointConstraint(W);
mpc1.create_slip_constraint(W.sub(0), (mt, 1), n, bcs=bcs);
mpc1.finalize().
2. How to define mpc constraint by displacement in two directions other than normal direction?
I understand that mpc1.create_slip_constraint should not be used

All mpcs should be contained in one constraint (as they will interact with each other).
Add all constraints to mpc1, then once done call finalize.

You can send in any vector to create_slip_constraint, you just have to interpolate it into the appropriate function space. See: dolfinx_mpc — DOLFINx-MPC: An extension to DOLFINx for multi point constraints

All mpcs should be contained in one constraint means:
mpc = MultiPointConstraint(W);
mpc.create_slip_constraint(W.sub(0), (mt, 1), n, bcs=bcs); # “1” face constraint
mpc.create_slip_constraint(W.sub(0), (mt, 2), n, bcs=bcs); # “2” face constraint
mpc.finalize().

send in any vector to create_slip_constraint means:
i can creat any vector to instead of n?

Yes.

Yes. As you can see the third imput to the function is v, which is used in enforcing u\cdot v=0.