Questions tagged [finite-element-method]
Tag for the usage of "FiniteElement" Method embedded in NDSolve and implementation of finite element method (fem) in mathematica.
1,352
questions
5
votes
1
answer
71
views
Inaccuracy for FEM for 3D Heat Equation
I'm simulating the heat transfer within a cylindrical rod, with external heating from its sides.
...
5
votes
1
answer
91
views
Mesh `Cylinder[{{0,0,0},{0,0,1}},1]` with inner boundary `x=y=0`
In a meshed cylinder Cylinder[{{0,0,0},{0,0,1}},1] I need to specify DirichletConditions along ...
1
vote
0
answers
42
views
NDSolve stops solving past a certain time
This is a continuation of the post I've made Unable to solve Delay PDEs Error in Boussinesq Approximation. I apologise if I shouldn't have posted a seperate question for this but I think that the ...
3
votes
1
answer
76
views
Steady state fluid flow for downward flow past an obstacle
I was attempting to simulate fluid flow past a circular obstacle. The following is the code which I used
...
1
vote
0
answers
67
views
Unable to solve Delay PDEs Error in Boussinesq Approximation
I'm trying to solve the set of equations below describing the flow of a pot of water being heated slightly. The equations are 2D axisymmetric in nature.
...
2
votes
1
answer
38
views
AceGen/ AceFEM: Wrong number of nodes?
I am trying to create an element T1 (linear triangle) to solve the steady, incompressible Navier-Stokes equations. Therefore, my SMSTemplate command reads as follows
...
1
vote
1
answer
82
views
Periodic boundary condition conflicts with DirichletCondition?
I want to solve a simple diffuse equation in a cylinder.
$\nabla\cdot(\hat{c}\nabla\rho_P)=0$
$\rho_P(x,y,\theta)==0,\sqrt{x^2+y^2}=R$
$\rho_P(0,0,\theta)==1,\sqrt{x^2+y^2}=0$
$\rho_P(x,y,2\pi)=\rho_P(...
4
votes
2
answers
271
views
Solving PDE with Dirichlet, Neumann and Boundary conditions
I am trying to solve the following PDE:
$$
u_{xx} + u_{yy}
=
\begin{cases}
- \cos(x) \quad -\pi/2 \leq x \leq \pi/2, \\
0 \quad \text{otherwise}
\end{cases}
$$
The domain is $\Omega = [-\pi,\pi] \...
3
votes
1
answer
90
views
Message Text not Found in FEM Model
I'm trying to solve for the heat transfer in 2D within a fluid. The geometry I'm using is a rectangle of water heated from the bottom. The code I'm using is as follows:
...
3
votes
0
answers
108
views
FEM code working well in v.12.1, has warning in v.13, and not working in v.13.2.1
Let us consider sound in a glass. Numerical model has been described here. FEM code is given by
...
0
votes
0
answers
54
views
PDE - The minimal damping factor of 1/10000 has been reached, NDSolveValue: PDESolve could not find a solution
I am trying to find a solution to a system of partial differential equations using Mathematica.
$$
\begin{align}
D_{e}\frac{\partial^{2}C_{A}}{\partial r^{2}}+\frac{D_{e}}{r}\frac{\...
0
votes
0
answers
58
views
How to solve 2 coupled PDEs with inner boundary condition?
I want to solve 2 coupled PDEs with inner region boundary conditions.
Diffuse equation
There are 2 kinds of particles in my system, $p$ and $a$. Their diffusion equations are as follows:
$\hat{D}=\...
5
votes
1
answer
314
views
How can I solve a three-dimensional Gross-Pitaevskii equation?
I want to solve a three-dimensional Gross-Pitaevskii equation with an uniform potential. The related papers are Emergence of a Turbulent Cascade in a Quantum Gas and Synthetic dissipation and cascade ...
0
votes
0
answers
33
views
How to plot solution and approximate solution in one graph?
I want to solve a BVP $y^{\prime\prime}(t)+y^{2}(t)-t^{4}-2=0$, with BCs $y(0)=0, y(1)=1$. Solving $x^{\prime\prime}=0$ with the BCs, we get the initial approximation $x_{0}=t$. The exact solution is ...
1
vote
1
answer
46
views
CPU time in iteration process
Let $Tx=\frac{x}{2}$ for all $x\in[0,1]$. Let $x_{0}\in[0,1]$ and set an iterative sequence $\{x_{n}\}$ by the method $x_{n+1}=Tx_{n}$. Now if $x_{0}=0.8$, then I get a convergent sequence towards the ...
4
votes
2
answers
175
views
Mesh region from mesh edges only
I have a collection of lines ordered by pairs of points, as below, and wish to get a MeshRegion from them, with the mesh edges being the given lines. (That is, the ...
3
votes
0
answers
54
views
How to make gaussian pulse move using Boundary Conditions (one spatial dimension)?
I'm trying to solve a system of normalized coupled PDE's to model Raman scattering. Essentially, a gaussian light pulse of 300ps duration enters the raman active medium at ζ = 0 which then drives the ...
2
votes
2
answers
202
views
Symbolic solution for Laplace equation with pure Neumann b.c. and constraint at a point
Starting problem:
$$
\begin{cases}
\nabla^2 f = 0 & \text{on} \; \Omega \\
\frac{\partial}{\partial\mathbf{n}} f = y\,n_x - x\,n_y & \text{on} \; \partial\Omega
\end{cases}
$$
with $\Omega \...
1
vote
1
answer
143
views
Post-process NDSolveValue result
For example, after solving the Poisson equation $-\nabla^2 T = 1$ on the unit circle using NDSolveValue and the following code
...
0
votes
0
answers
65
views
Wrong Eigenfunctions with NDEigensystem because of discontinuities
I'm trying to solve a 1D Photonic Crystal with PeriodicBoundaryConditions and a step function permittivitty but even if I get the proper band diagram my eigenfunctions don't correspond to the ones ...
2
votes
1
answer
91
views
How to access implementations of MaterialModel?
In the documentation for Hyperelasticity there is an example of the MaterialModel for NeoHookean and the St Venant Kirchoff models. These are very useful in helping develop ones own materials models. ...
3
votes
0
answers
42
views
Decomposing an eigenfunction of helmholtz equation into plane waves
I have defined a region and found the eigenmodes of the 2D Helmholtz equation in it:
...
4
votes
1
answer
246
views
+200
FEM - Linear grid covering a curved shape
I have a disk (or any other smooth curve) and wish to define a grid of squared cells everywhere, except for the boundary where they should be right triangles or pentagons with three right angles. In ...
7
votes
2
answers
298
views
How to use MMA to solve the minimal surface?
There is a great old post, but since MMA greatly improves the ability of solving differential equations, especially the Region can be used to define the range of variables. So I ask it again. As the ...
5
votes
1
answer
56
views
mesh / region creation in unit meters or mm:
How can we know the unit of mesh or create a mesh in specified length units:
such as, for example I have:
...
9
votes
2
answers
271
views
How do I pose Neumann boundary condition to suppress particles flux into zero point?
This is continuation from my previous post How to ensure for a solution of NDSolve to be positive? [https://mathematica.stackexchange.com/questions/278777/how-to-...
3
votes
1
answer
109
views
Complex equations: NDSolveValue / FEM,
So, I am trying to solve a simple problem using the FEM method.
The distribution of Voltage over a region,
The region is,
...
5
votes
2
answers
230
views
Meshing an irregular domain using quads to solve conjugate heat transfer problem
I am trying to mesh the following domain to solve a heat transfer + fluid flow problem:
The continuity+momentum equations are to be solved in $ABGH$, while the energy equation is to be solved across ...
5
votes
1
answer
103
views
Max cell size: cannot change the size,
I have the following mesh
...
3
votes
1
answer
44
views
Resolving of internal boundaries when using DistMesh generator
Mesh generator ToElementMesh allows to resolve internal boundaries of the domain to be tesselated:
...
1
vote
2
answers
135
views
Solving an ODE and a PDE
I am trying to solve coupled sets of (partial) differential equations. For my ODE, I use
...
2
votes
1
answer
80
views
How to specify derivative boundary conditions for the gradient to be normal to the boundary?
I'm currently modeling an electric field with 2 charges. To do so, I use NDSolveValue to solve a Laplacian with 2 Dirichlet conditions on the voltages of the ...
3
votes
1
answer
95
views
Running of mesh generator DistMesh under version Mathematica 13.2
I am trying to run the element mesh generator DistMeshfrom FEMAddOns package by using version Mathematica 13.2 under Ubuntu 20.04.
...
1
vote
1
answer
106
views
Region Holes outer surface
I have a following code:
...
2
votes
1
answer
60
views
Boundary of mesh gives non uniform result
I wish to extract a boundary mesh but for some reason the Frontier option only works on a portion on it:
...
0
votes
0
answers
51
views
Incorrect eigenvalues obtained from NDEigensystem
I have a matrix H1 given by
H1[kx_, ky_] := {{0, kx + ky}, {kx - ky, 0}};
and H2 which ...
0
votes
0
answers
65
views
Finding eigensystem using NDEigensystem
I am trying to calculate eigensystems for a matrix Ap, which I have provided an example of which in this thread. The matrix in general has a dependency on a ...
0
votes
0
answers
44
views
Stitch 2 diffusion equations together at the boundary
I wanted to stitch 2 diffusion equations together. Here, n1 and n2 are solved in the domain {x,-1,1}, and I wanted to impose: n1[1,t] = n2[1,t] and D[n1(x,t),x] = -D[n2(x,t),x] at x=1. At x=-1, I am ...
3
votes
1
answer
72
views
Obtain the coodinates of boundary mesh with particular mesh marker
This is a very simple question, however, I haven't been able to find straight forward documentation for this. I have a region that I have converted to an element mesh (which we can visualize with '...
6
votes
2
answers
689
views
NDSolve very slow on 2D heat equation
I am trying to solve the 2D heat equation
$$
\begin{cases}
u_{t}-u_{x x}-u_{y y}=f \\
u(0, x, y)=\sin (2 \pi x) \sin (2 \pi y) \\
u(t, 0, y)=0 \\
u(t, x, 1)=0 \\
u_{x}(t, 1, y)=2 \pi e^{-t} \sin (2 \...
1
vote
0
answers
79
views
How can we enhance the performance of `NDEigensystem`?
I am trying to reproduce eigenvalues in Tabl2 II in this paper (also available on the arxiv) for B=-12 but the results are slightly different from those in the ...
4
votes
1
answer
295
views
Implementation of FEM to steady-state coupled fluid flow and heat transfer
This is a steady-state conjugate heat transfer problem (the time-independent version of this problem). The problem is conjugate as the energy equation is being solved in thermally connected solid and ...
2
votes
0
answers
67
views
Numerical instability when using NDSolve to simulate phase separation
I'm using NDSolve to simulate the following model of phase separation:
where rho_T=rho_1+rho_2. The term with chi causes rho_1 and rho_2 to repel each other. However, there is a numerical instability ...
2
votes
0
answers
93
views
Implementation of Neumann-like boundary condition
If we wish to solve an elliptic PDE, say $\nabla^2\phi=\text{given}$, on a domain $\Omega$ with Neumann boundary conditions, $\hat{\mathbf{n}}\cdot \nabla \phi\Big|_{\partial \Omega}=\text{given}$, ...
4
votes
1
answer
77
views
Finite Element analysis: distribution of sine wave over a distance
I am trying to solve the following one-dimensional problem:
(to better understand and extend the FEM for a more complex problem),
...
1
vote
1
answer
64
views
Neumann b.c are not satisfied in NDSolve PDE
I am solving a PDE (p[x,t]) with 1 spatial dimension {x,-10,10} and 1 time dimension {t,0,100}. There is an external function, U. The code reads
...
7
votes
1
answer
235
views
Modelling heat transfer in periodically reversing flow
This is a heat transfer problem, which involves reciprocating (fully-reversing) fluid flow over a heated block of solid. The objective is to determine the temperature field in the solid and the fluid ...
1
vote
1
answer
71
views
Convergence problems Non-Linear FEM
I am trying to solve a 1D non-linear ODE with FEM. The ODE corresponds to a Model with 3 parameters ([Beta], [lambda], A_2). The ODE reads
mpl/(m^2)Cos(z)^4 f''(z)-2mpl/(m^2)Cos(z)^4Tan(z)f'(z)-A2\rho(...
2
votes
1
answer
73
views
NDSolve: PDE parsing error leads to "inconsistent equation dimensions" when solving coupled diffusion equation
I'm trying to solve a system of coupled diffusion equations in 1D, but I can't use multiple terms in the flux. (In the language of this tutorial, I can't set the gamma term.) Here is the code:
...
1
vote
1
answer
79
views
NDSolve is slow when defined as a function
I am solving a set of coupled PDEs, dependent variables (n,l) which are initial value problems on the domain x: {-10,10} and time: {0,1}. Let's say we have an external function u and some initial ...