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

Forces in V1.6

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 14, 2011, 12:27
Default
  #61
Member
 
The True
Join Date: Dec 2010
Posts: 80
Rep Power: 15
Eren10 is on a distinguished road
I have to change the pRef value to calculate the forces.

I am adding this statement to functions forces: pRef 1000; This does not change anything in values, it looks like it is invariant to the pRef value. How can I adapt the pRef value
Eren10 is offline   Reply With Quote

Old   June 16, 2011, 08:39
Default
  #62
Member
 
The True
Join Date: Dec 2010
Posts: 80
Rep Power: 15
Eren10 is on a distinguished road
The flow field looked oke but given Cl value was not oke. So, I decided to calculate the Cl value by sampling pressure values. I get, Cl = 0.166, which looks oke , for airfoil at 0 angle of attack. ( I have not calculated shear stress, don't know how to do it yet. For now I assume it is small, icoFoam)

The OpenFoam gives these value:

Cl = 0.00166316;
Cd = 0.0000724

Strange, I see it now, it looks like Cl and Cd is missing a multiply with 100
Eren10 is offline   Reply With Quote

Old   June 21, 2011, 11:08
Default
  #63
Member
 
The True
Join Date: Dec 2010
Posts: 80
Rep Power: 15
Eren10 is on a distinguished road
Still I haven't been able to specify the pRef value

I have tried this in the controlDict file, to calculate force coefficients: pref pRefPoint (x y z);

but openfoam doesn't see pRefPoint(x y z) as a scalar

I get this error: wrong token type - expected Scalar
Eren10 is offline   Reply With Quote

Old   September 8, 2011, 16:22
Default
  #64
Member
 
Santiago
Join Date: Dec 2009
Posts: 85
Rep Power: 16
gascortado is on a distinguished road
Hi,

I would like to be able to take a look at the libforces.so file to understand how it calculate the forces and eventually modify the library. Does anyone knows how to do that?

Thanks
gascortado is offline   Reply With Quote

Old   September 16, 2011, 17:13
Default
  #65
Member
 
Santiago
Join Date: Dec 2009
Posts: 85
Rep Power: 16
gascortado is on a distinguished road
This thread http://www.cfd-online.com/Forums/ope...tml#post324445 is related to force calculations. Does any one know the answer? Thanks
gascortado is offline   Reply With Quote

Old   February 3, 2012, 21:37
Default
  #66
Senior Member
 
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18
musahossein is on a distinguished road
Quote:
Originally Posted by santos View Post
Hi,

Put something like this in your system/controlDict, changing accordingly to your situation:

Code:
functions
{
forces
{
type forces;
functionObjectLibs ("libforces.so"); //Lib to load
patches (sphere_region0); // change to your patch name
rhoName rhoInf;
rhoInf 1000; //Reference density for fluid
CofR (2 0 0); //Origin for moment calculations
        outputControl   timeStep;
        outputInterval  1;
}
forceCoeffs
{
// rhoInf - reference density
// CofR - Centre of rotation
// dragDir - Direction of drag coefficient
// liftDir - Direction of lift coefficient
// pitchAxis - Pitching moment axis
// magUinf - free stream velocity magnitude
// lRef - reference length
// Aref - reference area
type forceCoeffs;
functionObjectLibs ("libforces.so");
patches (sphere_region0);
rhoName rhoInf;
rhoInf 1000;
CofR (2 0 0);
liftDir (0 1 0);
dragDir (1 0 0);
pitchAxis (0 0 1);
magUInf 1e-7;
lRef 0.06; // sphere diameter
Aref 0.0014137; //1/2 * projected area = pi*rē/2

        outputControl   timeStep;
        outputInterval  1;
}

}
Regards,
Jose Santos
Santos: I am running OpenFOAM 2.0.1. sloshingTank2D in interDyMFoam. I have rectangular tank half filled with water. Is there a quick way of getting the forces imparted by the fluid on the tank walls as the tank moves back and forth? I have some code in control dict that dumps cell alpha values and the corresponding pressure values into files that I have to extract and read.The only way I see of accomplishing this is first recording the cells that have alpha values of less than 1 indicating that the cell has fluid. Then look up the pressure in the cell. Then compute the force due to the pressure. is there a work around this so that I can, for example get the force due to fluid pressure on the left wall (or right wall) of the tank? What I am using right now is as follows:
wallPressure
{
type surfaces;
functionObjectLibs ("libsampling.so");
outputControl outputTime;
outputInterval 5;
surfaceFormat raw;
interpolationScheme cell;

fields ( alpha1
p
);
surfaces
(
leftwalls
{
type patch;
patches (leftWall);
interpolate true;
triangulate false;
}
rightwalls
{
type patch;
patches (rightWall);
interpolate true;
triangulate false;
}
);
}
musahossein is offline   Reply With Quote

Old   March 20, 2012, 06:00
Default
  #67
Member
 
The True
Join Date: Dec 2010
Posts: 80
Rep Power: 15
Eren10 is on a distinguished road
Hi,

I have used for mine new simulation the solution of old case. Only the angle of attack ( so velocity and lift and drag coefficients ) is changed. The simulations went oke, however the calculated lift and drag coefficients are wrong. If I sample the pressure coefficients than I get the correct Cl , Cd values however not exact as I want. Because of the many simulations I do not want to run them all again. Is there any solution for this issue ?

Is it possible to calculate the aerodynamic coefficients just based on the last time step ?

Last edited by Eren10; March 20, 2012 at 07:41.
Eren10 is offline   Reply With Quote

Old   May 10, 2012, 09:13
Default Wall pressures in InterDyMFoam
  #68
Senior Member
 
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18
musahossein is on a distinguished road
Dear all:
I am simulating a small 2D tank with dimensions 8m long, 5m high and 0.01m in depth. I am subjecting the tank to a sinusoidal displacement only and have modified the controlDict to provide wall pressures for the left and right walls at every 0.02 secs. In my opinion, if I am supplying a sinusoidal displacement, the pressures should also be sinusoidal. However when I plot the pressures corresponding to fluid phase in the left and right walls, I get what looks like a very choppy representation, which does not make sense. Any help or advice on how to fix this would be greatly appreciated, Thanks. I have attached the input plot and the pressure plot.

My mesh size is 200x200x1
Attached Images
File Type: png Sinusoidal Displacement.png (8.4 KB, 28 views)
File Type: png FLUID INERTIA FORCE LEFT AND RIGHT WALLS.png (14.0 KB, 32 views)
musahossein is offline   Reply With Quote

Old   October 17, 2012, 12:54
Default IRef Aref------> BI ELEMENT AIRFOIL
  #69
New Member
 
Fabio
Join Date: Sep 2012
Posts: 1
Rep Power: 0
FabioFobia is on a distinguished road
One question: If I had a bi element airfoil (main&flap), I put in the patches the name of the two walls (main, flap), but for lRef e Aref I need to put 2 different values because the main airfoil and the flap have different chord and so different area. Help me please
FabioFobia is offline   Reply With Quote

Old   November 11, 2013, 11:16
Default
  #70
Member
 
Pengchuan Wang
Join Date: Nov 2012
Location: Michigan USA
Posts: 58
Rep Power: 13
pechwang is on a distinguished road
Hi Petter,

I know this is an old thread. But I want to know whether you have found a way to calculate the multi-phase torque? Right now I'm using interFoam as well. And I'm stuck with the multi-phase torque calculation. If you have any updates, please let me know. Thank you very much.

Penghcuan
pechwang is offline   Reply With Quote

Old   November 17, 2013, 09:09
Default
  #71
Senior Member
 
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18
musahossein is on a distinguished road
Is there some way to introduce fluid / wall friction? I am running sloshingtank2d in interdymfoam. The sloshing I get goes on as long as the simulation continues. How can I introduce wall friction so that the sloshing will slowly dissipate once the displacement stops?
musahossein is offline   Reply With Quote

Old   July 8, 2014, 10:42
Default
  #72
New Member
 
yalong cai
Join Date: Feb 2014
Location: New York
Posts: 13
Rep Power: 12
pizicai is on a distinguished road
Hello, Santos,

I have confusions about the value of rhoInf, in this thread, different values appeared, e.g. 1.17, 1.225 and 1000. This difference confuses me.

Thanks for your attention.
pizicai is offline   Reply With Quote

Old   September 2, 2015, 16:49
Default
  #73
Member
 
Join Date: Apr 2015
Posts: 42
Rep Power: 11
HosseinB is on a distinguished road
Quote:
Originally Posted by paka View Post
I know the tool is not fully suitable for two-phase flows, but assuming that I only care for water domain (not air) I assume the tool gives acceptable solution.

So trying to use interFoam solver, the solver quits saying it cannot find "nu" in constant/transportProperties. I tried to redefine the code in forces.C, but for now I gave up. I found some work around, to add additional line at the beginning of transportProperties such as:

nu nu [ 0 2 -1 0 0 0 0 ] 1e-06;

Can any of OpenFOAM gurus comment on that? Is such work around acceptable? I think the other two nu-s in phase1 and phase2 are read correctly by the solver.

Thanks,
K
Hi Paka,

Could you find out if your nu nu ... approach at the top of the transport properties file is a valid workaround for the problem? Just FYI: for the turbulent interFoam, there is no problem in the force calculations, but the problem exists when using laminar interFoam. This problem is "solved" when I take your approach but I am not sure if it is a correct way of tackling this problem. I am using 221 version.

Cheers,
Hossein
HosseinB 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
changes to forces in 1.6 linnemann OpenFOAM Running, Solving & CFD 0 July 30, 2009 08:49
Strange results from interFoam solution converges but sum of all forces not equal to zero nicasch OpenFOAM Running, Solving & CFD 0 April 15, 2008 02:01
2d foil pressure forces problem mayor FLUENT 4 December 1, 2003 03:57
viscous-pressure forces nico FLUENT 0 June 9, 2003 14:41
Valve Forces in CFdesign Mike Clapp Main CFD Forum 3 March 8, 2001 14:09


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