CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

multiregion electrostatics

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   February 10, 2011, 16:35
Default multiregion electrostatics
  #1
New Member
 
Kiri Pullar
Join Date: Nov 2010
Posts: 5
Rep Power: 6
kirip is on a distinguished road
Hi all,
I have been struggling in OF17 for some time to set up a basic electrostatic simulation using multiple regions. I thought I had found a good starting point when I found Alireza Javidi project on http://www.tfd.chalmers.se/~hani/kurser/OS_CFD/
which is titled Implementing "chtMultiRegionFoam" Solver for Electric welding in OpenFoam 1.6.x
While I don't care about heat transfer or any of the fluid dynamic things so far I have found it really difficult to find much documentation about setting up solvers and BCs for multiple regions in OF.
So I downloaded the solver and run files from here:
http://www.tfd.chalmers.se/~hani/kur...irezaFiles.tgz
and it may just be me being a noob but I can't seem to recreate his results. The only thing I changed was setting sigma to 80 as I was trying to troubleshoot and this is what his figures showed. It seems like something weird is happening at the interface boundary, in particular I think it may be the bottomSolid side. (See figures)
So if anyone can (A) see what is going wrong in these files, or (B) has any advice or simple simulations for electrostatics with multiple materials it would be much appreciated.
Thanks in advance
Kiri
Attached Images
File Type: gif Kiri_Potential_sigmaBS80sigmaTA80.gif (3.7 KB, 19 views)
File Type: gif Kiri_Temperature.gif (4.4 KB, 15 views)
File Type: gif Alireza_graph_sigmaBS80sigmaTA80.gif (15.3 KB, 13 views)
File Type: gif Alireza_graph_Temperature.gif (18.0 KB, 11 views)
kirip is offline   Reply With Quote

Old   February 14, 2011, 06:45
Default
  #2
Senior Member
 
Matthias Voß
Join Date: Mar 2009
Location: Berlin, Germany
Posts: 414
Rep Power: 10
mvoss is on a distinguished road
hi,

did you try to improve the mesh quality?
I faced the exact same behavior when i implemented this approach in my mhd-solver.
Which OF version do you using?

neewbie

Last edited by mvoss; February 14, 2011 at 10:14.
mvoss is offline   Reply With Quote

Old   February 14, 2011, 17:20
Default Thanks
  #3
New Member
 
Kiri Pullar
Join Date: Nov 2010
Posts: 5
Rep Power: 6
kirip is on a distinguished road
Have both openfoam 1.5-dev and openfoam 1.7.1 currently installed on my computer.

Now I feel a little silly with all the time I wasted trying to make things work. It seems you were correct (that will teach me for assuming the supplied files were what was actually used to create the results). Still fiddling around trying to get the line smooth but changing the coarseness of the mesh has definitely made significant improvement.

Less urgent now that I have (hopefully) got the basics going, but would still be interested in hearing from anyone/seeing examples of using openfoam for multiregion electromagnetics.

Thanks heaps to neewbie
kirip is offline   Reply With Quote

Old   February 15, 2011, 03:51
Default
  #4
Senior Member
 
Matthias Voß
Join Date: Mar 2009
Location: Berlin, Germany
Posts: 414
Rep Power: 10
mvoss is on a distinguished road
so do i. what kind of electro-magnetics do you have in mind?Welding?PC-Hardware?

Regarding the multiple regions, i started to dig in the regionCouple for building a BC for smth. else than a scalar-value.
For scalar values you can also use
Code:
type            compressible::turbulentTemperatureCoupledBaffleMixed;
worked pretty well for me but i am not sure about the thermo physical properties.

neewbie
mvoss is offline   Reply With Quote

Old   February 15, 2011, 22:47
Default Why multiregion electrostatics?
  #5
New Member
 
Kiri Pullar
Join Date: Nov 2010
Posts: 5
Rep Power: 6
kirip is on a distinguished road
I am a Phd student trying to simulate electromagnetic fields in order to examine the sharks electrosensory system.
So my simplest scenario is I have two materials with differing conductivities (flesh and seawater) and want to examine the electric field due to a dipole source both in the seawater and in the shark.
I want to begin by looking at a single electrosensory organ, these organs open to the seawater and canal walls have high resistivity. Once I can get this "simple" simulation setup there are lots of questions I can examine based on experimental data. Then onto more complicated geometries and scenarios (i.e. the induced electric field through swimming in a magnetic field).
So the main reason I am dealing with openfoam is because what I want to do is unlikely to be doable with software out of the box (plus commercial electromagnetic software is super expensive!). I am liking that being opensource OF is very modifiable but the learning curve is pretty steep atm.
Wish me luck, it should be interesting!
kirip is offline   Reply With Quote

Old   April 11, 2011, 19:16
Default If you have the problem I mentioned above
  #6
New Member
 
Kiri Pullar
Join Date: Nov 2010
Posts: 5
Rep Power: 6
kirip is on a distinguished road
So today I learnt that another thing that causes discontinuities at the interface between materials is the way you import into parafoam (I had set up a more complicated case and it appeared my problem wasn't mesh quality). I had been using the script buildRegionPseudocases.py to set up my multiple regions to go into parafoam, but when I switched to having a bash script before running the solver saying parafoam -touch -region regionname my problem disappeared....so much time wasted through thinking there was a problem with my solver
Just thought I would let others know not to make the same mistakes as me

Last edited by kirip; April 11, 2011 at 20:04.
kirip is offline   Reply With Quote

Old   April 12, 2011, 07:46
Default
  #7
Senior Member
 
Matthias Voß
Join Date: Mar 2009
Location: Berlin, Germany
Posts: 414
Rep Power: 10
mvoss is on a distinguished road
so basically the behavior from post #1 disappeared when using the bash-script?
mvoss is offline   Reply With Quote

Old   April 12, 2011, 16:25
Default
  #8
New Member
 
Kiri Pullar
Join Date: Nov 2010
Posts: 5
Rep Power: 6
kirip is on a distinguished road
Yes-its weird. Originally I thought that adjusting the mesh quality like you mentioned had worked, but then I changed the geometry and still had the problem.
It got to the point where I was sure it wasn't the mesh quality that was the issue, so I spent ages trying to fix the continuity at the interface which turned out to be a non existent problem.
Somewhere along the way I gave up and started modifying chtMultiRegionFoam from scratch again and seemingly the only difference between working and not working was using the bash script, which I forget why I hadn't been using one in the first place (possibly just being a noob and getting easily confused)
Fun times
Kiri

I added a picture to show the difference. Same simulation and same parameters for contour of electric potential, only difference is how it got into paraFoam.
The top one I ran python buildRegionPseudocases.py at the end of solving, then opened the pseudocases using paraFoam, the bottom one I used a bash script before solving which had the command paraFoam -touch -region regionname then open as normal and they look rather different even though the results are exactly the same.
Attached Images
File Type: jpg Compare_import_cropped.jpg (30.5 KB, 28 views)

Last edited by kirip; April 12, 2011 at 18:44. Reason: added picture
kirip is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conjugate heat transfer and multiregion akidess OpenFOAM 10 July 25, 2013 05:52
multiRegion version of pisoFoam Fransje OpenFOAM Programming & Development 7 May 30, 2011 18:57
Multiregion mesh bengy STAR-CCM+ 1 August 3, 2010 06:37
Multiregion meshing with interface in between regions bhaskar STAR-CCM+ 2 June 23, 2009 07:06
electrostatics Mary Main CFD Forum 0 August 20, 2004 11:05


All times are GMT -4. The time now is 01:36.