Questions tagged [finite-element-method]
Tag for the usage of "FiniteElement" Method embedded in NDSolve and implementation of finite element method (fem) in mathematica.
412
questions
52
votes
4
answers
7k
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 ...
60
votes
1
answer
3k
views
What's inside InterpolatingFunction[{{1., 4.}}, <>]?
I'm curious what's inside the InterpolationFunction object?
For example:
...
15
votes
2
answers
2k
views
Boundary condition with spatial derivative is ignored by NDSolve
Consider the following differential equation:
$$\begin{align*}&\rho C_p\left(\frac{\partial T}{\partial t}\right)=k\left[\frac{\partial^2 T}{\partial x^2}\right]+\dot{q}\\
&\text{at }x=0,\;\...
97
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, ...
78
votes
3
answers
9k
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 ...
13
votes
1
answer
861
views
PDEs : automatic method choice : TensorProductGrid or FiniteElement?
A problem that arises when we solve PDEs with NDSolve[] and Method->Automatic is how to know which method has been chosen : <...
40
votes
3
answers
5k
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 ...
16
votes
3
answers
552
views
Reveal the formal PDE of FiniteElement
When FiniteElement method is used, the differential equations will first be transformed to certain standard form (named as formal PDE in recent FEM document), and ...
8
votes
4
answers
5k
views
Nonlinear differential equation: numerical solution
I have to find and plot a numerical solution for this second order differential equation:
u''[x] + (u'[x]/x) - (u[x]/(x^2)) + u[x] - u[x]^3 = 0
where $0\leq x &...
71
votes
4
answers
5k
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 ...
12
votes
4
answers
989
views
Position of discontinuous coefficient influences the solution of PDE
This issue is raised in the discussion under this post about heat flux continuity and I think it's better to start a new question to state it in a clearer way. Just consider the following example:
<...
6
votes
2
answers
2k
views
Test a wooden board's vibration mode
Here is a wooden board, with dimensions shown on the picture below. How we
can use Mathematica's newly build-in finite element analysis features to show the different
modes of its vibrations. Assuming ...
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 ...
24
votes
2
answers
2k
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 ...
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:
...
16
votes
4
answers
1k
views
Understanding PeriodicBoundaryConditions
Every thing works fine in a simple example with periodic boundary condition u[ 2,y]==u[0,y] from documentation of ...
10
votes
2
answers
1k
views
2D inhomogeneous biharmonic equation
How to solve a 2D inhomogeneous biharmonic equation with NDSolve?
I tried the following code:
...
28
votes
1
answer
4k
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 ...
18
votes
1
answer
2k
views
Solver for unsteady flow with the use of the Navier-Stokes and Mathematica FEM
There are many commercial and open code for solving the problems of unsteady flows. We are interested in the possibility of solving these problems using Mathematica FEM. Previously proposed solvers ...
14
votes
1
answer
2k
views
NDSolveValue - Heat flux continuity
I'm having some problems with NDSolve and the problem of conduction of heat. Specifically I'm having problems with the continuity of heat flux. First, let me ...
9
votes
3
answers
1k
views
How to use Finite elements to solve an initial value ODE with NDSolve?
This is on 11.3, windows 7
I have not used Mathematica FEM much at all. So sorry for this basic question on using it to solve a basic second order initial value ODE.
I want to use ...
6
votes
3
answers
2k
views
How to input Robin boundary conditions for nonstandard Laplace equation?
What is the correct way to input these boundary conditions for the following nonstandard Laplace equation, whose coefficients of $\frac{\partial^2 u}{\partial x^2}$ and $\frac{\partial^2 u}{\partial y^...
26
votes
1
answer
6k
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 ...
16
votes
4
answers
1k
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) = ...
14
votes
5
answers
1k
views
3D FEM Vector Potential
I am trying to reproduce an FEM result in a paper. Due to possible copyright I cannot show the result directly but fortunately there is a free link
An Incomplete Gauge for 3D Nodal Finite Element ...
12
votes
2
answers
575
views
Nonlinear dispersal equation modeling insect aggregation
I'm a newbie with Mathematica, I know it's a basic answer, but I can't solve the problem on my own.
I have the following equation reflecting insect aggregation at low population densities (taken from ...
11
votes
3
answers
889
views
Laplace's equation in spherical coordinates with Neumann b.c
I am trying to find the temperature field in a semi-infinite solid on whose surface there is an isotherm spherical cap sunken by a length p. For example:
...
54
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 ...
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:
...
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 \...
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{\...
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 ...
16
votes
3
answers
1k
views
Solving Stefan's solidification problem - for the case of 3 regions
This question heavily related to this question, where the case of two PDE's are solved along with a zipping condition that is a function of time.
Using the link in the code I have solved this set of ...
16
votes
1
answer
1k
views
Is it possible to re-mesh, downsample & upsample a DiscretizeRegion object?
In my project, I am importing a complex geometry from an STL file into Mathematica as a MeshRegion. I would like to edit this mesh significantly: For instance, drastically reduce or increase the ...
15
votes
3
answers
3k
views
Solve Laplace equation in Cylindrical - Polar Coordinates
Hey mathematica stackexchange!! I've got a (possibly stupid) problem. I've tried many things to no avail, and I've read every post I've found on Laplace's equation.
Background:
I'm trying to find the ...
8
votes
1
answer
799
views
Controlling dynamic time step size in NDSolveValue
Statement of problem
I'm writing a script to calculate the temperature of a 2D system with time-dependent heat deposition. The heat deposition is a square wave pulse of duration w = 10^-6 seconds, ...
6
votes
2
answers
614
views
NDSolve with equation system with unknown functions defined on different domains
Based on @xzczd's excellent answer on solving an equation system with unknown functions defined on different domains, I've tried to apply the same technique to a similar system shown below:
Equations:
...
6
votes
1
answer
621
views
Incorrect results of diffusion equation with Neumann boundary conditions [duplicate]
I want to resolve a PDE model, which is 1D heat diffusion equation with Neumann boundary conditions. The key problem is that I have some trouble in solving the equation numerically. Consider the ...
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 ...
35
votes
1
answer
3k
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 ...
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 ...
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 ...
13
votes
1
answer
4k
views
Numerically solving an inhomogeneous partial differential equation
I'm trying to solve a cylindrical partial differential equation with boundary conditions. But I got an error message saying ...
10
votes
5
answers
554
views
Overflow with NDSolve
Backslide introduced in 10.0, persisting through 12.1.
I am trying to solve the following differential equation and plot the result:
...
10
votes
1
answer
1k
views
Why should the spatial derivative order of the ODE *not* exceed two?
Following this question I came across this strange behaviour.
Let me define a 1 D interval implicitely
...
7
votes
1
answer
681
views
NDEigensystem for structural vibration
Having installed version 11 I thought I would check an old Stack Exchange vibration problem using NDEigensytem. The old problem was Test a wooden board's vibration mode and I think this was before ...
3
votes
1
answer
126
views
Convert boundary condition involving derivative to NeumannValue programmatically
As discussed in e.g.
what causes the error "The dependent variable in the boundary condition needs to be linear" when using NDSolve?
When FiniteElement ...
2
votes
2
answers
598
views
what causes the error "The dependent variable in the boundary condition needs to be linear" when using NDSolve?
V 12.1.1 on windows 10
Why the following works
...
52
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 ...
26
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 ...