Forum Message

 

 

We have moved the forum to https://forum.ngsolve.org . This is an archived version of the topics until 05/05/23. All the topics were moved to the new forum and conversations can be continued there. This forum is just kept as legacy to not invalidate old links. If you want to continue a conversation just look for the topic in the new forum.

Notice

The forum is in read only mode.

Question on constraint equations

More
4 years 2 months ago #2454 by anandes
Hello NGSolve developers,

How can constraint equations be implemented in NGSolve? For example, please see the attached toy problem. It is a rectangular block in 2D rotated 30 degrees from the X-axis. A Dirichlet condition on displacements (vector field "u") is to be applied on the left edge (boundary "B4" in the toy model). The condition to be imposed is u.n = 0 (displacements normal to the edge are to be set to 0).
So the equivalent constraint equation on the edge degrees of freedom is:
[tex]u_x n_x + u_y n_y = 0, [/tex] where [tex]u_x, u_y[/tex] are the components of the displacement vector and [tex]n_x, n_y[/tex] are the the components of the normal vector on edge "B4".

Please let me know how this can be implemented in NGSolve. I need to apply similar BCs on curved surfaces.

Thank you,
Anand
More
4 years 2 months ago #2455 by mneunteufel
Hi Anand,

a quick (but dirty) approach would be to add the constraint equation as a penalty
Code:
n = specialcf.normal(mesh.dim) ... a += Variation( 1e6*(u*n)**2*ds("B4") )

Best,
Michael
More
4 years 2 months ago #2456 by anandes
Hi Michael,

Thank you for your response.

I agree that approach can weakly enforce Dirichlet BCs as required. There is an issue I foresee specifically for the kind of problems I'm working on.

1. I have a formulation that already uses Lagrange multipliers to impose certain conservation constraints.

2. The governing equations are posed in mixed form. So such constraints have to be imposed on both displacements and tractions (Neumann BCs related to stress at the boundary surfaces).

Using the penalty approach to apply constraints to a system with the above characteristics will likely affect the system of equations adversely. If possible, I'd prefer not to degrade the linear algebraic system with additional penalty constraints.

Is there a different approach to implement the constraint equations? (I am fine even if it's painful to implement :-)

Thank you,
Anand
More
4 years 1 month ago #2459 by mneunteufel
Hi Anand,

you can use also a Lagrange multiplier to enforce the boundary condition instead of a penalty.
I'm not aware of another possibility as the VectorH1 is organized in Cartesian coordinates.

Maybe if you use an HDiv-conforming HDG method. There the (displacement) vector field is automatically split into its normal and tangential components. However, you would need to adapt your problem, see this tutorial .

Best
Michael
More
4 years 1 month ago #2469 by anandes
Hi Michael,

Yes, I can use Lagrange multipliers but these come with similar challenges in terms of matrix conditioning - I'll mostly end up doing this.

I was just wondering if NGSolve had any utility to impose constraint equations at the linear algebraic level (like using the constraint relation matrix and then condensing out the slave DOFs).

Thank you for the link to the HDG tutorial. I'll take a look at it to see if that is feasible in my case.

Thank you,
Anand
Time to create page: 0.179 seconds