|
[Sponsors] |
![]() |
![]() |
#1 |
New Member
Christopher Barry
Join Date: Aug 2009
Location: Switzerland
Posts: 18
Rep Power: 16 ![]() |
Hi everyone,
this may sound very simple, but I am new to OpenFOAM and am struggling a little. I am trying to get OpenFOAM to write out the wall shear stress into a simple csv file. For this I was going to modify the wallShearStress.C postprocessing application. However, I have not managed to get OpenFOAM to write the data out as a list in the following format: x, y, z, wall shear stress in x, directionm wall shear stress in y direction, wall shear stress in z direction I have tried using the following line: Info << mesh.Cf().boundaryField()[patchi] << wallShearStress.boundaryField()[patchi] << endl This however only resulted in a list of the coordinates written in brackets, followed by a seperate list underneath, which showd the wall shear stress vectors in brackets. There was also a bunch of information inbetween that I don't need. Does anyone have any ideas how I could do this? Best regards, Chris |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
N/A
Join Date: Mar 2009
Posts: 189
Rep Power: 17 ![]() |
You could use the sample postprocessing tool to write out the data in the format you required. I have used it for writing slices and I guess you can define cutting planes too. I am not sure if it has the capability to write a whole volume.
|
|
![]() |
![]() |
![]() |
![]() |
#3 |
New Member
Christopher Barry
Join Date: Aug 2009
Location: Switzerland
Posts: 18
Rep Power: 16 ![]() |
thank you for your reply. The problem with the sample tool is that, as I see it, you need to define a plane each time in the sampleDict, which is a bit tedious. Ideally I would like to just be able to select a wall and then get the coordinates of the points and the wall shear stresses written out into a nice csv list.
Do you reckon that's possible somehow by modifying the sample tool source code? It's a thought I've been playing with, but I can't see how to do it. Best regards, Chris |
|
![]() |
![]() |
![]() |
![]() |
#4 |
New Member
Christopher Barry
Join Date: Aug 2009
Location: Switzerland
Posts: 18
Rep Power: 16 ![]() |
Never mind, problem solved. I just had to define a vector within the vectorField mesh.Gf().boundaryField() and then create a forAll loop, in which OpenFOAM writes each component of the new vector for each iteration of the forAll loop.
Thanks for the help though. |
|
![]() |
![]() |
![]() |
Tags |
csv, export, list, wallshearstress |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problems in compiling paraview in Suse 10.3 platform | chiven | OpenFOAM Installation | 3 | December 1, 2009 07:21 |
OpenFOAM15 paraFoam bug | koen | OpenFOAM Bugs | 19 | June 30, 2009 10:46 |
[Technical] Creating your own mesh files | doug | OpenFOAM Meshing & Mesh Conversion | 28 | April 9, 2009 07:36 |
creating geometry using "Script files" in ICEMCFD | jaber | Main CFD Forum | 1 | November 11, 2007 09:28 |
Results saving in CFD | hawk | Main CFD Forum | 16 | July 21, 2005 20:51 |