|
[Sponsors] |
May 10, 2017, 17:17 |
Update FOAM objects after new solver run
|
#1 |
New Member
Join Date: Apr 2017
Posts: 5
Rep Power: 9 |
Hello everyone.
I'm writing a program, in which I do some calculations, get set of coordinates. I create a mesh and run a solver via system calls; then I load this data in Foam objects, preform calculations with new data, and repeat these steps in a loop. Initializing objects for the first time seems OK, but I'm not sure, how should I re-load new data into them. I use the following Foam objects: argList Time fvMesh meshSearch volFields I wrapped them in a class and just create a new instance every step, but I get incorrect results when reading volFields, though data files are correct (I checked this with paraview). So how should I re-initialize these objects? I found that some of them have sort of "update" functions, but it's not clear if I should use them or do something else. Thanks in advance. |
|
May 11, 2017, 17:26 |
|
#2 |
New Member
Join Date: Apr 2017
Posts: 5
Rep Power: 9 |
My problem seems to be solved. I replaced meshSearch::findNearestCell with meshSearch::findCell. It works slower, but gives right results. May be, I just misunderstood the meaning of these functions.
Though I still would like to know if I update objects properly, or there exists better way. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Foam::error::PrintStack | almir | OpenFOAM Running, Solving & CFD | 92 | May 21, 2024 08:56 |
[snappyHexMesh] Problem with parallel run of snappyHexMesh | Lorenzo92 | OpenFOAM Meshing & Mesh Conversion | 5 | April 15, 2016 05:12 |
potentialFoam doesnt start?! | Sway | OpenFOAM Running, Solving & CFD | 0 | July 2, 2015 08:48 |
channelFoam for a 3D pipe | AlmostSurelyRob | OpenFOAM | 3 | June 24, 2011 14:06 |
[blockMesh] BlockMesh FOAM warning | gaottino | OpenFOAM Meshing & Mesh Conversion | 7 | July 19, 2010 15:11 |