Questions tagged [finite-element-method]

Tag for the usage of "FiniteElement" Method embedded in NDSolve and implementation of finite element method (fem) in mathematica.

Filter by
Sorted by
Tagged with
4 votes
0 answers
87 views

FEM: modelling 2D flow under periodic forcing

Despite many examples of periodic boundary conditions being presented, it remains difficult to obtain a periodic solution. Let us consider a simple example of a flow in a two-dimensional channel under ...
user avatar
1 vote
0 answers
38 views

Neumann Boundary Condition for thermal radiation between two bodies

I'm trying to formulate and solve a pde which models thermal radiation between two bodies using a Neumann boundary condition. I've created a mesh and want to capture the thermal radiation heat ...
user avatar
2 votes
0 answers
79 views

NDEigensystem returns reversed list of eigenfuctions

I'm considering the two coupled linear differential operators ...
user avatar
5 votes
1 answer
136 views

NeumannValue is producing incorrect results

Cross-posted in Wolfram community, an online Mathematica notebook is available there. The problem under investigation is solving the Laplacian equation to model seepage. See the image below for the ...
user avatar
  • 53
3 votes
1 answer
107 views

Speeding up Boussinesq equations solving?

I am working on Boussinesq equation. The notebook can run perfectly for only 0.6 steps and then the calculation starts running slowly after 0.7. All boundary conditions seemed fine. I am unsure if I ...
user avatar
2 votes
1 answer
47 views

Convert boundary condition involving derivative to NeumannValue programmatically

As discussed in e.g. what causes the error "The dependent variable in the boundary condition needs to be linear" when using NDSolve? When FiniteElement ...
user avatar
  • 51.6k
2 votes
2 answers
106 views

How to solve 2D eigenvalue problem with robin boundary conditions

I need to solve an eigenvalue problem in 2D as seen in the picture. I've tried the function NDEigensystem but reading its documentation it seems it has issues with ...
user avatar
  • 21
10 votes
2 answers
789 views

How can I generate a Swiss-Cheese type region and render it transparent?

I am trying to visualize a percolation model that is equivalent to a swiss-cheese where the holes are conducting. At some point, the size of the holes gets large enough for them to touch and a ...
user avatar
  • 101
3 votes
0 answers
75 views

Understanding `NeumannValue`

From this interesting question Reveal the formal PDE of FiniteElement ...
user avatar
5 votes
1 answer
224 views

Neumann boundary conditions are not satisfied

I am solving a system of 3 ODEs and I want to implement neumann BC (d/dx = 0 @x=0). However, the solution does not seem to obey neumann BC when parameter A1/A2/A3 is non zero, as I notice that the ...
user avatar
  • 105
7 votes
1 answer
319 views

Reproducing figure from paper on hydrodynamics

I am trying to solve Eqn. on Page 674 of https://www.nature.com/articles/nphys3667.pdf I shall quote the relevant paragraph : Next, we proceed to analyse the nonlocal response in a strip with ...
user avatar
  • 327
4 votes
0 answers
75 views

NeumannValue nonlinear pde?

Inspired by the highly interesting question Solving Burger's equation with NDSolve at large time I'll try to understand Finite-Element-solution for nonlinear pde in more detail: Burger pde $u_t(x,t)+u(...
user avatar
4 votes
1 answer
140 views

NDEigensystem with FEM: parasitic solutions

I am trying to find the eigensystem of a system of 3 coupled ODEs. Analytically, the system spectrum should have a gap at [-2M,2M] (except for the degenerate state with E=0, strictly at the middle of ...
user avatar
9 votes
4 answers
737 views

Solving Burger's equation with NDSolve at large time

I want to solve the following Burger's equation $$\partial_tu+\partial_x\left(\frac{u^2}{2}\right)=0,~~x\in[0,2\pi],~t>0\\u(x,0)=\frac{1}{3}+\frac{2}{3}\sin(x)$$ with mathematica. Here's my code: <...
user avatar
  • 193
2 votes
0 answers
40 views

Inactive form for PDE and symmetry

I would like to solve the following non-linear Poisson equation (as a toy problem for a more complicated problem) ...
user avatar
5 votes
1 answer
167 views

Coupled PDE using NDSolve

The problem is to study the solution of a biharmonic which can be decomposed into a coupled PDE system $$ \Delta f - \nabla f\cdot\Gamma_{1} = g \\ \Delta g = \nabla f\cdot\Gamma_{2} $$where $...
user avatar
  • 327
1 vote
0 answers
55 views

Documentation of `NDSolve`FEM`FEMNintegrate`

Where can I find detailed information concerning the "NDSolveFEM" package? Thanks!
user avatar
4 votes
2 answers
115 views

Using Neumann boundary conditions for the wave equation

I have the following code to solve the wave equation in 2D: ...
user avatar
0 votes
0 answers
155 views

Why is regioncentroid not giving correct results?

I am trying to calculate and plot the x-axis of a volume centroid for the region between zx-plane and a function squared $u(t,x,z)$ from time $t=15$ to $25$. The function is a numerical solution to a ...
user avatar
  • 43
3 votes
1 answer
81 views

How to stop simulation after a given model variable achieves certain value?

I would like to stop my simulation after a given model variable (say, plastic strain averaged over entire domain) achieves a given threshold value. Do you know how to do it? I'm supplying the MWE. How ...
user avatar
0 votes
0 answers
52 views

Why does NDSolveValue give such different answers depending on the "Method" used and without indicating an error? [duplicate]

The first two inputs below only differ in the "Method" used in NDSolveValue for the solution of the heat equation in a composite yet they give no error (the error about BCs and ICs is ...
user avatar
0 votes
0 answers
63 views

If or Piecewise dependent coefficients in NDSolveValue

This: but the following (placing the partials inside the If) does not. Any suggestions?
user avatar
5 votes
1 answer
135 views

Solving system of nonlinear PDEs

My aim is to solve a system of nonlinear PDEs arising in nonlinear elasticity. I am new to Mathematica so I started by modifying this example. I tried to change it to neo-Hookean solid. The resulting ...
user avatar
8 votes
3 answers
325 views

How to generate a mesh in an area with curves inside

I would like to know how to generate a mesh inside an area, and be able to find the original curve outline inside the area from the mesh. For example: There is a rectangle inside which there is a ...
user avatar
  • 83
3 votes
1 answer
112 views

Simulating a gaussian pulse for the wave equation

In the process of investigating diffraction of waves, I am starting with a simple problem consisting in injecting a gaussian pulse at the boundary x=0 of a square domain and then solving the wave ...
user avatar
  • 45
6 votes
1 answer
204 views

Solving 2D Landau-Khalatnikov equation & Poisson equation using finite element approach

I would like to solve Landau-Khalatnikov (LK) equation and Poisson equation using finite element approach to simulate ferroelectric hysteresis loop, electric potential distribution and electric ...
user avatar
  • 63
8 votes
1 answer
212 views

Quarter a given triangular meshregion

For a given , examplary simple, triangular meshregion ...
user avatar
8 votes
2 answers
128 views

How to do boolean operations between a large amount of regions

I want to do boolean operations between a large amount of regions. For convenience, I consider a simplified problem. The problem is as follows, digging out a large number of small hemispheres on the ...
user avatar
  • 165
2 votes
1 answer
78 views

NDSolve fails while solving PDE with Dancwerts BC

The following code runs with BC1 (Dirichlet Type). However, it fails for Dancwerts type BC1. ...
user avatar
2 votes
1 answer
91 views

Why does SolidMechanicsStrain calculated inside a module give strange results?

I am exploring the FE capabilities of Mathematica and trying a few solid mechanics problems with the aim of bringing them into my teaching. The problem is a simplified version of the coupled heat ...
user avatar
  • 3,524
4 votes
1 answer
213 views

System of 3 second order non linear differential equations

I wish to solve the following system of equations: $\frac{d^2f}{dr^2}- \frac{1}{r} \frac{df}{dr} = 2 f(r)\phi(r)^2$ $\frac{d^2\phi}{dr^2} + \frac{1}{r}\frac{d\phi}{dr} = \frac{1}{r^2} f(r)^2\phi(r) + \...
user avatar
  • 73
1 vote
0 answers
40 views

How does FindRoot decide if a solution has converged?

I am solving a 1D non-linear differential equation using the finite element method with NDSolve. From the documentation I understand that the equation is discretized and then solved with FindRoot, I ...
user avatar
  • 75
6 votes
1 answer
109 views

Solving a Fokker-Planck equation NDSolveValue

I want to solve the following Fokker-Planck equation: $$\partial_t p = \frac{1}{2}\partial_{xx}\left[\varepsilon^2p\right] + \frac{1}{2}\partial_{yy}\left[\varepsilon^2p\right] - \partial_x\left[(9x-x^...
user avatar
  • 73
6 votes
1 answer
139 views

Fast integration of ElementMeshInterpolation[]-functions

In this simplified example I consider a small FEM-mesh ...
user avatar
5 votes
2 answers
185 views

How to create cylinder pie using `ParametricRegion`?

I'm wondering that this simple definition of a cylinder pie doesn't work ...
user avatar
6 votes
4 answers
196 views

How to order the coordinates generated by ToBoundaryMesh counterclockwise?

The following code works for polygons. A square 4x4 is tried here: ...
user avatar
1 vote
0 answers
125 views

How to evaluate an Integral which has Interpolating functions

I am trying to evaluate an Integral which has products of Interpolating functions inside, using NIntegrate command. It gives a wrong answer. The code that I used for performing this task is given ...
user avatar
  • 181
0 votes
1 answer
88 views

Coordinates of mesh generated by Mathematica-FEM

MeshCoordinates function yields more nodal coordinates than expected. Can I extract the coordinates of vertices only. Here is an example of a square region with a course mesh to explain the problem. I ...
user avatar
1 vote
1 answer
72 views

Dirichlet condition from user-defined polygon

I would like to specify a Dirichlet condition from a polyhedron defined by a set of points. ...
user avatar
  • 145
3 votes
1 answer
82 views

The element mesh has insufficient quality

I am quite new at FEM. I was trying to create a triangular mesh of a rectangular region. I wanted to do something very basic: Discretize the domain using squares and then subdivide each square into ...
user avatar
  • 117
1 vote
0 answers
64 views

Finite Element Discretization of Differential Operator (FEM Programming)

I am pretty new to FEM. I want to try to discretize a PDE operator using FEM---in order to find approximations of the eigenvalues and eigenfunctions for example. I know I can try to use NDSolve or ...
user avatar
  • 117
5 votes
1 answer
157 views

How to impose Neumann boundary conditions describing quantum Hall effect?

I am trying to solve the following differential equation : $$ \nabla\cdot\left(\begin{pmatrix} c_1 & c_2 \\ -c_2 & c_1 \end{pmatrix}\nabla\phi\right) = 0 $$ on a rectangular domain [1,0]x[0,1] ...
user avatar
  • 327
0 votes
1 answer
101 views

2nd Order Regular Triangular Mesh on Rectangular domain

I want to create a mesh of 6 noded triangular elements ( 2 nd order element) on a rectangular domain as shown. (0,0) can be seen at left bottom corner with the whole mesh in the positive quadrant. I ...
user avatar
1 vote
1 answer
58 views

NDSolve or NDSolveValue for simple, 1D diffusion

Trying to solve a simple semi-infinite diffusion equation numerically. At t=0, the value at z=0 rises from 0 to cA02, and diffuses in the positive x direction. <...
user avatar
9 votes
1 answer
185 views

NIntegrate can't handle InterpolatingFunction produced by FiniteElement properly?

This is a problem comes out in the discussion here and I think it's worth posting a new question for it. Consider the following sample: ...
user avatar
  • 51.6k
3 votes
1 answer
180 views

Solution from NDSolve doesn't conserve a quantity that should be conserved

I am trying to solve Klein-Gordon equation : $$(\frac{\partial^2}{\partial t^2}-\frac{\partial^2}{\partial x^2}+1)\psi(x,t)=0$$ in a new coordinate system where $x\to y=\frac{x}{L(t)}$. Here is my ...
user avatar
1 vote
0 answers
43 views

Why do I see Part::partw error when using NDSolveValue?

I am using Mathematica 12.0. The present calculation is a simple "test case" to prove efficacy, but I am receiving an error I haven't seen before. e.g: ...
user avatar
  • 11
12 votes
1 answer
198 views

Smooth refinement for a merged 2D mesh

Thanks to @user21 response and FEMAddOns I have been able to create a multi-region mesh. I am trying to make a smooth transitional mesh refinement with respect to a ...
user avatar
  • 1,554
1 vote
0 answers
28 views

FEM: Parsing error for ∂ in NDSolveValue? NDSolveValue: No derivatives of dependent variables [duplicate]

I came across an error/inconsistency when using inactive operators in NDSolveValue, which could be a parsing error as well as ...
user avatar
2 votes
1 answer
70 views

How are variables uv initialized?

I am reading through the documentation for FEM programming, in particular the section for transient coupled PDEs, here. I do not understand how the variable uv is ...
user avatar
  • 6,114

1
2 3 4 5
25