Author Topic: is there a permanent magnet simulator like LTSPICE?  (Read 1200 times)

0 Members and 1 Guest are viewing this topic.

Offline CapernicusTopic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 483
  • Country: au
is there a permanent magnet simulator like LTSPICE?
« on: May 17, 2021, 09:35:25 pm »
Magnets are so confusing, and it takes so much time to setup a real jig for a permanent magnet device,   its probably simpler than electricity to simulate, but it doesnt seem to be so popular.

Is there a 3d permanent magnet simulator on the internet somewhere?

Id prefer something like Falstad circuit simulator,  realtime is the best.
 

Offline penfold

  • Frequent Contributor
  • **
  • Posts: 675
  • Country: gb
Re: is there a permanent magnet simulator like LTSPICE?
« Reply #1 on: May 17, 2021, 10:28:05 pm »
It's not 3D, and not real-time but FEMM is a very useful simulation tool for magnetics, electrostatics and thermal in 2D. Magnetics (and electrostatics) tend to rely on representing "space" as a finite grid/mesh and solving equations for each point results in quite slow and difficult to realise in real-time simulations. Also changing a single point would strictly require re-evaluating the entire mesh which makes "interactivity" hard to incorporate into simulations, I find FEMM to be a reasonable balance between quality of results and the ability to make quick changes to simulation.

Most magnetics problems can be approximated as 2D, stuff like flux distribution in a motor or transformer. There is a scripting interface in FEMM that lets you rotate sections as if a motor's rotor for example.
 
The following users thanked this post: Capernicus

Offline CapernicusTopic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 483
  • Country: au
Re: is there a permanent magnet simulator like LTSPICE?
« Reply #2 on: May 18, 2021, 01:14:28 am »
Magnetics (and electrostatics) tend to rely on representing "space" as a finite grid/mesh and solving equations for each point results in quite slow and difficult to realise in real-time simulations.

I bet its nothing a gpu cant handle.
 

Offline CatalinaWOW

  • Super Contributor
  • ***
  • Posts: 5231
  • Country: us
Re: is there a permanent magnet simulator like LTSPICE?
« Reply #3 on: May 18, 2021, 01:29:46 am »
I have seen many magnetic simulation programs advertised in the trade magazines/journals.  All were pricey, most were add-ons to mechanical design solid modeling software.  There is a significant learning curve to learning the software, and magnetics are generally not simple themselves.  Non-linear material behavior is the norm, not the exception.

The are open source programs to do these things, but I don't have enough personal experience to recommend any, and found that for me it was a long way to useful output.  Might be a personal problem, but it is very possible that test setups will be the "faster and easier" approach.
 

Offline twospoons

  • Regular Contributor
  • *
  • Posts: 228
  • Country: nz
Re: is there a permanent magnet simulator like LTSPICE?
« Reply #4 on: May 18, 2021, 05:36:17 am »

I bet its nothing a gpu cant handle.

Bet you it is.

I used to run Ansys Maxwell for electromagnetic simulations of wireless power transfer - just the transmitting side - on an i7 with 64GB or ram and it could take days to run a single simulation.I would typically start a run on Friday and hope it was finished by Monday.  Adding more cores didn't help much.  The issue is just the sheer size of the problem once you start working in 3d. It ends up requiring a colossal amount of memory / disk space.

There are free 3d simulators available, like https://www.csc.fi/web/elmer .

FEMM4.1 is a very useful (and reasonably quick) FEA simulator that does 2D and 2.5D problems, and mentioned by penfold. Reducing a 3d problem to a 2d slice can still tell you quite a lot.
« Last Edit: May 18, 2021, 05:53:07 am by twospoons »
 
The following users thanked this post: Capernicus

Offline Terry Bites

  • Super Contributor
  • ***
  • Posts: 2391
  • Country: gb
  • Recovering Electrical Engineer
 

Offline penfold

  • Frequent Contributor
  • **
  • Posts: 675
  • Country: gb
Re: is there a permanent magnet simulator like LTSPICE?
« Reply #6 on: May 18, 2021, 12:53:48 pm »
Magnetics (and electrostatics) tend to rely on representing "space" as a finite grid/mesh and solving equations for each point results in quite slow and difficult to realise in real-time simulations.

I bet its nothing a gpu cant handle.

The floor is yours if you wish to code it  ;)

 

Offline CapernicusTopic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 483
  • Country: au
Re: is there a permanent magnet simulator like LTSPICE?
« Reply #7 on: May 18, 2021, 01:21:08 pm »
Magnetics (and electrostatics) tend to rely on representing "space" as a finite grid/mesh and solving equations for each point results in quite slow and difficult to realise in real-time simulations.

I bet its nothing a gpu cant handle.

The floor is yours if you wish to code it  ;)

I can code for gpu's and they are faster given the circumstance of what they are good at running,   if u did the magnet sim like a giant particle system gpus kick ass at that,  but its just a matter of making it realistic thats the problem,   maybe one day I'll give it a go.  There could be monetary benefit in a high performance mag sim... until they copy your idea and put out the alternative.
 

Offline penfold

  • Frequent Contributor
  • **
  • Posts: 675
  • Country: gb
Re: is there a permanent magnet simulator like LTSPICE?
« Reply #8 on: May 18, 2021, 03:44:36 pm »
I can code for gpu's and they are faster given the circumstance of what they are good at running,   if u did the magnet sim like a giant particle system gpus kick ass at that,  but its just a matter of making it realistic thats the problem,   maybe one day I'll give it a go.  There could be monetary benefit in a high performance mag sim... until they copy your idea and put out the alternative.

I was pushed for time, so I stuck with the snarky answer sorry. I wasn't really saying it's not possible, and it's definitely been done in commercial (at a price tag) and academic software (no comment). The equations fit quite neatly into GPUs since they are single-function multiple-data and each mesh node requires its nearest neighbours and 1 or 2 historic values (for time-domain), I did just that a little over 10 years ago as an academic when CUDA was just starting to become useful and I'd be happy to share some bits of code if you want something to start with (...if I can remember where I archived it). I wouldn't really doubt that you could simulate simple shapes, rectangles, transformer cores, simple (very simple) motors with just enough resolution to help you develop a bit of intuition about how the fields behave in 3D. But... what I'm not sure about is whether that would actually be any easier to understand over a 2D slice?
 
The following users thanked this post: Capernicus

Offline CapernicusTopic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 483
  • Country: au
Re: is there a permanent magnet simulator like LTSPICE?
« Reply #9 on: May 18, 2021, 05:34:05 pm »
Not snarky at all,   compared to what I'm used to its a breath of fresh air. :)  I guess you have to get a thick skin as an engineer, mines formed hard and beautiful tree bark now, but I do have a way to go yet before I consider myself "philosophically sound in a crazy environment"
I agree with what you said, sounds right to me,  so u can do a bit of gpu work yourself. I started off in direct x,  I was doing gp-gpu on shader 2 model. hehe. 

A 2d slice would go alot faster and more high resolution than 3d would, and its 99% all you need to test out whatever your making anyway.
GPGPU game of life sims are 10,000x the resolution of cpu ones if you count x and y.

It would be cool to have it on the internet, to go with FALSTAD,  if anyone wants to put the time in to get it.

You can do GPU code in browser based these days,  but thats a missing area in my knowledge,  I haven't learnt it, if you wanted to make it commercial.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf