Constraint

Top  Previous  Next

{  CONSTRAINT.PDE 

   This problem shows the use of constraints to resolve an ill-posed problem.

   There are no value boundary conditions in any of the three equations, so

   there are infinitely many solutions that satisfy the PDE's.  The constraints

   select from the family of solutions those which have an integral of 4,

   or a mean value of 1.

}

 

title 'Constraint Test'

 

Variables

    u1 u2 u3

 

equations

    u1:        div(grad(u1)) +x = 0

    u2:        div(grad(u2)) +x+y = 0

    u3:        div(grad(u3)) +y = 0

 

constraints

    integral(u1) = 4

    integral(u2) = 4

    integral(u3) = 4

 

boundaries

   Region 1

    start(-1,-1) line to (1,-1) to (1,1) to (-1,1) to close

 

monitors

   contour(u1)

   contour(u2)

   contour(u3)

plots

   contour(u1)

   contour(u2)

   contour(u3)

 

end