# Resolute Wave equation with freefem

Hello everyone,
I want to analyse the pressure on freefem for a tube
Closed on the left side and open on the right side.
We have 4 boundary conditions for the pressure (look the picture )
À Newman condition “dp/dn=0(on the 3 side 1,2,4 but on the side number 3 we don’t have a Newman boundary condition ) but we have that P(L,t)=0
How we resolute that in freefem with the helmoltz equation can anyone help me please ?
Thanks

This is triaval if you know the Variational form of helmoltz equation

``````int[int] ll=[2,3,4,1]; // to get you label numbering
mesh Th=square(100,10,[x*10,y],label=ll);
fespace Vh(Th,P1);

Vh P,v;
real k = 10;
real k2 = k*k;
func f=1;
solve Helmholtz(P,v) = int2d(Th) ( grad(P)'*grad(v) - k2*P*v)- int2d(Th)(f*v) + on(3,P=0); // 0 on Gamma 3
plot(P,wait=1);
``````

This is a stationary cas to make time depend see https://www.um.es/freefem/ff++/pmwiki.php?n=Main.WaveEquation ,
Wifi Propagation for example or
Acoustics

Hello thanks for u respond ,
But why we have f ? And why we have fixed f to 1?
Thanks A lot !

Hello mister ,
Why we don’t need to put the dp/dn on the label 3 please ? Cause we don’t have a Newman bundaty condition on this label.
Best regards

Because it is Homogeneous Neuman Boundary condition this imply the term in variation form.