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

A little brainstorming needed about an mpirun case!

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 8, 2018, 18:04
Default A little brainstorming needed about an mpirun case!
  #1
Member
 
Anonymouse
Join Date: Dec 2015
Posts: 98
Rep Power: 10
KarenRei is on a distinguished road
So, I've been for a couple days baffled about some behavior I was seeing in a simulation of an array of spark gaps. When I run a non-decomposed case, it worked as expected. But when I ran a decomposed case with mpirun, I was getting far too many sparks, and in weird locations.

All of the sudden, it hit me: every single parallel case runs my scalarCodedSourceCoeffs / codeAddSup code in fvOptions. This code involves tracking down the closest cell to the spark (computing the x and y differences from mesh_.C(), aka the cell centres) and then adding in the appropriate power during the appropriate cycles. Obviously, in the non-decomposed case, this works. But in the decomposed case, many of the parallel segments won't even be close to any given spark. The code is just picking the closest cell regardless, even though it may be very far away.

My first thought was a distance limit, but that doesn't really work. The cells can be radically different in size, and they're generated by snappyHexMesh over an autogenerated model. So a distance limit would disk both failing to detect that a spark does belong within a given cell if that cell is large, or by having different parallel cases both simulate the spark if the spark is on the border zone and the cells are small in size.

Really what would be *ideal* would be some sort of "is_inside_cell(x, y, z)" function. Does anything like that exist?
KarenRei is offline   Reply With Quote

Old   October 8, 2018, 18:20
Default
  #2
Member
 
Anonymouse
Join Date: Dec 2015
Posts: 98
Rep Power: 10
KarenRei is on a distinguished road
Oh hey... findCell? Let's try that


ED: Lol, okay, solved my own problem. Guess it helps just to talk things out...
KarenRei is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[waves2Foam] Waves2Foam Related Topics ngj OpenFOAM Community Contributions 660 August 20, 2018 12:39
Simple channel case using cyclicAMI will not converge cbcoutinho OpenFOAM Running, Solving & CFD 3 August 4, 2015 12:28
Error when using mpirun for parallel case mfoster OpenFOAM Running, Solving & CFD 10 July 7, 2015 12:28
motorBike tutorial case needed btgyd OpenFOAM Running, Solving & CFD 1 November 8, 2010 15:12
[OpenFOAM] Paraview in Prallel (server-client) prapanj ParaView 11 September 24, 2010 07:12


All times are GMT -4. The time now is 22:08.