"MgDynHarm" Solver Missing

Discussion about building and installing Elmer
Post Reply
wdb
Posts: 4
Joined: 04 Jan 2021, 05:42
Antispam: Yes

"MgDynHarm" Solver Missing

Post by wdb »

I just installed Elmer on ubuntu 20.04 and am working through the tutorials here: http://www.nic.funet.fi/index/elmer/doc ... orials.pdf

I am starting with the "Magnetic field induced by harmonic current in a wire" tutorial but I am stuck because the "MgDynHarm" solver is missing. The tutorial states that this solver should be located in the "magnetodynamics.xml" file, and I have tried loading it by both coping the xml files between the edf-extra and edf folders and by loading the xml file through the append definitions dialogue. I know this process is working because other solvers appear when I do this. There is a "MgHarm" solve, a "MgDyn" solver, and a "MgDyn2DHarmonic" solver, but there is no "MgDynHarm" solver.

Opening the "magnetodynamics.xml" file in a text editor I see the names of other solvers, but not "MgDynHarm". Thinking the tutorial was out of date, I tried using the "MgDyn" solver, but later steps do not match. The "MgHarm" solver seems to have the same fields but my end simulation results do not seem to match what is given in the tutorial.

Was the "MgDynHarm" solver renamed or removed? Is it now the MgHarm" and I have just messed up at some step in the tutorial?
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: "MgDynHarm" Solver Missing

Post by kevinarden »

There is an inconsistency in the tutorial write up, the radius is not as reported.

viewtopic.php?f=3&t=7048&p=22599&hilit=0.524#p22599

viewtopic.php?f=7&t=7021&p=22382&hilit=wire.grd#p22382
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: "MgDynHarm" Solver Missing

Post by raback »

Yes, it is probably just messed up documentation. Whereas tests may be checked for inconsistency the verbal stuff in tutorials not so easily. I just changed the "MgDynHarm" to "MgHarm" in the tutorials.

The naming started from the transient solver where the statics is just a special case. And harmonics was derived from the transient solver. So the fact that "MagnetoDynamics" is the main module has some historical baggage.

The tutorial was first just a consistency test, you find there many variations of the wire case:

Code: Select all

elmeruser@elmeruser-VirtualBox:~/elmerfem/fem/tests$ ls | grep wire
mgdyn_core_wire_line_element
mgdyn_harmonic_wire
mgdyn_harmonic_wire_impedanceBC
mgdyn_steady_wire
mgdyn_steady_wire2
mgdyn_steady_wire_conforming
mgdyn_steady_wire_periodic
mgdyn_wire_dbdt_line_element
mgdyn_wire_line_element
The development usually starts from the module, then tests are created, at later stage XML file for GUI may be written, and as last part some educational tutorial is written. As you seem to aim high you probably would like to end up to level where you can study and edit the .sif files directly.
What the ideal workflow end the end will be depends on what tools you're using already for other tasks.

-Peter
wdb
Posts: 4
Joined: 04 Jan 2021, 05:42
Antispam: Yes

Re: "MgDynHarm" Solver Missing

Post by wdb »

Thanks for the quick replies! Are there known good copies of the tutorial project files?

With the harmonic solver I am getting some pretty weird results. I believe I have matched the steps from the tutorial exactly and from my limited experience with COMSOL all the inputs seem reasonable.

I am getting a magnetic field strength orders of magnitude higher than the tutorial and no magnetic field outside the wire:
Screenshot from 2021-01-04 12-12-47.png
(68.74 KiB) Not downloaded yet
I don't have any prior experience with paraview, but I don't think I simple mistake with paraview could be leading to results this different.
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: "MgDynHarm" Solver Missing

Post by raback »

Hi

Could it be that you haven't tagged the equation active in the air body?

-Peter
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: "MgDynHarm" Solver Missing

Post by kevinarden »

If you can post your sif file a review/check would be possible.
wdb
Posts: 4
Joined: 04 Jan 2021, 05:42
Antispam: Yes

Re: "MgDynHarm" Solver Missing

Post by wdb »

It would make sense that I am missing some equation or boundary, but it seems like I am applying them all to the correct items as instructed.

The only thing that is ambiguous in the tutorial is if the ground and voltage boundaries should be applied to only the wire or the wire and the cylindrical ends of the air block. I have tried both ways and the end result seems to be the same.

Are there any example projects for anything that is mildly complex relating to magnetic that are online for me to look at? Or as Peter implied are people mainly using Elmer as a backend and using something other than the Elmer GUI to generate the sif files?

I have attached my sif file. If someone could look it over and point out what I am doing wrong that would be great.
Attachments
case.sif
(4.48 KiB) Downloaded 178 times
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: "MgDynHarm" Solver Missing

Post by kevinarden »

"Because of the radius inconstancy and scaling, even 100 Hz is too high. Use 1 HZ and you will get the same answer as steady state"

In your sif

Angular Frequency = 1.0e5
wdb
Posts: 4
Joined: 04 Jan 2021, 05:42
Antispam: Yes

Re: "MgDynHarm" Solver Missing

Post by wdb »

I was following the tutorial steps initially. Updating the frequency to 1.0 I am getting ~ the same results as I showed before. No fields are being shown outside the wire and the magnitude is way too high.

If no one is spotting any errors in the sif file, perhaps I am messing up something with ParaView? It seems unlikely, but I am running out of reasons.

My install did not come with the /elmerfem/fem/tests directory, how can I get access to those? If there is not an example file for the GUI there should still be a known goof sif file, right? That would at least allow me to make sure I am not doing something wrong with ParaView.
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: "MgDynHarm" Solver Missing

Post by kevinarden »

The tutorial files are here in the tar.gz file
http://www.nic.funet.fi/pub/sci/physics/elmer/doc/
The test files are here
https://github.com/ElmerCSC/elmerfem/tr ... monic_wire

in the test case you will have to make this change for paraview
Post File = case.vtu

note that the radius in the test elmergrid file is 1
and the coordinate scaling is 1.E-3 in the test sif file
which make the radius .001
not the .01 stated in the tutorial nor sif comments
Post Reply