use compute_no_normal_flux_constraints within step-35

13 views
Skip to first unread message

Giovanni Formica

unread,
Jun 26, 2019, 10:51:11 AM6/26/19
to deal.II User Group
Dear All,

I'm trying to slightly modify the step-35 code in order to better understand how boundary conditions work in this case study.
The boundary id 3 is the right-hand line of the domain ("nsbench2.inp" 2D example), and I'd like to impose a zero tangential velocity in an alternative way the tutorial does.
In the diffusion_step of the tutorial, we have a loop over each component, and in the case 3 of the boundary ids we simply impose that the components != 0 are zero.
Maybe I'm wrong, but this situation is valid only with orthogonal faces and not with curved boundaries.
Therefore, I'd like to substitute the present call
                case 3:
                     
if (d != 0)
                         
VectorTools::interpolate_boundary_values(
                                  dof_handler_velocity
,
                                  boundary_id
,
                                 
Functions::ZeroFunction<dim>(),
                                  boundary_values
);
                     
break;
with something like this:
                case 3:
                   
VectorTools::compute_no_normal_flux_constraints(
                                dof_handler_velocity
,
                               
0,
                                boundary_id
,
                               
Functions::ZeroFunction<dim>(), // incorrect, I know!
                                        boundary_values
);
                     
break;


I understood that "ZeroFunction" has to be actually a "AffineConstraints", but I'd like to avoid complicating the code too much, at the moment (I'm a deal.ii beginner).

Any help or suggestions  are greatly appreciated.

Best!





Reply all
Reply to author
Forward
0 new messages