On 10/24/2016 01:41 PM, [email protected] wrote:
       for (typename Triangulation<dim> ::active_cell_iterator
        cell=triangulation.begin_active();
        cell!=triangulation.end(); ++cell)
*            for (unsigned int f=0; f<GeometryInfo<dim>::faces_per_cell;
++f)*
*        if (cell->face(f)->at_boundary())*
*           {*
*    const Point<dim> face_center = cell->face(f)->center();*
*    if (face_center[0] == 0)*
*            cell->face(f)->set_boundary_id (0);
            // faces on z-axis...*
*    else if (face_center[1] == 0)*
*            cell->face(f)->set_boundary_id (1);
            // faces on r-axis...*
*    else if (std::sqrt(face_center[0]*face_center[0]+*
*   face_center[1]*face_center[1]) == outer_radius)*

This 'if' will never trigger because the two numbers on the two sides of == will never be exactly equal. You need to take into account floating point round-off. See step-1, for example, on how to do that.


*This section is for imposing the distributed pressure on the curved
edge of the surface:*


      for (unsigned int face_number=0;
face_number<GeometryInfo<dim>::faces_per_cell; ++face_number)
          if (cell_eta->face(face_number)->at_boundary()
         &&
             cell_eta->face(face_number)->boundary_id() == 2)
          {
            fe_face_values_eta.reinit (cell_eta, face_number);
            for (unsigned int q_point=0; q_point<n_face_q_points_eta;
++q_point)
            {
            double pii = numbers::PI;
*            double r_value =
fe_face_values_eta.quadrature_point(q_point)[0];*
            const double eta_orderG = lqph[q_point].get_eta_orderG();
                              // This is the boundary load...
*           const double time_ramp = (time.current() / time.end());
                                  // Should I use this here??*

I don't know -- it depends on what kind of equation you are solving and how exactly the boundary values look like that you want to impose.


 It should be noted that my equations were written in cylindrical
coordinate system. It would be very kind of you if you let me know
whether I have defined the desired face on the boundary and impose the
pressure on that edges correctly or I missed something. In addition,
what should I do if If I want to convert my domain to 3D for creating a
quarter of a bulk sphere instead of circle because of the fact that I
used quarter_hyper_shell for creation of this domain. I really want to
be confident about implying this part of my code.

You mean one eighth of a sphere (i.e., an octant)? I don't recall if there is a function for that in namespace GridGenerator, but if there isn't, it shouldn't be terribly difficult to write one. Take a look at the implementation of the quarter circle to see how this is done!

Best
 W.


--
------------------------------------------------------------------------
Wolfgang Bangerth          email:                 [email protected]
                           www: http://www.math.colostate.edu/~bangerth/

--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to