Skip to main content

Questions tagged [fenics]

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

Filter by
Sorted by
Tagged with
15 votes
2 answers

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 ...
Truman Ellis's user avatar
7 votes
2 answers

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 ...
Justin's user avatar
  • 791
7 votes
2 answers

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 ...
Nico Schlömer's user avatar
7 votes
2 answers

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 ...
facetus's user avatar
  • 358
5 votes
1 answer

Compute lengths of the longest edge of each cell

Having mesh = UnitSquareMesh(2, 2) Q = FunctionSpace(mesh, 'DG', 0) this works as expected ...
Jan Blechta's user avatar
4 votes
1 answer

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 ...
nickrocks's user avatar
  • 117
4 votes
0 answers

Fenics: Result of Steady state dynamic linear elastic doesn't match with actual values

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( \...
Bahram's user avatar
  • 111
2 votes
1 answer

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)(|\...
Andrei's user avatar
  • 203
2 votes
2 answers

Schrödinger equation with time dependent Hamiltonian

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 $...
kelasmadin's user avatar