MHD: HARTMANN PROBLEM 2D
-
- Site Admin
- Posts: 4823
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: MHD: HARTMANN PROBLEM 2D
Hi
Do you have mesh dense enough to resolve the boundary layers? Your picture looks very coarse. I think Kevin got good results with a fine enough mesh. Isn't this the same problem?
-Peter
Do you have mesh dense enough to resolve the boundary layers? Your picture looks very coarse. I think Kevin got good results with a fine enough mesh. Isn't this the same problem?
-Peter
-
- Posts: 176
- Joined: 22 Mar 2021, 18:39
- Antispam: Yes
- Location: POLYTHECNIC UNIVERSITY OF TURIN
Re: MHD: HARTMANN PROBLEM 2D
Hi Peter,
Yes, it is the same problem. Actually, the mesh is coarse. Now I am using the last Kevin's mesh and the maximum value of the velocity is always the same.
-Andrea
- Attachments
-
- beam.grd
- (630 Bytes) Downloaded 149 times
-
- velocity.png (14.8 KiB) Viewed 4988 times
POLYTECHNIC UNIVERSITY OF TURIN-DIMEAS
-
- Site Admin
- Posts: 4823
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: MHD: HARTMANN PROBLEM 2D
Hi,
I had some time to study this interesting problem. Convergence depends quite a bit on the strength of the coupling. It is difficult to get good convergence wit large magnetic fields without some relaxation.
To make the study somewhat faster I use only 2 elements in x-direction + periodic BCs. This way I can iterate a converged solution of the profile in seconds. The price is that the Ha number can only be defined after the simulation. We should add a piece of code to constrain the average velocity, now an offset of pressure is used. Still, this can be used to ensure the correctness of the coupling. I hope it helps.
Plot the output profile with
-Peter
I had some time to study this interesting problem. Convergence depends quite a bit on the strength of the coupling. It is difficult to get good convergence wit large magnetic fields without some relaxation.
To make the study somewhat faster I use only 2 elements in x-direction + periodic BCs. This way I can iterate a converged solution of the profile in seconds. The price is that the Ha number can only be defined after the simulation. We should add a piece of code to constrain the average velocity, now an offset of pressure is used. Still, this can be used to ensure the correctness of the coupling. I hope it helps.
Plot the output profile with
Code: Select all
load f.dat
plot(f(:,5),f(:,13))
-Peter
-
- Posts: 176
- Joined: 22 Mar 2021, 18:39
- Antispam: Yes
- Location: POLYTHECNIC UNIVERSITY OF TURIN
Re: MHD: HARTMANN PROBLEM 2D
Hi Peter,raback wrote: ↑02 Jun 2021, 18:05 Hi,
I had some time to study this interesting problem. Convergence depends quite a bit on the strength of the coupling. It is difficult to get good convergence wit large magnetic fields without some relaxation.
To make the study somewhat faster I use only 2 elements in x-direction + periodic BCs. This way I can iterate a converged solution of the profile in seconds. The price is that the Ha number can only be defined after the simulation. We should add a piece of code to constrain the average velocity, now an offset of pressure is used. Still, this can be used to ensure the correctness of the coupling. I hope it helps.
Plot the output profile withCode: Select all
load f.dat plot(f(:,5),f(:,13))
-Peter
Thanks a lot for your precious time, Peter, I try it right now. Will it be added to the Elmer tests collection on GitHub?
Regards,
Andrea
POLYTECHNIC UNIVERSITY OF TURIN-DIMEAS
-
- Site Admin
- Posts: 4823
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: MHD: HARTMANN PROBLEM 2D
It, may be added as a test. Just would like to add a constraint for the total flow before that. -Peter
-
- Posts: 176
- Joined: 22 Mar 2021, 18:39
- Antispam: Yes
- Location: POLYTHECNIC UNIVERSITY OF TURIN
Re: MHD: HARTMANN PROBLEM 2D
That's perfect Peter, I am really happy about this possible publication. Now I am trying to couple the Level set with the Magnetic solver used in this Hartmann problem example.
Regards,
Andrea
POLYTECHNIC UNIVERSITY OF TURIN-DIMEAS
-
- Posts: 176
- Joined: 22 Mar 2021, 18:39
- Antispam: Yes
- Location: POLYTHECNIC UNIVERSITY OF TURIN
Re: MHD: HARTMANN PROBLEM 2D
How do I have to write this code?raback wrote: ↑02 Jun 2021, 18:05 Hi,
I had some time to study this interesting problem. Convergence depends quite a bit on the strength of the coupling. It is difficult to get good convergence wit large magnetic fields without some relaxation.
To make the study somewhat faster I use only 2 elements in x-direction + periodic BCs. This way I can iterate a converged solution of the profile in seconds. The price is that the Ha number can only be defined after the simulation. We should add a piece of code to constrain the average velocity, now an offset of pressure is used. Still, this can be used to ensure the correctness of the coupling. I hope it helps.
Plot the output profile withCode: Select all
load f.dat plot(f(:,5),f(:,13))
-Peter
Code: Select all
load f.dat
plot(f(:,5),f(:,13))
Can't I use Paraview?
Regards,
Andrea
POLYTECHNIC UNIVERSITY OF TURIN-DIMEAS
-
- Site Admin
- Posts: 4823
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: MHD: HARTMANN PROBLEM 2D
Hi
This case inspired me to implement integral constraint for any field. So the idea is that on a given boundary you can define \int f dA = F(t,...). This comes handy in this case as we can set the average inlet velocity to one without knowing the profile. We don't even need long tubes to develop the flow. It can be quite a short piece of tube.
Here is the compute profile with different values of the nondimensional parameter. The case was just added as a test case here:
https://github.com/ElmerCSC/elmerfem/tr ... ntHartmann
This case can be used to study the severity of the boundary layer challenge and difficulty of relaxation. The larger the external magnetic force the smaller the relaxation factor must be. These observations may be good to study before going into more complicated cases.
-Peter
PS. The code for integral constraint was just committed so you need to recompile or wait for the new builds to appear.
This case inspired me to implement integral constraint for any field. So the idea is that on a given boundary you can define \int f dA = F(t,...). This comes handy in this case as we can set the average inlet velocity to one without knowing the profile. We don't even need long tubes to develop the flow. It can be quite a short piece of tube.
Here is the compute profile with different values of the nondimensional parameter. The case was just added as a test case here:
https://github.com/ElmerCSC/elmerfem/tr ... ntHartmann
This case can be used to study the severity of the boundary layer challenge and difficulty of relaxation. The larger the external magnetic force the smaller the relaxation factor must be. These observations may be good to study before going into more complicated cases.
-Peter
PS. The code for integral constraint was just committed so you need to recompile or wait for the new builds to appear.
-
- Posts: 176
- Joined: 22 Mar 2021, 18:39
- Antispam: Yes
- Location: POLYTHECNIC UNIVERSITY OF TURIN
Re: MHD: HARTMANN PROBLEM 2D
Hi Peter,raback wrote: ↑15 Jun 2021, 17:31 Hi
This case inspired me to implement integral constraint for any field. So the idea is that on a given boundary you can define \int f dA = F(t,...). This comes handy in this case as we can set the average inlet velocity to one without knowing the profile. We don't even need long tubes to develop the flow. It can be quite a short piece of tube.
Here is the compute profile with different values of the nondimensional parameter.
HartmannProfile.PNG
The case was just added as a test case here:
https://github.com/ElmerCSC/elmerfem/tr ... ntHartmann
This case can be used to study the severity of the boundary layer challenge and difficulty of relaxation. The larger the external magnetic force the smaller the relaxation factor must be. These observations may be good to study before going into more complicated cases.
-Peter
PS. The code for integral constraint was just committed so you need to recompile or wait for the new builds to appear.
Extraordinary work!!! Can the Magnetic solver used for this case deal with function to define the magnetic field? I have tried with a function like this:
Code: Select all
Applied Magnetic Field 1 = Variable Coordinate 2
Real MATC " B1*exp(-(tx-0.01)^2/(2*(1002)^2))"
Regards,
Andrea
POLYTECHNIC UNIVERSITY OF TURIN-DIMEAS
-
- Posts: 176
- Joined: 22 Mar 2021, 18:39
- Antispam: Yes
- Location: POLYTHECNIC UNIVERSITY OF TURIN
Re: MHD: HARTMANN PROBLEM 2D
What does integral BC velocity mean?raback wrote: ↑15 Jun 2021, 17:31 Hi
This case inspired me to implement integral constraint for any field. So the idea is that on a given boundary you can define \int f dA = F(t,...). This comes handy in this case as we can set the average inlet velocity to one without knowing the profile. We don't even need long tubes to develop the flow. It can be quite a short piece of tube.
Here is the compute profile with different values of the nondimensional parameter.
HartmannProfile.PNG
The case was just added as a test case here:
https://github.com/ElmerCSC/elmerfem/tr ... ntHartmann
This case can be used to study the severity of the boundary layer challenge and difficulty of relaxation. The larger the external magnetic force the smaller the relaxation factor must be. These observations may be good to study before going into more complicated cases.
-Peter
PS. The code for integral constraint was just committed so you need to recompile or wait for the new builds to appear.
POLYTECHNIC UNIVERSITY OF TURIN-DIMEAS