Forum Message

 

 

We have moved the forum to https://forum.ngsolve.org . This is an archived version of the topics until 05/05/23. All the topics were moved to the new forum and conversations can be continued there. This forum is just kept as legacy to not invalidate old links. If you want to continue a conversation just look for the topic in the new forum.

Notice

The forum is in read only mode.

Time-Harmonic Elastic Wave Problem

More
4 years 9 months ago #1701 by Amad
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?
Code:
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
More
4 years 9 months ago #1709 by joachim
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
The following user(s) said Thank You: Amad
More
4 years 9 months ago #1725 by Amad
Dear Joachim,

Thank you for your answer. It's working now! :)
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.
Code:
#Error analysis print ("Displacement L2-error:", sqrt (Integrate ( (u-u_exact)*(u-u_exact), mesh)))

Thank you in advance.

Best Regards,

Alan
More
4 years 9 months ago #1730 by christopher
Hi Amad,
you can either use the Norm CoefficientFunction or the Conj (conjugate).]
Best
Christopher
The following user(s) said Thank You: Amad
Time to create page: 0.145 seconds