10
votes
Accepted
How do I simulate an open end?
The problem you describe, how to prescribe non-reflecting
or absorbing boundary conditions when solving partial differential
equations (PDE) has been extensively studied. For complex (e.g. nonlinear)
...
10
votes
How to solve a second order differential equation (diffusion) with boundary conditions using Python
I have found that I must keep the value of dt near dx or the results become unstable
This behavior you have noticed is known as the Courant–Friedrichs–Lewy (CFL) condition. Indeed, there are ...
9
votes
Accepted
FEM: Possible to have boundary conditions "inside" the domain?
The solution of the equation you are looking for is in the space $H^1$ of functions that have one weak derivative, but in 2d and 3d, this does not imply that the solution is in fact continuous. As a ...
8
votes
Accepted
Do the class of PDEs that lack initial conditions have a name?
Such problems (sometimes called lateral Cauchy problems) are in general not well-posed (meaning they either lack a solution, or there are infinitely many of them, or the solution is unstable under ...
8
votes
Accepted
Transparent boundary conditions for finite element simulation of TDSE
Kirill's answer is a good method but it is hampered that the fact that you need to tune it to a specific range in energy, so it is not appropriate if you have a broad-band wavepacket you need to ...
8
votes
Accepted
Symmetric boundary condition
For the sake of simplicity let me slightly change your notation. Let $u, v, w$ be the components in the $x, y, z$ directions of a true (polar) vector, and $y=0$ the symmetry plane. For a true vector, ...
8
votes
Accepted
Solving Poisson equation with current BC using FEM
It is standard procedure for general case like that. You can enforce condition for electrode by Lagrange multipliers,
$$
L(u,\lambda) = \int_\Omega \sigma u_{,i} u_{,i} \, \textrm{d}V - \int_{\...
7
votes
Solving a linear equation system with pure Neumann condition
Pure Neumann problem is unique up to a constant. My two favourite solution strategies:
Modifying the equation $-\Delta u = f$ to $-\Delta u + \varepsilon u = f$ for some small $\varepsilon>0$. If ...
7
votes
How can an engineering student become a computational scinece expert in a short time
There is no shortcut. Just like there is no shortcut to becoming an "engineering expert in a short time".
The thing is that to be an expert in civil engineering, you need to understand load analysis, ...
6
votes
Role of boundary conditions (e.g. periodic) in Poisson equation
I know its been 2 years.. but here is an example from physics to hammer it home.
Consider you are solving the Poisson equation: $$\nabla^2\phi =f$$for electrostatic potentials(ϕ) with the right hand ...
6
votes
How do I program periodic boundary conditions?
Typically, you would add "guard cells", that is (for u) u(-1) and u(n+1) with your notation. Before each integration step:
u(n+1) = u(0)
u(-1) = u(n)
and ...
6
votes
Accepted
Boundary condition for Pressure in Navier-Stokes equation
When we say that the pressure is only defined "up to a constant", what we mean is this: If $u,p$ is a solution to the Navier-Stokes equations, then $u,p+c$ for any constant $c$ is also a solution. In ...
6
votes
Computing accurate fluxes with FEM
If $\nabla u$ is of more interest than $u$ itself, it is reasonable to set $\mathbb v := -\sigma \, \nabla u$ and convert your Poisson problem
$$
-\nabla \cdot (\sigma \, \nabla u) = f \quad \text{in }...
6
votes
Accepted
How to apply non zero Dirichlet boundary condition in finite elements?
Consider the fact that your linear system can be broken up into two parts: the equations that correspond to the known Dirichlet dofs, and the equations that correspond to the unknown dofs. For the ...
6
votes
Accepted
FEM current toy problem
The formulation of this problem is tricky. Here is what you have in your original post:
Find $h \in L^2(\partial D)$ such that for any $w \in H^{\frac 1 2}(\partial D)$,
$$
\int_{\partial D} hw \,...
6
votes
Accepted
Traction -> stress; stress->displacement gradient
In short, no. Neumann boundary conditions should be specified in terms of traction. This is clear when you move from a strong-form statement of the boundary value problem to a weak-form.
Strong form:
...
6
votes
Modelling question: example of a physical phenomenon with this jump condition at an interface?
$\vec\Phi = K_i \nabla u_i$ is the flux across the interface. For example, if $u$ is the thermal energy density and $K$ the thermal conductivity, then $\vec\Phi$ is the thermal energy flux. Energy ...
6
votes
Starting configuration for Molecular Dynamics
Usually one needs to employ periodic boundary conditions (at least in the horizontal directions). Any atoms which fly outside of the box will be mapped to the opposite side. This also has to be ...
5
votes
Poisson equation finite-difference with pure Neumann boundary conditions
I know this question is old but I found an error that I wanted to clear up in @DrHansGruber 's answer. It took me a few hours to spot the issue and I wanted to post the solution to save anyone else ...
5
votes
Accepted
Impose Neumann Boundary Condition in advection-diffusion equation 1D
First, write out the semi-discrete equation for $u_0$, assuming it's an interior node:
$ \frac{d}{dt}(u_0) = - c \frac{\left( u_1 - u_{-1} \right)}{2h} + \alpha \frac{\left(u_1 - 2u_0 + u_{-1}\right)}...
5
votes
Accepted
Is the diffusion equation with Neumann and Dirichlet BCs well-posed?
Yes, the problem with mixed boundary conditions is well posed. What's not clear to me is this:
Why do you approximate the derivative via the two-sides approximation? Shouldn't it be enough to just ...
5
votes
Accepted
Imposing no flux boundary conditions on variants of the Cahn-Hilliard equation using Finite Differences in Python
The short answer is that you need
$$\phi_{-1} = \phi_0$$
$$\phi_N = \phi_{N-1}$$
to impose $\nabla\phi=0$.
A quick check by making the following change
...
4
votes
Accepted
How to physically understand time dependent boundary conditions?
For the heat equation imagine a rod that is heated on the left and cooled on the right. Now imagine that instead of a constant prescribed temperature on the left what we want is the heat to steadily ...
4
votes
Solving a linear equation system with pure Neumann condition
Including even one Dirichelt condition changes the problem you are trying to solve and will not give you the correct solution! You must fulfil the Discrete Compatibility Criteria, see e.g. first and ...
4
votes
How to incorporate the boundary conditions with the Galerkin method?
Here is a method known as basis recombination, which has not been mentioned in the present thread. I'm citing from the book of J.P. Boyd, "Chebyshev and Fourier Spectral Methods", 2nd Ed., Chapter 6.5....
4
votes
Accepted
How to deal with PDE over the real line
You must have boundary conditions in addition to the PDE itself. For example, a common boundary condition for cases such as yours is $u(t,x)\rightarrow 0$ for $x\rightarrow \pm\infty$ for any $t$. I'...
4
votes
Accepted
$O(h^2)$ convergence for Elliptic PDE
You appear (and correct me if I am wrong, i do not wish to presume) to be confused on the notion of what is an order of convergence.
The order of convergence is the order at which your approximate ...
4
votes
Solving the Poisson equation with Neumann Boundary Conditions - Finite Difference, BiCGSTAB
One of the standard ways to handle singular problems like Poisson with Neumann boundary conditions which lead to a sinuglar problem $Ax=b$ is to make the obtained solution orthogonal to the kernel (...
4
votes
Accepted
Initial Condition in a Numerical Problem
That depends on the equation you have, and on the situation you want to model. Imagine, for example, that you are considering the advection equation
$$
\partial_t u + c \partial_x u = 0,
$$
i.e., ...
4
votes
Accepted
Computing accurate fluxes with FEM
If averaging the element fluxes, as suggested by @Bill Greene, does not produce accurate enough fluxes, there are ways to improve the accuracy of the fluxes by post-processing. A standard and quite ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
boundary-conditions × 408finite-difference × 106
pde × 90
finite-element × 88
fluid-dynamics × 54
numerics × 41
matlab × 27
ode × 26
finite-volume × 26
poisson × 25
python × 22
elliptic-pde × 22
computational-physics × 18
advection-diffusion × 18
navier-stokes × 16
wave-propagation × 16
discretization × 15
differential-equations × 14
hyperbolic-pde × 14
solid-mechanics × 14
diffusion × 14
nonlinear-equations × 13
parabolic-pde × 13
numerical-modelling × 12
advection × 12