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
12
votes
3
answers
779
views
FEM doesn't output exactly the same solution for exactly the same code?
Consider this toy example:
...
4
votes
0
answers
121
views
Inactive PDE terms in FEM without Neumann boundary conditions
I am solving a Poisson-like set of PDEs for u[x,y] and v[x,y] in the square region ...
9
votes
2
answers
322
views
How can we apply specific boundary conditions with NDEigensystem?
I'm solving an eigenvalue problem with special b.c. mentioned in the paper Edge states in gated bilayer-monolayer graphene ribbons and bilayer domain walls. (See Eq.(3)(6)(7) and the paragraph after (...
1
vote
1
answer
94
views
Define a function on a MeshRegion
This looks like a simple question with the answer to be easily found, but unfortunately I could not find it either on the web or in the documentation browser.
Let us assume we have a MeshRegion ...
1
vote
1
answer
74
views
Numbering of auxiliary symbols in AceGen generated code
I have a general question regarding the numbering of auxiliary symbols in AceGen.
Consider this example (taken from the AceGen manual, only the language is switched to ...
3
votes
1
answer
107
views
Understand NDEigensystem::stlin
I am trying to solve Eq.3 and reproduce Fig.2 of this paper using NDEigensystem but fail, what is wrong with my code?
...
2
votes
0
answers
78
views
3D BoundaryMeshRegion Minkowski difference via RegionErosion Failure
I need to be able to produce Minkowski difference of an arbitrary BoundaryMeshRegion and a cylinder.
...
4
votes
1
answer
63
views
Total number of corner nodes and middle nodes in a given mesh with 2nd order triangular elements
I have created a mesh consisting of 2nd order triangular elements, on the domain as follows.
...
7
votes
1
answer
302
views
Refining mesh size leads to absurd results for a coupled heat transfer FEM model
I have been recently solving a conjugate heat transfer problem, which involves fully-reversing or reciprocating flow of fluid over a heated block of solid. The problem is 2D and the temperature field ...
3
votes
0
answers
74
views
What is the correct way to create an animation in parallel using the result of NDSolve?
For example, in the following code ParallelTable takes 23 minutes:
...
2
votes
2
answers
135
views
NDSolve Extrapolating boundary conditions for FiniteElements
I'm trying to solve a 1+1 (1d time + 1d space) partial differential diffusion equation.
My NDSolve call look basically like this:
...
1
vote
0
answers
54
views
Problem meshing hexahedron
I have observed the following problem when meshing with the Hexahedra function. A rectangular body can be meshed by ToElementMesh and ToBoundaryMesh. A non-rectangular solid cannot. The difference ...
3
votes
1
answer
89
views
Making a mesh from a set of points
In conjunction with this question I find I am having difficulty making a mesh using a given set of points. The overarching objective is to make an interpolation function from an irregular set of ...
2
votes
1
answer
131
views
Directly calculating the cyclic steady state of a time-periodic conjugate heat transfer problem
Context
The following transient problem is the reciprocating (i.e., fully reversing) flow of a fluid $0<x<L, 0<y<d$ over a thick heated block $0<x<L, -e<y<0$ until the system ...
3
votes
1
answer
126
views
Conjugate heat transfer modelling of reciprocating flow crashes for long flow times
The following transient problem is essentially the reciprocating (i.e., fully reversing) flow of a fluid over a thick heated block until the system reaches a cyclic steady-state (i.e., the system ...
1
vote
0
answers
73
views
Some conceptual doubts about steady and transient solvers of the NS + energy equations
Recently, I have been solving some transient and steady, flow and heat transfer problems in Mathematica. The transient problem is essentially the reciprocating (i.e., fully reversing) flow of a fluid ...
1
vote
1
answer
139
views
How to solve a reaction-diffusion?
I would like to solve a PDE system reaction-diffusion type (2D spatial + 1 temporal) coupled as described below. Another question of this same system was solved here:
System of nonlinear PDE 2D (...
3
votes
2
answers
75
views
How to create an ElementMesh with at least two triangle elements at each corner?
Based on this simple example of a triangle mesh
...
2
votes
1
answer
67
views
Confusion in Eigenvalue and eigenfunction distribution using NDEigensystem [duplicate]
I have been using NDEigensystem to solve the Schrodinger equation for different potentials. However, whenever the potential has its minimum in the negative y-axis, ...
0
votes
1
answer
156
views
On the Dirichlet integral
Continuing this topic, once the Dini-Neumann problem is solved:
$$
\begin{cases}
\Delta f = 0 & \text{on} \; \Omega \\
\frac{\text{d}}{\text{d} n} f = y\,n_x - x\,n_y & \text{on} \; \partial\...
6
votes
1
answer
292
views
Numerical solution of a partial derivative problem
WARNING: a couple of days ago I posted a similar question, but due to the impossibility of DirichletCondition[] to handle "cross-coupling of dependent ...
3
votes
2
answers
146
views
Solving a system of differential and integral equations in Mathematica
Here is a system of differential equation I am trying to solve:
$$ u''(x) - a(x) u(x) + b(x) v(x) = 0 \quad (1)$$
$$ \gamma v''(x) + a(x) u(x) - b(x) v(x) = 0 \quad (2) $$
where $a(x)$, $b(x)$ are ...
2
votes
0
answers
70
views
Make NDSolve return solution over only part of domain
Consider the following pair of PDEs, for which I will solve in the mesh built below. The mesh needs to be much larger than the region of interest to mimic boundary conditions "at infinity".
...
3
votes
1
answer
205
views
Strange chattering in derivative of InterpolatingFunction returned by NDSolve using FEM
When using the Finite Element Method of NDSolve to solve a set of ODE, the resulting InterpolatingFunction showcases a strange chattering in its derivatives. This ...
5
votes
1
answer
223
views
Solving Coupled nonlinear Differential Equations For Eigenvalue And Eigen functions
I tried to solve coupled nonlinear differential equations from this paper https://sci-hub.hkvisa.net/10.1016/j.jcp.2019.109058 to see eigenvalues and eigenfunctions in different dimensions. At first, ...
1
vote
0
answers
58
views
Using FEM to solve 1D coupled PDES [duplicate]
I have been attempting to numerically simulate the electron and lattice temperature of a two-layer metal subject to laser heating (1d two-temperature model). I have read related questions such as ...
2
votes
1
answer
81
views
Step size of InterpolatingFunction returned from NDSolve using FEM
I would like to retrieve the step size information of an InterpolatingFunction returned from NDSolve while using the Finite Element Method (FEM) (...
2
votes
0
answers
58
views
Coupled PDEs with different dimensions and boundary conditions
The geometry of the problem is described by a cylinder inside a rectangular domain. The equations describes the region in between them.
I have 2 PDEs for U(x,y,z) in the bulk region and V(z) for -0.5&...
4
votes
1
answer
107
views
FEM breaks because of Abs(f'(x))
I am trying to solve a 1d differential equation in Mathematica using the finite element method. I have successfully implemented the problem in a commercial software called COMSOL, but I like to use ...
5
votes
1
answer
121
views
Steady state heat equation/Laplace's equation special geometry
I would like to solve the Laplace's equation in between the square domain and a disk. However, using the code below, I was able to generate mesh but not able to obtain results with correct boundary ...
2
votes
1
answer
72
views
How to use ElementMeshInterpolation to interpolate to deformed mesh?
I'm solving a problem in solid mechanics, but I ran into problems when I tried to plot some stuff over the deformed mesh, because the plots are cut off. They end when the undeformed mesh ends.
...
3
votes
1
answer
92
views
AceFEM higher order elements fail basic test
I was trying to perform a simple test, as some results that we obtained from AceFEM were not matching with the results we obtained from other methods. Here, I have a simple biaxial test on a cube of ...
2
votes
2
answers
111
views
3D FEM - How to define Point-Markers for an ElementMesh object created with ElementMeshRegionProduct
I want to create a 3D grid based on a 2D mesh, on the surface of which I want to assign point-marker for certain regions. The mesh created in the sample code is a fluidic Y-structure, at whose inputs (...
2
votes
0
answers
64
views
Problems with using NDSolveValue to solve two-dimensional Fokker-Planck equation
When I use NDSolveValue to solve the following two-dimensional Fokker-Planck equation, it works well:
...
6
votes
1
answer
189
views
Finite element method solution data, Mathematica 13.1
I just upgraded to Mathematica 13.1 and encountered the following issue (this is just code from the first few lines of the FEM programming documentation):
...
4
votes
2
answers
214
views
Animating a potential function (eigenfunctions of Laplace's equation) - something has changed
I had this working with Kuba's help some time ago see here but something has changed. I am using version 13.0.
The animation lay out has changed to this configuration where the animation bar is ...
4
votes
3
answers
254
views
Multiply differential operator matrix and shape function matrix
I'm new to Mathematica.
Say $N(\xi, \eta)$ (NSHAPE in code below) is a 2x6 matrix:
$$
N(\xi,\eta) =
\left[
\begin{array}{cccccc}
1 -\xi -\eta & 0 & \xi &...
0
votes
0
answers
100
views
How to modify global stiffness matrix before solving it by SMTNewtonIteration[]?
I'm trying to use the Model Order Reduction technique to reduce the stiffness matrix in AceFEM/AceGen. But there is a problem with the manipulation of the global stiffness before solving it by ...
1
vote
0
answers
48
views
How to find the relationship between parameters and eigenvalue via DEigensystem or NDEigensystem?
I have a system with some parameters(like masses,couplings). But it seems DEigensystem/NDEigensystem only works when theses parameters are specified? My code is below:
...
0
votes
0
answers
27
views
NDSolveValue with derivative boundary conditions not working [duplicate]
I have some nonlinear PDE that I'm trying to solve. I have defined the equation, eqJ, and am running the following code:
...
-1
votes
1
answer
119
views
How to find complex eigenvalues via NDEigensystem? [closed]
I'm using NDEigenvalue to solve following uncoupled eigenvalue problem:
...
2
votes
2
answers
256
views
How should I define the boundary conditions of free end and fixed end scenarios for 1D Wave Equation?
The 1D wave equation is $$\frac{\partial^2 u(x,t)}{\partial t^2} = c^2 \frac{\partial^2 u(x,t)}{\partial x^2}$$
where $c$ is the wave speed, $c^2=E/\rho$, $E$ is the Young's modulus and $\rho$ is the ...
1
vote
0
answers
129
views
Solid mechanics - traction boundary condition in the reference configuration
Both SolidBoundaryLoadValue or NeumannValue can be used to specify the traction boundary condition, because ...
4
votes
1
answer
141
views
Nonlinear PDE with a trivial and nontrivial solutions: how to?
I am solving the following PDE:
eqMain = D[z[x, y], {x, 2}] + D[ z[x, y], {y, 2}] -
(a - x/(x^2 + y^2 + 0.0001))*z[x, y] - z[x, y]^3==0;
with the zero ...
4
votes
1
answer
142
views
Problem with NDSolve for 1st order non-linear system of PDEs
I wish to solve the PDE system
\begin{align}
x_u^2+y_u^2+\left(xx_u+yy_u \right)^2&=1\\
x_v^2+y_v^2+\left(xx_v+yy_v \right)^2&=1
\end{align}
subjected to $x(0,v)=0$ and $y(u,0)=0$. However, ...
6
votes
2
answers
252
views
SolidMechanicsStress returns, that the stress is equal to zero
Bug introduced in 13.1 and fixed in 13.2.0
I am trying to compute a deformation and a stress of a material with a custom material law. I have successfully computed the deformation using ...
3
votes
1
answer
217
views
Solving 3D Nonlinear Integral Partial Differential Equation
I am trying to solve Equation number (1.2) numerically in MATHEMATICA. This equation is solved in the papers https://arxiv.org/pdf/2205.05193.pdf, https://arxiv.org/pdf/2202.13264.pdf, and https://...
10
votes
3
answers
326
views
Can NDSolve be initialized with a close solution?
I have a set of 4 first order ODE with 4 initial conditions to be met. It models a simple damped pendulum like the one described here. What changes is the damping term and I switched to first order ...
4
votes
1
answer
113
views
Is it possible to remove an element during computation in AceFEM?
The title says it all. I know there have been a lot of enhancements in the recent versions of AceGen/AceFEM. I would like to know if there is a possibility of removing an element during computation (...
10
votes
1
answer
184
views
1D diffusion problem: Troublesome NeumannValue
Bug introduced in 13.1 or earlier and fixed in 13.2.0
Mathematica solves the diffusion problem (two Neumann-conditions)
...