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
5
votes
0
answers
200
views
What is resistivity function of a 3-bar electric switch?
I answered a question on Physics StackExchange - considered as homework - numerically. The question is: What is the resistance of three stacked identical blocks, the middle bar shifted by its half ...
7
votes
2
answers
495
views
How to improve FDM solver for unsteady viscous flow?
To solve the problem that is discussed in the paper Finite Difference Analysis of Time-Dependent Viscous Nanofluid Flow Between Parallel Plates we developed FDM solver based on the code from the blog ...
3
votes
2
answers
293
views
LinearSolve problem occurs as solving PDEs with NDSolve
I am new to Mathematica, please forgive me asking naive questions. I tried to solve PDEs numerically using NDSolve, but failed to go through due to errors. Two of three PDEs are time-dependent and ...
4
votes
1
answer
246
views
Dirac equation for a Coulomb potential in 2D with NDEigensystem
I want to numerically solve the ground state wave function of the hydrogen atom with the Coulomb potential using the NDEigensystem. Here is the code to get the ground state wave function from the ...
2
votes
1
answer
161
views
How to enforce DOFs to have the same values in AceFEM?
I want to make simulation of shearing of one cubic finite element as in the code below. How can I constrain all horizontal displacements (in X direction) of nodes "X"==L to have the same ...
0
votes
1
answer
169
views
Generate the full mesh of the room model
I want to import a 3d model to create a complete mesh of an interior model.
...
2
votes
1
answer
182
views
NDSolve ignores my NeumannValue boundary conditions
I am trying to solve a simple linear differential equation for $f(x,y)$ on a square with area $L\times L =1$.
I consider
$(\partial_x^2 + \partial_y^2)f + \partial_x \partial_y f = 0$ with the ...
7
votes
2
answers
2k
views
Numerically solving radial Schrödinger equation with Yukawa potential
I am trying to solve the radial Schrödinger equation using NDEigensystem but I am running into some issues. There are posts about doing this (see here for example), ...
1
vote
0
answers
107
views
Solving PDE for Diffusion Equation with Both Ideal and Excess Potential (Boundary Condition Issue)
I am trying to solve this partial diffusion equation shown
$$\dfrac{\partial C_A}{\partial t}=D_A\left[\dfrac{\partial^2C_A}{\partial r^2}+\dfrac2r\dfrac{\partial C_A}{\partial r}+\dfrac1{K_BT}\dfrac1{...
2
votes
1
answer
194
views
Method of lines - Dirichlet and mixed BC
I have a dissolution problem to solve with two equations (everything is in dimensionless form - concentration, time and distance - EDIT: that came from the second Fick's law, where the distance was ...
1
vote
0
answers
66
views
Solving PDE for Diffusion Equation (Boundary Condition Issue) [duplicate]
I am trying to solve this partial diffusion equation shown
$$\dfrac{\partial\overset\sim\rho_c}{\partial\overset\sim t}=D_c(\overset\sim r)A\left(\dfrac{\partial^2\overset\sim\rho_c}{\partial\overset\...
1
vote
1
answer
165
views
Numerical instability due to convection dominated PDE [duplicate]
I am trying to solve this partial diffusion equation$$\dfrac{\partial\overset\sim\rho_c}{\partial\overset\sim t}=D_c(\overset\sim r)A\left(\dfrac{\partial^2\overset\sim\rho_c}{\partial\overset\sim r^2}...
1
vote
1
answer
374
views
Numerical solving diffusion equation in spherical coordinates
Mathematica nicely solves Poisson's equation in spherical coordinates as
...
4
votes
2
answers
390
views
How to mesh a cylinder with helix points?
I would like to mesh a cylinder surface. The mesh should include given cylinderpoints which lie on a helix.
My attempt using "IncludePoints"
...
2
votes
1
answer
396
views
Numerical ground state wavefunction of Schrödinger equation with a Coulomb potential in 2D from NDEigensystem
I want to numerically solve the ground state wave function of the hydrogen atom with the Coulomb potential using the NDEigensystem. Here is the code to get the ground state wave function from the ...
7
votes
4
answers
448
views
Minimal surface bounded between turns of helix
I'm curious to find the shape of a surface bounded between the rungs of a helix, ie the shape of the cloth stretched between the rungs of this child's play tunnel. I'm wondering if we could find it ...
2
votes
0
answers
240
views
Problem with pdetoode for two coupled PDEs
I tried to adapt a code for a single equation to solve the following system using 'pdetoode'
Updated answer
...
3
votes
1
answer
251
views
Solving system of first order PDEs
I am trying to solve the 1st order PDE system
\begin{align}
\xi_u^2+\eta_u^2&= \left(1+\frac{\xi^2+\eta^2}{4} \right)^2\\
\xi_v^2+\eta_v^2&=\left(1+\frac{\xi^2+\eta^2}{4} \right)^2
\end{align}
...
4
votes
1
answer
311
views
Numerical solution of second-order linear hyperbolic PDE
(I'm also searching for analytical solutions to this PDE; check the bountied questions here and here if you have any ideas)
I'm trying to find the numerical solution of the following 2D second-order ...
-1
votes
1
answer
210
views
Galactic rotation speed and density research
Rotation speed of Milky Way looks like this until about 25 kpc
I know the following points to describe this curve
...
2
votes
1
answer
320
views
Machine overflow when defining boundary conditions
Recently I have been trying to code Maxwell's equations over a closed surface and have been facing some trouble defining the boundary conditions for the magnetic field.
The equation for the normal of ...
2
votes
1
answer
184
views
Solving Poisson PDE with NDSolve and incomplete BC specifications
When solving the following PDE with a missing BC on the fourth edge ($y=1$):
...
3
votes
4
answers
371
views
NDSolve over derivatives of Heaviside function
I am trying to numerically solve for the strain of a Maxwell material in response to a step stress. The governing equations are $$\dot{\sigma} + \sigma = \dot{\varepsilon}$$ and I want to find $\...
4
votes
1
answer
220
views
Numerically solve for the potential of a point charge in a periodic cubic domain
How can I obtain the 3D numerical solution for the potential (or field) due to a point charge inside a cubic domain with periodic boundary conditions in all directions? I guess I can use ...
1
vote
1
answer
185
views
Import in Mathematica does not work
I want to import STL files as boundary element mesh.
...
1
vote
1
answer
121
views
NDSolveValue::fememrc | Defining initial conditions on a part of a 1D mesh
I am trying to solve a simple PDE in the cylindrical coordinates:
$$ \frac{\partial c}{\partial t} = D \bigg(\frac{1}{r}\frac{\partial c}{\partial r}+\frac{\partial c^2}{\partial r^2}\bigg)$$
The ...
3
votes
1
answer
341
views
Numerical solution of the Richards' equation
I am trying to solve Richards' equation to model fluid flow in soil. The governing partial differential equation, initial condition, and boundary conditions are:
The analytical solution of the problem ...
6
votes
2
answers
548
views
Simulating buckling
We are trying to implement buckling using a newly implemented FEM solver. However, if we try to reproduce the buckling phenomena using a thin rod, it is just compressed, and we cannot observe the ...
0
votes
1
answer
100
views
2
votes
1
answer
142
views
Post Processing of Solution and Plot of Coupled Partial Differential Equation Over a Semi-Circular Domain
Linked Question: Solution and Plot of Coupled Partial Differential Equation Over a Semi-Circular Domain.II
Many many thanks to @Nasser (https://mathematica.stackexchange.com/users/70/nasser) for his ...
2
votes
1
answer
178
views
Solution and Plot of Coupled Partial Differential Equation Over a Semi-Circular Domain.II
This question is connected with reference to my previous question (Solution of Dimensionless Partial Differential Equation Over a Semi-Circular Domain), where I asked for a help to solve the following ...
1
vote
1
answer
144
views
NDSolveValue result contradicts initial condition
I'm trying to solve the Schroedinger equation in a box with two holes defined by:
...
1
vote
1
answer
179
views
Solve dimensionless PDE in polar coordinate over a semi-circular re
I am trying to solve the following BVP in mathematica
using the following code:
...
2
votes
1
answer
122
views
FEM solution for onedimensional boundary value problem doesn't evaluate [closed]
modified
Based on this, unfortunately closed, question How can we know on how many parts is domain splitted with MaxCellMeasure? [closed] I would like to know why ...
2
votes
1
answer
147
views
Mathematica thinks that an initial condition is a boundary condition
I would like to solve the following reaction-diffusion problem in Mathematica using NDSolve:
...
5
votes
1
answer
229
views
Artifacts when interpolating on an unstructured set of 3D data
When doing an interpolation on an unstructured set of points it is best to use the interpolation method available from the finite element package. However, it is essential that some re-scaling is done ...
3
votes
1
answer
183
views
Second order Poisson ODE
I have a 2nd differential Poisson equation for the electric field in a semiconductor (application for a MOS simulation, hopefully).
I have the formula:
with the condition that after a certain value(...
2
votes
1
answer
175
views
Need help solving cylindrical Laplacian
I'm trying to solve the cylindrical Laplacian for a heated disk in a large cylinder. The cylinder and disk have constant temperatures and I only care about the temperature field between the disk and ...
1
vote
0
answers
83
views
WhenEvent in ParametricNDSolve but not executed
I tried to solve a partial differential equation with parameters, the critical condition of which I used WhenEvent to express, but the solution after bringing in the parameters shows that the ...
2
votes
1
answer
510
views
Solving Schrödinger equation for Dirac comb potential (kicked rotor)
I need to solve the Schrödinger equation for a Dirac delta potential. I could not find the correct way to write the time-dependent potential and how to solve the time-dependent equation for it.
The ...
2
votes
1
answer
141
views
AceGen: Assemble a user specific global array (similar to "Residual")
I have an issue which I know is definitely solvable but I don't know how to implement this in AceGen.
Basically, I want to assemble a matrix $\mathbf{L} \in \mathbb{R}^{n_{dof} \times 6}$ for a global ...
1
vote
1
answer
253
views
How to find eigenvalues?
I have the following system of differetial equations, which are linearized based on steady state solutions. How to discretize them and find eigenvalues or use any other method without discretization ...
1
vote
1
answer
442
views
How to find the analytical or numerical solution of a system of partial differential equations?
I am trying to use mathematica to solve a system of second-order partial differential equations, but I have been unable to solve it. The code of mathematica is as follows:
...
2
votes
2
answers
564
views
Spherical Heat Equation and Convection Boundary Conditions
I'm trying to solve transient heat conduction equation in spherical domain in Mathematica. I made the simplifying hypothesis that temperature varies only with time and radial coordinate.
The code is:
<...
1
vote
1
answer
125
views
Fitting Parameters to the Heat Equation [closed]
As part of my research, I have been trying to use a model of heat conduction through a 2D layer given an input steady-state Gaussian power profile and a heat loss term to the environment. All but one ...
0
votes
0
answers
122
views
NDSolve diverges with Neumann boundary condition [duplicate]
I am solving Poisson-like PDE with the Finite Element Method in Wolfram Mathematica. Only the Neumann boundary condition is imposed on the boundary. Of course, the solution is not unique, most likely ...
4
votes
1
answer
262
views
Finer mesh for selected subregion of a solid 3D cylinder
I am trying to create a finer mesh in a subregion of a solid cylinder in order to improve the resolution there. I don't want to have too many elements for the entire cylinder because it slows down the ...
4
votes
1
answer
236
views
FindRoot error in NDSolve
I have two coupled differential equations as follows
$$
\frac{\partial }{\partial x}U(x,y) =2V(x,y),
$$
$$
\frac{\partial }{\partial y}V(x,y) =V(x,y)U(x,y)+1,
$$
with ...
0
votes
1
answer
191
views
Why do the eigenvalues periodically change with successive increase in the consideration region?
When finding the eigenvalues and eigenfunctions of the system Hc[r, z] using NDEigensystem, the following issue arises: When ...
1
vote
0
answers
136
views
How to find the eigenvalues of a particle in the Coulomb field using NDEigensystem?
As advised in the previous two questions (Why, if I enter an angle into the function, then does the code not work correctly?, let us solve the problem for the Coulomb potential in spherical ...