Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [finite-element-method]

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

0
votes
0answers
57 views

NDSolveValue for Laplace equation not converging to analytic solution

I'm solving Laplace equation $\nabla^2 \phi = 0$ with BC's $\phi_x(x=\pm 1) = 0,\, \phi_y(y=-h) = 0$ with a specified BC along the circular arc $x^2 + (-1 + y)^2 = 4$, which I call $\Gamma$ (so the ...
4
votes
1answer
101 views

Recycling solutions of multidimensional NDSolve

Dear wolfram community, I hope my problem is clear and easy to solve. I have already solved the following heat equation over a domain: ...
2
votes
1answer
59 views

Heat Equation with Mathematica Neumann / Dirichlet Conditions

This is the question I am trying to solve After fours hours of research and 61 attempts (just today) on how to do this, I'm asking for help. I've been in hospital and am now trying to catch up on ...
4
votes
1answer
56 views

Multiple Boundary Conditions for NDSolve in mesh with multiple interfaces

Here is my problem: I want to solve a Laplacian equation in a 2D geometry with multiple interfaces, each interface presenting a different boundary condition. As for an example, I am working on a ring ...
9
votes
2answers
98 views

Distinguish between inner and outer boundary in MeshRegion

For example, this is a 2D MeshRegion with one (or more) holes in it: ...
2
votes
1answer
50 views

How to set the NeumannValue conditions when the conditions are Discrete points?

For example i can use Piecewise when the condition is a Continuous function ...
0
votes
2answers
160 views

Solving the 3D Poisson equation on the surface of a cube using a relaxation method

The code below is from another question asked by someone else about solving the 3D Laplace equation for truncated octahedron in a cube matrix, How to solve Laplace equation in 3D?. I wanna know, how ...
7
votes
1answer
183 views

How to solve this 2nd-order ODE with singularity?

I tried solving the eigenvalue problem of a 2nd-order ODE $$[b^2(k-2)^2y^2-2b(k-2)(1+2ky)+4k^2+b^2(k-2)3y]f(y) \\- 3b(3by-2)f'(y)\\-(3by-2)^2f''(y)=\lambda f(y)$$ with ...
9
votes
1answer
158 views

FiniteElement v.s. TensorProductGrid: which is reliable for Schrödinger equation with periodic b.c.?

This is a problem comes up in the discussion under this post and I think it's worth starting a new question for it. I suspect the underlying issue is the same as in this post, but not sure. Consider ...
4
votes
4answers
309 views

Inhomogeneous Neumann boundary conditions for diffusion equation

I am new to Mathematica and I have a problem specifying Neumann boundary conditions in diffusion equation. The best result I managed to get is this. ...
3
votes
1answer
141 views

Eigenvalues of a non-Hermitian complex periodic potential

I have an eigenvalue problem: $$-\frac{d^2}{dx^2} \psi(x) +V(x)\psi(x) = E \psi(x)$$ where $V(x)$ is a complex periodic potential: $$V(x) = 4[\cos^2(x) + i 0.3 \sin(2x)]$$ It has been claimed that ...
5
votes
1answer
70 views

How to set a NeumannValue on a given ElementMarker on the boundary of a mesh?

How can one apply a NeumannValue on an ElementMarker on the boundary of an ElementMesh for a ...
5
votes
1answer
115 views

Help with 3D FEM calculation of a heat equation

I want to solve a heat transport problem in a long tube where 4 coolings rods are inserted. Fluid flows down axially, and there's radial heat conduction. First, the shape is defined: ...
8
votes
0answers
208 views

From where to learn finite element method?

Can anyone reccomend me a book or site for learning finite element method with mathematica, besides wolfram language official site, https://reference.wolfram.com/language/FEMDocumentation/tutorial/...
5
votes
0answers
112 views

NDSolve post-processing: Calculate the flow over a FEM-boundary

I'm trying to calculate the heat loss from buried pipes with NDSolve`FEM. For this I set Dirichlet conditions at the model top and bottom and temperature dependant Neumann conditions at the contact ...
3
votes
2answers
51 views

Problems using DensityPlot when solving Laplace's equation

I am trying to solve Laplace's equation in 2 dimensions with potencial boundary conditions at the edges of an external square and an internal circle. Everything seems to work fine until the point ...
3
votes
1answer
76 views

How to control boundary markers for overlapping FEM meshes?

I am trying to create FE meshes from vector or bitmap images and have come across the following issue. This is best shown using the following simplified code. ...
4
votes
1answer
132 views

How to create meshes with multiple regions from 2D images?

I would like to import 2D images to Mathematica and to use them to create meshed regions which can then be used for FEM. I create the images in Adobe illustrator so can either import a vector based ...
3
votes
2answers
98 views

Convergence of PDE solution using method of lines

I'm afraid that this will turn more into a math question rather than a Mathematica one. I'm trying to solve the equation $$\frac {\partial n}{\partial t}=D\frac {\partial^2n}{\partial x^2}$$ $$\...
4
votes
2answers
106 views

How to make a frustum of a cone

For finite element purposes I need a frustum of a cone with a finite wall thickness, i.e. a tapered pipe. To make a cone is easy ...
0
votes
0answers
46 views

How to create surface mesh from a given 2D mesh toplogy?

I would like to convert a very easy(examplary) mesh(2D) ...
6
votes
1answer
105 views

ElementMesh from ImplicitRegion cuts corners of region

I'm trying to define a region within a cell and below a level set of a function using ImplicitRegion and ToElementMesh. Here I ...
3
votes
2answers
132 views

Schrödinger equation for a hydrogen atom and lack of memory

I'm trying to solve the Schrödinger equation for a hydrogen atom in the Cartesian coordinate system. This is my code ...
4
votes
1answer
105 views

MeshRefinementFunction for region gives error

I would like to refine a mesh within a given path/volume, that is specified by the MeshRefinementFunction option given in ToElementMesh[]. For starting i took a simple 3D MeshRegion of a Tetrahedron <...
4
votes
1answer
219 views

How does this Mathematica code work?

I am trying to work with a simulation of Brain Tumor growth and I was fortunate to get a very great example at http://community.wolfram.com/. However, I need clarifications on some of the code. I ...
4
votes
0answers
175 views

Solver for unsteady flow with the use of the Navier-Stokes and Mathematica FEM

There are many commercial and open code for solving the problems of unsteady flows. We are interested in the possibility of solving these problems using Mathematica FEM. Previously proposed solvers ...
6
votes
1answer
126 views

2D interpolation of function with dependent interpolation border

My problem is to compute $$\int\limits_{x_{min}}^{x_{max}}\int\limits_{y_{min}}^{\sqrt{x^{2}-a^{2}}}W(x,y)g(x)\ dx\ dy$$ Because $W$ have highly oscillatory 2d complex numeric integral inside, dumb ...
3
votes
1answer
56 views

How to change the grid numbers in x direction when solving a 2D-PDE?

I have found an example in the reference document. I want to change the grid numbers. Any one can help? The code is below. ...
3
votes
1answer
61 views

Does `ElementMeshInterpolation` work for arbitrary orders?

Mathematica will not, in general, do arbitrary order interpolation on unstructured grids: ...
7
votes
2answers
168 views

ToElementMesh ignores Boundaries and MeshRefinemet

I'm building a mesh of a pit storage in Mathematica which I then export to another FEM-software. I follow the workflow for creating a ElementMesh from the documentation, but it won't work in the way ...
3
votes
1answer
82 views

Running Abaqus with AceGen

I am an AceGen/AceFEM user, but I think codes generated with AceGen could be more useful if people accustomed to Abaqus could also use them. The AceGen help claims that generation of Abaqus codes is ...
1
vote
1answer
89 views

Mesh does not have a valid dimension as a plotting domain in 11.0

In Version 11.0, it appears that one cannot plot over a mesh. The following code worked in Version 10.2: ...
4
votes
0answers
76 views

Analyzing MethodOfLines

In this example the wave equation ...
3
votes
0answers
113 views

Postprocessing of FEM: extremely slow speed of NIntegrate

I've gone through the documentation for NDSolve FEM. There are quite a lot tips and techniques for accelerating NDSolve, and only quite few tips for post processing. Somehow I found out that the ...
3
votes
1answer
80 views

Large residual error when solving a 2D BVP with NDSolve and Finite Element Method

I'm trying to solve a simple PDE (an inhomogeneous Helmholtz equation) in a disk domain with center at $(1,0)$ and radius 0.5 using the following commands ...
6
votes
1answer
245 views

The rectangular region composed of two triangular regions contains a pde connecting the bc of the first and the second kind

I'm going to solve the Laplacian equation of the electrostatic field, which consists of two triangular regions, a rectangular region, a square, and on the intersection of the two regions of $$y=x$$, ...
-3
votes
1answer
190 views

Surface Energy Calculation [closed]

I have the following problem which is shown as: The field variable $d$ is assigned a unit scalar value within radius $r = 5$ at the center of a square plate. The multi-field equations are solved, $...
5
votes
1answer
120 views

How to generate a GraphicsComplex using a quadratic approximation function?

The code below illustrates a finite element mesh composed by quadratic 9-node elemets. I'm using the GraphicsComplex and Polygon ...
2
votes
1answer
97 views

Boundary values in PDE using NDSolve - different outputs whether v.10.2 or 11.3

I'm trying to solve the following PDE $$\frac{\partial n(t,x)}{\partial t}=f(t,x)\frac{\partial^2n}{\partial x^2}+\frac{\partial n}{\partial x}\frac{\partial f}{\partial x}$$ with the boundary ...
8
votes
3answers
177 views

Trouble meshing a Corbino disc

I am trying to simulate current flow using FEM through this particular device (a Corbino disk) and I have difficulties generating the mesh for it. Here is the region: ...
4
votes
1answer
84 views

How to solve a PDE with a function known only in the mesh?

I need to solve a PDE using FEM but it involves a function known only on the points of the mesh. I mean, I do not have a formula for such function. I want to the delay the evaluation for that function ...
4
votes
2answers
145 views

Replace solution of NDSolve into another NDSolve

I was wondering if it was possible to replace the solution of L'[x] (which is dependent on r[x], ...
3
votes
3answers
120 views

Volume of HexahedronElement with non-coplanar faces

I would like to calculate the volume of ElementMesh made of HexahedronElement. Even though ...
0
votes
1answer
57 views

Specifying different Neumann boundary values on different parts of a boundary

In Mathematica PDE solvers (say by FEM), the specification of Neumann boundary conditions is by specifying NeumannValue[..] (see Mathematica documentation, and also ...
0
votes
1answer
60 views

NDSolveValue in NDSolveValue

I would like to implement a sort of Euler explicit manually. I have this code ...
2
votes
3answers
104 views

Using DSolve and NDSolve for 1D steady-state diffusion equation with a reaction term

I am trying to solve for a 1D steady-state diffusion equation (Fick's Second Law/Heat Equation) with a reaction term. I wanted to compare using both DSolve and <...
2
votes
0answers
76 views

Using of FindMinimum in constrained problem

There is a constrained optimization problem based on finite element method. We should find the optimal distribution of density inside the our region for minimazing the energy of deformation. The ...
11
votes
3answers
655 views

Solve Laplace equation in Cylindrical - Polar Coordinates

Hey mathematica stackexchange!! I've got a (possibly stupid) problem. I've tried many things to no avail, and I've read every post I've found on Laplace's equation. Background: I'm trying to find the ...
1
vote
1answer
104 views

Numerical solution of PDE - Liouville's equation

I'm trying to solve Liouville's equation: $\frac{\partial\rho}{\partial t}-f(q)\frac{\partial\rho}{\partial p}+p\frac{\partial\rho}{\partial q}=0$ I believe this should be solvable given an initial ...
5
votes
1answer
51 views

How to define element size with ToBoundaryMesh?

I am trying to make a mesh for finite element analysis with shell elements: I have to define 2D finite elements in 3D space. My code is: ...