Sign of Lorentz force

Numerical methods and mathematical models of Elmer
Andrea_P
Posts: 176
Joined: 22 Mar 2021, 18:39
Antispam: Yes
Location: POLYTHECNIC UNIVERSITY OF TURIN

Sign of Lorentz force

Post by Andrea_P »

Hi,
I have noted from my simulation that the Lorentz force is in the opposite sign with respect to the real physics of the problem. Indeed, It should be negative in the interface

Code: Select all

interface=h*h1
I have computed the values by hand following the equations in the description of the model, but I don't obtain the same things in term of the sign
Is it a sign problem of the Magnetic induction solver? Is it possible to view the solver script? Maybe, I am doing some sign mistakes in the case.sif for example in:

Code: Select all

-dofs 3 lorentz force
This is the link of my mesh: https://we.tl/t-KWhl7gTGct. Thanks in advance for your precious help.
I have proved with both the signs of external B in the material section, nevertheless, in both cases the Lorentz force is positive.
I have attached an image of the computation where I show the sign.

Regards,
Andrea
Attachments
Caso report oscillazioni.jpg
(192.59 KiB) Not downloaded yet
case_positive_B.sif
(6.33 KiB) Downloaded 127 times
case_negative_B.sif
(6.38 KiB) Downloaded 126 times
POLYTECHNIC UNIVERSITY OF TURIN-DIMEAS
raback
Site Admin
Posts: 4803
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Sign of Lorentz force

Post by raback »

Hi

Lorenze force is for historical reasons here:
https://github.com/ElmerCSC/elmerfem/bl ... ntials.F90

For your term look at line 181. Seems ok to me.

-Peter
Andrea_P
Posts: 176
Joined: 22 Mar 2021, 18:39
Antispam: Yes
Location: POLYTHECNIC UNIVERSITY OF TURIN

Re: Sign of Lorentz force

Post by Andrea_P »

Thanks Peter, so I cannot explain why Lorentz force isn’t negative.
Andrea
Attachments
682D8DDA-82EB-41F4-A52C-A22C6D4A5A32.png
(22.7 KiB) Not downloaded yet
POLYTECHNIC UNIVERSITY OF TURIN-DIMEAS
Andrea_P
Posts: 176
Joined: 22 Mar 2021, 18:39
Antispam: Yes
Location: POLYTHECNIC UNIVERSITY OF TURIN

Re: Sign of Lorentz force

Post by Andrea_P »

raback wrote: 07 Jul 2021, 11:37 Hi

Lorenze force is for historical reasons here:
https://github.com/ElmerCSC/elmerfem/bl ... ntials.F90

For your term look at line 181. Seems ok to me.

-Peter
I have checked in the Hartmann Problem published in the GitHub collection and the results for the Lorentz Force and electric current are right in terms of the sign. Hence, I don't know if it depends on the BC used, because I read in the model manual that as BC you can use a Dirichlet condition for the induced magnetic field and not for the applied one. By the way, I conclude that is not a problem of BC maybe.
POLYTECHNIC UNIVERSITY OF TURIN-DIMEAS
kevinarden
Posts: 2221
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Sign of Lorentz force

Post by kevinarden »

I have not looked into this specific example, but in other problems I have learned that positive boundary values are positive normal to the boundary away from the body the boundary is attached ton and negative into the body it is attached to. Regardless of coordinate system used.
Andrea_P
Posts: 176
Joined: 22 Mar 2021, 18:39
Antispam: Yes
Location: POLYTHECNIC UNIVERSITY OF TURIN

Re: Sign of Lorentz force

Post by Andrea_P »

Apparently, I have resolved the problem by putting a homogeneous boundary condition in the "Movin wall" (boundary 1):

Code: Select all

Magnetic Field 1 = 0
Magnetic Field 2 = 0
Magnetic Field 3 = 0
When I have refined the mesh, this error occurred:

Code: Select all

 Error occurred in umf4num:   -1.0000000000000000     
STOP 1
What does it mean?
-Andrea
POLYTECHNIC UNIVERSITY OF TURIN-DIMEAS
kevinarden
Posts: 2221
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Sign of Lorentz force

Post by kevinarden »

I get that error when the machine runs out of memory. You can try mumps or the iterative solver.
Andrea_P
Posts: 176
Joined: 22 Mar 2021, 18:39
Antispam: Yes
Location: POLYTHECNIC UNIVERSITY OF TURIN

Re: Sign of Lorentz force

Post by Andrea_P »

kevinarden wrote: 08 Jul 2021, 11:49 I get that error when the machine runs out of memory. You can try mumps or the iterative solver.
Whit an iterative method I don't have good results, mumps gave some problems too. So, can't I o anything about that memory limitation?
POLYTECHNIC UNIVERSITY OF TURIN-DIMEAS
kevinarden
Posts: 2221
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Sign of Lorentz force

Post by kevinarden »

1. Get more RAM
2. Reduce the problem size
3. Set up/increase the size of a swap file (disk space used as RAM)
Andrea_P
Posts: 176
Joined: 22 Mar 2021, 18:39
Antispam: Yes
Location: POLYTHECNIC UNIVERSITY OF TURIN

Re: Sign of Lorentz force

Post by Andrea_P »

kevinarden wrote: 08 Jul 2021, 12:39 1. Get more RAM
2. Reduce the problem size
3. Set up/increase the size of a swap file (disk space used as RAM)
Thanks, Kevin, another question, is there the possibility to extend the number of time steps when a simulation has finished by keeping the results obtained until the last step? Namely, not starting over, just from the last time step.
POLYTECHNIC UNIVERSITY OF TURIN-DIMEAS
Post Reply