Page 3 of 3

Re: Creating a boundary condition within an object, i.e. to measure flux

Posted: 27 Oct 2022, 18:59
by raback
Hi

What version of Gmsh do you have? I get:

Code: Select all

elmeruser@elmeruser-VirtualBox:~/ElmerWrk/core$ gmsh -3 coreWire.geo
Info    : Running 'gmsh -3 coreWire.geo' [Gmsh 4.4.1, 1 node, max. 1 thread]
Info    : Started on Thu Oct 27 18:56:07 2022
Info    : Reading 'coreWire.geo'...
Error   : Unknown number option 'Mesh.MeshSizeFromCurvature'
Info    : Done reading 'coreWire.geo'
Info    : Reading 'coreWire.geo.opt'...
Error   : Unknown string option 'General.BuildInfo'
Error   : Unknown string option 'General.ScriptingLanguages'
Error   : Unknown number option 'General.AbortOnError'
Error   : Unknown number option 'General.DetachedProcess'
Error   : Unknown number option 'General.FltkRefreshRate'
Error   : Unknown number option 'General.NativeFileChooser'
Segmentation fault (core dumped)
Edit: I downloaded a fresh Gmsh and seems to work fine there.

-Peter

Re: Creating a boundary condition within an object, i.e. to measure flux

Posted: 27 Oct 2022, 20:52
by raback
Hi,

You could try this one (with more iterations). The ~zero field at the interface is due to the fact that nodal fields are enforced to be continuous. Rather look at elemental fields... The magnetic energy for [x,y] table is integrated over. Here the code does not know what to do. I added some warnings and eliminated NaNs in the code (in devel).

-Peter

Re: Creating a boundary condition within an object, i.e. to measure flux

Posted: 29 Oct 2022, 11:50
by uplatise
Hi Peter,

thank you for the tip, the elemental fields do show correct results, however results only make sense with mean:

Code: Select all

  Mask Name 1 = "Flux1"
  Variable 1 = Magnetic Flux Density e 1
  Operator 1 = boundary int mean
  Variable 2 = Magnetic Flux Density e 2
  Operator 2 = boundary int mean
  Variable 3 = Magnetic Flux Density e 3
  Operator 3 = boundary int mean
  Variable 4 = Magnetic Flux Density e
  Operator 4 = area
EDIT: my mistake above -> they're correct also with "int" only dividing by "area"

I've noticed that if mesh isn't sufficiently fine then B-H non-linear characteristics may distort the accuracy due to high concentration (flows) at certain nodes (which will incorrectly saturate and limit the H). So mesh creation is really a critical point in non-linear sim.

Technically parallel reduction could be possible by taking in account the area if given as one of the mandatory (when parallel = true and mean used), or auto enabled unless given, operators: SUM A_i * mean_i / SUM A_i

Uros.

Re: Creating a boundary condition within an object, i.e. to measure flux

Posted: 01 Nov 2022, 00:02
by Rich_B
Hello,

Attached is another gmsh model of the flux core, this time with a rectangular cross section. The dimensions of the core were taken from the referenced paper. The geo file was designed to make it easy to refine the mesh in the cross section.

Included are two cross section views, using a mesh with nominally 4 elements on a side of the rectangular cross section.

Rich.
rect-core-1.png
rect-core-1.png (208.78 KiB) Viewed 1789 times
rect-core-2.png
rect-core-2.png (309.31 KiB) Viewed 1789 times

Re: Creating a boundary condition within an object, i.e. to measure flux

Posted: 02 Nov 2022, 13:11
by uplatise
Hi Rich,

thank you for the nice example and also runs very fast ~32 seconds, non-parallel exec. gmsh generates around 200k elements.

Had to "!Mask Name" to get calcs in the rectCore.dat file.

This particular material from the article has the following params:

Code: Select all

  PFM Dipoles Field Strength(1) = Real 70
  PFM Dipoles Flux Density(1)   = Real 0.361
  H-B Curve = Variable "dummy"
    Procedure "MagnetoDynamics" "PlatiseFerroModel"
Sim then runs abount 45 seconds, and results show slightly higher flux 0.09 T on linear u_r = 3000, and 0.12 T with above.

Next thing will be to add "coil around" ...

Uros.

Re: Creating a boundary condition within an object, i.e. to measure flux

Posted: 03 Nov 2022, 21:03
by Rich_B
Hello Uros,

Yes, adding coils would make sense, after adding two holes for the infinity loop.

Could you go through the math again, about how to calculate the expected magnetic flux density?

Rich.

Re: Creating a boundary condition within an object, i.e. to measure flux

Posted: 04 Nov 2022, 12:13
by raback
Hi,

Nice case! There is a value of being fast. Trying out different options is then so much faster.

Maybe you can add this also to the "elmer-elmag" repo.

-Peter