FEniCS in cylindrical geometry

Asked by Derek Monahan

Hi,

I am trying to solve Poissons eqn in an axially symmetric cyclindrical geometry. Of course the nabla operator is defined in cartesian coordinates. Assuming $\nabla = \nabla_{cartesian}$ the expression for Poissons equation becomes:

$$
\nabla^2 u + (1/x[0])du/dx[0] = f
$$

How might I implement this in FEniCS? Specifically how to I specify the differential wrt x[0] only?

Any help or suggestions would be appricated.

Regards,

Derek

Question information

Language:
English Edit question
Status:
Solved
For:
FEniCS Project Edit question
Assignee:
No assignee Edit question
Solved by:
Martin Sandve Alnæs
Solved:
Last query:
Last reply:
Revision history for this message
Best Martin Sandve Alnæs (martinal) said :
#1

You need to express your pde in weak form to use the finite element method.

du/dx[0] can be implemented as u.dx(0) or Dx(u, 0)

I recommend reading the fenics tutorial to learn the basics, we can only answer very specific questions here.

Revision history for this message
Derek Monahan (derek-d-monahan) said :
#2

Thank you Dr Alnæs. I have read through quite a bit of the FEniCS book
but there is a lot of information to take in and I could not recall an
example in which a derivative along a single dimension was required.
However, your answer does look familiar so it is clearly in there. My
apologies.

On 12/12/12 14:41, Martin Sandve Alnæs wrote:
> Your question #216598 on FEniCS Project changed:
> https://answers.launchpad.net/fenics/+question/216598
>
> Status: Open => Answered
>
> Martin Sandve Alnæs proposed the following answer:
> You need to express your pde in weak form to use the finite element
> method.
>
> du/dx[0] can be implemented as u.dx(0) or Dx(u, 0)
>
> I recommend reading the fenics tutorial to learn the basics, we can only
> answer very specific questions here.
>

Revision history for this message
Derek Monahan (derek-d-monahan) said :
#3

Thanks Martin Sandve Alnæs, that solved my question.