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
3 votes
1 answer
137 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
1 vote
1 answer
71 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
123 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
41 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,156
1 vote
0 answers
96 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
  • 567
2 votes
2 answers
135 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
117 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
189 views

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

...
Cedric Martens's user avatar
2 votes
0 answers
61 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,156
4 votes
2 answers
215 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
  • 636
3 votes
1 answer
190 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
111 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
  • 1,921
0 votes
1 answer
131 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
114 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
109 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
69 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
211 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
182 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
5 votes
0 answers
135 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 ...
Roland F's user avatar
  • 3,263
7 votes
2 answers
253 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 ...
Alex Trounev's user avatar
  • 43.3k
3 votes
2 answers
161 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 ...
dopey's user avatar
  • 63
3 votes
1 answer
136 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 ...
AminD's user avatar
  • 51
1 vote
1 answer
95 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 ...
Binka's user avatar
  • 53
0 votes
1 answer
114 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. ...
Lewis's user avatar
  • 11
2 votes
1 answer
128 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 ...
B. Brekke's user avatar
  • 123
6 votes
2 answers
1k 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), ...
MarcosMFlores's user avatar
1 vote
0 answers
75 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{...
Snowymint's user avatar
2 votes
1 answer
114 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 ...
Larissa Santos's user avatar
1 vote
0 answers
55 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\...
Snowymint's user avatar
1 vote
1 answer
73 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}...
Snowymint's user avatar
1 vote
1 answer
230 views

Numerical solving diffusion equation in spherical coordinates

Mathematica nicely solves Poisson's equation in spherical coordinates as ...
Rodion Stepanov's user avatar
4 votes
2 answers
266 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" ...
Ulrich Neumann's user avatar
2 votes
1 answer
177 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 ...
AminD's user avatar
  • 51
7 votes
4 answers
322 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 ...
Ariana Fenris's user avatar
2 votes
0 answers
152 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 ...
S. Maths's user avatar
  • 203
3 votes
1 answer
153 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} ...
Daniel Castro's user avatar
4 votes
1 answer
262 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 ...
pp.ch.te's user avatar
  • 191
2 votes
1 answer
214 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 ...
Jole Stock's user avatar
2 votes
1 answer
106 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$): ...
anderstood's user avatar
  • 14.3k
3 votes
4 answers
183 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 $\...
JamesVR's user avatar
  • 335
3 votes
1 answer
126 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 ...
kotozna's user avatar
  • 319
1 vote
1 answer
116 views

Import in Mathematica does not work

I want to import STL files as boundary element mesh. ...
Lewis's user avatar
  • 11
1 vote
1 answer
75 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 ...
Brownian_Motion's user avatar
3 votes
1 answer
189 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 ...
Tayfun's user avatar
  • 31
6 votes
2 answers
368 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 ...
Takashi Miura's user avatar
0 votes
1 answer
72 views

Which approximation functions does NDSolve take when solving second order ODE with the finite element method? Are they linear in parts or some other?

This is the code that I have ...
klaic710's user avatar
2 votes
1 answer
83 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 ...
user94537's user avatar
  • 107
2 votes
1 answer
121 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 ...
user94537's user avatar
  • 107
1 vote
1 answer
111 views

NDSolveValue result contradicts initial condition

I'm trying to solve the Schroedinger equation in a box with two holes defined by: ...
kacper's user avatar
  • 13
1 vote
1 answer
96 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: ...
user94537's user avatar
  • 107

1
2 3 4 5
30