Dear Javier,

in step-6 only Dirichlet boundary conditions are imposed. So if you would like to use Neumann boundary conditions, you can't you the same functions. For this kind of boundary conditions you would have to implement them in a weak sense (Nitsche's trick).

If you really want Dirichlet conditions and you have two boundary indicators and different boundary functions, you can handle this as

std::map<unsigned int,double> boundary_values;

VectorTools::interpolate_boundary_values (dof_handler,
                                          1,
                                          bundary_function_1(),
                                          boundary_values);

VectorTools::interpolate_boundary_values (dof_handler,
                                          2,
                                          bundary_function_2(),
                                          boundary_values);

MatrixTools::apply_boundary_values (boundary_values,
                                       system_matrix,
                                       solution,
                                       system_rhs);

Does this help? If not, please let us know!

Best,
Bärbel

--
Bärbel Janssen
Mathematisches Institut
Universität Bern

Sidlerstrasse 5, CH-3012 Bern
Tel: +41 (0)31 631 88 47
[email protected]

On Mon, 7 May 2012, Javier Muñoz wrote:

Hello all


I'm trying to use the adaptive refinement capabilities of deal.ii. I was
reading step 6, where adaptivity is introduced for first time.

I have two questions:

The kelly error estimator expects a map with relations between boundary
indicators and corresponding objects describing neumann boundary values.
So, for what I understand if I have, lets say, 2 boundaries with
indicators '1' and '2', I need to put them in the map function with the
respective functions that gave me the values for these boundaries.
Something like:

'1' boundary_function_1()
'2' boundary_function_2()

How do I define this map function?

And, what happen if I use robin boundary conditions?  Do I need to put
them in the map function? If so, how do I do it?

Finally, I would like to expose what is the problem I'm trying to solve
because I'm not sure if the way I'm doing it the more efficient one
(probably not). Any advice would be highly appreciated.

The problem is a heat pipe. I have a 3d cubic domain with a cylindrical
hole. The problem equation in the cube domain is heat diffusion and is
subjected to robin and neumann boundary conditions on the external
surfaces and a robin boundary condition on the hole surface. This
boundary condition depends on the solution of a 1d advection problem.
The 1d domain has an internal heat generation depending on the values on
the internal hole surface in the 3d domain.
I iterate the assembling and solve steps until the difference in both
norm solutions is less than .5.


Kind regards
Javier Munoz




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

Reply via email to