Hi, all 

I have a question on using deal.ii for solving unknown boundary condition 
problem. 
I have thought the most minimized related to my question. 

where I consider a navies slip boundary condition, and I have tried to 
solve this with finite difference.
For more demonstration please see following screenshot. 

<https://lh3.googleusercontent.com/-8pkboMpqLjI/WtP58qWMZCI/AAAAAAAABI0/lHDGu5xIH9gE8yd5BUZKla5jq9z8ulaPQCLcBGAs/s1600/Screen%2BShot%2B2018-04-15%2Bat%2B8.18.18%2BPM.png>


Finite Difference Formulation might be...



<https://lh3.googleusercontent.com/--I8d8GGbTsU/WtP6LkA4EBI/AAAAAAAABI4/f6wHkKSYJ4saSgRU-6RWNm1LKWzGNvbKwCLcBGAs/s1600/Untitled2.png>

where the last raw of matrix is added to show boundary condition at lower 
plate.

 

and I think problem is generally well posed so that I can solve this with 



<https://lh3.googleusercontent.com/-AXRjXGE6NC8/WtP6gh0ggBI/AAAAAAAABJA/4M1BwjS21_oEySIdrNHNmJYR52jTqFpeQCLcBGAs/s1600/Untitled3.png>



Now, I am trying to solve same problem using finite element method...


<https://lh3.googleusercontent.com/-S78U0ujm-5U/WtP7H_h1DPI/AAAAAAAABJM/4r1RTrBfEpM_z7zJ_g5oHaiyNt-leD28wCLcBGAs/s1600/Untitled4.png>


The description of same boundary condition in weak form will look like 

 

 has on the boundary

        

        for (unsigned int face=0; face<GeometryInfo<dim>::faces_per_cell; 
++face)

        { if (cell->face(face)->boundary_id() == 2)

            {  for (unsigned int q=0; q<n_face_q_points; ++q)

                { for (unsigned int i=0; i<dofs_per_cell; ++i)

                    {for (unsigned int j=0; j<dofs_per_cell; ++j)

                        {cell_matrix(i,j) += (1/beta)*fe_values.shape_value 
(i, q_index)*

                                                fe_values.shape_value (j, 
q_index)

                                                * fe_face_values.JxW(q);}

                            cell_rhs(i) += 0;

                    }//i cycle

                }//quadrature (face) cycle

            }

        }//end of face cycle

        

        


 



and I think I should add this cell_matrix(i,j) and cell_rhs(i) to my system 
matrix. 

but not overlapping the rows that describe weakform of original poisson 
equation.. so I think i should not use them...



   for (unsigned int i=0; i<dofs_per_cell; ++i)

        {

            for (unsigned int j=0; j<dofs_per_cell; ++j)

                system_matrix.add (local_dof_indices[i],

                                   local_dof_indices[j],

                                   cell_matrix(i,j));

            

                system_rhs(local_dof_indices[i]) += cell_rhs(i);

        }



In this situation, how should I expand (to add rows) my system matrix and 
connect to it boundary dof ? 




Thanks...  

-- 
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.

Reply via email to