- Thank you received: 0
Magnetostatic cur-curl formulation in 2D
- creativeworker
- Topic Author
- Offline
- Senior Member
Less
More
4 years 6 months ago #2686
by creativeworker
Magnetostatic cur-curl formulation in 2D was created 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:
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?
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)
Can anybody give me a hint, where i can find a clue to the right solution?
- mneunteufel
- Offline
- Premium Member
Less
More
- Thank you received: 59
4 years 6 months ago #2689
by mneunteufel
Replied by mneunteufel on topic Magnetostatic cur-curl formulation in 2D
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
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
- creativeworker
- Topic Author
- Offline
- Senior Member
Less
More
- Thank you received: 0
4 years 6 months ago #2716
by creativeworker
Replied by creativeworker on topic Magnetostatic cur-curl formulation in 2D
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!
- mneunteufel
- Offline
- Premium Member
Less
More
- Thank you received: 59
4 years 6 months ago #2717
by mneunteufel
Replied by mneunteufel on topic Magnetostatic cur-curl formulation in 2D
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
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
Attachments:
The following user(s) said Thank You: creativeworker
- creativeworker
- Topic Author
- Offline
- Senior Member
Less
More
- Thank you received: 0
4 years 6 months ago #2720
by creativeworker
Replied by creativeworker on topic Magnetostatic cur-curl formulation in 2D
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?
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?
- mneunteufel
- Offline
- Premium Member
Less
More
- Thank you received: 59
4 years 6 months ago #2725
by mneunteufel
Replied by mneunteufel on topic Magnetostatic cur-curl formulation in 2D
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
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