Need help in defining exact solution in polar coordinates

Hi Ashini,

The code you have provided is not a minimal working example (please see Read before posting: How do I get my questions answered?.) It would also be of great help if you commented the code, either line-by-line or by explaining what the different variables of your code are.

Notwithstanding the above: are phi_1 and phi_3 the first and third derivatives of the expression \Psi with respect to \varphi? If so, at a first glance it seems to me that at least phi_1 is not the correct expression for the first derivative \Psi'(\varphi). This might be the problem. An alternative is to perform the differentiation of phi directly in the code (searching this forum for e.g. “how to differentiate symbolic expressions in dolfin” probably yields some helpful results.)

Best,
Halvor

1 Like