Time-Harmonic Elastic Wave Problem

Hello everyone!

I am trying to solve the time-harmonic elastic wave problem using the Galerkin method.
But the results are not correct.

I am attaching a jupyter-notebook with the case that I tried. Could you tell me what I am doing wrong?
In addition, I would like to include a pointwise source in this problem, could you also help me with this?

Finally, how can I use the complex conjugate to measure L2-norm error?

gfu = GridFunction(fes)

u_exact = CoefficientFunction(r_source)
u = CoefficientFunction(gfu)

#Error analysis
print ("Displacement L2-error:", sqrt (Integrate ( (u-u_exact)*(u-u_exact), mesh)))

Thank you in advance for your time.

Kind Regards,

Alan

Attachment: Elastodynamics.ipynb

Hi Alan,

it looks like you wanted to specify Dirichlet boundary conditions, but you gave Neumann …

For the beginning, replace the point-source by a small Gaussian peak,

Joachim

Dear Joachim,

Thank you for your answer. It’s working now! :slight_smile:
How to use L^2 norm for a complex number?

I tried to include a complex conjugate in the code below, but it didn’t work.

#Error analysis
print ("Displacement L2-error:", sqrt (Integrate ( (u-u_exact)*(u-u_exact), mesh)))

Thank you in advance.

Best Regards,

Alan

Hi Amad,
you can either use the Norm CoefficientFunction or the Conj (conjugate).]
Best
Christopher