Create line inside domain in mesh
10 months ago by
I am trying to define the 2D Poisson problem where the domain is a circle and in the centre there is a flat electrode (line or degenerate rectangle) on which there is a prescribed potential
R = 1 d = 0.5 circle = Circle(Point(0, 0), R) electrode = Rectangle(Point(-d, 0), Point(d, 0)) domain = circle - electrode mesh = generate_mesh(domain, 10) plot (mesh)
Later I will define a Dirchlet BC: U( "electrode") = 1 and on U("circle") = 1 and solve the Poisson equation in this domain and compute the charge distribution on "electrode"
My problem is that mshr does not accept a definition of a degenerate rectangle.
Error: Unable to create rectangle. *** Reason: Rectangle with corner <Point x = -0.25 y = 0 z = 0> and <Point x = 0.25 y = 0 z = 0> degenerated. *** Where: This error was encountered inside CSGPrimitives2D.cpp. *** Process: 0 *** *** DOLFIN version: 2017.1.0 *** Git changeset: unknown
Can this geormetry be described and solved by fenics?
Community: FEniCS Project
Please login to add an answer/comment or follow this question.