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

How to obtain the viscous force and pressure force using simpleFoam solver??

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 22, 2015, 00:05
Default How to obtain the viscous force and pressure force using simpleFoam solver??
  #1
Senior Member
 
tareqkh's Avatar
 
CFD
Join Date: Nov 2010
Location: United States
Posts: 243
Rep Power: 17
tareqkh is on a distinguished road
Hello All,

I hope that you are all having a wonderful weekend. I have been working on a small project using simpleFoam (Flow over a cylinder at Re=40). I have implemented the force function in order to obtain the drag and compare to the experimental result. I want to prove that the drag force that I have obtained comes from the pressure force. However, I am unable to filter the data in the post-processing folder since it is a little bit messy. Can some of you guide me in this issue...


Regards,
tareqkh is offline   Reply With Quote

Old   March 22, 2015, 16:54
Default Any answers.......
  #2
Senior Member
 
tareqkh's Avatar
 
CFD
Join Date: Nov 2010
Location: United States
Posts: 243
Rep Power: 17
tareqkh is on a distinguished road
Can someone help?
tareqkh is offline   Reply With Quote

Old   March 23, 2015, 09:03
Default
  #3
Senior Member
 
Pablo
Join Date: Mar 2009
Posts: 102
Rep Power: 17
pablodecastillo is on a distinguished road
Study motorbike tutorial, and you can change forcecoef by forces, google it for a couple minutes and done
pablodecastillo is offline   Reply With Quote

Old   March 23, 2015, 15:14
Default
  #4
Senior Member
 
tareqkh's Avatar
 
CFD
Join Date: Nov 2010
Location: United States
Posts: 243
Rep Power: 17
tareqkh is on a distinguished road
I would really appreciate your help, if could provide clear explanations in this regards.

Thank you
tareqkh is offline   Reply With Quote

Old   March 24, 2015, 07:30
Default
  #5
Senior Member
 
Pablo
Join Date: Mar 2009
Posts: 102
Rep Power: 17
pablodecastillo is on a distinguished road
Maybe i am missundertanding to you, but if you want to extract forces, it is so easy like in controlfile at the endo of the file add:
functions
{
#include "forces"
}

And in system folder create a file forces with:

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/

forces1
{
type forces;

functionObjectLibs ( "libforces.so" );

outputControl timeStep;
timeInterval 1;

log yes;

patches ( motorBikeGroup );
rhoName rhoInf; // Indicates incompressible
rhoInf 1; // Redundant for incompressible

CofR (0.72 0 0); // Axle midpoint on ground


/*
binData
{
nBin 20; // output data into 20 bins
direction (1 0 0); // bin direction
cumulative yes;
}
*/
}


// ************************************************** *********************** //

And if you want to integrate your own functions, i add a *.H with code like:

const volScalarField& p_ = mesh_.lookupObject<volScalarField>("p"); //was p



Fmine[0] =
gSum
(
p_.boundaryField()[patchI]*
mesh_.Sf().boundaryField()[patchI]
);

You can modify this calculation.

Best,
pablodecastillo 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
to separate pressure force and viscous force using udf ignayars Fluent UDF and Scheme Programming 1 October 19, 2014 08:26
how does Fluent calculate the pressure and viscous force vector? Ralf Schmidt FLUENT 2 May 17, 2010 16:49
pressure force and viscous force CFD FLUENT 0 March 7, 2006 02:03
Gas pressure question Dan Moskal Main CFD Forum 0 October 24, 2002 23:02
what the result is negatif pressure at inlet chong chee nan FLUENT 0 December 29, 2001 06:13


All times are GMT -4. The time now is 19:02.