14 votes
Accepted

Balanced flux in FEA using NeumanValue

Update (Steady-State Solution) I think the fundamental issue is that you are over constraining your system. Whether you are solving the "heat equation" or not, your operator has the same ...
Tim Laska's user avatar
  • 16.2k
13 votes

periodic boundary conditions and NDEigensystem

I think here is another way to do it. For this we use the low level FEM functions. First we have a utility function that converts a PDE specification to a discrete version. ...
user21's user avatar
  • 39.1k
13 votes
Accepted

Reciprocating flow in a channel over a heated surface

We can solve this problem with method proposed on my page. Solution1. We use nondimensional form of equations with scale d and $t_s = d^2/(k_f/(c_p \rho))$. We ...
Alex Trounev's user avatar
12 votes
Accepted

Laplace's equation in spherical coordinates with Neumann b.c

Two issues here. First of all, you've chosen 100 to approximate Infinity, which is way too large in this case. Something like <...
xzczd's user avatar
  • 63.8k
12 votes
Accepted

Why DSolve solution to this PDE does not match NDSolve solution?

The "Polar" coordinates programmed into Mathematica implicitly assume that the $\theta$ coordinate runs between -π and π, not between 0 and 2π as your ...
Michael Seifert's user avatar
11 votes

periodic boundary conditions and NDEigensystem

Periodic potentials and Bloch waves This is a completely different approach, using functionality that was already present in Mathematica version 8. I'm posting this because it's quite robust and also ...
Jens's user avatar
  • 96.8k
11 votes

Mathematica vs. MATLAB: why am I getting different results for PDE with non-constant boundary condition?

As @Henrik Schumacher points out, you have a very high aspect ratio (1000:1) domain. It is always conducive to conduct a dimensional analysis of your system. In the OP case, the dimensional analysis ...
Tim Laska's user avatar
  • 16.2k
11 votes
Accepted

NDSolve for Laplace equation on disk is not working

3 issues here. You've mixed up polar coordinates and Cartesian coordinates. Since the equation is defined in polar coordinates, the shape of domain of definition is no longer a ...
xzczd's user avatar
  • 63.8k
10 votes
Accepted

periodic boundary conditions and NDEigensystem

In the apparent absence of a direct solution using NDEigensystem to the periodic problem posed in the question, ...
bbgodfrey's user avatar
  • 60.8k
10 votes
Accepted

Inhomogeneous Neumann boundary conditions for diffusion equation

Updated Background This is a more detailed response to a comment from the OP about the Neumann Value specification. The following is how I like to think of it. I was initially confused on how to ...
Tim Laska's user avatar
  • 16.2k
10 votes

Stokes equations in 2D with traction boundary conditions

As mentioned user21 for setting traction boundary conditions we need to know normal and tangent to the surface which is subjected to loading. On the inner surface ($r=a$) for the unit tangent vector ...
Oleksii Semenov's user avatar
10 votes

Reciprocating flow in a channel over a heated surface

It seems that the main challenge in this problem is Dirichlet BC which should be switched periodically on $x=0$ and $x=L$. I don't know whether it possible to switch BC inside ...
Oleksii Semenov's user avatar
9 votes
Accepted

DSolve, Partial equations, The arguments should be ordered consistently

DSolve is unable to solve this problem without assistance. Begin by solving the PDE only, ...
bbgodfrey's user avatar
  • 60.8k
9 votes
Accepted

Help with 3D FEM calculation of a heat equation

Solution in the case when the Neumann condition is given at all boundaries where possible ...
Alex Trounev's user avatar
9 votes
Accepted

Solve an ODE with parameters in a boundary condition

This question is particularly interesting to me, and I have a package that may be helpful to you here. This particular equation is: Fourth order Linear Inhomogeneous in the independent variable ...
SPPearce's user avatar
  • 5,613
9 votes
Accepted

Laplace equation with robin boundary conditions

Using DSolve V 12.1 can solve this exactly. ...
Nasser's user avatar
  • 137k
9 votes
Accepted

Numerically solve PDEs with constraints and without boundary solution

Linear PDEs typically are solved by the method of characteristics. For the PDE in the question, the ODEs of the characteristics are ...
bbgodfrey's user avatar
  • 60.8k
9 votes

Laplace's equation in spherical coordinates with Neumann b.c

In a previous answer 240190, I showed how one could use anisotropic meshing to add a DirichletCondition at "infinity" for a 1D problem. In this answer, I ...
Tim Laska's user avatar
  • 16.2k
9 votes
Accepted

How can we apply specific boundary conditions with NDEigensystem?

"Different equations for different region" is not directly supported by NDSolve, NDEigensystem, etc. (at least for now)...
xzczd's user avatar
  • 63.8k
8 votes
Accepted

Mathematica gets stuck trying to solve a simple differential equation

This does not get stuck, it returns right away ClearAll[x,y] z=1/1000; DSolve[{1+x-x^2==D[2/(y[x]*(((1+ z x)/(2*y[x]))^2+1)),{x}],y[0]==0},y[x],x] But your input ...
Nasser's user avatar
  • 137k
8 votes
Accepted

Imposing boundary condition and normalization on an ODE

You can solve your problem by introducing a second ode (defining the antiderivative): ...
Ulrich Neumann's user avatar
8 votes
Accepted

Convergence of PDE solution using method of lines

There is a simple sign error in the set up I would think; the left NeumannValues needs a negative sign: ...
user21's user avatar
  • 39.1k
8 votes
Accepted

Multiple Boundary Conditions for NDSolve in mesh with multiple interfaces

If I understand the question right, you could use boundary markers like so: ...
user21's user avatar
  • 39.1k
8 votes

Balanced flux in FEA using NeumanValue

Too long for a comment. An easy way to generate a high quality mesh is to replace the Implicitegion with Cubuid and make use of ...
user21's user avatar
  • 39.1k
8 votes

Laplace's equation in spherical coordinates with Neumann b.c

One can also consider the 3D statement of the problem. Solution of a such linear problem is not so time consuming nowadays. For mesh generation let's take advantage of ...
Oleksii Semenov's user avatar
8 votes
Accepted

Integrating a ParametricNDSolve solution whose initial conditions are determined by another ParametricNDSolve function?

The problem can be solved using ParametricNDSolve twice, but a simpler approach is to use ParametricNDSolve once together with <...
bbgodfrey's user avatar
  • 60.8k
7 votes
Accepted

Solution of nonlinear system with boundary conditions

There is a solution satisfying all the boundary conditions for L = 2.665. I'll show you how to build this solution. First, we solve explicitly the first and third equations for the derivatives, we ...
Alex Trounev's user avatar
7 votes

Coupled elliptic pdes, FEM solver

Here is a partial solution; especially to the issues of @bbgodfrey 's answer. Let's look at the fourth-order ODE: ...
user21's user avatar
  • 39.1k
7 votes

periodic boundary conditions and NDEigensystem

Version 11.0 has an additional boundary condition PeriodicBoundaryCondition. With this you can then use with NDEigensystem: Here is an example with an unsymmetrical ...
user21's user avatar
  • 39.1k
7 votes
Accepted

Eigenvalues of a fourth-order ODE

This problem can be solved symbolically, although perhaps not with DEigensystem. Instead, begin with DSolve. ...
bbgodfrey's user avatar
  • 60.8k

Only top scored, non community-wiki answers of a minimum length are eligible