I have poisson equations written in weak form in polar coordinates. How do I implement this in fenics in polar coordinates with dirichlet BCs in cartesian coordinates? I am a fenics newbie
I think you must express the boundary conditions in polar coordinates in order to implement it. If you show the physical problem maybe I can help you.
FEniCS is agnostic to the coordinate system. Clearly a Cartesian model is straightforward; however, you can define the orthogonal coordinates of a mesh to be whatever you like. For example in an azimuthally symmetric cylindrical coordinate system you could set (x_1, x_2) = (r, z) where (x_1, x_2) are the orthogonal coordinates of a 2D FEniCS mesh. You would just have to be careful about vector calculus operations and integral measures. See for example Axisymmetric formulation for elastic structures of revolution — Numerical tours of continuum mechanics using FEniCS master documentation.