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

Update FOAM objects after new solver run

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 10, 2017, 16:17
Default Update FOAM objects after new solver run
  #1
New Member
 
Join Date: Apr 2017
Posts: 5
Rep Power: 9
peterTr is on a distinguished road
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.
peterTr is offline   Reply With Quote

Old   May 11, 2017, 16:26
Default
  #2
New Member
 
Join Date: Apr 2017
Posts: 5
Rep Power: 9
peterTr is on a distinguished road
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.
peterTr is offline   Reply With Quote

Reply


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
Foam::error::PrintStack almir OpenFOAM Running, Solving & CFD 91 December 21, 2022 04:50
[snappyHexMesh] Problem with parallel run of snappyHexMesh Lorenzo92 OpenFOAM Meshing & Mesh Conversion 5 April 15, 2016 04:12
potentialFoam doesnt start?! Sway OpenFOAM Running, Solving & CFD 0 July 2, 2015 07:48
channelFoam for a 3D pipe AlmostSurelyRob OpenFOAM 3 June 24, 2011 13:06
[blockMesh] BlockMesh FOAM warning gaottino OpenFOAM Meshing & Mesh Conversion 7 July 19, 2010 14:11


All times are GMT -4. The time now is 18:55.