Velocity field with phase

Hello, apologies in advance but I am an engineer not a mathematician(!)

I’m working on an acoustics problem of a cube with one face radiating.
I based it on this tutorial: https://nbviewer.org/github/mscroggs/bempp-acoustic-tutorials/blob/main/tutorials/5_loudspeaker.ipynb

It works quite nicely, but now I would like to try making the opposite face radiate with an amplitude and phase difference to look at the directivity patterns and generally play around with it.
I have my tagged mesh set up with different IDs for the different faces.

How do I set up the two velocity fields in Bempp with different amplitude and phase?
How do I set up the solver with the multiple spaces?

Thanks!

1 Like

I worked this out.

The velocity field is defined in this function:

@bempp.api.complex_callable
def u_total_callable(x, n, domain_index, result):
if domain_index == 2:
result[0] = n[2];
else:
result[0] = 0

To add another field to another domain, I included an elif for that domain index/tag.
The complex values for each field can be entered as required.

1 Like

I am an engineering student working on a similar problem. I have a few questions and It would be really helpful if we can connect. Could you please suggest a way for me to contact you?

Hi Kevin, post your questions here.
I’m not an expert in the field, but there are experts on this forum.