Apply Lorentz force as body force for Lin Elast solver

Numerical methods and mathematical models of Elmer
Post Reply
zeljkoT
Posts: 9
Joined: 14 Nov 2018, 12:55
Antispam: Yes

Apply Lorentz force as body force for Lin Elast solver

Post by zeljkoT » 14 Dec 2018, 20:21

Hi experts

How to apply the Lorentz force from electromagnetic to linear elastic calculation?

Check out the appendix:
I have a running 3D Emag calculation but want to couple it to observer the diplacemten of a coil caused by electromagnetic forces.
Do I have to save the force in a variable first and apply it afterwards or is there maybe a simple command?

thx for your help...

Cheers
Attachments
rectCoil.zip
(88.36 KiB) Downloaded 27 times

raback
Site Admin
Posts: 3404
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Apply Lorentz force as body force for Lin Elast solver

Post by raback » 15 Dec 2018, 15:51

Hi

I hope you use the same mesh for both. Then the way to do this is:

1) In postprocessing ask "Calculate Nodal Forces" and you should get fields "Nodal Force i", i=1,2,3
2) For the BC where you want to give the force say "Displacement i Load = Equals "Nodal Force i", i=1,2,3

This is convenient since you have clear separation of the electromagnetic and structual domains and they are linked by nodal forces.

-Peter

zeljkoT
Posts: 9
Joined: 14 Nov 2018, 12:55
Antispam: Yes

Re: Apply Lorentz force as body force for Lin Elast solver

Post by zeljkoT » 18 Dec 2018, 13:42

Hi Peter

Thank you for your answer.
It works perfectly.

I will compare the solution with another SW and share my example afterwards in the "Contributed cases" folder.
For the sake of completeness herer the need code in the sif file:

Code: Select all

Body Force 1
  Name = "LorentzForce"
  Displacement 1 Load = Equals "Nodal Force 1"
  Displacement 2 Load = Equals "Nodal Force 2"
  Displacement 3 Load = Equals "Nodal Force 3"
End
Cheers

raback
Site Admin
Posts: 3404
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Apply Lorentz force as body force for Lin Elast solver

Post by raback » 18 Dec 2018, 13:44

Hi zeljko,

Good to hear! Looking forward for your example.

-Peter

zeljkoT
Posts: 9
Joined: 14 Nov 2018, 12:55
Antispam: Yes

Re: Apply Lorentz force as body force for Lin Elast solver

Post by zeljkoT » 27 Dec 2018, 02:53

Hi Peter

Regarding the force one question again:

In order to compare the numeric with analytic results I need to get the volume integral of the force density in X, Y and Z direction.
I already know that a volume integral of a quantity can be calculated by the SaveScalars solver like this (pls correct me if Im wrong):

Code: Select all

Solver 3
  Equation = SaveScalars
  Exec Solver = after all
  Filename = myData.dat
  Procedure = "SaveData" "SaveScalars"
  Operator 1 = volume
  Operator 2 = volume
  Operator 3 = volume
  Variable 1 = Nodal Force 1
  Variable 2 = Nodal Force 2
  Variable 3 = Nodal Force 3
End
But unfortunately I get for all direction Fx, Fy, Fz the same scalar value (2.663758597243E-004), and this can not be.
When I analyse the fields saved in the case.vtu file I can not see force values corresponding to any direction, only something called "nodal force e" or "nodal force". And this migth cause the wrong interpretation of the SaveScalars solver. I guess SaveScalars takes "nodal force e" and integrates it over the whole volume of all domains, right?

Therefore my questions:
1. Is the SaveScalars code snippet right?
2. How can I get access to nodal forces in X, Y and Z direction? The best way would be to get them saved to the output file for visualization purposes!
3. How can I force the SaveScalars to integrate only over one body/conductor?

Thx for your help.
Cheers

raback
Site Admin
Posts: 3404
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Apply Lorentz force as body force for Lin Elast solver

Post by raback » 02 Jan 2019, 17:46

Hi

Nodal force is directly given as Newtons. So you should not intergrate over it, but take a sum i.e. operator should be "sum".

You can either compute nodal forces either using standard or DG basis where each node has separate value in different elements. The latter is needed when you need to distinguish forces acting on different bodies over an interface. The you would naturally operate on "Nodal Force e 1" etc.

-Peter

zeljkoT
Posts: 9
Joined: 14 Nov 2018, 12:55
Antispam: Yes

Re: Apply Lorentz force as body force for Lin Elast solver

Post by zeljkoT » 08 Jan 2019, 23:48

Hi Peter

Thx for your reply.
Ok, I see, the "sum" operator is the right one.

Yes, I need to distinguish the forces between bodies. In my test case I have two parallel wires covered by air, where a predefined current is flowing. So ideally I need to sum up the Lorentz forces only on one wire and then I can compare it with analytical formula.
Unfortunately I dont understand what do you mean with "you would naturally operate on "Nodal Force e 1"". Can you explain it more precisely pls?

Thx and cheers

zeljkoT
Posts: 9
Joined: 14 Nov 2018, 12:55
Antispam: Yes

Re: Apply Lorentz force as body force for Lin Elast solver

Post by zeljkoT » 15 Apr 2019, 14:21

Hey guys

I follow up to regarding the force density integration over seperate bodies:

If there are 2 bodies (2 parallel current carrying wires) and I want to integrate the force density of only one body, how to get the total force in N for x,y & z direction? Or in other words, I need for every body the total force in x,y & z!

I still do not understand how to get such a list.
Any suggestions?

raback
Site Admin
Posts: 3404
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Apply Lorentz force as body force for Lin Elast solver

Post by raback » 18 Apr 2019, 15:47

Hi

Look at test case mgdyn_airgap_force:
https://github.com/ElmerCSC/elmerfem/tr ... rgap_force

There a concept of "component" is used to group together bodies. In these bodies you can automatically sum up the nodal forces that you have already computed.

-Peter

Post Reply