CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Adding magnetic field to rhoCentralFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 27, 2015, 17:04
Default Adding magnetic field to rhoCentralFoam
  #1
New Member
 
Peter
Join Date: Nov 2014
Posts: 2
Rep Power: 0
pumpkinITER is on a distinguished road
In short, I'm looking to add in a magnetic field component to the rhoCentralFoam solver.

The simulation I'm running is supposed to represent a high temperature and pressure (5 eV, 300 MPa) plasma expanding out of a small cavity. I have run the simulation with just rhoCentralFoam, and now want to see the effect of running the same simulation if an external magnetic field is applied. I'm thinking that I'll be combining elements of rhoCentralFoam and mhdFoam.

Are there any good tutorials for this?

I've already seen "How to add temperature to icoFoam", but I think I need much more than that.

Thanks!
pumpkinITER is offline   Reply With Quote

Old   May 28, 2015, 06:47
Default
  #2
New Member
 
Alexey Ryakhovskiy
Join Date: Sep 2014
Posts: 11
Rep Power: 12
Alexee is on a distinguished road
Quote:
Originally Posted by pumpkinITER View Post
In short, I'm looking to add in a magnetic field component to the rhoCentralFoam solver.

The simulation I'm running is supposed to represent a high temperature and pressure (5 eV, 300 MPa) plasma expanding out of a small cavity. I have run the simulation with just rhoCentralFoam, and now want to see the effect of running the same simulation if an external magnetic field is applied. I'm thinking that I'll be combining elements of rhoCentralFoam and mhdFoam.

Are there any good tutorials for this?

I've already seen "How to add temperature to icoFoam", but I think I need much more than that.

Thanks!
I'm working on a similar problem. Initially I went with sonicFoam and added magnetic field into it, nut now I'm switching to density-based solver. I didn't use a lot of literature aside from the link you've provided, but I only needed to add constant magnetic field from a coil, so I just wrote a script to calculate in each cell using writeCellCentres.

I just realized that your post is dated February^^. Have you succeded in modifying rhoCentralFoam? If so, maybe you can share your experience or, if not, I can probably answer some of your questions.
Alexee is offline   Reply With Quote

Old   July 3, 2015, 10:37
Default
  #3
Senior Member
 
Join Date: Oct 2013
Posts: 397
Rep Power: 19
chriss85 will become famous soon enough
Any updates here?
I'm also somewhat interested in adding new terms to rhoCentralFoam. I'm currently using sonicFoam, but I think that rhoCentralFoam might be better.

Do you happen to know how low the MACH number may be with rhoCentralFoam to keep it stable and reliable? Because in plasmas the speed of sound can be considerably higher than in air, so we can have subsonic cases even when the flow is a few thousand metres per second.
chriss85 is offline   Reply With Quote

Old   July 4, 2015, 06:35
Default
  #4
New Member
 
Alexey Ryakhovskiy
Join Date: Sep 2014
Posts: 11
Rep Power: 12
Alexee is on a distinguished road
Quote:
Originally Posted by chriss85 View Post
Any updates here?
I'm also somewhat interested in adding new terms to rhoCentralFoam. I'm currently using sonicFoam, but I think that rhoCentralFoam might be better.

Do you happen to know how low the MACH number may be with rhoCentralFoam to keep it stable and reliable? Because in plasmas the speed of sound can be considerably higher than in air, so we can have subsonic cases even when the flow is a few thousand metres per second.
Hey, I've succeded to some extent in adding e/m interaction into rhoCentralFoam. My problem has constant magnetic field, so all I had to do is calculating Lorenz force as a function of velocity.

Using upwind schemes for interpolation helped me to keep rhoCentralFoam stable. (vanLeer schemes, that are used in shockTube tutorial caused the solver to crash on my problem (mach=3)).
rhoCentralFoam is better than sonicFoam in that it doesn't cause overshooting in shockwave like the sonicFoam does. I'd show you exactly what I mean by that, but I'm not at work till Monday. Basically the pressure in the shock wave from has to be monotone, but with sonicFoam (as with all pressure-based solvers, as opposed to density-based) it has a spike, which is essentially non-physical.
Alexee is offline   Reply With Quote

Old   July 6, 2015, 05:57
Default
  #5
Senior Member
 
Join Date: Oct 2013
Posts: 397
Rep Power: 19
chriss85 will become famous soon enough
You are at supersonic speeds though with MACH=3, at which density based solvers outperform pressure based solvers like sonicFoam. Have you made sure to use the correct speed of sound? In plasmas it can be significantly higher due to the high temperature.
chriss85 is offline   Reply With Quote

Old   April 7, 2016, 13:33
Default Updates??
  #6
New Member
 
Sanjiv Paudel
Join Date: Aug 2015
Posts: 10
Rep Power: 11
mechesanjiv is on a distinguished road
Hello all above,

May I know where should I scroll to get the idea to incorporate mhdFoam into one of the density based solver or in rhoCentralFoam as discussed above? I have setup a density based solver but I am stuck in evaluating the magnetic field effect in it!!
Please reply me in your free time..

Thanks,

Last edited by mechesanjiv; April 20, 2016 at 11:52.
mechesanjiv is offline   Reply With Quote

Reply

Tags
magnetic field, mhdfoam, plasma, rhocentralfoam


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding source terms to rhoCentralFoam chriss85 OpenFOAM Programming & Development 1 July 1, 2023 14:08
Re: Magnetic field around a current carrying square bar yashganatra Fluent UDF and Scheme Programming 7 August 3, 2022 08:13
chtMultiRegionSimpleFoam samiam1000 OpenFOAM Running, Solving & CFD 39 March 31, 2016 09:43
adding temperature field to icofoam houkensjtu OpenFOAM 5 September 26, 2012 23:20
ACCESS VIOLATION MHDWill FLUENT 1 September 23, 2007 03:51


All times are GMT -4. The time now is 13:07.