Helmholtz equation Neumann and divergence

In summary, the conversation discusses solving an elliptic problem using finite differences on a grid and using boundary conditions to ensure the divergence of B is equal to zero on the boundaries. However, there is an issue with the divergence of B becoming abnormal near the boundaries. It is suggested to refer to a specific paper for the correct boundary conditions to solve this issue.
  • #1
Heimdall
42
0
"Helmholtz equation" Neumann and divergence

Hello, I'm trying to solve the following elliptic problem :

[tex]S = B - \mu\nabla^2 B[/tex]

Where S(x,y) and B(x,y) are 3 component vectors.

I have [tex]\nabla\cdot S = 0[/tex] and I want B such that [tex]\nabla\cdot B = 0[/tex] everywhere.

I'm using finite differences on a grid with nx+1 in the x direction and ny+1 points in the y direction. The x=0 and x=nx boundaries are periodic, so we have :

[tex]Bx(0,y) = Bx(nx,y)[/tex]
[tex]By(0,y) = By(nx,y)[/tex]
[tex]Bz(0,y) = Bz(nx,y)[/tex]I thought that maybe the following boundary conditions would ensure [tex]\nabla\cdot B=0[/tex] : [tex]Bx(x,0) = B_1[/tex]
[tex]Bx(x,ny) = B_2[/tex]

[tex]\frac{\partial B_y}{\partial y}\left(x,ny\right)= \frac{\partial B_y}{\partial y}\left(x,0\right) = 0[/tex]

(this make the divergence of B equal to zero on the y=0 and y=ny boundaries)

and homogenous dirichlet conditions for Bz at y=0 and y=ny.

Do you so far agree with that ?

I'm using centered second order scheme to discretize my equation (standard 5 point laplacien). And for the Neumann BC I'm doing :

By(x,-1) = By(x,1) for the y=0 border
By(x,ny+1) = By(x,ny-1) for the y=ny border.

This is supposed to be second order first derivative. Thanks to this, I can replace the "ghost" point in my Laplacian when I'm on the top or bottom border.

But I have a problem, when I look at [tex]\nabla\cdot B[/tex], it is 0 in the middle of my domain but on a small length from the y=constant borders, the divergence of B is starting to raise anormally.

example :
http://nico.aunai.free.fr/divB.png

another one (del dot B versus y-direction) :
http://nico.aunai.free.fr/divb.png

you can see that there is no problem at all on the periodic boundaries :-sWhen I'm solving the equation for an analytical source term for which I know the analytical solution, I can notice that there is a small error (but definately bigger than everywhere else in the domain) on the Y boundary regarding to the Neumann BC.

Please, would you know where I should look at to fix this problem ?
Is my boundary conditions are bad to satisfy [tex]\nabla\cdot B=0 [/tex] ?
Is my discretisation not correct ? I've checked the local truncation error which seems to be second order consistant, and eigenvalues of my linear operator looks pretty much the same that those of the Laplacian (1- L), and if I'm correct it should be stable and so converge towards the solution with second order accuracy everywhere, no ?

I can post my gauss-seidel routine if needed.

Thanks a lot !
Please tell me if something's not clear.
 
Last edited by a moderator:
Physics news on Phys.org
  • #2


When [tex] \nabla \cdot B =0 [/tex] your equation can be written,

[tex]\mu\nabla\times\nabla\times B + B = S[/tex].

The correct boundary conditions for this equation are discussed in http://dx.doi.org" , reference number doi:10.1016/j.jcp.2008.03.046.

There it is shown that with [tex] \hat{n} \times B=0 [/tex] on the boundary,
a compatibility condition,

[tex] \int_{\partial D} \hat{n} \cdot [ B-S] \mathrm{d} \mathcal S=0 [/tex]

must be satisfied,
or with

[tex] \hat{n} \times \nabla \times B=0 [/tex]

on the boundary, the boundary condition,

[tex] \hat{n} \cdot [B-S]=0 [/tex]

must be imposed.
 
Last edited by a moderator:

Related to Helmholtz equation Neumann and divergence

1. What is the Helmholtz equation?

The Helmholtz equation is a partial differential equation that describes the behavior of wave phenomena in physics, such as sound waves and electromagnetic waves. It is named after German physicist Hermann von Helmholtz.

2. What is the Neumann condition in the Helmholtz equation?

The Neumann condition, also known as the Neumann boundary condition, is a type of boundary condition that specifies the value of the derivative of a function at the boundary of a domain. In the context of the Helmholtz equation, it is used to describe the behavior of waves at the boundary of a physical system.

3. What is the divergence in the Helmholtz equation?

In the Helmholtz equation, the divergence is a mathematical operation that measures the rate at which a vector field is expanding or contracting at a given point. It is an important component in the equation, as it helps to describe the behavior of waves in a physical system.

4. How is the Helmholtz equation used in scientific research?

The Helmholtz equation is commonly used in scientific research to model and analyze various wave phenomena, such as sound waves, electromagnetic waves, and fluid dynamics. It is also used in fields such as acoustics, optics, and seismology to understand and predict the behavior of waves in different systems.

5. Are there any practical applications of the Helmholtz equation?

Yes, the Helmholtz equation has many practical applications in various fields. For example, it is used in medical imaging techniques such as ultrasound and MRI to create images of internal structures in the body. It is also used in engineering to design and optimize structures for sound and vibration control. Additionally, it is used in meteorology to model and predict weather patterns and in geophysics to study seismic activity.

Similar threads

  • Differential Equations
Replies
11
Views
2K
  • Differential Equations
Replies
1
Views
2K
  • Programming and Computer Science
Replies
4
Views
683
  • Differential Equations
Replies
7
Views
444
  • Differential Equations
Replies
2
Views
1K
Replies
1
Views
1K
  • Differential Equations
Replies
5
Views
699
  • Differential Equations
Replies
2
Views
2K
Replies
1
Views
2K
Replies
61
Views
1K
Back
Top