CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM

Full force and moment coefficient output

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   March 13, 2010, 03:03
Default Full force and moment coefficient output
  #1
New Member
 
Steve Goodwood
Join Date: Mar 2010
Posts: 3
Rep Power: 7
Newfoamy is on a distinguished road
I'm trying to output full force and moment coefficients components from a simulation, i.e. from pressure contribution along x and viscous term contribution along x, pressure and viscous along y, etc and the pressure and viscous moments about x, y and so on.

I've been pointed toward using the "functionObjects/forces/forces" function but the results I get are not what I expected. I know what the answer should be. Has anybody used the forces function with any success ?

As an check of the forces function output I've even tried post processing the output externally with my own code. I have files named

"points! with 24716 values of x,y,z coordinates,

"faces" with 48480 values which start 4 7835 7832 18451 18448, etc.

and I've created a code to read these and plot them in Tecplot and I can see my mesh.

I also have a file "boundary" which tells me that the wedge1 has a start face of 23765 with 12046 values, wedge 2 starts at 35811 with 12046 values, Wall which starts at 48011 and has 154 values.

I can plot the Wall faces and can see the surface.

I also have field values of pressure with 12046 values but how do I relate these to the Wall faces as they appear to be related to the wedge1 and wedge 2 faces?

Is the key in the "neighbour" file which also has 48480 values but which starts 6 12 21 25 17 494 508, each number being on a new line.

Or is it in "owner" which starts 48480 and then 0 0 0 0 1 1 1 1 2 2 2 2, each number on a new line.

Anybody got any ideas either on the "forces" function or my trying to post process problem. Any help most welcome.
Newfoamy is offline   Reply With Quote

Old   March 13, 2010, 06:17
Default
  #2
Senior Member
 
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 530
Rep Power: 16
philippose will become famous soon enough
Hello Steve,

A Good Morning to you!

I use the forces function object in OpenFOAM quite often, and I have had no issues with it.... the values that I get are correct, realistic, and usable.

The question is... when you say that you are not "seeing what you are expecting", what are you expecting, and what are you getting, and what is it in the result that differs from your expectations?

Would it be possible to have some more details.... preferably quantitative?

Have a nice day!

Philippose
philippose is offline   Reply With Quote

Old   March 14, 2010, 02:10
Default
  #3
New Member
 
Steve Goodwood
Join Date: Mar 2010
Posts: 3
Rep Power: 7
Newfoamy is on a distinguished road
Philippose, Thanks for responding.

It is the viscous terms which appear to be a couple of orders of magnitude too low. I know what the answer should be from a computation from another tried and trusted code that I have and this other code has been validated.

Can you explain the cell numbering issue that I also posed ? What are the "owner" and "neighbour" files data telling me. How do I interpret their contents ?
Newfoamy is offline   Reply With Quote

Old   March 16, 2010, 04:13
Default
  #4
New Member
 
Ping-Chen Wu
Join Date: Feb 2010
Posts: 4
Rep Power: 7
koWUalsky is on a distinguished road
I am still new in OpenFoam, but I read the mesh part of User Guide (the official pdf file). As I know, in page of U-125, it shows what the owner or neighbour is. Based on my understanding, one cell has six faces. And, three of these six faces are owned by this specific cell.

Then, the other thee faces are owned by neighbours. It means each face of these three faces is owned by different cells individually.

In the "owner" and "neighbour" file, these number are cell indexes following the order of faces index. In these two files, there are three same cell indexes. It points out that these three faces belong to one cell. For example, in "owner" file,
872324
(
0
0
0
1
1
1
2
....
)
1st, 2nd, 3rd face belongs to cell 0, 4~6th face belongs to cell 1...and so on. Or, cell 0 owns 1st, 2nd, 3rd face....The number 872324 is equal to the amount of faces as shown in the "face" file.


In "neighbour" file, the three same cell indexes could be found separately in different places, because each faces belongs to different cells. And one cell has three different neighbour. See:
872324
(
1
106
5724
...
106
...
106
...
)
Face 1 belongs to cell 1, face 2 belongs to cell 106, face 3 belongs to cell 5724. Then, there are other two faces belongs to cell 106. The number 872324 is also equal to the amount of faces. Then, if you see "-1", that means it is boundary. The cell on boundary owns only three faces. Or you can say, the face on bounadry has its owner but has no neighbor.

As your reference, it is quite complicated and confusing. I hope what I know is right and helpful.

best regards,
Ping-Chen Wu
koWUalsky is offline   Reply With Quote

Old   March 16, 2010, 13:10
Default
  #5
New Member
 
Steve Goodwood
Join Date: Mar 2010
Posts: 3
Rep Power: 7
Newfoamy is on a distinguished road
Many thanks. Your explanation of the "owners" and "neighbours" has significantly helped me. I think I now understand what the two files are trying to tell me and how I can use the information.
Newfoamy is offline   Reply With Quote

Old   March 16, 2010, 14:13
Default
  #6
Senior Member
 
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 530
Rep Power: 16
philippose will become famous soon enough
Hello again Steve,

A Good Evening to you!

Ahh... so you are interested in the Viscous forces, and not the forces due to the pressure distribution on a patch..... So far, I have been able to reliably use the pressure forces, but since the applications I work with are primarily dominated by the pressure forces, I cannot say too much about the accuracy of the viscous forces calculated by OpenFOAM.

I also noticed that you are interested in the OpenFOAM mesh format.... I think on of the most complete descriptions of the OpenFOAM mesh format can be found here:

http://openfoamwiki.net/index.php/Write_OpenFOAM_meshes


Hope this helps...!

Enjoy!

Philippose
philippose is offline   Reply With Quote

Old   March 17, 2010, 04:19
Default
  #7
New Member
 
Ping-Chen Wu
Join Date: Feb 2010
Posts: 4
Rep Power: 7
koWUalsky is on a distinguished road
You are welcome. I also thank this forum very much. I learn a lot here.

My topic is ship flow. Now, I am working on that forces function. But as I know, see:
Free Surface Ship Flow
It works, but seems to get many problems. Until now, my result is similar to that the thread talked about. Like your situation, "the results I get are not what I expected." It doesn't have a good agreement with experiment data. The wave seems good, but the force is strange.

So, we want to use the CFD analysis in Tecplot. I knew the FoamToTecplot, but we don't have tecplot in Linux. So, we may try to make a program to transfer the format. This is why I need to understand the mesh format. Then, I can use Tecplot in Windows.

Or, I learn the programming to modify the source code. Anyway, either way will be a tough work for me. I gotta learn a lot of foam things.

Good luck,

Ping-Chen Wu
koWUalsky is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Force and Force Coefficient ata OpenFOAM Post-Processing 8 April 10, 2012 20:41
Time Averaged Moment Coefficient prasad84 FLUENT 0 October 16, 2009 14:27
Calculate Cn and Cm of a tube+air inlet ? Cyril FLUENT 3 June 20, 2006 12:16
Lift, Drag Vs time chart,calculations Jamesd69climber CFX 8 February 17, 2005 18:23
force coefficient computation tascflowuser CFX 0 May 6, 2003 08:57


All times are GMT -4. The time now is 03:41.