From: Tobias M. <tob...@un...> - 2017-11-21 13:26:09
|
Dear all, I have some problem with Lagrange multipliers: Maybe I misinterpret my results, but somehow they don't have the effect I expected. Looking at the solution of systems_of_equations_ex3, (using paraview) I see the (real part of) pressure r_p to be 0 at time step 0 and than it jumps to ~10, where it stays for the rest of the simulation. But isn't it actually enforced to stay at 0 "forever"? I also tried to change its value to some other fixed (and time-dependent) ones: diff --git a/examples/systems_of_equations/systems_of_equations_ex3/systems_of_equations_ex3.C b/examples/systems_of_equations/systems_of_equations_ex3/systems_of_equations_ex3.C index b626203..f576138 100644 --- a/examples/systems_of_equations/systems_of_equations_ex3/systems_of_equations_ex3.C +++ b/examples/systems_of_equations/systems_of_equations_ex3/systems_of_equations_ex3.C @@ -614,8 +614,15 @@ void assemble_stokes (EquationSystems & es, // negative one. Here we do not. for (unsigned int i=0; i<n_p_dofs; i++) { - Kp_alpha(i,0) += JxW[qp]*psi[i][qp]; - Kalpha_p(0,i) += JxW[qp]*psi[i][qp]; + // original: set p=0 + //Kp_alpha(i,0) += JxW[qp]*psi[i][qp]; + //Kalpha_p(0,i) += JxW[qp]*psi[i][qp]; + // lets fix the pressure to some finite value: + //Kp_alpha(i,0) += JxW[qp]*psi[i][qp]-1.*JxW[qp]; + //Kalpha_p(0,i) += JxW[qp]*psi[i][qp]-1.*JxW[qp]; + // lets make the pressure growing with time. + Kp_alpha(i,0) += JxW[qp]*psi[i][qp]-theta*dt*JxW[qp]; + Kalpha_p(0,i) += JxW[qp]*psi[i][qp]-theta*dt*JxW[qp]; for (unsigned int j=0; j<n_u_dofs; j++) { Kpu(i,j) += JxW[qp]*psi[i][qp]*dphi[j][qp](0); However, even though the values change a bit, the general behaviour stays the same. Could someone please help me clarifying, what is wrong here? Thanks in advance, Tobias |