Apply Lorentz force as body force for Lin Elast solver
Apply Lorentz force as body force for Lin Elast solver
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
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

 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
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
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
Re: Apply Lorentz force as body force for Lin Elast solver
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:
Cheers
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

 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
Hi zeljko,
Good to hear! Looking forward for your example.
Peter
Good to hear! Looking forward for your example.
Peter
Re: Apply Lorentz force as body force for Lin Elast solver
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):
But unfortunately I get for all direction Fx, Fy, Fz the same scalar value (2.663758597243E004), 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
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
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

 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
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
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
Re: Apply Lorentz force as body force for Lin Elast solver
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
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
Re: Apply Lorentz force as body force for Lin Elast solver
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?
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?

 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
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
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