Questions tagged [fenics]

Questions about the finite element method software FEniCS and its subpackages (Dolfin, UFL, FFC).

9 questions
Filter by
Sorted by
Tagged with
3k views

FeniCS: Visualizing high order elements

I've just started messing around with FEniCS. I am solving Poisson with 3rd order elements and would like to visualize the results. However, when I use plot(u), the visualization is just a linear ...
• 542
363 views

Comparing various implementations/software packages for large-scale finite element simulations

I currently use FEniCS and Deal.II to solve various FEM problems. I am also writing my own implementation of these problems by directly implementing the data structures, routines, and solvers within ...
• 791
4k views

FEniCS: separate boundary conditions in normal and tangential direction of mesh boundary

Given a vector-valued PDE, I'd like to enforce the boundary conditions $$\vec{n}\cdot u = g\\ \vec{n}\cdot \nabla (\vec{t}\cdot u) = 0$$ on the solution $\vec{u}$. If the boundary happens to align ...
• 3,126
7k views

FEniCS: how to specify boundary conditions on a circle inside 2D mesh

I would like to numerically find a mutual capacitance of two stripes of metal on the opposites sides of a cylinder. The problem is obviously a 2D Laplace equation. I would like to find the potential ...
• 358
1k views

Compute lengths of the longest edge of each cell

Having mesh = UnitSquareMesh(2, 2) Q = FunctionSpace(mesh, 'DG', 0) this works as expected ...
• 927
4k views

Fenics: Meshfunction usage

I am confused most of the time with the application of boundary conditions in Fenics. Suppose I have an xml mesh for a rectangular beam and want to apply Dirichlet BC ($u =0$) on the left side of the ...
• 117
I solved the steady state dynamic linear elastic model in a solid. My equation is a function of frequency and the strong form is: $$\operatorname{div}(\operatorname{stress}(\vec x, w)) + w^2 \rho u( \... • 111 2 votes 1 answer 2k views time-dependent nonlinear pde in fenics I am interesting in solving the following nonlinear, time-dependent pde in 2 spatial dimensions (complex Gross-Pitaevskii eq):$$i \frac{\partial \psi}{\partial t} = \left[ -\nabla^2 + (1-i \sigma)(|\...
I need to solve the Schrödinger equation with a time dependent Hamiltonian i\hbar \frac{\partial}{\partial t} \Psi = \left[-\frac{\hbar^2}{2m}\nabla^2 +\frac{1}{2} k(t)(x^2+y^2) + V(r)\right]\Psi \$...