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
1 vote
1 answer
79 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\...
3 votes
1 answer
126 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
28 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
58 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
56 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
36 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
92 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
73 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
88 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
98 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
58 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. ...
  • 344
2 votes
3 answers
98 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
20 views

Transparent Boundary Conditions relationship with intermediate BCs in ADI-PR method

I have read some materials about ADI - PR method with the aim to understand how to put boundary conditions in my 2D scheme which solves the Time-Dependent Schrodinger Equation. All the theory I read ...
  • 131
0 votes
0 answers
60 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
57 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
181 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
74 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
121 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
40 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
52 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 ...
  • 121
0 votes
0 answers
82 views

Solving an apparently tricky geodesic BVP in Matlab

I want to be able to solve the BVP $$\ddot \mu_k = -\frac{\mu_k}{2} \left ( \sum_{i=1}^n \frac{\dot \mu_i^2}{\mu_i} - \frac{\dot \mu_k^2}{\mu_k^2} + \frac{ \left [ \sum_{i=1}^n \dot \mu_i \right ]^2}{\...
3 votes
2 answers
395 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 $\...
3 votes
0 answers
45 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
311 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)=\...
1 vote
0 answers
51 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 ...
  • 51
1 vote
0 answers
92 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
194 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 ...
0 votes
1 answer
72 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
121 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 ...
  • 344
1 vote
1 answer
155 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 ...
  • 344
4 votes
1 answer
195 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
676 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
92 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
207 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 ...
0 votes
1 answer
89 views

Displacement field not correct?

Consider the elastic equation $$- \operatorname{div}(C \nabla \mathbf{u}) = \mathbf{f}$$ as presented in step-8. Here $\mathbf{u}$ is the displacement vector, let's consider the 2d case. As you can ...
4 votes
1 answer
268 views

Weak Formulation of Poisson's Equation for Electrostatics with Surface Charge

I am currently attempting to use FEnICS to solve an electrostatic problem with two materials of different permittivity $\varepsilon_1$ and $\varepsilon_2$ forming an interface: Consider a domain $\...
  • 43
1 vote
0 answers
63 views

Constrained optimization for non-linear equations in octaveGNU

I have installed Optim1.6.1 package. I would like to solve a system of equations in non linear finite element analysis using constraints as u=1 at certain nodes. u=0 at certain nodes. Typically I find ...
1 vote
0 answers
125 views

Weak form of Elliptic problem with mixed Dirichlet & Neumann conditions

Let $\Omega \subset \mathbb{R}$ in a bounded polygon domain and $f:\Omega \to \mathbb{R}$ known function.We split the boundary into two parts $\partial \Omega_{1}$ and $\partial \Omega_{2}$ such that $...
's user avatar
0 votes
0 answers
36 views

Insert a boundary condition without removing periodicity assumption

I've to perform a multi-fluid internal flow simulation with a code which intrinsically assumes periodicity on a given direction (say z) on a cartesian grid. Nonetheless, the problem I'm trying to ...
  • 1
3 votes
2 answers
436 views

How to solve second order coupled non linear differential equations

For a project I am doing, I have to solve the following system of differential equations numerically using my own code: $$ x^2K'' = KH^2 + K(K^2-1) $$ and, $$ x^2H'' = 2K^2H + \alpha H(H^2-x^2) $$ ...
  • 41
1 vote
0 answers
53 views

Why is this Advection-convection model with insulating boundary losing mass?

I am trying to model a 1-d advection-convection numerically, using an upwind scheme. I'm using the following equation to calculate the value of internal cells: $$C_x^{t+1} = C_x^{t} + D\frac{\Delta t}{...
  • 119
0 votes
0 answers
114 views

Boundary conditions for an FEM approximation of the Laplace operator

Using FEM, I want to approximate the Laplacian $$u = \nabla \cdot \nabla h \, ,$$ where $h(x,y)$ is an FEM approximated scalar field on the same mesh, i.e. piecewise differentiable. I am using MOOSE ...
  • 1
2 votes
0 answers
30 views

Semi-analytical/empirical modelling of wall boundary conditions in advection-diffusion-reaction equation with distributed source

Let's suppose I need to numerically solve a 3D steady-state transport equation of the form $$ \nabla \cdot (\mathbf{u} c) = \nabla \cdot (D \nabla c) - \lambda c + S $$ where $c$ is the transported ...
1 vote
0 answers
79 views

Solving Laplace equation with constraint on boundary

I have found the following PDE problem in a paper: Essentially, we have a rectangular domain where there is a unknown interface $z=\xi(x)$ (liquid-air interface) separating the domain into two medium ...
  • 217
2 votes
0 answers
251 views

How are finite volume method boundary conditions implemented without using ghost-cells?

I'm currently trying to implement my own FVM code in cpp, but when I try to calculate the laplacian of a test function, given by \begin{align}\phi_0=\sin(2\pi x)\sin(2\pi y),\end{align} I get ...
  • 21
0 votes
0 answers
279 views

Poisson equation, stiffness matrix positive definiteness, Dirichlet boundary conditions

I have a question regarding the positive definiteness of the stiffness matrix. Specifically, I believe that it should be positive definite only when at least one Dirichlet point is given, so I would ...
2 votes
0 answers
53 views

How to solve this boundary value problem which has more unknown than equation on MATLAB

I need your helps about solving the problem below with MATLAB. I am trying to solve 2D Stress Wave Propagation problem by using FDTD(Finite difference time domain) method on the cylindrical coord. I ...
0 votes
0 answers
50 views

Cauchy problem ill-posed?

Find the solution to the Cauchy problem consisting of the wave equation : $$u_{xx}-u_{yy}=0$$ together with initial conditions: $$ u(x,0)=0,$$ $$u_{y}(x,0)=g(x)$$ for some known initial datum $g$. Is ...
's user avatar
2 votes
2 answers
234 views

Two-dimensional heat equation with Neumann boundary conditions: any hope to find an analytical solution?

I am looking for references showing how to analytically solve the heat equation with Neumann boundary conditions in two dimensions. So far, I have found the problem solved analytically in one ...
  • 61

1
2 3 4 5
8