Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Solving a system with a DAE via a lagrange multiplier

Please login with a confirmed email address before reporting spam

My initial question was how to solve for a system that involves a constraint on the solution variables (referred to as a differential-algebraic equation, DAE).

The set of equations I was trying to solve were 3 coupled, time-dependent pdes defining (nx, ny and nz) subject to a constraint equation, nx^2 + ny^2 + nz^2 = 1 (the DAE). This system can be rewritten in terms of a lagrange multiplier, lambda by adding the additional term lambda*nj to the source term of the corresponding equation, j. The trick to solving this sort of problem is to define the lagrange multiplier equation off of one of the other equations. For instance describing the lambda equation off of the nx pde by placing the entire equation into the source term, F. And then inserting a higher order derivative of the constraint into the equation specifying nx, in my case I used gamma = -nx*nxx and F=d(ny*nyx+nz*nzx,x) for a 1d case.

Additionally, I encountered some rather frustrating errors saying that an initial value could not be found for a well-posed system. This problem was circumvented using higher order elements.

Best of luck.


Mike

0 Replies Last Post 8 juil. 2009, 13:17 UTC−4
COMSOL Moderator

Hello Michael Fina

Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.

If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.