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
1 vote
1 answer
48 views

How to unite the region of ParametricPlot and set up the mesh for FEM?

I have used the ParametricPlot to plot the sector of the disk and use Show to combine them in one picture, however it cannot be ...
  • 65
2 votes
1 answer
50 views

How to extract gauss coordinates in AceGen/ AceFEM?

I am trying to implement a 2D turbulence problem with the model of Spalart-Allmaras. Therefore, I need to extract the global gauss coordinates to define parameter 'd' which stands for the distance to ...
3 votes
0 answers
45 views

How to transform the default coordinate when set up the mesh with FEM method?

I want to establish the electromagnetic field of the motor based on the finite element method, because the governing equations are different in different regions, so we need to first build the shape ...
  • 65
5 votes
1 answer
204 views

Inaccuracy for FEM for 3D Heat Equation

I'm simulating the heat transfer within a cylindrical rod, with external heating from its sides. ...
  • 103
5 votes
1 answer
108 views

Mesh `Cylinder[{{0,0,0},{0,0,1}},1]` with inner boundary `x=y=0`

In a meshed cylinder Cylinder[{{0,0,0},{0,0,1}},1] I need to specify DirichletConditions along ...
1 vote
0 answers
47 views

NDSolve stops solving past a certain time

This is a continuation of the post I've made Unable to solve Delay PDEs Error in Boussinesq Approximation. I apologise if I shouldn't have posted a seperate question for this but I think that the ...
  • 103
3 votes
1 answer
81 views

Steady state fluid flow for downward flow past an obstacle

I was attempting to simulate fluid flow past a circular obstacle. The following is the code which I used ...
1 vote
0 answers
69 views

Unable to solve Delay PDEs Error in Boussinesq Approximation

I'm trying to solve the set of equations below describing the flow of a pot of water being heated slightly. The equations are 2D axisymmetric in nature. ...
  • 103
3 votes
1 answer
45 views

AceGen/ AceFEM: Wrong number of nodes?

I am trying to create an element T1 (linear triangle) to solve the steady, incompressible Navier-Stokes equations. Therefore, my SMSTemplate command reads as follows ...
1 vote
1 answer
87 views

Periodic boundary condition conflicts with DirichletCondition?

I want to solve a simple diffuse equation in a cylinder. $\nabla\cdot(\hat{c}\nabla\rho_P)=0$ $\rho_P(x,y,\theta)==0,\sqrt{x^2+y^2}=R$ $\rho_P(0,0,\theta)==1,\sqrt{x^2+y^2}=0$ $\rho_P(x,y,2\pi)=\rho_P(...
4 votes
2 answers
274 views

Solving PDE with Dirichlet, Neumann and Boundary conditions

I am trying to solve the following PDE: $$ u_{xx} + u_{yy} = \begin{cases} - \cos(x) \quad -\pi/2 \leq x \leq \pi/2, \\ 0 \quad \text{otherwise} \end{cases} $$ The domain is $\Omega = [-\pi,\pi] \...
  • 141
3 votes
1 answer
91 views

Message Text not Found in FEM Model

I'm trying to solve for the heat transfer in 2D within a fluid. The geometry I'm using is a rectangle of water heated from the bottom. The code I'm using is as follows: ...
  • 103
3 votes
0 answers
115 views

FEM code working well in v.12.1, has warning in v.13, and not working in v.13.2.1

Let us consider sound in a glass. Numerical model has been described here. FEM code is given by ...
  • 38.5k
0 votes
0 answers
56 views

PDE - The minimal damping factor of 1/10000 has been reached, NDSolveValue: PDESolve could not find a solution

I am trying to find a solution to a system of partial differential equations using Mathematica. $$ \begin{align} D_{e}\frac{\partial^{2}C_{A}}{\partial r^{2}}+\frac{D_{e}}{r}\frac{\...
  • 1
0 votes
0 answers
59 views

How to solve 2 coupled PDEs with inner boundary condition?

I want to solve 2 coupled PDEs with inner region boundary conditions. Diffuse equation There are 2 kinds of particles in my system, $p$ and $a$. Their diffusion equations are as follows: $\hat{D}=\...
5 votes
1 answer
315 views

How can I solve a three-dimensional Gross-Pitaevskii equation?

I want to solve a three-dimensional Gross-Pitaevskii equation with an uniform potential. The related papers are Emergence of a Turbulent Cascade in a Quantum Gas and Synthetic dissipation and cascade ...
  • 177
0 votes
0 answers
33 views

How to plot solution and approximate solution in one graph?

I want to solve a BVP $y^{\prime\prime}(t)+y^{2}(t)-t^{4}-2=0$, with BCs $y(0)=0, y(1)=1$. Solving $x^{\prime\prime}=0$ with the BCs, we get the initial approximation $x_{0}=t$. The exact solution is ...
1 vote
1 answer
46 views

CPU time in iteration process

Let $Tx=\frac{x}{2}$ for all $x\in[0,1]$. Let $x_{0}\in[0,1]$ and set an iterative sequence $\{x_{n}\}$ by the method $x_{n+1}=Tx_{n}$. Now if $x_{0}=0.8$, then I get a convergent sequence towards the ...
4 votes
2 answers
175 views

Mesh region from mesh edges only

I have a collection of lines ordered by pairs of points, as below, and wish to get a MeshRegion from them, with the mesh edges being the given lines. (That is, the ...
3 votes
0 answers
54 views

How to make gaussian pulse move using Boundary Conditions (one spatial dimension)?

I'm trying to solve a system of normalized coupled PDE's to model Raman scattering. Essentially, a gaussian light pulse of 300ps duration enters the raman active medium at ζ = 0 which then drives the ...
2 votes
2 answers
205 views

Symbolic solution for Laplace equation with pure Neumann b.c. and constraint at a point

Starting problem: $$ \begin{cases} \nabla^2 f = 0 & \text{on} \; \Omega \\ \frac{\partial}{\partial\mathbf{n}} f = y\,n_x - x\,n_y & \text{on} \; \partial\Omega \end{cases} $$ with $\Omega \...
  • 4,402
1 vote
1 answer
144 views

Post-process NDSolveValue result

For example, after solving the Poisson equation $-\nabla^2 T = 1$ on the unit circle using NDSolveValue and the following code ...
  • 479
0 votes
0 answers
65 views

Wrong Eigenfunctions with NDEigensystem because of discontinuities

I'm trying to solve a 1D Photonic Crystal with PeriodicBoundaryConditions and a step function permittivitty but even if I get the proper band diagram my eigenfunctions don't correspond to the ones ...
2 votes
1 answer
91 views

How to access implementations of MaterialModel?

In the documentation for Hyperelasticity there is an example of the MaterialModel for NeoHookean and the St Venant Kirchoff models. These are very useful in helping develop ones own materials models. ...
  • 3,683
3 votes
0 answers
42 views

Decomposing an eigenfunction of helmholtz equation into plane waves

I have defined a region and found the eigenmodes of the 2D Helmholtz equation in it: ...
4 votes
1 answer
287 views

FEM - Linear grid covering a curved shape

I have a disk (or any other smooth curve) and wish to define a grid of squared cells everywhere, except for the boundary where they should be right triangles or pentagons with three right angles. In ...
7 votes
2 answers
298 views

How to use MMA to solve the minimal surface?

There is a great old post, but since MMA greatly improves the ability of solving differential equations, especially the Region can be used to define the range of variables. So I ask it again. As the ...
  • 25.3k
5 votes
1 answer
56 views

mesh / region creation in unit meters or mm:

How can we know the unit of mesh or create a mesh in specified length units: such as, for example I have: ...
  • 703
9 votes
2 answers
271 views

How do I pose Neumann boundary condition to suppress particles flux into zero point?

This is continuation from my previous post How to ensure for a solution of NDSolve to be positive? [https://mathematica.stackexchange.com/questions/278777/how-to-...
3 votes
1 answer
109 views

Complex equations: NDSolveValue / FEM,

So, I am trying to solve a simple problem using the FEM method. The distribution of Voltage over a region, The region is, ...
  • 703
5 votes
2 answers
230 views

Meshing an irregular domain using quads to solve conjugate heat transfer problem

I am trying to mesh the following domain to solve a heat transfer + fluid flow problem: The continuity+momentum equations are to be solved in $ABGH$, while the energy equation is to be solved across ...
  • 297
5 votes
1 answer
104 views

Max cell size: cannot change the size,

I have the following mesh ...
  • 703
3 votes
1 answer
45 views

Resolving of internal boundaries when using DistMesh generator

Mesh generator ToElementMesh allows to resolve internal boundaries of the domain to be tesselated: ...
1 vote
2 answers
135 views

Solving an ODE and a PDE

I am trying to solve coupled sets of (partial) differential equations. For my ODE, I use ...
  • 749
2 votes
1 answer
82 views

How to specify derivative boundary conditions for the gradient to be normal to the boundary?

I'm currently modeling an electric field with 2 charges. To do so, I use NDSolveValue to solve a Laplacian with 2 Dirichlet conditions on the voltages of the ...
3 votes
1 answer
95 views

Running of mesh generator DistMesh under version Mathematica 13.2

I am trying to run the element mesh generator DistMeshfrom FEMAddOns package by using version Mathematica 13.2 under Ubuntu 20.04. ...
1 vote
1 answer
106 views

Region Holes outer surface

I have a following code: ...
  • 703
2 votes
1 answer
60 views

Boundary of mesh gives non uniform result

I wish to extract a boundary mesh but for some reason the Frontier option only works on a portion on it: ...
0 votes
0 answers
51 views

Incorrect eigenvalues obtained from NDEigensystem

I have a matrix H1 given by H1[kx_, ky_] := {{0, kx + ky}, {kx - ky, 0}}; and H2 which ...
  • 749
0 votes
0 answers
65 views

Finding eigensystem using NDEigensystem

I am trying to calculate eigensystems for a matrix Ap, which I have provided an example of which in this thread. The matrix in general has a dependency on a ...
  • 749
0 votes
0 answers
44 views

Stitch 2 diffusion equations together at the boundary

I wanted to stitch 2 diffusion equations together. Here, n1 and n2 are solved in the domain {x,-1,1}, and I wanted to impose: n1[1,t] = n2[1,t] and D[n1(x,t),x] = -D[n2(x,t),x] at x=1. At x=-1, I am ...
  • 93
3 votes
1 answer
72 views

Obtain the coodinates of boundary mesh with particular mesh marker

This is a very simple question, however, I haven't been able to find straight forward documentation for this. I have a region that I have converted to an element mesh (which we can visualize with '...
  • 93
6 votes
2 answers
689 views

NDSolve very slow on 2D heat equation

I am trying to solve the 2D heat equation $$ \begin{cases} u_{t}-u_{x x}-u_{y y}=f \\ u(0, x, y)=\sin (2 \pi x) \sin (2 \pi y) \\ u(t, 0, y)=0 \\ u(t, x, 1)=0 \\ u_{x}(t, 1, y)=2 \pi e^{-t} \sin (2 \...
1 vote
0 answers
79 views

How can we enhance the performance of `NDEigensystem`?

I am trying to reproduce eigenvalues in Tabl2 II in this paper (also available on the arxiv) for B=-12 but the results are slightly different from those in the ...
4 votes
1 answer
297 views

Implementation of FEM to steady-state coupled fluid flow and heat transfer

This is a steady-state conjugate heat transfer problem (the time-independent version of this problem). The problem is conjugate as the energy equation is being solved in thermally connected solid and ...
  • 297
2 votes
0 answers
67 views

Numerical instability when using NDSolve to simulate phase separation

I'm using NDSolve to simulate the following model of phase separation: where rho_T=rho_1+rho_2. The term with chi causes rho_1 and rho_2 to repel each other. However, there is a numerical instability ...
  • 43
2 votes
0 answers
93 views

Implementation of Neumann-like boundary condition

If we wish to solve an elliptic PDE, say $\nabla^2\phi=\text{given}$, on a domain $\Omega$ with Neumann boundary conditions, $\hat{\mathbf{n}}\cdot \nabla \phi\Big|_{\partial \Omega}=\text{given}$, ...
4 votes
1 answer
77 views

Finite Element analysis: distribution of sine wave over a distance

I am trying to solve the following one-dimensional problem: (to better understand and extend the FEM for a more complex problem), ...
  • 703
1 vote
1 answer
64 views

Neumann b.c are not satisfied in NDSolve PDE

I am solving a PDE (p[x,t]) with 1 spatial dimension {x,-10,10} and 1 time dimension {t,0,100}. There is an external function, U. The code reads ...
  • 93
7 votes
1 answer
238 views

Modelling heat transfer in periodically reversing flow

This is a heat transfer problem, which involves reciprocating (fully-reversing) fluid flow over a heated block of solid. The objective is to determine the temperature field in the solid and the fluid ...
  • 297

1
2 3 4 5
28