Skip to main content

Questions tagged [finite-element-method]

Usage of the Finite Element Method embedded in NDSolve and details on the implementation of the fem in mathematica.

Filter by
Sorted by
Tagged with
0 votes
0 answers
9 views

AceFEM-generated mesh versus Mathematica mesh: How to extrude 2D mesh to create a 3D mesh in AceFEM

The packages MeshTools (@Pinti) and FEMAddons seem to feature similar functions. I sometimes had strange (i.e. inconsistent results when meshing would work/not work without changing anything). Which ...
jmt's user avatar
  • 61
0 votes
0 answers
44 views

Boundary сonditions specified in different domains

I am modeling mass transport phenomena involving convection and diffusion within a two-dimensional box. The box has a height ranging from 0 to h along the y-axis and is divided into two domains along ...
LUIS MORALES's user avatar
0 votes
0 answers
31 views

Solving a diffusion equation in a partially noisy potential

So recently I tried modelling diffusion over the rough part of a potential W. To do so I try numerically solving the Fokker-Planck equation: $$\partial_t P(x,t) = -\nabla\cdot J$$ $$J= -D(x)\nabla P-D(...
IronicOwl's user avatar
  • 115
1 vote
1 answer
111 views

2D momentum type equation for compressible fluids

I have this program which displays errors in the declaration of terms, I've tried to modify it several times but it displays the same errors, apparently in the declaration of the term $(v \cdot \nabla)...
Kamal Khalil's user avatar
1 vote
0 answers
59 views

Why is NDSolve ignoring two PDEs out of three ones I am solving?

I am solving the following coupled system of 3 PDEs modelling a 1D membrane coupled to a 1D fluid flow field underneath. However, on putting them into NDSolveValue (and trying with FEM), it says the &...
Ariana Fenris's user avatar
2 votes
0 answers
96 views

How to solve electric drift and diffusion PDE using `NDSolveValue`?

I am trying to learn how to use NDSolveValue with various boundary conditions. After going through several examples here, I thought I'd try it on what I thought ...
BeauGeste's user avatar
  • 2,835
0 votes
1 answer
141 views

Solving coupled quasi-linear PDEs with boundary conditions

I realized that in this solution, changing one of the boundary conditions makes the answer invalid. I wonder if it is possible to modify the code in this answer to solve the following equations. $$ \...
questionerno8's user avatar
0 votes
0 answers
38 views

NDSolveValue - states fewer dependent variables than equations for simple FEM beam model & variables not same shape

This is a simple FEM beam model. Supported at both ends, uniform load. Nothing complex. error message - "There are fewer dependent variables, {u[x]}, than equations, so the system is ...
SAK's user avatar
  • 11
1 vote
0 answers
84 views

NDSolve`FEM` 3D problem [closed]

I solved Laplace's differential equation in 2D with functions from the NDSolveFEM package and everything worked fine, but when I extended it to 3D, it doesn't work ...
someoneelse's user avatar
2 votes
1 answer
127 views

How to define styles for a mesh based on a function of element index

My main objective is to have control over style of each element in a mesh. I don't quite understand how ElementMeshToGraphicsComplex works. It looks very cool and ...
MathX's user avatar
  • 1,709
1 vote
1 answer
69 views

EM Wave Equation: Insufficient initial conditions for NDSolve?

I am trying to model a EM wave propagation through a region of free space. However, Mathematica tells that there are insufficient initial conditions, even though I specify all values at ...
Dr__Soul's user avatar
2 votes
0 answers
46 views

Nonlinear FiniteElement method (`Inactive`-form) : PDE-Discretization fails

In the documentation Nonlinear Finite Element Method Verification Tests an analytical solution of the problem is given ...
Ulrich Neumann's user avatar
11 votes
1 answer
330 views

Schrödinger equation for the Morse potential (DEigensystem)

I have tried to solve the Schrödinger equation for the Morse potential using Mathematica. I am using Mathematica 12, and I have written the following code: ...
Θάνος Κ.'s user avatar
4 votes
1 answer
72 views

Solving Fokker-Planck on potential, which is discontinuous in the second derivative

I am trying to solve the following Fokker-Planck equation using NDSolveValue: $$\partial_t P(x,t) = -\partial_xJ$$ where $$J = -D\partial_x P(x,t) - (D/k_BT)\partial_xW(x)$$ where we assume D,T ...
IronicOwl's user avatar
  • 115
0 votes
0 answers
49 views

performance of the NDEigensystem and DEigensystem

I can't find any result and I can't understand what is going wrong. Any help please? My code is: ...
HarrisModel's user avatar
6 votes
1 answer
154 views

How do I couple an 1D PDE to a 2D Laplace equation?

Recently I've come across the following system governing the spreading of an evaporating droplet. The height of the droplet $h$ is defined by the following equation $$\frac{\partial h}{\partial t}=-\...
FLP's user avatar
  • 547
0 votes
0 answers
41 views

Use Interpolating function from NDSolve as an initial condition for another NDSolve

The following are the 4 parts of my code. The 1st part is constant definition. The 2nd part is function definition. The 3rd part is equation solving which works as expected. The 4th part tries to use ...
Liu Zhiyu's user avatar
4 votes
2 answers
171 views

Solve Richards equation for unsaturated soils with FEM (`NDSolveValue`)

I am attempting to solve the nonlinear Richards equation for the dependent variable $\Psi(t,x,y)$. The equation is as follows: $\frac{\partial\theta(\Psi)}{\partial t}=\nabla. (k(\Psi)\nabla(\Psi + y) ...
Stratus's user avatar
  • 2,954
1 vote
3 answers
304 views

Non-linear PDE coefficients problem

I'm trying to solve the following PDE ...
Daniel Castro's user avatar
5 votes
1 answer
158 views

3D FEM Memory Problem with Hexahedral Elements & V14 & Apple Silicon

After using MM V12 for a long time on a MacBook Pro 2011, which just lost 8GB or RAM from 16GB, I am trying V14 on a MacMini M2pro with 32GB. I had previously coded a coupled 3D EM problem involving a ...
Greenasnz's user avatar
  • 381
0 votes
1 answer
95 views

Solving a 3+1D Wave Equation

I am having some problems with finding the solution to the magnetic field, B[x,y,z,t]. Is there anything I can change to my code to obtain a solution of B[x,y,z,t] with the initial conditions and ...
Tommy Wong's user avatar
1 vote
1 answer
116 views

Problem Encountered when Solving a System Consisting of Two PDEs and an ODE in a Semi-NDSolve-based Approach

This is a continuation for question 300522. Firstly, I have changed the equation for $C_{2\text{b}}^* $ in my system. The updated $C_{2\text{b}}^* $ is expressed as below: $$ \begin{equation} C_{2\...
Johnson's user avatar
  • 357
3 votes
2 answers
95 views

Does NDEigensystem work in dimensions greater than 3?

I have been trying to run NDEigensystem on a differential operator with four variables $\alpha$, $\beta$, $\gamma$, and $\delta$. I've found that if I run the ...
NOABM's user avatar
  • 33
2 votes
1 answer
111 views

Solving heat equation in spherical coordinates

I am attempting to solve a heat equation in spherical coordinates. However, I encountered an error message. My Mathematica code is ...
pkiwan93's user avatar
0 votes
0 answers
79 views

Specifying Prescribed Mesh to Solve for a System Consisting of Two PDEs and an ODE

I am solving the following equations: $$ \frac{\delta C_{1\text{f}}^*}{\delta t^*} = \frac{\overline{t}}{\overline{x}^2} \frac{\delta}{\delta x^*} \left\{ \mathcal{D} \left[ \frac{\delta C^*_{1\text{f}...
Johnson's user avatar
  • 357
1 vote
0 answers
96 views

Speed up the evaluation of two million consecutive eigenvalues using `NDEigenvalues`?

$Version "13.0.1 for Linux x86 (64-bit) (January 29, 2022)" I have $28$GB of RAM. I need to calculate two million consecutive eigenvalues for a given ...
user444's user avatar
  • 2,446
3 votes
1 answer
66 views

Discretize nonlinear PDE-system fails

Inspired by this post Solving the system of nonlinear PDE I would like to discretize these two stationary nonlinear pde's for further use with FEMsolver of NDSolve. parameters used: ...
Ulrich Neumann's user avatar
5 votes
0 answers
54 views

Interpolation on an unstructured grid with large aspect ratio

If you wish to interpolate on an unstructured grid then the solution is to use ElementMeshInterpolation from the Finite Element Method. I examined this here but now ...
Hugh's user avatar
  • 16.5k
5 votes
1 answer
155 views

How to solve two diffusion equations coupled over boundary conditions

I have a two phase, ternary component system, that is recovering from an action performed on the concentration on its third component. The resulting differential equations are two coupled diffusion ...
IronicOwl's user avatar
  • 115
5 votes
4 answers
269 views

Solving the system of nonlinear PDE

I have never used Mathematica before. I am trying to solve the system of PDE \begin{array}{l} \frac{\partial u}{\partial t} = D_u \nabla^2 u - \beta \chi_u \nabla ( u \nabla \pi_u) + u (\pi_u - \...
random487510's user avatar
2 votes
2 answers
132 views

How to interpolate and visualize a finite element integration point solution

I can intepolate the nodal solution using the function ufun = ElementMeshInterpolation[{mesh}, nodalsol] and visualize the nodal solution with the function ...
Stratus's user avatar
  • 2,954
4 votes
3 answers
229 views

NDSolve FEM-Solver fails for simple PDE

Trying to solve this pde (inspired by this question NeumannValue when differential equation does not use Laplacian ) ...
Ulrich Neumann's user avatar
5 votes
1 answer
221 views

Combining 3D-text (extruded 2D-font) and a simple solid: RegionProduct produces invalid BoundaryMeshRegion

Below is a code fragment demonstrating a problem that has been vexing me for days. The history is in my question #298513 (thanks again to @cvgmt and @user21), but knowledge of that question or its ...
Felix Kasza's user avatar
2 votes
1 answer
108 views

NeumannValue when differential equation does not use Laplacian

The context: I am attempting to solve the differential equation d^2f(x,y)/dx^2=y^2*f(x,y) on the rectangle given by (x_min,x_max)=(0,1), (y_min,y_max)=(0,1) with the boundary conditions f(x_max,y)=1 ...
Andrew L's user avatar
4 votes
1 answer
141 views

Extrude font into a prism: BoundaryDiscretizeGraphics and Line fail to produce a RegionProduct

I am attempting to use a text character as the base of a three-dimensional prism: ...
Felix Kasza's user avatar
0 votes
0 answers
44 views

Inner working of `NDEigensystem` [duplicate]

What is the inner workings of the NDEigensystem? How does it solve a second-order differential equation? I know it is an inbuilt Mathematica function. I want to ...
user444's user avatar
  • 2,446
1 vote
0 answers
104 views

Solutions of NDSolve with FEM don't solve the PDE's

I have 2 mixed-order PDE's that I need to solve in a finite computational space. The first equation is $$\frac{2 A \mu ^2 e^{-\frac{3 r^2}{\text{r0}^2}} \left(r^2 e^{\frac{2 r^2}{\text{r0}^2}}-\...
shanedrum's user avatar
  • 587
2 votes
2 answers
139 views

Failed to retrieve raw data from importing InterpolatingFunction derived from NDSolve

I tried numerically solving a set of time-dependent PDEs with variables {u, v, w} by NDSolve over 2 regions with 2D grids, ...
dopey's user avatar
  • 63
6 votes
1 answer
133 views

Avoiding artificial diffusion and minimize changes to code

I am currently working through Solving Partial Differential Equations with Finite Elements specifically the fluid flow problems. I took the Stokes flow problem and replaced it with Euler's equations ...
Kendall's user avatar
  • 363
4 votes
1 answer
198 views

Applying Dirichlet and Neumann boundary conditions seem to ignore Neumann boundary conditions

...
Cedric Martens's user avatar
2 votes
0 answers
62 views

How to get single $n^{th}$ eigenvalue and eigenfunction using NDEigensystem?

I am trying to solve the Schrödinger equation for a $2D$ Harmonic Oscillator using the following codes. Code-1 ...
user444's user avatar
  • 2,446
4 votes
2 answers
268 views

Making geometries with Mathematica for use in Ansys

I am trying to model deformations caused by identical, solid half-ball bearings on a thin, solid cylindrical plate in Ansys. But drawing the geometries is much easier in Mathematica, especially if I ...
Teg Louis's user avatar
3 votes
1 answer
196 views

Numerically compute the eigenvalues and eigenstates of a two-order partial differential equation [closed]

The objective is to numerically compute the eigenvalues and eigenstates of a stationary Schrödinger equation in an arbitrary polynomial potential. The equation takes the form: $$ \left[-\frac{1}{2}\...
basic nutshell's user avatar
2 votes
1 answer
113 views

NDSolveValue is unable to provide a solution because of boundary conditions

I have the following Mathematica code for solving a partial differential equation, which I took from this paper (page 6, 10) for B = 0 (which has ...
codebpr's user avatar
  • 2,253
0 votes
1 answer
134 views

Navier Stokes example not running

This may be a pretty noob question, but for some reason, I can't get the following Navier-Stokes FEM example to run https://www.wolfram.com/language/12/nonlinear-finite-elements/transient-navier-...
Mishal's user avatar
  • 39
2 votes
0 answers
120 views

Cavity resonator modeling with Wolfram Mathematica

I am attempting to determine eigenfrequencies and the corresponding electric field distribution in a rectangular cavity resonator with perfectly conducting walls. In the simplest case of a rectangular ...
Ian's user avatar
  • 41
3 votes
1 answer
114 views

NDEigensystem does not work when using nonlinear operator [closed]

I am trying to find the eigenvalues of the stationary Gross Pitaevskii equation using the NDEigensystem command via ...
user3623974's user avatar
0 votes
1 answer
74 views

How to set up "mixed" boundary conditions for NDSolve for PDE? [closed]

I have the following PDE that I am able to solve using DirichletCondition with NDSolve as the following: ...
user79317's user avatar
  • 125
6 votes
3 answers
224 views

Solving a nonlinear PDE on a mesh with a variable density

I would like to solve the following partial differential equation in 2D on a disk with the radius 10 and centered in the coordinates origin: ...
Alexei Boulbitch's user avatar
1 vote
2 answers
194 views

Unexpected result for Poisson problem on torus (using PeriodicBoundaryCondition)

I want to solve the Laplace problem $-\Delta u=f$ ("analyst's Laplacian") for a given $f$ and unknown $u$ on the torus $[0,2\pi]/\sim$, i.e. a rectangle with opposite sides identified. The ...
user505117's user avatar

1
2 3 4 5
30