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

Writing file problem

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 1, 2007, 03:44
Default Hi everybody, I have a prob
  #1
Senior Member
 
Vincent RIVOLA
Join Date: Mar 2009
Location: France
Posts: 283
Rep Power: 18
vinz is on a distinguished road
Hi everybody,

I have a problem with the solver I'm writting and I must admit I have no idea how to solve it.
The pressure seems to computed in a write way (I can see it by printing some information on the screen during the computation for each time step), however the pressure file present in each time directory is not writen in the right way.
Indeed, the maximum value of the pressure (that I print on the screen to look at the evolution) is increasing, but in each time directory I only find the pressure file that I had at the begining in time directory "O". Then, of course, when I use paraview, I cannot see my pressure or qat least I only see the initial field!
Does someone have an idea how to solve this kind of problem?

Regards,

Vincent
vinz is offline   Reply With Quote

Old   February 1, 2007, 03:53
Default Hi, I've got a similar pro
  #2
Senior Member
 
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 340
Rep Power: 18
lr103476 is on a distinguished road
Hi,

I've got a similar problem with the pressure field. When I solve for the flow around a 3D moving object, the velocity and vorticity field are correct. The pressure field only gives me the initial solution or some strange linear behavior. Since the velocity field is correct the equations are solve appropriately, but apparently the pressure field is wrongly written to file. When I use tecplot the same error is present.

Anyone any ideas?

Regards, Frank
__________________
Frank Bos
lr103476 is offline   Reply With Quote

Old   February 1, 2007, 04:11
Default Hi Frank, Your explanation
  #3
Senior Member
 
Vincent RIVOLA
Join Date: Mar 2009
Location: France
Posts: 283
Rep Power: 18
vinz is on a distinguished road
Hi Frank,

Your explanation is more clear than mine but it's exactly the same problem. The wired thing is that, if I look to the file Udisp of the structure region, the pressure is well written on the boundary.
Did you find a way to avoid this problem? (force writting or so?)

Regards,

Vincent
vinz is offline   Reply With Quote

Old   February 1, 2007, 04:21
Default No, I did not solve the proble
  #4
Senior Member
 
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 340
Rep Power: 18
lr103476 is on a distinguished road
No, I did not solve the problem nor did I investigate it in detail. At first I was worried about the solution from the equations, but looking at the vorticity (I mainly look at this quantity) the flow solution is correct. Off course this problem should be solved but at this time I am busy with other things (i.e. learning gridpro).

Has anyone solved this problem of wrong pressure writing?

Frank
__________________
Frank Bos
lr103476 is offline   Reply With Quote

Old   February 1, 2007, 04:56
Default It would be very very difficul
  #5
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,905
Rep Power: 33
hjasak will become famous soon enough
It would be very very difficult to break the file I/O system for only one class in OpenFOAM: all the code is produced from the same templated functions, i.e. it will either all work fine or all be broken.

I suspect the problem is in the code you've written yourself, rather than a standard application, right? There are two possibilities:

- you are taking a reference to a temporary field, which gets deleted by the time of writing and memory is re-used by something else (like yours truly, and only last week - goes to show some people never learn) :-)

- some other memory violation in the code is corrupting your data.

In order to find this, you should run you executable through valgrind and see if there are memory violations. An even better way of handling the problem would be to use a full debug build, which will check for all out-of-bounds array access while the code is running.

In any case, it is not the writing that messes things up: I am almost certain the problem is somewhere else.

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   February 1, 2007, 05:03
Default Hi Hrv, I already tried my
  #6
Senior Member
 
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 340
Rep Power: 18
lr103476 is on a distinguished road
Hi Hrv,

I already tried my case using the standard icoDyMFoam in combination with your dynamicBodyFvMesh library. The result is that I can use the velocity field but the pressure field is constant or linearly varying (not at all what is expected). Could it be something with the set-up of the boundary conditions.

Regards, Frank
__________________
Frank Bos
lr103476 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
UDF for writing txt. file manu FLUENT 2 December 13, 2007 06:19
Errors writing problem file. Dan Siemens 3 November 19, 2006 09:11
Writing to a file Mike FLUENT 6 June 18, 2005 23:57
writing User file sam Siemens 1 May 31, 2005 15:10
Writing ngeom file Luca D Siemens 2 March 30, 2004 05:24


All times are GMT -4. The time now is 09:48.