- Thank you received: 0
Question on constraint equations
4 years 8 months ago #2454
by anandes
Question on constraint equations was created 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
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
- mneunteufel
- Offline
- Premium Member
Less
More
- Thank you received: 59
4 years 8 months ago #2455
by mneunteufel
Replied by mneunteufel on topic Question on constraint equations
Hi Anand,
a quick (but dirty) approach would be to add the constraint equation as a penalty
Best,
Michael
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
4 years 8 months ago #2456
by anandes
Replied by anandes on topic Question on constraint equations
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
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
- mneunteufel
- Offline
- Premium Member
Less
More
- Thank you received: 59
4 years 8 months ago #2459
by mneunteufel
Replied by mneunteufel on topic Question on constraint equations
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
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
4 years 8 months ago #2469
by anandes
Replied by anandes on topic Question on constraint equations
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
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.111 seconds