Questions tagged [finite-element-method]

Usage of the Finite Element Method embedded in NDSolve and details on the implementation of the fem in mathematica.

Filter by
Sorted by
Tagged with
103 votes
17 answers
5k views

Future enhancements for the finite element method

How should the finite element method (FEM) framework in the language be extended to be more useful? With the release of version 12.0 all fundamental FEM solvers (linear, nonlinear, stationary, ...
user21's user avatar
  • 39.8k
80 votes
3 answers
10k views

Numerically solving Helmholtz equation in 2D for arbitrary shapes

I would like to solve the Helmholtz equation with Dirichlet boundary conditions in two dimensions for an arbitrary shape (for a qualitative comparison of the eigenstates to periodic orbits in the ...
Julian S.'s user avatar
  • 1,018
73 votes
4 answers
6k views

Can Mathematica solve Plateau's problem (finding a minimal surface with specified boundary)?

Given a closed curve $\mathcal C$ in three dimensions, is it possible to use Mathematica's built-in functionality to compute a minimal surface whose boundary is $\mathcal C$? For simplicity, let us ...
user avatar
60 votes
1 answer
3k views

What's inside InterpolatingFunction[{{1., 4.}}, <>]?

I'm curious what's inside the InterpolationFunction object? For example: ...
xslittlegrass's user avatar
56 votes
3 answers
5k views

Mathematica vs. Comsol for finite element analysis?

Being relatively new to finite element analysis, I was wondering how expert users assess Mathematica's capabilities in solving PDEs via the finite element method compared to other commercial tools (e....
Alexander Erlich's user avatar
55 votes
2 answers
4k views

Numerically solving Helmholtz equation in 3D for arbitrary shapes

Context While studying manifold Learning I got interested in finding the eigenvectors of the Laplacian. (also in connection to this problem of solving the heat equation) Following this and that ...
chris's user avatar
  • 23k
54 votes
4 answers
8k views

Dynamic Euler–Bernoulli beam equation

I am trying to solve for the vibration of a Euler–Bernoulli beam. The equation is $\frac{\partial ^2u(t,x)}{\partial t^2}+\frac{\partial ^4u(t,x)}{\partial x^4}=0$ For the boundary conditions I ...
Hugh's user avatar
  • 16.5k
53 votes
2 answers
2k views

A geometric multigrid solver for Mathematica?

Cross posted to community.wolfram.com Mathematica ships a variety of linear solvers through the interface LinearSolve[A, b, Method -> method] the most ...
Henrik Schumacher's user avatar
41 votes
4 answers
7k views

Creating a 2D meshing algorithm in Mathematica

As what is proving to be a difficult, but entertaining task, I am attempting to adapt a 2D meshing algorithm created for MATLAB and port it to Mathematica. I understand meshing functions already exist ...
Tom's user avatar
  • 3,416
40 votes
3 answers
6k views

Nonlinear FEM Solver for Navier-Stokes equations in 2D

it's me again. I'm trying to obtain a numerical solution to Navier-Stokes equations in 2D in a non-rectangular region. So far, this guide was very helpful, but he is using finite differences, which is ...
user16320's user avatar
  • 2,396
36 votes
4 answers
7k views

Why is raytracing so slow?

I'm trying to get some rays to bounce in a circle. But I want to be able to control the reflections, i.e. the direction the rays bounce in the circle. I have a MWE below, and it is severely limited by ...
Tomi's user avatar
  • 4,378
35 votes
1 answer
4k views

Calculating a potential function using the finite element method

This is my first attempt to use the Finite Element method available in version 10. There are questions and I am very open to suggestions. My example is flow around a cylinder which is a well known ...
Hugh's user avatar
  • 16.5k
32 votes
7 answers
5k views

How to generate a mesh with quadrilateral elements?

I have the following code that generates a finite element mesh: ...
Stratus's user avatar
  • 2,954
31 votes
1 answer
974 views

Finite element simulation of Airy waves

I am attempting to solve for waves on a water surface starting with a two dimensional solution. The equations are that the water must satisfy Laplace's equation everywhere with a time dependent ...
Hugh's user avatar
  • 16.5k
31 votes
1 answer
725 views

Detecting collisions in FEM

Say I want to study the deformation of a pitchfork when you have it fixed on the bottom and push one side. ...
tsuresuregusa's user avatar
30 votes
1 answer
980 views

How to model wooden joints with Mathematica's FEM?

This is a dovetail joint: and I'd like to see the stresses and deformation on the joint.I haven't seen any modeling of disconnected regions with FEM, only connected regions, so I'm curious if you can ...
tsuresuregusa's user avatar
29 votes
1 answer
5k views

Stress calculations using finite elements

A standard engineering problem is to calculate stresses in a structure due to applied forces. With the inclusion of the finite element method in version 10 this question attempts to investigate how ...
Hugh's user avatar
  • 16.5k
27 votes
5 answers
2k views

Plot a partition of the sphere given vertices of polygons

I saw in this question that Mathematica can draw spherical triangles. I guess something similar can be done to plot a spherical polygon. I am interested in something similar: I have a set of points ...
Beni Bogosel's user avatar
27 votes
1 answer
4k views

How do I use the new nonlinear finite element in Mathematica 12 for this equation?

With Mathematica 12 we get new technology for nonlinear finite elements. Out of curiosity, I just wanted to solve the following equation $$ \frac{d}{dx} \left( c(x) \left[\frac{d}{dx} u(x)\right]^p \...
Mauricio Fernández's user avatar
26 votes
3 answers
14k views

How to solve ODE with boundary at infinity

y''[x] - x y[x] == 0 y[0] == AiryAi[0], y[∞] == 0 The analytic solution to this ODE is the Airy function y[x] == AiryAi[x] if ...
3c.'s user avatar
  • 669
26 votes
1 answer
7k views

How to numerically solve a 1-d time-independent Schrödinger equation?

The point is to solve the eigensystem of the given Hamiltonian. I tried ParametricNDSolve combined with FindRoot to search for ...
Turgon's user avatar
  • 1,050
24 votes
1 answer
1k views

Implement fractional Laplacian

What is a way to implement the Fractional Laplacian with Mathematica? How can we apply such implementation to numerically solve the problem $$(-\Delta)^su = 1 \text{ in } B_1(0), \\ u = 0 \text{ in ...
user avatar
24 votes
2 answers
3k views

Optimizing a Numerical Laplace Equation Solver

Laplace's Equation is an equation on a scalar in which, given the value of the scalar on the boundaries (the boundary conditions), one can determine the value of the scalar at any point in the region ...
Vincent Tjeng's user avatar
24 votes
2 answers
3k views

ListContourPlot interpolation fails if x and y axes have different scales

To summarize what is below: ListContourPlot doesn't work when the domain has different x and y scales (fails when x/y~10^4, which seems surprisingly small). Is it possible to call ListContourPlot on ...
ninemileskid's user avatar
24 votes
2 answers
1k views

3D Elastic waves in a glass

Take an empty glass, hit the side, the glass will make a sound that can be recorded using ...
Alex Trounev's user avatar
  • 44.7k
24 votes
1 answer
911 views

Mismatch between Mathematica and COMSOL in 3D FEM problem

I would like to solve an advection-diffusion problem on a torus domain. There are three Dirichlet conditions: One at the inlet (concentration $c=0$), one at the outlet ($c=0.5$) and one at the wall ($...
Alexander Erlich's user avatar
23 votes
7 answers
811 views

How to make the boundary of a 3D region smooth?

I want to draw this region,but the surface is rough.I tried to find options to improve the surface but failed. ...
AsukaMinato's user avatar
  • 9,878
23 votes
4 answers
883 views

Making holes from maze generated Graphics3D

...
seilgu's user avatar
  • 497
22 votes
2 answers
890 views

Getting rid of spikes in the PDE solution

Bug introduced in 10.0 and fixed in 10.3 Note: In 10.0, Rationalize[fd, 0] was needed or mesh generation would fail. Preamble: I am solving a PDE in a domain ...
Alexei Boulbitch's user avatar
22 votes
1 answer
499 views

Violin with f-holes and FEM simulation of Helmholtz resonance in 3D

This question is about FEM simulation of violin vibration modes in 3D. There are several problem around. One of them is Helmholtz resonance. Air inside the violin body has own frequencies dependent ...
Alex Trounev's user avatar
  • 44.7k
21 votes
4 answers
6k views

How do I solve a PDE with a strange boundary condition?

How do I solve the PDE with boundary value like this $$u(t,x,y)=0, \textrm{when } F(x,y)=0$$ using DSolve? As a specific example, I want to solve heat equation $$\frac{\partial u}{\partial t}=\...
Golbez's user avatar
  • 313
21 votes
3 answers
7k views

How to discretize a nonlinear PDE fast?

I wish to numerically solve the following PDE. Although there are some complete discussions for solving PDEs in tutorial/NDSolvePDE, there is no hint for the nonlinear case by discretization. Thus, I ...
Faz's user avatar
  • 1,817
21 votes
2 answers
2k views

Least effort to handle a point source inside the domain of PDE(s)

By point source I mean a constrained condition at one point inside the domain of PDE(s). For example: $$\frac{\partial ^2u(t,x,y)}{\partial t^2}=\frac{\partial ^2u(t,x,y)}{\partial x^2}+\frac{\...
xzczd's user avatar
  • 66.2k
21 votes
2 answers
1k views

Partial Differential Equation in Parallel

is there any native way to implement multi-core parallel solving of PDE in Wolfram Mathematica? WM 10 now supports Finite Elements Method, but it is actually useless without parallelization. Usually ...
user18790's user avatar
  • 311
21 votes
2 answers
2k views

How to access FEM shape functions?

A couple of days ago I asked here about surface meshes and plotting on surfaces. Now I have another question: How can I access the surface or boundary element shape functions? I would like to ...
AxelF's user avatar
  • 977
21 votes
1 answer
2k views

Couple a PDE and ODE in NDSolve

I would like to solve an example of non-stationary heat transfer with a coupled PDE and ODE. Let's assume that we have 1 dimensional bar of length $L$ with uniform initial temperature. The right end ...
Pinti's user avatar
  • 6,503
21 votes
1 answer
663 views

How to fix broken InterpolatingFunction?

Bug introduced in 8.0 and fixed in 9.0.0 I have an InterpolatingFunction based on irregularly-gridded data, like this: ...
JxB's user avatar
  • 5,111
21 votes
1 answer
1k views

Eigenfunctions of the Laplacian on an arbitrary mesh

So, I've constructed a mesh over which I'd like to find eigenfunctions of Laplace's equation with a free boundary (a zero Neumann boundary condition along the edge). Mostly because I figured an ...
Michael L.'s user avatar
21 votes
1 answer
517 views

3D stable fluids algorithm to simulate transition from laminar to turbulent flow

This algorithm is 3D extension of our 2D algorithm published on this page and here. We suppose that with this code we can simulate transition from laminar to turbulent flow. In this example we compute ...
Alex Trounev's user avatar
  • 44.7k
20 votes
3 answers
2k views

Numerically solve the initial value problem for the 1-D wave equation

I want to solve the standard 1-dimensional wave equation $y_{xx}=y_{tt}$ using NDSolve (for $y(x,t)$) with the following conditions: ...
arcbloom's user avatar
  • 313
20 votes
2 answers
1k views

Large deformation of solids

Link to notebook with this question and code I'd like to understand how large deformations of solid mechanics work and how they are implemented. For this am looking at the following reference problem: ...
user21's user avatar
  • 39.8k
20 votes
3 answers
629 views

Inverting differential equation using finite element methods

tl;dr; How to use FEM tools to extract models needed to invert PDEs. Context In astrophysics, one is interested in so-called 'cosmic archeology' which involves recovering the origin of a given ...
chris's user avatar
  • 23k
20 votes
1 answer
436 views

What are pattern sparse arrays and how do I use them?

I found a few references to something called a "pattern sparse array" that does not contain any values, only positions. What is this data structure? How and when do I use it? From the documentation ...
Szabolcs's user avatar
  • 235k
19 votes
6 answers
2k views

Poisson equation with pure Neumann boundary conditions

Dear Mathematica users, I would like to numerically solve a, as the title says, Poisson equation with pure Neumann boundary conditions $-\nabla^2(\psi)=f$ $\nabla(\psi)\cdot \text{n}=g$ Is it ...
Mefistofelis's user avatar
19 votes
4 answers
1k views

How to apply different equations to different parts of a geometry in PDE?

I want to solve two coupled partial differential equations on two dimension. There are two variables v and m. The geometry is a ...
MOON's user avatar
  • 3,864
19 votes
2 answers
975 views

Project map to a particular shape

I want to project a map to a particular shape, like a circle or ellipse. For example, let's imagine we want to project a map of the continental United states so that its outline is that of a circle. ...
Tyler Durden's user avatar
  • 4,090
19 votes
3 answers
829 views

Using Regions, can I model a reflecting wavefront?

I was wondering if I could get Regions and Mathematica's shapes to do all the hard work for me in making a "droplet in a pond" simulation. I do not want the "waves" ...
Tomi's user avatar
  • 4,378
19 votes
3 answers
3k views

What is NDSolve`FEM`*?

I stumbled on this: ?"NDSolve`FEM`*" ...
JxB's user avatar
  • 5,111
18 votes
4 answers
2k views

How to model diffusion through a membrane?

This is a follow-up on How to handle discontinuity in diffusion coefficient? Consider diffusion of $u(t,x)$ on the domain $x \in [0,2]$ with some simple boundary conditions such as $u(0) = 2, u(2) = ...
Szabolcs's user avatar
  • 235k
18 votes
5 answers
3k views

periodic boundary conditions and NDEigensystem

Mathematica 10 has a splendid new function, NDEigensystem, that makes it possible to solve Sturm-Liouville problems numerically in a single step. I have not however been able to find a way to get it ...
Leon Avery's user avatar
  • 1,342

1
2 3 4 5
30