time_dependent_Dirichlet_BC.edp (3.0 KB)
i am new to FreeFem and i am trying to simulate the propagation of an acoustic wave generated by a transducer by solving the wave equation with a time dependent Dirichlet boundary condition. Everething is working well if i use the “problem” approach (see the script attached).
Unfortunately, the code is a little bit slow for my computer and i’ve tried the “varf” approach which is way faster (part commented in the script attached). My problem is that i can not manage to impose the time dependent Dirichlet BC by using “varf”. The matrix is not updated in the time loop. I am definitely missing something.
Any help is much appreciated. Since i am new to FreeFem any suggestion on the code i wrote is welcomed.