Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

Helmholtz 2d boundary conditions

ilogin
Beginner
582 Views
Dears,
I need your help with the subj. The problem is that my function is not defined on boundaries. Description of d_commit_Helmholtz_2D shows that it finds solution inside target area (ax
This is confusing for me because i do not know function values on the boundaries. I need to solve 2D Helmholtz problem with 0 Neiman conditions and i do not know what to write on boundaries into F because of special sort of my equation. I cannot find the values on boundaries.
Thank you in advance for your help.
Regards,
Ilya
0 Kudos
8 Replies
Alexander_K_Intel2
582 Views
Hi Ilya,
Could you describe you problem in details? It is not clear for me why you don't know values of rhs.If you want you could answer me in private mode.
With best regards,
Alexander Kalinkin
0 Kudos
mecej4
Honored Contributor III
582 Views
If all the boundary conditions are Neumann b.c., the solution is indeterminate by a constant. In other words, if u(x,y) is a solution, so is u + C. There will be a corresponding indeterminancy in the discretized problem, as well.

The resolution is simple. Simply specify the value at one point, say, (ax, ay) to be any value that you like, such as zero.

Another artifice is to use v = u/x ( or, if better suited, u/y) as the dependent variable.
0 Kudos
ilogin
Beginner
582 Views
Hello,
Let me clarify. My problem looks likeu/x+u/y=-F(x,y). Boundary conditions areu/x=0|(x=0,x=Lx) andu/y=0|(y=0,y=Ly). F is not defined on boundaries because of problem statement. So currently I cannot see the way to implement your idea.
MKL function force me to pass boundary values into array F but values are not defined.
Thank you,
Ilya
0 Kudos
mecej4
Honored Contributor III
582 Views
> My problem looks likeu/x+u/y=-F(x,y)

That is the Poisson equation, not the Helmholtz equation -- the latter has the additional term q . u in it, where q is a constant. Please clarify which equation you want to solve.

And, when you wrote in your first post that

> The problem is that my function is not defined on boundaries

did you refer to u or to F as "my function" ?

In the problem that you want to solve, is F known as an analytical expression? If not, how is it known?
0 Kudos
ilogin
Beginner
582 Views
I'm sorry for the inconvenience. The issue is with F.
F is defined as an array of values in the area 0<1, 0<1. Therefore I don't know values for F on the boundaries. I do not have any analytical expression for F since I compute it in sophisticated iteration process.
I use d_Helmholtz_2D function to compute my problem. As far as I know there is no separate function for poisson problem so I use q=0.
0 Kudos
Alexander_K_Intel2
582 Views

Gents,

It's seems we have some misunderstanding. For differential problem one doesnt know values of rhs on boundary of domain. But for algebraic problem that comes from differential one need to set value on boundary (for example continue rhs from domain to its boundary).

With best regards,

Alexander Kalinkin


0 Kudos
ilogin
Beginner
582 Views
Thank you guys! I need to find a way how to extend F values for boundaries and not to break physical meaning of problem. This is not good that MKL function requires values for its arguments stronger than stated in documentation.
Thank you,
Ilya
0 Kudos
Alexander_K_Intel2
582 Views

Ilia,

MKL uses a standard 5-point approximation of 2D Helmholtz problem. But Poisson library from MKL requires values of rhs on Neumann boundary to find values of solution on this boundary. So, if you want to use Helmholtz functionality you need to implement next trick:

If want to solve Helmholtz equation in domain (a_x, b_x)*(a_y, b_y) with nx and ny mesh intervals correspondently then call Poisson library with parameters as follows:

ax_new = a_x+(bx-ax)/nx;

bx_new = b_x-(bx-ax)/nx;

ay_new = a_y+(by-ay)/ny;

by_new = b_y-(by-ay)/ny;

nx_new = nx-2;

ny_new = ny-2;

d_init_Helmholtz_2D(&ax_new, &bx_new, &ay_new, &by_new, &nx_new, &ny_new, BCtype, &q, ipar, dpar, &stat);

d_commit_Helmholtz_2D(f, bd_ax, bd_bx, bd_ay, bd_by, &xhandle, ipar, dpar, &stat);

ets

With best regards,

Alexander Kalinkin


0 Kudos
Reply