Questions tagged [boundary-conditions]

For questions regarding the choice and/or appropriateness of conditions necessary to model a particular phenomenon with a partial differential equations.

Filter by
Sorted by
Tagged with
0 votes
0 answers
37 views

Analytical Equation of the gaussian 1D wave equation with periodic Boundary condition

I am trying to validate the 1D analytical wave equation with a numerical solution with periodic boundary conditions. I have implemented the periodic boundary condition for the numerically calculated ...
  • 121
1 vote
0 answers
44 views

How to include zero flux boundary conditions?

I am trying to solve the following differential equation in the domain of $\theta \in [0, 2 \pi]$ using finite differences scheme: For $0< \theta \leq \pi$ \begin{align} \rho_i^{n+1}=\rho_i^{n}+D\...
  • 111
1 vote
0 answers
70 views

Interface condition for 1D Helmholtz equation using finite element method

I want to implement a 1D Helmholtz equation with jump condition. The domain is $x=[0,1]$ and both ends have Dirichlet boundaries($p$=0). The 1D strong formulation is; $$c^2\nabla^2p + w^2p=0 \qquad \...
0 votes
0 answers
28 views

boundary condition at rotation axis of a spherically-symmetric system

The quantity I am interested in is not the rotation rate $\Omega$, but I will use this quantity nonetheless to make the problem clearer. I am interested in a spherically-symmetric system and in the ...
0 votes
0 answers
37 views

Why do BVP solvers' APIs only allow "unknown" parameters in the derivative and residual functions but not "known" parameters?

I recently needed to solve a second order boundary value problem and noticed that both scipy.integrate.solve_bvp and Matlab's ...
  • 328
2 votes
0 answers
63 views

Compact Finite Differences for the Heat Equation with Robin Boundary Conditions

I am trying to solve the Heat equation with Robin Boundary condition: $$ u_t(x,t) = u_{xx}(x,t), \\ u(x,0) = g(x), \\ u(0,t) + u_x(0,t) = h_0(t), \\ u(1,t) + u_x(1,t) = h_1(t)$$ for $ 0\leq x\leq1$ ...
  • 21
0 votes
1 answer
129 views

Nonlinear Robin boundary condition involving square root

If you have a nonlinear second-order boundary value problem where the domain of the problem is $x \in [a,b]$, the boundary conditions imposed are the Robins condition at $x=a$ and the Dirichlet ...
0 votes
0 answers
58 views

Want to know how to solve this high order differential equation system with boundary condition?

The numerical results may be like this:
1 vote
1 answer
107 views

Free Time Dependent Schrodinger Equation with Inhomogeneous Dirichlet boundary

There exists a FFT-based method to solve the poisson equation in inhomogeneous Dirichlet boundary condition using the sine-transform. For example, Which fourier series is needed to solve a 2D poisson ...
0 votes
2 answers
106 views

Practical implementation of the discrete compatibility condtion

I've recently started looking into writing a finite-differences-based solver for the Poisson equation of the form $$\nabla\left(\varepsilon\nabla\varphi\right)=\rho$$ in 2D for arbitrary geometries (...
  • 53
2 votes
0 answers
58 views

Boundary conditions for compressible Euler equations

I want to solve the compressible 1D Euler equations numerically. Theory says that for subsonic inflows, one can prescribe two variables, e.g. pressure and temperature. Density can then be computed ...
  • 81
3 votes
0 answers
424 views

What EXACTLY are the "outflow" and "pressure outlet" BCs in ANSYS Fluent?

I am just starting my MSc and we have been given an assignment in which we must model two-dimensional, laminar, incompressible Poiseuille flow in a channel. We are supposed to use a VELOCITY INLET ...
1 vote
0 answers
55 views

How to incorporate a continuity of 1st derivatives at an internal interface in a 2nd order Poisson equation in finite elements method?

How should I modify the following matrix formulation of a finite element (FE) approximation of Poisson equation at the (internal) interface denoted by the nodes $i-1$ to $i+1$ having a continuous 1st ...
1 vote
1 answer
21 views

Applying spectral method to a damped, driven 2D bending-mode wave equation on an irregular domain with heterogeneous boundary conditions

I'm trying to model some two-dimensional waves, and am unsure how to combine my boundary conditions with spectral methods. The PDE I'd like to explore resembles the equations for damped, driven ...
  • 141
2 votes
0 answers
103 views

Numerical precision on tricky coupled nonlinear boundary value problem on infinite interval

I am trying to solve with high precision the following coupled system $(f,h)$ on $[0,\infty]$: $$-h''-\frac{1}{r}h'+\lambda_c h(f^2-1)+4\lambda_h h^3=0$$ $$-f''-\frac{1}{r}f'+\frac{1}{r^2}f+ f(-\...
  • 33
1 vote
1 answer
71 views

Boundary value problem solver fails on trivial case

I am trying to solve a boundary value problem on $[0, \infty]$, using scipy's scipy.integrate.solve_bvp and I am seeing that the solutions are not converging even ...
  • 33
0 votes
1 answer
134 views

Can successive over-relaxation (SOR) method deal with ill-posed PDE BVP?

Recently, I've been struggling to understand the limitations and capabilities of the successive over-relaxation (SOR) method for boundary value problems which are ill-posed, such as, for instance, ...
  • 53
1 vote
1 answer
164 views

Convergence stall when solving 2D Poisson PDE with pure Neumann boundaries (finite differences)

I recently started coding a small library of 2D PDE solvers (time dependent and time independent), and my first attempt was a 2D Poisson equation of the form: $$\nabla(\epsilon\nabla\varphi)=\nabla\...
  • 53
4 votes
1 answer
170 views

Does DCT diagonalize the FD discretisation of the Laplacian with Neumann boundary conditions?

If one has the Poisson problem (assume $\int_{\Omega} f = 0$ and $\int_{\Omega} u = 0$): \begin{alignat}{3} \Delta u(x) &= f(x), &\quad&x\in\Omega \\ \partial_nu(x) &= 0, &\quad&...
0 votes
0 answers
51 views

How to define a stretched coordinate perfectly matched layer (PML) parameters for maximum absorbtion?

I have written a MATLAB code for solving Maxwell's equations (electromagnetic wave propagation) in 3D with perfectly matched layer (PML) boundaries. I am using a stretched coordinate PML, but I see ...
1 vote
1 answer
74 views

How can I define an equipotential surface/volume in FEniCS?

I want to solve electrostatic problem for potential. Charge density and medium permittivity are known, so is the potential of a grounded surface. I know how I can implement that. But I would like to ...
  • 123
1 vote
0 answers
31 views

How does Tannehill impose boundary conditions when coding the Parabolized Navier Stokes on an Implicit Finite Differences Scheme?

I'm trying to implement the scheme he describes on his book "Computational Fluid Mechanics and Heat Transfer" on Chap.9 and I'm having trouble imposing BC. I don’t get how he imposes them. I ...
  • 11
1 vote
1 answer
64 views

Applying Stress Boundary Conditions in Commercial Finite Element Analysis Codes

I am trying to replicate a finite element analysis given in a research paper titled On the Detection of Stress Singularities in Finite Element Analysis 1 by G.B.Sinclair et. al. The geometry of the ...
1 vote
0 answers
38 views

Adding wall friction to a 3D model - Stokes equation

Maybe that is not the best place for the following question, if such, let me know and sorry. I would like to model the flow of expanding bentonite in a fracture following the given reference. In order ...
  • 89
0 votes
0 answers
258 views

The mathematical meaning of a zero gradient pressure boundary condition in the Navier-Stokes equations

I would like to solve the Navier-Stokes equations for the unsteady problem of the flow around a circular cylinder. I would like to understand how to write mathematically the boundary condition for the ...
0 votes
2 answers
113 views

Solving a generalized eigenvalue problem with Chebyshev spectral method: How to impose boundary conditions into the matrices?

I'm solving a local instability problem for a pipe Poiseuille flow. The coordinate system is columnar, i.e., ($r,\theta,x$) (radial, tangential and axial). The basic flow is $\bar{u_r}=0, \bar{u_\...
  • 1
1 vote
0 answers
169 views

Open boundary condition for 1d wave equation with variable wave speed using finite differences

I have implemented a finite difference solver for the 1d wave equation with variable wave speed: $$ u_{tt} = c(x)u_{xx}, \hspace{10mm}c(x) = \dfrac{6 -x^2}{2} \hspace{5mm} $$ on $-2 \leq x \leq 2, t &...
0 votes
1 answer
378 views

Who can explain the minimum image convention in molecular dynamic simulations?

How to choose the cutoff radius so that the atoms do not interact with its periodic image? Especially when simulating macromolecules (proteins).
0 votes
0 answers
63 views

Passing boundary conditions to solver

Quite broad question, Currently building own Poisson solver subroutine for CFD solver. Works smooth, the goal is to generalise the input and make it flexible. Description of also: Memory allocation. ...
  • 354
2 votes
3 answers
105 views

Simple to program method for elliptic PDE with curved boundary?

I know very little about numerical PDE, so I apologize if this equation is ill-formed (and I appreciate any corrections). I am currently learning about Brownian motion. A classic result is that we can ...
  • 105
0 votes
0 answers
68 views

Transparent Boundary Conditions for Finite Difference ADI PR 2D TDSE solution

I want to put (non-dirichlet) boundary conditions inside the code I wrote to solve the 2dim TDSE using the alternating direction implicit Peaceman - Rachford method. $$ (1 + iB\Delta t/2 ) \psi^{n+1/2}...
  • 131
3 votes
0 answers
62 views

Change in Variables applied to biharmonic equation

Background I want to solve the following biharmonic equation: $$\frac{ \partial^4 s }{ {\partial \xi}^4 }+\frac{ \partial^4 s }{ {\partial \xi}^2{\partial t}^2 }+\frac{ \partial^4 s }{ {\partial t}^4 }...
1 vote
1 answer
332 views

Solving ODE with Spectral Method using Chebyshev Polynomials

I would like to solve following the basic equation of linear elasticity (for simplicity in 1D) $$ \frac{d}{dx} \left( E \frac{du}{dx} \right) = 0 \quad \textrm{with} \quad u(1)=0, \; u(-1)=b $$ ...
  • 13
1 vote
1 answer
80 views

How to Impose nonhomogeneous Neumann Boundary Condition in the DG Formulation

Consider the following partial differential equation \begin{align} \frac{\partial u}{\partial t}+\frac{\partial f}{\partial x} &= g(x,t), \ \ x\in \Omega = [x_{L},x_{R}] \\ u(x,0) &= u_{0}(x) ...
2 votes
1 answer
147 views

DG method for solving Hyperbolic Partial Differential Equation with Dirichlet Boundary Conditions

Consider the following partial differential equation \begin{align} \frac{\partial u}{\partial t}+\frac{\partial f}{\partial x} &= g(x,t), \ \ x\in \Omega = [x_{L},x_{R}] \\ u(x,0) &= u_{0}(x) ...
1 vote
1 answer
43 views

An explanation of 2delta waves on non-staggered grids

While looking into the difference between staggered and collocated grids, I came across an effect called $2\Delta x$-oscillations, which happen on non-staggered grids, but not on staggered grids. This ...
2 votes
0 answers
89 views

switching boundary conditions to simulate a reciprocating flow in COMSOL

This is a re-posted question which was poorly defined earlier I have been trying to simulate reciprocating flow of a convective fluid through a heated channel in COMSOL-Multiphysics. The schematic of ...
  • 41
3 votes
2 answers
401 views

Modelling question: example of a physical phenomenon with this jump condition at an interface?

in our finite element class we were talking about interface problems our teacher came up with the following, where $K_i$ are two given functions and $u_i$ is the restriction of the solution $u$ to $\...
  • 211
3 votes
0 answers
51 views

Appropiate Artificial Boundary Conditions for the radial part of the Klein Gordon equation?

I am trying to simulate the following equation using FDTD $ \left(- \partial^2_t + \partial^2_x + V(x) \right) \psi(x,t) =0 $ subjected to the initial conditions $\psi(x,0) = f(x),~ \partial_t \psi(x,...
  • 131
0 votes
1 answer
621 views

1D wave equation using Finite difference method MATLAB

I have the wave equation $$u_{tt} = 4 u_{xx}$$ with the boundary conditions $$u(0,t) = u(L,t) = 0\,,\quad x \leq 0 \leq 2\pi \,,\quad t\geq 0$$ and initial conditions $$\begin{align} &u(x,0)=\...
2 votes
0 answers
74 views

Advection diffusion equation using Crank-Nicolson with total flux and Diriclet BCs

I am trying to model the 1D advection-diffusion equation: $${\partial c \over \partial t} = D_c{\partial^2 c \over \partial x^2} -u{\partial c \over \partial x}.$$ With Robin boundary conditions that ...
  • 81
1 vote
0 answers
133 views

How to apply Neumann boundary conditions in Newton's method [closed]

Suppose that I have a very long and tedious set of differential equations. After discretization, I can get a mapping $f:\mathbb{R}^N \to \mathbb{R}^N$ such that solutions $\phi =(\phi_0,...,\phi_{N-1})...
1 vote
1 answer
298 views

Lagrange multiplier for boundary conditions in pure Neumann problem

I'm trying to solve $-u''=\cos(2 \pi x)$ with boundary conditions $u'(0)=u'(1)=0$ and the constraint $\int_{0}^1 u = 0$ I have to use linear finite elements, so let's assume that I have $M$ degrees of ...
  • 211
0 votes
1 answer
80 views

Manufactured solution to 2d convection-diffusion with homogeneous Robin boundary conditions

I am looking for a manufactured (or analytical if it exists) solution to the 2d boundary-value problem $$\frac{\partial u}{\partial t} = \mathbf{a} \cdot \nabla u + D \nabla^2 u \quad \quad \mbox{in } ...
  • 61
3 votes
1 answer
130 views

Wave equation, wave is bouncing off Neuman boundary

Wave equation. Mixed BC. Applied Neuman boundary condition ($\frac{\partial u}{\partial x}\big|_N=0$) to the RHS of the domain You may observe the sharp edge in the middle of the string in the image ...
  • 354
1 vote
1 answer
165 views

Non-reflective boundary condition

I'm currently solving incompressible Navier-Stokes system of equations with periodic flow and high viscosity. Is there any outlet boundary types that avoids the reflection of flow from the outlet back ...
  • 354
4 votes
1 answer
279 views

Computing second derivatives with Neumann boundary condition

I am implementing a finite difference method for a PDE with a Neumann boundary condition. I will simplify my question to a single dimension. Suppose I have a PDE $$\frac{\partial u}{\partial t} = \...
9 votes
1 answer
779 views

How to solve a second order differential equation (diffusion) with boundary conditions using Python

I am having trouble implementing a model from a publication. Huang, K-L.; Holsen, T.M.; Selman, J.R. Ind. Eng. Chem. Res. 2003, 42, 15, 3620–3625 scihub link: https://sci-hub.se/10.1021/ie030109q I ...
1 vote
1 answer
132 views

Finite element method with two different Dirichlet boundary conditions

I have the problem like this $$ -\triangle u = f \ \ on\ \Omega \\ u = g_1 \ \ on \ \partial \Omega_1 \\ u = g_2 \ \ on \ \partial \Omega_2 $$ If we choose $$ V_1 = \{ \nu_1 \in H^1 : \nu_1 = 0 \ ...
  • 111
0 votes
1 answer
286 views

deal.ii - ParaView "warp by scalar" of my output is not continuous

During our finite element course, we've solved the linear elasticity problem in 2D on a square (GridGenerator::hyper_cube) with $Q_1$ bilinear finite elements in ...
  • 211

1
2 3 4 5
8