On 05/23/2018 03:46 PM, 'Maxi Miller' via deal.II User Group wrote:
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.
That already suggests that the approach cannot be correct. And indeed, if you
work through the derivation f the equations in a cylindrical coordinate
system, you will find that the factor of 'r' needs to be applied to all parts.
This is because you start with
\int\int\int (...some function...) dz dy dx
which you transform into
\int\int\int (...some function...) dz r dr dphi
If you assume that your function does not depend on phi, then the integration
over phi only yields a factor of 2pi, so you get
2 pi \int\int (...some function...) dz r dr
which is exactly what you have. The point being that the factor does not come
out of rewriting some part of the Laplace operator into cylindrical
coordinates, but out of the integration -- and consequently applies to *all*
parts of the integrand.
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?
You are correct: The approach is wrong :-)
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.