Hi

I've been working and studying deal.ii for 3 or 4 months. So far I been
able to set up a simple time dependent model of heat diffusion with free
and fixed boundary conditions. I also was able to establish material
properties based on material id's.

My question might be very simple. I want to set up a function to
calculate the heat flux in the surface based on a given 'external
temperature' (read from a external file) and the temperature over that
surface (i.e. newtons law of cooling). Based on step 7 I have this piece
of code:

typename DoFHandler<dim>::active_cell_iterator 
   cell = dof_handler.begin (),
   endc = dof_handler.end ();
     for (;cell != endc; ++cell)
       {
        cell_rhs = 0;
        for (unsigned int face = 0;
             face<GeometryInfo<dim>::faces_per_cell;
             ++face)
             if (cell->face(face)->at_boundary()
                 &&
                (cell->face(face)->boundary_indicator () == 2))
                    {
                    fe_face_values.reinit (cell,face);
                    for (unsigned int q_point = 0;
                         q_point < n_face_q_points;
                         ++q_point)
                         {
                          const double neumann_value 
                              = 'problematic-function';
                          for (unsigned int i = 0;
                               i < dofs_per_cell;
                               ++i)
                                  cell_rhs (i) += (neumann_value *
                                  fe_face_values.shape_value(i,q_point)*
                                  fe_face_values.JxW (q_point));
                          }
                     }     
             cell -> get_dof_indices (local_dof_indices);
             for (unsigned int i = 0; i<dofs_per_cell; ++i)
                 {
                   system_rhs(local_dof_indices [i]) += cell_rhs (i);
                 } 
       }

Here I'm trying to establish the neumann boundary condition but in order
to determine the heat flux I need to know the value of temperature over
the face. Are these values the degrees of freedom over the surface? If
so, can I obtain them using get_dof_values (although I don't know
exactly how)?

I'll appreciate any clue you could give me.

Regards
Javier Muñoz

_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii

Reply via email to