CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Visualization & Post-Processing Software > ParaView

[OpenFOAM] How to calculate a custom field

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 8, 2008, 12:23
Default How to calculate a custom field
  #1
New Member
 
Ravi Ramalho
Join Date: Mar 2009
Location: Recife, PE, Brazil
Posts: 5
Rep Power: 17
rres is on a distinguished road
Hi,

I'm new in OpenFOAM and didn't find anything clear enough explaining how to calculate a custom field. For example, how to calculate the vorticity? Q-criterion? u<sup>+</sup>, y<sup>+</sup>, wall shear stress? Skin friction coefficient? Pressure coefficient? etc.
The user guide shows the foamCalc tool, but it doesn't seems to do the trick.
Quote:
>> foamCalc xxxx
Selecting calcType xxxx
unknown calcType type xxxx, constructor not in hash table
Valid calcType selections are:
5
(
div
components
mag
magGrad
magSqr
)
Any sugestions? Thanks in advance.

Ravi Ramalho
rres is offline   Reply With Quote

Old   October 8, 2008, 14:22
Default Go to the OpenFOAM application
  #2
Member
 
Ville Tossavainen
Join Date: Mar 2009
Posts: 60
Rep Power: 17
villet is on a distinguished road
Go to the OpenFOAM applications/utilities/postProcessing directory. You may be interested about the utilities that are under "stressFields", "velocityField" and "wall" directories. These utilities are precompiled and have the same names as the directories. Try them out in your case directory!

Anyone can correct me about this. I'm not sure if there are any utilities for skin friction/pressure coefficients in the OpenFOAM distribution. But you can call function objects in your /system/controlDict while the computation. Here are more discussion about it "http://www.cfd-online.com/OpenFOAM_D...es/1/8402.html". You can also compute the values aferhand using the "execFlowFunctionObjects" utility.
villet is offline   Reply With Quote

Old   October 8, 2008, 15:02
Default Hi Ville, I found the OpenF
  #3
New Member
 
Ravi Ramalho
Join Date: Mar 2009
Location: Recife, PE, Brazil
Posts: 5
Rep Power: 17
rres is on a distinguished road
Hi Ville,

I found the OpenFOAM post-processing utilities on in the website.

If someone have the same problem, here is the link: http://www.opencfd.co.uk/openfoam/indexhe23.html

The execFlowFunctionObjects didn't work, or I don't know how to use it. I'll try a little bit.

I've managed to calculate the skin friction, pressure coefficient and other stuff using the "calculator filter" in paraFoam. But how to save these field data to make things easier?

Thanks in advance.

Ravi Ramalho
rres is offline   Reply With Quote

Old   October 8, 2008, 15:57
Default Hi. The best thing to do is
  #4
Senior Member
 
Gavin Tabor
Join Date: Mar 2009
Posts: 181
Rep Power: 17
grtabor is on a distinguished road
Hi.

The best thing to do is to roll your own code, so to speak. Copy one of the utilities to your own directory, change the entry in Make/files to read

EXE = $(FOAM_USER_APPBIN)/new_file_Name

and then edit the .C file to do whatever you want to do with the data. The utilities will provide you with a template to work from, showing you how to read in an existing field and manipulate it, then write it out. Compile the code using the command wmake, then run it on your case.

Gavin
grtabor is offline   Reply With Quote

Old   November 16, 2012, 05:24
Default
  #5
Member
 
Suranga Dharmarathne
Join Date: Jan 2011
Location: TX, USA
Posts: 39
Rep Power: 15
sdharmar is on a distinguished road
@ Ravi,

I know the thread is very old. But if you remember could you please explain me how did you find skin friction coefficient.

BR,
Suranga.
sdharmar 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
[mesh manipulation] Importing Multiple Meshes thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 19:57
Custom Field Functions mtfl FLUENT 1 November 23, 2015 13:32
"if statement" Custom Field Functions asal FLUENT 1 October 11, 2015 11:22
time step size in Custom Field Function Tong FLUENT 0 May 2, 2008 16:51
Custom Field Function Question Jason FLUENT 0 August 4, 2004 11:23


All times are GMT -4. The time now is 14:26.