Magnetostatic cur-curl formulation in 2D

More
4 years 6 months ago #2686 by creativeworker
Hello,

i want to compare H1-space and HCurl-space for 2D magnetostatics problems.
I got it running in 3D, but have a problem in 2D with HCurl-space with the current enforcement.

For the H1-space i defined the current like this:
Code:
curdens1_cf = CoefficientFunction([curdens if mat == "coil1" else 0 for mat in mesh.GetMaterials()]) ... f += SymbolicLFI(curdens1_cf*v)
For HCurl this can't work, because v has dim=2.


Can anybody give me a hint, where i can find a clue to the right solution?
More
4 years 6 months ago #2689 by mneunteufel
Hi creativeworker,

in 2D there are two curl operators, one scalar to vector and one vector to scalar curl. So there are also two different curl-curl problems
[tex]\text{curl}^{vs}\text{curl}^{sv}:\mathbb{R}\to\mathbb{R}[/tex]
and
[tex]\text{curl}^{sv}\text{curl}^{vs}:\mathbb{R}^2\to\mathbb{R}^2[/tex]
where "vs" and "sv" means vector-to-scalar and scalar-to-vector.

To use H(curl) elements I guess you will need the second equation, as the first one does only work for scalar fields. When using the second one the right-hand side should also be a vector.

Best
Michael
More
4 years 6 months ago #2716 by creativeworker
Thanks for your hint. I tried to work it out by myself, but couldn't find the right way. Perhaps you can give me a minimal example? Thank you in advance!
More
4 years 6 months ago #2717 by mneunteufel
Hi creativeworker,

attached you'll find a minimal example of a 2D curl-curl formulation with H1 and HCurl.

I don't know how physically this problem is, but it should be suitable for comparing H1 with HCurl in 2D.
For example if you change the order from 2 to 1 the H1 solution does not look correct, whereas the HCurl solution do.

Best
Michael

File Attachment:

File Name: curlcurl_2d.py
File Size:1 KB
Attachments:
The following user(s) said Thank You: creativeworker
More
4 years 6 months ago #2720 by creativeworker
Thank you, that help a lot for understanding!
Now, I see I need the opposite curl, so that I can solve a ScalarH1 (scalar source and scalar result) equation in HCurl Space. Do I have to define my own curl operator then?
More
4 years 6 months ago #2725 by mneunteufel
Hi creativeworker,

to use the HCurl Space you need to have a vector-valued unknown and thus a vector-valued right-hand side.
As far as I know the vector-valued version is the right one for Maxwell-equations (in 3D the source is also a vector not a scalar).

The scalar version is "just" a rotated Laplace problem (instead of div(grad(u)) you have rotated div of rotated grad). In this case the H1 space should be a good choice. Here you cannot use HCurl for approximating a scalar u.

Best
Michael
The following user(s) said Thank You: creativeworker
Time to create page: 0.123 seconds