Re: [deal.II] Issue with convergence of iterative linear solver for system matrix in modified step-57 with no-normal flux constraints

2018-02-22 Thread Bruno Blais
I have found my problem. A boundary condition in my mesh was ill-defined 
and this lead to my error.
Sorry for the confusion.
Thanks


On Monday, 19 February 2018 13:41:35 UTC-5, Bruno Blais wrote:
>
> Hello,
> Sorry I feel I have not explained myself correctly. Here is a drawing of 
> the case:
>
>
> 
>
> With Ux may be a profile or a constant.
> Initially I had set-up that case with Ux as a Poiseuille flow profile and 
> the Top and Bottom as no slip boundary conditions. In that case I got the 
> solution I was expecting. Convergence was good and the solution was what I 
> had in mind.
> Then what I wish to do is set Ux as a constant and apply slip at the top 
> and bottom boundary conditions. When I do this is when I am unable to reach 
> convergence in my iterative solution, yet I do not understand why because 
> the problem should be well posed.
> I don't think that leaving my right boundary as a free traction boundary 
> condition is problematic since it is by all mean an outlet boundary. This 
> worked well for instance in a backward facing step case.
> Thank you for your time, sorry for the confusion.
> Best regards
>
>
>
> On Monday, 19 February 2018 10:50:48 UTC-5, Timo Heister wrote:
>>
>> > Does the order in which I apply the nonzero and zero constraints 
>> matter? 
>>
>> These are two independent objects, so no. 
>>
>> > Currently I apply the inlet and then the no-slip in the 
>> nonzero_constraints, 
>> > thus the bottom and top wall appear after the inlet. Afterward the 
>> cylinder 
>> > is put in the zero constraints. 
>>
>> I don't understand. You need boundary conditions in 
>> nonzero_constraints and zero_constraints for all boundaries. The 
>> reason for these two sets is that one is used for the initial solve, 
>> while the second one is used for the Newton updates. 
>>
>>
>> -- 
>> Timo Heister 
>> http://www.math.clemson.edu/~heister/ 
>>
>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [deal.II] Issue with convergence of iterative linear solver for system matrix in modified step-57 with no-normal flux constraints

2018-02-19 Thread Bruno Blais
Hello,
Sorry I feel I have not explained myself correctly. Here is a drawing of 
the case:



With Ux may be a profile or a constant.
Initially I had set-up that case with Ux as a Poiseuille flow profile and 
the Top and Bottom as no slip boundary conditions. In that case I got the 
solution I was expecting. Convergence was good and the solution was what I 
had in mind.
Then what I wish to do is set Ux as a constant and apply slip at the top 
and bottom boundary conditions. When I do this is when I am unable to reach 
convergence in my iterative solution, yet I do not understand why because 
the problem should be well posed.
I don't think that leaving my right boundary as a free traction boundary 
condition is problematic since it is by all mean an outlet boundary. This 
worked well for instance in a backward facing step case.
Thank you for your time, sorry for the confusion.
Best regards



On Monday, 19 February 2018 10:50:48 UTC-5, Timo Heister wrote:
>
> > Does the order in which I apply the nonzero and zero constraints matter? 
>
> These are two independent objects, so no. 
>
> > Currently I apply the inlet and then the no-slip in the 
> nonzero_constraints, 
> > thus the bottom and top wall appear after the inlet. Afterward the 
> cylinder 
> > is put in the zero constraints. 
>
> I don't understand. You need boundary conditions in 
> nonzero_constraints and zero_constraints for all boundaries. The 
> reason for these two sets is that one is used for the initial solve, 
> while the second one is used for the Newton updates. 
>
>
> -- 
> Timo Heister 
> http://www.math.clemson.edu/~heister/ 
>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [deal.II] Issue with convergence of iterative linear solver for system matrix in modified step-57 with no-normal flux constraints

2018-02-19 Thread Timo Heister
> Does the order in which I apply the nonzero and zero constraints matter?

These are two independent objects, so no.

> Currently I apply the inlet and then the no-slip in the nonzero_constraints,
> thus the bottom and top wall appear after the inlet. Afterward the cylinder
> is put in the zero constraints.

I don't understand. You need boundary conditions in
nonzero_constraints and zero_constraints for all boundaries. The
reason for these two sets is that one is used for the initial solve,
while the second one is used for the Newton updates.


-- 
Timo Heister
http://www.math.clemson.edu/~heister/

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [deal.II] Issue with convergence of iterative linear solver for system matrix in modified step-57 with no-normal flux constraints

2018-02-18 Thread Bruno Blais
Hello,
My gmsh mesh produces 3 physical groups which are independent. Say my 
simulation is the flow around a cylinder. The cylinder is a physical group 
(0), the inlet (say left wall) is a class inheriting from the Function 
class which sets the X component to 1 and the Y component to 0 and uses the 
velocity mask.
Finally the physical group(2) is supposed to be the top and the bottom 
boundary which would be slip. The last part (the right wall) I wish to 
leave as a free boundary condition so it is not put in any physical group.
Everything works if I put the physical group(2) as a dirichlet boundary 
condition (and if I adapt the velocity profile of the inlet so that it 
matches the 0 on the top and bottom wall using for instance a parabolic 
inlet profile).

Does the order in which I apply the nonzero and zero constraints matter?
Currently I apply the inlet and then the no-slip in the 
nonzero_constraints, thus the bottom and top wall appear after the inlet. 
Afterward the cylinder is put in the zero constraints.
Thanks you very much
Best regards
Bruno


On Sunday, 18 February 2018 11:58:40 UTC-5, Timo Heister wrote:
>
> Are you setting the conditions correctly for the zero_constraints and 
> the nonzero_constraints and are you sure you are not applying other 
> boundary conditions on that wall (for example with 
> interpolate_boundary_values())? 
>
> On Sat, Feb 17, 2018 at 5:46 PM, Bruno Blais  > wrote: 
> > Hello everyone, 
> > 
> > I believe this may sound like a relatively dumb question, but I thank 
> you 
> > for your time. 
> > I am using a (slightly) modified version of step-57 to solve certain 
> steady 
> > state Navier-Stokes problem. 
> > I have had relatively good success and showed that i could recover the 
> > appropriate order of convergence on manufactured solutions and obtained 
> good 
> > solutions on problems like a backward facing step, as such I am 
> confident 
> > that the residual / jacobian matrix / linear solver / Schur complement 
> > aspect is ok. Anyway, I did not modify anything from Step-57 when it 
> comes 
> > to the Schur complement / solution of the linear system. 
> > 
> > My core issue arises when I try to replace one of my homogenous or 
> > non-homogenous dirichlet boundary condition with a 
> > no_normal_flux_constraints to impose slip instead of no-slip on a 
> boundary. 
> > Simply, I can say that I implement it by adding an additional constraint 
> in 
> > the setup_dofs member function of step-57 such as: 
> > 
> > std::set no_normal_flux_boundaries; 
> > 
> > no_normal_flux_boundaries.insert (2); /* here 2 is a Physical Line in my 
> > gmsh mesh */ 
> > 
> > VectorTools::compute_no_normal_flux_constraints (dof_handler, 0, 
> > 
> > 
>  no_normal_flux_boundaries, 
> > 
> >  nonzero_constraints 
> > 
> >  ); 
> > 
> > 
> > Now everything compiles , but the iterative solver (GMRES in this case) 
> for 
> > the system matrix does not converge anymore with this set of boundary 
> > conditions. My general problem is well-posed and if I replace these 
> boundary 
> > with regular Dirichlet I get an expected solution. 
> > Clearly, I am doing something wrong, but I must admit my lack of 
> knowledge 
> > on the issue. Could it be related to the way for system matrix and the 
> Schur 
> > complement is formed which is rendered not-ok in this case for no-flux 
> > boundaries? 
> > I know the example is made with Dirichlet (homogenous or not) boundary 
> in 
> > mind, so clearly I am missing something when it comes to changing one of 
> > these boundaries to a slip. 
> > 
> > I thank you greatly for your time, 
> > Best regards, 
> > Bruno 
> > 
> > 
> > -- 
> > The deal.II project is located at 
> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.dealii.org_&d=DwIBaQ&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=4k7iKXbjGC8LfYxVJJXiaYVu6FRWmEjX38S7JmlS9Vw&m=ulWuM0dNK_XHF-DL_x2EvT8bMSBuSrV4XKcqEfBiLm8&s=-4wmXq2eve0gPycm8fOaR7d-hpgfjIE1aPscZQsUILk&e=
>  
> > For mailing list/forum options, see 
> > 
> https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_forum_dealii-3Fhl-3Den&d=DwIBaQ&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=4k7iKXbjGC8LfYxVJJXiaYVu6FRWmEjX38S7JmlS9Vw&m=ulWuM0dNK_XHF-DL_x2EvT8bMSBuSrV4XKcqEfBiLm8&s=shEU_TxDkAEzy7XeIgIrmbDaeclYOji85cAxehiBlJE&e=
>  
> > --- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "deal.II User Group" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an 
> > email to dealii+un...@googlegroups.com . 
> > For more options, visit 
> https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_optout&d=DwIBaQ&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=4k7iKXbjGC8LfYxVJJXiaYVu6FRWmEjX38S7JmlS9Vw&m=ulWuM0dNK_XHF-DL_x2EvT8bMSBuSrV4XKcqEfBiLm8&s=IGenO_6vTVuLZb24YoNS8UKHa

Re: [deal.II] Issue with convergence of iterative linear solver for system matrix in modified step-57 with no-normal flux constraints

2018-02-18 Thread Timo Heister
Are you setting the conditions correctly for the zero_constraints and
the nonzero_constraints and are you sure you are not applying other
boundary conditions on that wall (for example with
interpolate_boundary_values())?

On Sat, Feb 17, 2018 at 5:46 PM, Bruno Blais  wrote:
> Hello everyone,
>
> I believe this may sound like a relatively dumb question, but I thank you
> for your time.
> I am using a (slightly) modified version of step-57 to solve certain steady
> state Navier-Stokes problem.
> I have had relatively good success and showed that i could recover the
> appropriate order of convergence on manufactured solutions and obtained good
> solutions on problems like a backward facing step, as such I am confident
> that the residual / jacobian matrix / linear solver / Schur complement
> aspect is ok. Anyway, I did not modify anything from Step-57 when it comes
> to the Schur complement / solution of the linear system.
>
> My core issue arises when I try to replace one of my homogenous or
> non-homogenous dirichlet boundary condition with a
> no_normal_flux_constraints to impose slip instead of no-slip on a boundary.
> Simply, I can say that I implement it by adding an additional constraint in
> the setup_dofs member function of step-57 such as:
>
> std::set no_normal_flux_boundaries;
>
> no_normal_flux_boundaries.insert (2); /* here 2 is a Physical Line in my
> gmsh mesh */
>
> VectorTools::compute_no_normal_flux_constraints (dof_handler, 0,
>
>  no_normal_flux_boundaries,
>
>  nonzero_constraints
>
>  );
>
>
> Now everything compiles , but the iterative solver (GMRES in this case) for
> the system matrix does not converge anymore with this set of boundary
> conditions. My general problem is well-posed and if I replace these boundary
> with regular Dirichlet I get an expected solution.
> Clearly, I am doing something wrong, but I must admit my lack of knowledge
> on the issue. Could it be related to the way for system matrix and the Schur
> complement is formed which is rendered not-ok in this case for no-flux
> boundaries?
> I know the example is made with Dirichlet (homogenous or not) boundary in
> mind, so clearly I am missing something when it comes to changing one of
> these boundaries to a slip.
>
> I thank you greatly for your time,
> Best regards,
> Bruno
>
>
> --
> The deal.II project is located at 
> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.dealii.org_&d=DwIBaQ&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=4k7iKXbjGC8LfYxVJJXiaYVu6FRWmEjX38S7JmlS9Vw&m=ulWuM0dNK_XHF-DL_x2EvT8bMSBuSrV4XKcqEfBiLm8&s=-4wmXq2eve0gPycm8fOaR7d-hpgfjIE1aPscZQsUILk&e=
>  
> For mailing list/forum options, see
> https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_forum_dealii-3Fhl-3Den&d=DwIBaQ&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=4k7iKXbjGC8LfYxVJJXiaYVu6FRWmEjX38S7JmlS9Vw&m=ulWuM0dNK_XHF-DL_x2EvT8bMSBuSrV4XKcqEfBiLm8&s=shEU_TxDkAEzy7XeIgIrmbDaeclYOji85cAxehiBlJE&e=
>  
> ---
> You received this message because you are subscribed to the Google Groups
> "deal.II User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to dealii+unsubscr...@googlegroups.com.
> For more options, visit 
> https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_optout&d=DwIBaQ&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=4k7iKXbjGC8LfYxVJJXiaYVu6FRWmEjX38S7JmlS9Vw&m=ulWuM0dNK_XHF-DL_x2EvT8bMSBuSrV4XKcqEfBiLm8&s=IGenO_6vTVuLZb24YoNS8UKHad1Gw628aXOYYblETro&e=
>  .



-- 
Timo Heister
http://www.math.clemson.edu/~heister/

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.