Questions tagged [finite-element-method]
Usage of the Finite Element Method embedded in NDSolve and details on the implementation of the fem in mathematica.
1,703 questions
3
votes
2
answers
216
views
Solving a coupled 2nd order differential equation numerically using NDSolve
I would like to solve the following system of differential equations numerically for two one-dimensional functions $R(x)$ and $\phi(x)$:
\begin{eqnarray}
c_1 \left(R''(x) - (\phi'(x))^2 R(x) \right) - ...
1
vote
0
answers
125
views
Why Interpolation with InterpolationOrder -> 1 looks smooth in 2D case?
The following code
...
0
votes
0
answers
144
views
Oblique derivative boundary conditions in FEM
In one of my tasks, it is necessary to set a boundary condition in the form of an oblique derivative for the two-dimensional Laplace equation.
Do you know how this can be done in Wolfram Mathematics? ...
2
votes
1
answer
118
views
Machine number overflow when solving a PDE system
Recently I asked a question on solving a system of 3 nonlinear PDE (To solve a system of 3 nonlinear PDE). Now I transitioned to the next step, that is, a realistic PDE which has been my initial aim:
<...
9
votes
3
answers
405
views
To solve a system of 3 nonlinear PDE
I am trying to solve a system of 3 nonlinear partial differential equations:
...
2
votes
3
answers
248
views
Heat equation with b.c. at $+\infty$ and i.c. at $-\infty$
I am wondering what is the best way to solve numerically a initial-boundary value problem of heat equation like this (surely I've made a lot of mistakes in the code):
...
5
votes
2
answers
314
views
NDSolve exceedingly slow
I the following ODE with parameters
\begin{align}
B_e\: \theta''(s)+2(s-1)\cos\theta(s)=S_e\: f\left(\theta(s)\right),
\end{align}
with $0\leq s\leq 1$ and
\begin{align}
\theta(0)=0\:\:\:\text{and}\:\:...
1
vote
1
answer
132
views
Can't evaluate and plot eigenfunctions after using NDEigensystem
I used NDEigensystem for finding eigenvalues and eigenfunctions of specified dif. operator. If I set R=1 everything is good and I get right results, but when I set R=10 and more I get complex ...
6
votes
2
answers
459
views
Can we construct 3D meshes that respect internal boundaries?
In a recent answer to a question on constructing 2D meshes with internal boundaries @user21 provided an extremely useful answer which can be found here.
I have tried to extend this to 3D by ...
0
votes
0
answers
76
views
How to Solve PDE using Inactive Form
I am trying to solve this PDE using the inactive form, however I ran into error stating that the: The PDE coefficient 0....
10
votes
2
answers
446
views
Mesh Rectangle with a fixed inner Line
In this simple example I try to mesh a rectangle, the mesh should include a fixed line.
Using "IncludePoints" I get
...
0
votes
0
answers
111
views
PDE in inactive form
I am trying to solve this complex PDE, however I am getting an error from Mathematica stating: The maximum derivative order of the nonlinear PDE coefficients for the Finite Element Method is larger ...
5
votes
1
answer
342
views
Solving Poisson's Equation Numerically
I'm trying to numerically solve Poisson's equation for the following scenario:
The potential inside a cylinder of radius R=1 and height H=2 with uniform charge density(which I'll set to 1).
Poisson's ...
3
votes
1
answer
149
views
Speed up a finite element solver with small features (full code without error)
This is a question similar to the previous one with small features. I'm solving this problem by modifying the method of @Alex. The code can run without error, but it was always stuck at ~...
6
votes
1
answer
567
views
How can I color a cylinder inside a sphere?
I am trying to draw a figure and color it like this from here:
I tried
CSGRegion["Difference", {Ball[{0, 0, 0}, 5], Cylinder[{{0, 0, -5}, {0, 0, 5}}, 2]}]
...
2
votes
1
answer
190
views
Using NDEigensystem for infinite interval
I'm trying to find eigenvalues and eigenfunctions for a differential operator H=p''[x]-V[x]*p[x]. Actually, V[x] is a potential (...
1
vote
0
answers
44
views
How to set up line search in AceFEM for plasticity with non-associative asymmetric yield?
I would need some help when introducing line-search inside Newton-Raphson method inside AceGEN.
I'm working with a custom plasticity model implemented in AceGEN/AceFEM using standard Tangent and ...
5
votes
0
answers
193
views
Can a Mesh be generated directly without using ListContourPlot?
Can a Mesh be generated directly without using ListContourPlot?
Background:
In this quite wonderful answer to Finding optimal ...
4
votes
1
answer
162
views
Mesh Generation for 4D Coordinates
I am trying to create a response surface involving 4 input parameters and 1 output parameter from an unstructured data set with 30 data points from which I can obtain an output value from any ...
2
votes
1
answer
247
views
Can CFD convergence be improved? (Airflow past a car)
This post is similar to one posted to the Wolfram Community here.
The notebook can be downloaded at that site.
Introduction
This notebook is an attempt to model airflow past a moving vehicle. It ...
7
votes
2
answers
780
views
General form of Green's identity used by Mathematica
modified
Mathematica FiniteElementMethod methods use Green's identity in a more general form:
The parameter $c$ (scalar or matrix) may depend on ...
1
vote
0
answers
158
views
Pure bending boundary conditions in AceGEN/AceFEM
I have a column beam (x = 10, y = 1, z = 1) and would like to prescribe pure bending conditions around Y axis. How can I achieve that in AceGEN/AceFEM?
Edit: by pure bending I mean applying equal and ...
3
votes
1
answer
137
views
Single mesh element marker for each boundary region
I am using StructuredMesh for generating a second order mesh for plane figures. Afterwards I use ToBoundaryMesh to generate the ...
1
vote
0
answers
90
views
How to reduce the size of the output `InterpolatingFunction` from `NDSolve`? [closed]
This is my codes to calculate a wave equation by NDSolveValue:
...
5
votes
1
answer
160
views
Trouble with "RegionMarker" in Mathematica FEM Package
I’m encountering issues while using the "RegionMarker" option to label different subregions in a mesh for solving PDEs with Mathematica’s FEM package (NDSolve/ToElementMesh). Despite ...
10
votes
1
answer
376
views
Kernel crash during RegionDifference of complex 3D meshes + BoundaryMeshRegion::bsuncl error
I'm modeling a screw rotor with cavities (for CAD/CFD analysis). The workflow involves:
Generating the rotor body from 5 parametric surfaces.
Creating cavity profiles from 4 extruded segments.
...
6
votes
3
answers
320
views
Incorrect results when solving BVP with 3 non-linear ODEs
This is a build-up question from my previous post.
I am currently having trouble to produce the correct trend using the NDSolve FEM results. I realized that no matter which parameters I changed, the ...
1
vote
0
answers
81
views
Why does the "No Dirichlet condition" warning appear for fine mesh but not for coarse mesh?
It is known that the solution of the Laplace equation with exclusively Neumann boundary conditions is ambiguous. Wolfram Mathematica warns about this by submitting messages like this one:
No ...
5
votes
1
answer
133
views
Could not generate mesh when the mesh count is too large
I am trying to generate 1D mesh points on x axis, shown below:
...
2
votes
1
answer
140
views
How to write system of 1D non-linear ODEs in inactive form?
I am solving a system of non-constant coefficient, non-linear ODEs, shown as follows:
$$
\frac{\partial}{\partial x} \left[ - B(x) \left( \frac{\partial C_{na}}{\partial x} + C_{na} \frac{\partial y}{\...
0
votes
0
answers
107
views
PDE Solution not converging
I am trying to determine if my solution converges, by calculating the residual of my PDE. I have already gotten help previously however I realized that the issue still persist. By plotting my solution ...
0
votes
0
answers
68
views
PDE Solution not converging at transition point
I am having issues with getting my solution to converge. Here I calculate the normalised residual and plot it and noticed that the residual is quite high at the transition points (I use multiple tanh ...
7
votes
1
answer
249
views
Structured mesh for a rectangle with two holes inside
I would like to use the FEMAddOns package to make a structured mesh (with quad elements with InterpolationOrder -> 2, "MeshOrder" -> 2 ) with two ...
2
votes
1
answer
155
views
Calculating Residual From PDE
Bug introduced in 14.2 or earlier.
I am trying to determine if my solution converges, by calculating the residual of my PDE.
...
2
votes
1
answer
164
views
Examples in SOLID MECHANICS tech notes - how to extract mesh and mesh statistics (no. elements, type, no. nodes, etc..)
I have started to work on the examples presented in the SOLID MECHANICS technical notes. The example I am focusing on is the small, cantilever beam, with a load applied to the end surface.
I have ...
3
votes
0
answers
64
views
Why do different boundary condition formulations in ParametricNDSolveValue give different results with FEM warning?
I'm solving a coupled system of differential equations for neutron star matter using ParametricNDSolveValue. I encountered two issues:
Boundary Condition ...
6
votes
1
answer
252
views
Gradient of FEM generated electric potential is rough or noisy
I have a function ep[x, y] that represents the electric potential on the x–y plane. This function was obtained by solving a partial differential equation (PDE) and ...
0
votes
0
answers
144
views
Finite Element Method Limiting boundary condition
I am trying to solve this PDE using FEM
[![PDE][1]][1]
[![Solution][2]][2]
with this bc:
$$
\lim_{y\to\infty}\big\{ \psi(x, y) - v(y)\big\} =\psi^0(x),\lim_{x\to\pm\infty}\big\{ \psi(x, y) - \psi^0(x)\...
2
votes
0
answers
65
views
Is it possible to perform anisotropic symmetry analysis in SolidMechanicsPDEComponent in mathematica version 13.0.1?
In "Anisotropic linear elastic materials" section of this technical note on solid mechanics (https://reference.wolfram.com/language/PDEModels/tutorial/StructuralMechanics/SolidMechanics.html#...
7
votes
1
answer
213
views
Heat equation, NeumannValue and RegionBoundary issues
Context
I am interested in solving (no outgoing flux) heat equations on non trivial region with a specific boundary condition. For simplicity I assume here a Disk ...
2
votes
1
answer
127
views
Is DiffusionCoefficients in formal PDE of FEM redundant?
This is an issue I noticed when exploring this problem, I think it's worth posting a new question. Consider the following toy example:
...
8
votes
1
answer
217
views
Cantilever Bending looks like a worm [duplicate]
I want to simulate the bending of a cantilever under its own weight. Pretty standard stuff and I know that there are the SolidMechanics tools.
Nevertheless I tried to solve it in a more manual matter.
...
2
votes
1
answer
130
views
Laplacian in 2D with NDSolve -- solution not satisfying boundary condition? [closed]
Please note, I know how to do this problem exactly by separation of variables, and for a class I am teaching, I have resorted to solving
it that way, and then just using Mathematica to plot the ...
3
votes
1
answer
241
views
Solve the 2D wave equation over a nonregular defined region
Need to find eigen values for a rectangular region simple supported membrane. I am able to get results with a uniform area - The answer is close to what I expected
...
5
votes
2
answers
770
views
IBVP of PDE system deduced from Kirchhoff's rod theory
I am trying to solve the following system of nonlinear PDEs in Mathematica, but I'm encountering difficulties, particularly with defining the initial conditions. Here's the system I am working with:
$$...
6
votes
0
answers
159
views
How to apply a pressure load to the surface of a deforming mesh?
I would like to be able to apply a pressure load to the surface of a thin membrane for FEM, and wish to make sure that the pressure always acts in the direction of the normal vector of the surface of ...
2
votes
0
answers
162
views
segregation of impurities
Trying to simulate the impurities distribution after several pass.
Schematics of zone refining furnace and solution of each regions are depicted in the figure.
Can you give any idea how deals on the ...
3
votes
1
answer
226
views
NDSolveValue Failing for 3D Navier Stokes Around A Ball
I get the following output from the Mathematica code given below:
complaining presumably about boundary conditions.
I'd like to stick with the new FluidFlowPDEComponent. My code is below:
...
5
votes
3
answers
514
views
High quality mesh for solid spiral with several turns
I want to model a solid spiral but Region[] seems to connect the different turns of the spiral
...
11
votes
4
answers
770
views
Fast way to spot the element containing certain point in a mesh
This problem raises up when I'm exploring this question. Consider the following first order 2D triangle mesh:
...