|
[Sponsors] |
A little brainstorming needed about an mpirun case! |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 8, 2018, 19:04 |
A little brainstorming needed about an mpirun case!
|
#1 |
Member
Anonymouse
Join Date: Dec 2015
Posts: 98
Rep Power: 11 |
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? |
|
October 8, 2018, 19:20 |
|
#2 |
Member
Anonymouse
Join Date: Dec 2015
Posts: 98
Rep Power: 11 |
Oh hey... findCell? Let's try that
ED: Lol, okay, solved my own problem. Guess it helps just to talk things out... |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[waves2Foam] Waves2Foam Related Topics | ngj | OpenFOAM Community Contributions | 660 | August 20, 2018 13:39 |
Simple channel case using cyclicAMI will not converge | cbcoutinho | OpenFOAM Running, Solving & CFD | 3 | August 4, 2015 13:28 |
Error when using mpirun for parallel case | mfoster | OpenFOAM Running, Solving & CFD | 10 | July 7, 2015 13:28 |
motorBike tutorial case needed | btgyd | OpenFOAM Running, Solving & CFD | 1 | November 8, 2010 16:12 |
[OpenFOAM] Paraview in Prallel (server-client) | prapanj | ParaView | 11 | September 24, 2010 08:12 |