Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options answers only not deleted user 4999

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

28 votes

Nonlinear differential equation: numerical solution

Introduction I think there are several questions on this site about ODEs of the form $$(x-a)^2 u''(x) = F(x,u,u')$$ with an initial condition at $x=a$. There is no general guarantee that solutions e …
Michael E2's user avatar
  • 245k
25 votes

How to improve this plot?

Interpolation error The overshoots are the unavoidable result of interpolation. NDSolve computes the values of u of the DirichletCondition to machine-precision accuracy and approximates the values o …
Michael E2's user avatar
  • 245k
21 votes

How to solve ODE with boundary at infinity

Spectral methods I present two general ways to approach a second-order linear BVP of the form $$\gamma(x)\, y''(x) + \beta(x)\, y'(x) + \alpha(x)\, y(x) + \varphi(x) = 0,\ y(0) = y_1,\ y(\infty) = y …
Michael E2's user avatar
  • 245k
20 votes

How to solve ODE with boundary at infinity

The finite element method can be used on this problem if we make a change of variables to convert the domain $[0, \infty)$ to a finite interval. I believe only MachinePrecision is available in FEM. …
Michael E2's user avatar
  • 245k
18 votes

ListContourPlot interpolation fails if x and y axes have different scales

I will address the case of an irregular grid. There are two or three ways to produce a pretty good looking plot, through rescaling/FrameTicks or through interpolation. The ticks method involves resc …
Michael E2's user avatar
  • 245k
18 votes
Accepted

representation of custom deformation on a meshgrid

You have to create your own mesh and you have to convert your u and v to mesh interpolations. (In the example in the documentation, NDSolveValue does this itself in constructing uif, vif.) Example: …
Michael E2's user avatar
  • 245k
17 votes
Accepted

How to convert a surface into a solid

Method 1: Construct mesh elements manually We can triangulate a periodic quad-lattice on the surface: n = {180, 20}; (* number of points in each direction *) pts = Table[ g[4. Pi/n[[1]] t, 2. Pi/ …
Michael E2's user avatar
  • 245k
15 votes

Getting rid of spikes in the PDE solution

There is the as yet undocumented FEM function (see this answer, or read the user-interface with Definition after clearing the ReadProtected attribute) ElementMeshPlot3D[valuesOnMeshCoordinates, eleme …
Michael E2's user avatar
  • 245k
13 votes

Error when using NDSolve for $\epsilon y'' - y' + y^2 = 1$

First, there are multiple solutions. Second, the one shown on math.SE has such a narrow range of feasible starting initial conditions fo $\epsilon = 1/10$ that the default shooting method in NDSolve i …
Michael E2's user avatar
  • 245k
12 votes

Problem in sharpness of Heaviside Function

In NDSolve you can only approximate a discontinuity in the spatial domain by interpolation over a discrete set. In FEM, this is the only option and the order of interpolation is restricted to 1 or 2. …
Michael E2's user avatar
  • 245k
11 votes

Discretizing regions with pointy boundaries

fn = {-Cos[u] (1.2 - Cos[(u - Pi)/2]^6) (0.2 + Cos[10 u]^10), Sin[u] (1.2 - Cos[(u - Pi)/2]^6) (0.2 + Cos[10 u]^10)}; plot = ParametricPlot[fn, {u, 0, 2 Pi}, PlotPoints -> Round[2 Pi (Sqrt@M …
Michael E2's user avatar
  • 245k
11 votes

Plot a partition of the sphere given vertices of polygons

An FEM element-meshing approach. The quality is controlled by the option "MaxCellMeasure" -> {"Length" -> 0.05}. Note that the VertexNormals -> -coords option causes the polygonal sphere to be smoot …
Michael E2's user avatar
  • 245k
10 votes

Kernel quits without error in NDSolveValue

I began this thinking of adding a comment to the answer by bbgodfrey, who points out mathematical fixes to the OP's problem. But each idea led to another test and another idea. Aside from the uncere …
Michael E2's user avatar
  • 245k
10 votes

FEM giving " ... is not a polynomial error"

A small remark on the error: CoefficientArrays::poly: -(1 + 3.27432/(1 + 0.092 Ccu)^2) Ccu11498 - (3 Ccu11499)/200 + 1.38465 Ccu$11500 is not a polynomial. >> First note that Ccu is your depende …
Michael E2's user avatar
  • 245k
10 votes
Accepted

Transforming a region obtained with RegionPlot

The OP's updated example The OP's example exhibits some numerical problems about which the fastidious ToElementMesh and even some System functions complain. Since the OP is dealing with the System` R …
Michael E2's user avatar
  • 245k

1
2 3 4 5 6
15 30 50 per page