I tried to implement the static heat equation in cylindrical coordinates on 
a 2d-plane, while being radially symmetric at x = 0. That leads me to the 
following weak formulation of the problem (while neglecting the factor 
2\pi):

\int\limits_0^R \nabla U\nabla\phi r dr dz = \int\limits_0^R f\phi r dr dz

Compared to the cartesian version

\int\limits_0^Y \nabla U\nabla\phi dx dy = \int\limits_0^Y f\phi dx dy

the onliest difference is the factor r in the equation.

The question is now: When writing this into the program code, I iterate 
over the dimensions. Does every dimension need the additional factor r, 
i.e. do I have to multiply every dimension with r, or only the parts which 
are responsible for the direction r is going? I would suspect the latter, 
but I do not know how to do that for calculating the right hand side. 
Usually I would expect (for two dimensions) that (when printing both 
solutions separately) both solutions are equal, but when using a tensor for 
applying the prefactors with

Tensor<1, dim> r_pref;
r_pref[0] = 1;
r_pref[1] = r_val; //value for r at the current point q


for(size_t d = 0; d < dim; ++d)
    cell_rhs(i) += fe_values[surface].value(i, q)[d] * r_pref[d] * f * 
fe_values.JxW(q);


I get an unsymmetric right hand side, and the solutions A_x and A_y are 
different, too. Thus I assume that this approach is wrong. Is that correct, 
or did I not consider something else?

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

Reply via email to