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

Forces on cylinder in Openfoam

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

Like Tree4Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   July 4, 2012, 03:40
Default
  #21
Senior Member
 
niaz's Avatar
 
A_R
Join Date: Jun 2009
Posts: 120
Rep Power: 9
niaz is on a distinguished road
amin66 wrote for me:
Dear A_R
i couldn't find masflux corrected in user guide. and we can't use zero gradient for P in each boundary. i'm so confused.

can i ask you send me your system, constant and 0 folders. of course if it doesn't matter dear.

another I'm in Iran, I want to contact you if you are here please.
niaz is offline   Reply With Quote

Old   July 4, 2012, 03:42
Default
  #22
Senior Member
 
niaz's Avatar
 
A_R
Join Date: Jun 2009
Posts: 120
Rep Power: 9
niaz is on a distinguished road
Dear amin
please write your problems on forum because your problem may be others problem and it helps them.
you should implement uniform pressure constant value for outlet and other is zero gradient
you cannot find many things about openfoam in userguids. you should discover it. and you have to calculate the flux handly and import it as value.
finally, I think there is no need for private contact please propse your problem publicly, ofcourse it helps other people too.
regards,
A_R
Quote:
Originally Posted by niaz View Post
amin66 wrote for me:
Dear A_R
i couldn't find masflux corrected in user guide. and we can't use zero gradient for P in each boundary. i'm so confused.

can i ask you send me your system, constant and 0 folders. of course if it doesn't matter dear.

another I'm in Iran, I want to contact you if you are here please.
sunshuai likes this.
niaz is offline   Reply With Quote

Old   July 4, 2012, 06:41
Default
  #23
Member
 
Amin
Join Date: Mar 2012
Posts: 60
Rep Power: 7
amin66 is on a distinguished road
Dear A_R
i'm sorry. you are all right, my private message was for this post:
http://www.cfd-online.com/Forums/ope...erfoam-bc.html

by the way tnx for your attention
good luck
amin66 is offline   Reply With Quote

Old   February 8, 2014, 13:11
Default
  #24
Senior Member
 
ok
Join Date: Oct 2013
Posts: 346
Rep Power: 6
Maimouna is on a distinguished road
Dear Amin,

could you help me please, what solver you use to run your case?

I'm working in such case similar to yours.

Many thanks in advanced
Maimouna is offline   Reply With Quote

Old   February 11, 2014, 10:38
Default flow passed a circular cylinder
  #25
Senior Member
 
ok
Join Date: Oct 2013
Posts: 346
Rep Power: 6
Maimouna is on a distinguished road
Dear all,

many thanks for your posts. I'm looking for flow in a circular cylinder too to get the relation between time and drag and lift coefficients. I will write you steps that I applied and please guide me to the right way

1. I went to the tutorials/ basic
2. solver potentialFoam
3. I copied the cylinder folder and pasted it by different name.
4. I changed the controlDict file as posted by Mahlar in post number 7. (Note that I changed application to potentialFoam

then blockMesh
potentialFoam
paraFoam

and nothing new coming comparing with the cylinder case.

Might I don't ungerstanding something. Could you please guide me to the right direction.

Many thanks in advanced.
Maimouna is offline   Reply With Quote

Old   February 11, 2014, 11:27
Default
  #26
Senior Member
 
ok
Join Date: Oct 2013
Posts: 346
Rep Power: 6
Maimouna is on a distinguished road
sorry I forgot to post my blockMeshDict

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.0 |
| \\ / A nd | Web: http://www.extend-project.de |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 1;
vertices
(
(110 0 -200) //0 front circle
(77.781746 77.781746 -200) //1 45 Degrees
(0 110 -200) //2
(-77.781746 77.781746 -200) //3
(-110 0 -200) //4
(-77.781746 -77.781746 -200) //5
(0 -110 -200) //6
(77.781746 -77.781746 -200) //7
(110 0 200) //8 back circle
(77.781746 77.781746 200) //9
(0 110 200) //10
(-77.781746 77.781746 200) //11
(-110 0 200) //12
(-77.781746 -77.781746 200) //13
(0 -110 200) //14
(77.781746 -77.781746 200) //15
(-1100 -1100 -200) //16 front big block
(3300 -1100 -200) //17
(3300 1100 -200) //18
(-1100 1100 -200) //19
(-1100 -1100 200) //20 back big block
(3300 -1100 200) //21
(3300 1100 200) //22
(-1100 1100 200) //23
);

blocks
(
hex (16 17 18 19 20 21 22 23) (1 1 1) simpleGrading (1 1 1)
);

edges
(
arc 5 6 ( 0 0.02828 0 )
arc 6 10 ( 0.02828 0 0 )
arc 9 10 ( 0 -0.02828 0 )
arc 9 5 ( -0.02828 0 0 )
arc 21 22 ( 0 0.02828 0.392 )
arc 26 22 ( 0.02828 0 0.392 )
arc 25 26 ( 0 -0.02828 0.392 )
arc 25 21 ( -0.02828 0 0.392 )
);

patches
(
patch outlet
(
(18 22 21 17)
)
patch inlet
(
(16 20 23 19)
)
patch fixedWalls
(
(19 23 22 18)
(17 21 20 16)
)
patch frontAndBack
(
(16 19 18 17)
(20 21 22 23)
)
patch hole // I think it must be here, where is something wrong
(
(2 1 9 10)
(1 0 8 9)
(0 7 15 8)
(7 6 14 15)
(6 5 13 14)
(5 4 12 13)
(4 3 11 12)
(3 2 10 11)
)
);

mergePatchPairs
(
);


// ************************************************** *********************** //
Maimouna is offline   Reply With Quote

Old   February 6, 2015, 02:48
Default
  #27
New Member
 
arya
Join Date: Jan 2015
Posts: 3
Rep Power: 4
arya123 is on a distinguished road
hi,
I was trying to find the forces and the force coefficients on a cylinder in OpenFoam 2.3.0. I have typed the following in my controlDict file:

application icoFoam;

startFrom startTime;

startTime 0;

stopAt endTime;

endTime 0.5;

deltaT 0.005;

writeControl timeStep;

writeInterval 20;

purgeWrite 0;

writeFormat ascii;

writePrecision 6;

writeCompression off;

timeFormat general;

timePrecision 6;

runTimeModifiable true;

adjustTimeStep yes;

maxCo 0.5;

maxDeltaT 2.0e-3;

functions
{
probes
{
type probes;
functionObjectLibs ("libsampling.so");
enabled true;
outputControl timeStep;
outputInterval 1;
probeLocations
(
(0.5 0 -0.5)
(1 0 -0.5)
(0.707107 0.707107 -0.5)
(0.353553 0.353553 -0.5)
(0 1 -0.5)
(0 0.5 -0.5)
(-0.5 0 -0.5)
(-1 0 -0.5)
(-0.707107 0.707107 -0.5)
(-0.353553 0.353553 -0.5)

);

fields
(
p
);
}

forces
{
type forceCoeffs;
functionObjectLibs ( "libforces.so" );
outputControl timeStep;
outputInterval 1;
patches
(
walls
);
directForceDensity no;

pName p;
UName U;
rhoName rhoInf;
//log true;
rhoInf 994.5;
CofR ( 0 0 0 );
liftDir ( 0 1 0 );
dragDir ( 1 0 0 );
pitchAxis ( 0 0 1 );
magUInf 0.54;
lRef 0.04;
Aref 0.0157;
Aref1 0.004;
rhoRef 994.5;
}

fieldAverage1
{
type fieldAverage;
functionObjectLibs ("libfieldFunctionObjects.so");
enabled true;
outputControl outputTime;
fields
(
U
{
mean on;
prime2Mean on;
base time;
}

p
{
mean on;
prime2Mean on;
base time;
}
);
}
}

In the forces directory I got only 0 directory was present(with forceCoeffs_0.005.dat, forceCoeffs.dat files). Moreover all the forcecoefficients (Cm,Cl,Cd) values were zeroes.
Please help me to get other values of forceCoefficients.

Regards
arya123 is offline   Reply With Quote

Old   March 7, 2017, 11:13
Default
  #28
New Member
 
Niranjan Prabhu
Join Date: Sep 2016
Location: chennai
Posts: 7
Rep Power: 2
niran is on a distinguished road
i'm new to this platform, trying to compute forces on cylinder
i am getting error keyword origin is undefined

FOAM FATAL IO ERROR:
keyword origin is undefined in dictionary "/home/user/OpenFOAM/user-2.4.0/run/work/3_waveflume/system/controlDict.functions.forces"

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

application interFoam;

startFrom startTime;

startTime 0;

stopAt endTime;

endTime 20;

deltaT 0.001;

writeControl adjustableRunTime;

writeInterval 0.2;

purgeWrite 0;

writeFormat ascii;

writePrecision 6;

writeCompression uncompressed;

timeFormat general;

timePrecision 6;

runTimeModifiable yes;

adjustTimeStep yes;

maxCo 0.25;

maxAlphaCo 0.25;

maxDeltaT 1;

functions
{
#includeIfPresent "../waveGaugesNProbes/surfaceElevationAnyName_controlDict";

forces
{
type forces;
functionObjectLibs ("libforces.so");
outputControl outputTime;
patches (floatingObject);
pName p;
UName U;
rhoName rhoInf;
log yes;
rhoInf 1000;
CofR (0 0 0);
}
}
niran is offline   Reply With Quote

Old   March 7, 2017, 12:39
Default
  #29
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 132
Rep Power: 3
piu58 is on a distinguished road
I have a snippet form my controlDict file which works. The surface I want to know the forces from is "cylinder":
Code:
functions
{
    forces
    {
        type            forceCoeffs;
        functionObjectLibs ( "libforces.so" );
        outputControl   timeStep;
        outputInterval  1;
        patches         ( cylinder );
        pName           p;
        UName           U;
        rhoName         rhoInf;
        log             true;
        rhoInf          1;
        liftDir         (0 1 0);
        dragDir         (1 0 0);
        CofR            (-0.5 0 0);
        pitchAxis       (0 1 0);
        magUInf         1;
        lRef            1;
        Aref            1;
    }
}
__________________
Uwe Pilz
--
Sie ahnen nicht, wieviel Poesie in der Berechnung
einer Logarithmentafel enthalten ist (Carl Friedrich Gauß)
piu58 is offline   Reply With Quote

Old   April 8, 2017, 11:05
Default problem while using forceCoeffs
  #30
New Member
 
virat dhabalia
Join Date: Apr 2017
Posts: 2
Rep Power: 0
viratdhabalia is on a distinguished road
actually i m doing flow over cylinder problem .. and i have used icoFoam solver and in controlDict file i have used function for force and forceCoeffs
but after simulation there is no postProcesser folder generates, but simulation has done, so what to do to solve this problem... i have posted code below.. plz refer it and reply where i have done mistake
thank yu


////controlDict file portion////

application icoFoam;

startFrom startTime;

startTime 0;

stopAt endTime;

endTime 100;

deltaT 0.0025;

writeControl timeStep;

writeInterval 25;

purgeWrite 0;

writeFormat ascii;

writePrecision 6;

writeCompression off;

timeFormat general;

timePrecision 6;

runTimeModifiable true;

function
{

forces
{
type forces;
functionObjectLibs ("libforces.so");
outputControl timeStep;
outputInterval 1;
patches ( "wallCyl" );
pName p;
UName U;
rhoName rhoInf;
CofR (0 0 0);
rhoInf 1;
}

forceCoeffs
{
type forceCoeffs;
functionObjectLibs ("libforces.so");
outputControl timeStep;
outputInterval 1;
patches ( "wallCyl" );
pName p;
UName U;
rhoName rhoInf;
log true;
liftDir (0 1 0);
dragDir (1 0 0);
CofR (0 0 0);
pitchAxis (0 1 0);
magUInf 1;
rhoInf 1;
lRef 1;
Aref 1;
}
viratdhabalia is offline   Reply With Quote

Reply

Tags
forces and force coeff.

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
forces in interFoam Svensson OpenFOAM Post-Processing 2 May 9, 2012 13:31
New OpenFOAM Forum Structure jola OpenFOAM 2 October 19, 2011 06:55
FORCES don't run! C12Carbon OpenFOAM 0 September 10, 2011 07:34
Summer School on Numerical Modelling and OpenFOAM hjasak OpenFOAM 5 October 12, 2008 13:14
OpenFOAM Training and Workshop Hrvoje Jasak Main CFD Forum 0 October 7, 2005 07:14


All times are GMT -4. The time now is 10:31.