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

Force Coeffs with icoFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By A.Wendy

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 18, 2013, 11:33
Default Force Coeffs with icoFoam
  #1
Member
 
VS
Join Date: Nov 2012
Posts: 86
Rep Power: 14
VSass is on a distinguished road
Hello there,

i'm trying to use the function object forces and forceCoeffs with icoFoam.

i put this in controlDict :

functionObjects
(
forces
{
type forces;
functionObjectLibs ("libforces.so"); //Lib to load
patches (Upstream); // change to your patch name
rhoInf 1.225; //Reference density for fluid
CofR (0.25 0 0); //Origin for moment calculations
}

forceCoeffs
{
type forceCoeffs;
functionObjectLibs ("libforces.so");
patches (Upstream); //change to your patch name
rhoInf 1.225;
CofR (0 0 0);
liftDir (0 1 0);
dragDir (1 0 0);
pitchAxis (0.25 0 0);
magUInf 10.0;
lRef 1;
Aref 1;
}

I thought that a .dat file should appear in my case directory, but nothing happens.
Is there anything else i should do, complie or add something else?
VSass is offline   Reply With Quote

Old   February 19, 2013, 03:40
Default
  #2
Member
 
Andreas Wendy
Join Date: Aug 2012
Posts: 73
Rep Power: 14
A.Wendy is on a distinguished road
hi,

under your case folder should a folder called "forces" appear where the forces file is stored.

best wishes

Andy
A.Wendy is offline   Reply With Quote

Old   February 19, 2013, 06:38
Default
  #3
Member
 
VS
Join Date: Nov 2012
Posts: 86
Rep Power: 14
VSass is on a distinguished road
That's the problem, nothing appears. That's why i wonder if i should do some compile or any other form of "activation".

Thanks for the reply
VSass is offline   Reply With Quote

Old   February 19, 2013, 06:42
Default
  #4
Member
 
Andreas Wendy
Join Date: Aug 2012
Posts: 73
Rep Power: 14
A.Wendy is on a distinguished road
could you post your controlDict and the boundary file?
A.Wendy is offline   Reply With Quote

Old   February 19, 2013, 06:45
Default
  #5
Member
 
VS
Join Date: Nov 2012
Posts: 86
Rep Power: 14
VSass is on a distinguished road
controlDict

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.1.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application icoFoam;

startFrom startTime;

startTime 0;

stopAt endTime;

endTime 0.5;

deltaT 0.0001;

writeControl timeStep;

writeInterval 50;

purgeWrite 0;

writeFormat ascii;

writePrecision 6;

writeCompression off;

timeFormat general;

timePrecision 6;

runTimeModifiable true;

adjustTimeStep yes;

maxCo 0.5;

functionObjects
(
forces
{
type forces;
functionObjectLibs ("libforces.so"); //Lib to load
patches (Upstream); // change to your patch name
rhoInf 1.225; //Reference density for fluid
CofR (0.25 0 0); //Origin for moment calculations
}

forceCoeffs
{
type forceCoeffs;
functionObjectLibs ("libforces.so");
patches (Upstream); //change to your patch name
rhoInf 1.225;
CofR (0 0 0);
liftDir (0 1 0);
dragDir (1 0 0);
pitchAxis (0.25 0 0);
magUInf 10.0;
lRef 1;
Aref 1;
}
);







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

U boundary

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.1.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 1 -1 0 0 0 0];

internalField uniform (20 0 0);

boundaryField
{
Downstream
{
type fixedValue;
value uniform (0 0 0);
}

Farfield
{
type inletOutlet;
inletValue uniform (20 0 0);
value uniform (20 0 0);
}

Upstream
{
type fixedValue;
value uniform (0 0 0);
}
}

// ************************************************** *********************** //
VSass is offline   Reply With Quote

Old   February 19, 2013, 06:48
Default
  #6
Member
 
Andreas Wendy
Join Date: Aug 2012
Posts: 73
Rep Power: 14
A.Wendy is on a distinguished road
try to put the patch name in your control dict in brackets like:


patches ("Upstream");


regards

Andy
A.Wendy is offline   Reply With Quote

Old   February 19, 2013, 07:28
Default
  #7
Member
 
VS
Join Date: Nov 2012
Posts: 86
Rep Power: 14
VSass is on a distinguished road
Nothing happens.It just writes down the timesteps folder with u and p but nowhere the forces.

Thanks anyway Andrew, honestly.
VSass is offline   Reply With Quote

Old   February 19, 2013, 07:38
Default
  #8
Member
 
Andreas Wendy
Join Date: Aug 2012
Posts: 73
Rep Power: 14
A.Wendy is on a distinguished road
try the following:

forces
{
type forces;
functionObjectLibs ("libforces.so"); //Lib to load
outputControl timeStep;
outputInterval 1;
patches ("Upstream"); // change to your patch name
pName p;
UName U;
rhoName rhoInf;
rhoInf 1.225; //Reference density for fluid
log true;
CofR (0.25 0 0); //Origin for moment calculations
}


forceCoeffs
{
type forceCoeffs;
functionObjectLibs ("libforces.so");
outputControl timeStep;
outputInterval 1;
patches ("Upstream"); //change to your patch name
pName p;
UName U;
rhoName rhoInf;
rhoInf 1.225;
CofR (0 0 0);
liftDir (0 1 0);
dragDir (1 0 0);
pitchAxis (0.25 0 0);
magUInf 10.0;
lRef 1;
Aref 1;
log true;
}





i am not sure of the coefficient stuff but the forces should work
jiaojiao likes this.
A.Wendy is offline   Reply With Quote

Old   February 19, 2013, 08:10
Default
  #9
Member
 
VS
Join Date: Nov 2012
Posts: 86
Rep Power: 14
VSass is on a distinguished road
Nothing again. I'll give it a shot again later.

Thanks again
VSass is offline   Reply With Quote

Old   February 19, 2013, 08:11
Default
  #10
Member
 
Andreas Wendy
Join Date: Aug 2012
Posts: 73
Rep Power: 14
A.Wendy is on a distinguished road
strange. can you upload the complete case folder?
i am stuck at another problem and need something new in mind^^
A.Wendy is offline   Reply With Quote

Old   February 5, 2016, 17:26
Default
  #11
New Member
 
Murtaza Abbas
Join Date: Nov 2015
Posts: 5
Rep Power: 11
MurtazaAbbas is on a distinguished road
Hi all,

I'm having a similar problem using OpenFOAM 3.0.1. Have you managed to find a solution to as why there is no output postProcessing directory?

Thanks in advance!
MurtazaAbbas is offline   Reply With Quote

Reply

Tags
force, forcecoeffs, forces, functionobjects


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
ActuatorDiskExplicitForce in OF2.1. Help be_inspired OpenFOAM Programming & Development 10 September 14, 2018 12:12
How to add a source term (body force) to icoFoam? chris Liu OpenFOAM Programming & Development 4 October 27, 2014 16:38
Force coeffs in compressible flows nachettito OpenFOAM Post-Processing 0 August 13, 2012 07:18
Force can not converge colopolo CFX 13 October 4, 2011 23:03
DEFINE_CG_MOTION and pressure force Teo Fumagalli FLUENT 0 April 11, 2008 11:25


All times are GMT -4. The time now is 16:06.