CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   Problem Boundary Conditions, forceCoeff (https://www.cfd-online.com/Forums/openfoam-pre-processing/130009-problem-boundary-conditions-forcecoeff.html)

 valerio galluzzi February 18, 2014 07:13

Problem Boundary Conditions, forceCoeff

Hello everyone,
i'm a phd student of engineering and i'm new using openfoam. I'm trying to simulate a flow around a circular cylinder. The first time i reached good results using a flow velocity inlet condition and now i want to do the same thing but using the gauge pressure inlet condition. My problem is i'm not sure about the new boundary condition and how to set up the force and forceCoeff files. The results of the second simulation were really bad, the mean Cd and mean Cl were too big, like 10e4 O_o.

i hope someone can help me, because i cant understand if there is a problem inside the P and U boundary condition files or there is a problem inside the forceCoeff file or both of them.

Re=8900

---------------------------------------
InitialCondition file:

flowVelocity (0 0 0);
pressure 28.4;
turbulentKE 6.9646e-1;
turbulentOmega 4.3923e2;
nut_initial 0;
#inputMode merge

---------------------------------------
P file:

#include "include/initialConditions"

dimensions [0 2 -2 0 0 0 0];

internalField uniform \$pressure;

boundaryField
{
In
{
type fixedValue;
value uniform \$pressure;
}

Out
{
type fixedValue;
value \$internalField;
}

Up&Bottom
{
type fixedValue;;
value \$internalField;
}

Wall
{
}

Left&Right
{
type empty;
}
}

----------------------------------------------
U file

#include "include/initialConditions"

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

internalField uniform \$flowVelocity;

boundaryField
{
In
{
type inletOutlet;
inletValue uniform (0 0 0);
value \$internalField;
}

Out
{
type inletOutlet;
inletValue uniform (0 0 0);
value \$internalField;
}

Up&Bottom
{
type inletOutlet;
inletValue uniform (0 0 0);
value \$internalField;
}

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

Left&Right
{
type empty;
}
}

--------------------------------------------------------
force file

forces
{
type forces;
outputControl timeStep;
outputInterval 1;

patches (Wall); // change to your patch name
pName p;
UName U;
rhoName rhoInf; // Indicates incompressible
nuName nuInf;
log true;
rhoInf 1.225; // Redundant for incompressible
nuInf 1.45e-05; //Reference kinetic viscosity for fluid
liftDir (0 1 0);
dragDir (1 0 0);
CofR (0 0 0); // Origin for moment calc
pitchAxis (0 0 1);
magUInf 6.814;
lRef 0.019; // Characteristic length
Aref 2.8338e-4; // Estimated

}

---------------------------------------------------------

forceCoeff file

forceCoeffs
{
type forceCoeffs;
functionObjectLibs ( "libforces.so" );
outputControl timeStep;
outputInterval 1;

patches ( Wall );
pName p;
UName U;
rhoName rhoInf; // Indicates incompressible
log true;
rhoInf 1.225; // Redundant for incompressible
liftDir (0 1 0);
dragDir (1 0 0);
CofR (0 0 0); // Origin for moment calc
pitchAxis (0 0 1);
magUInf 6.814;
lRef 0.019; // Characteristic length
Aref 2.8338e-4; // Estimated
}

--------------------------------------------------------------------

 valerio galluzzi February 20, 2014 06:24

someone!? pls, i really need help!

 xerxes92005 April 20, 2014 12:15

Hi Valerio.

I`m almost working on the same problem. simulating flow around single and tandem cylinders using OpenFOAM. I`m a beginner with OpenFOAM and started few weeks ago.
my primitive simulation includes a single cylinder subjected to uniform steady current with Re=3900. I deliberately chose Re=3900 because lots of works in literature have used this Re and my model can be crosschecked and verified comparing to their results.
I run simulations using icoFOAM, simpleFOAM and PisoFoam but i haven't got acceptable results yet.
maybe you can upload our folders here in order to check our results together and I can upload mine as well.

Amin

 valerio galluzzi April 22, 2014 04:48

Hi xerxes! Finally someone has my same issue.
As u have already read i use Re=8900, k-omegaSST turbulence model with wall-functions for k,omega, and nut and the solver is pimplefoam.
What i found looking up in internet is probably a problem with the turbulence model. The k-omegaSST has problems when the Re is too low, like less than 10e+4. I couldnt try the k-epsilon model because i cant make it works, at least so far, and now i work on another things. But others have tried it and said it's better....i dont know.

Write me ur email in pvt, because the files are too heavy for the forum.

 xerxes92005 May 1, 2014 17:37

Valerio, you may find this thread useful:

http://www.cfd-online.com/Forums/ope...ng-fluent.html

 RodriguezFatz May 7, 2014 08:36

Did you try if any change in numerical parameters changes the solution?
What if you decrease the time step? Or if you increase the length from inlet to your bluff body?

 valerio galluzzi May 7, 2014 09:04

i evaluated the time step by the courant number (less than 0.8) because i know the strouhal should be 0.21-0.22.
I didnt try to change the distance from the inlet, but i used a reliable distance (well, i think it's reliable because the literature) 10.5 Diameters.

 RodriguezFatz May 7, 2014 09:07

What are the other boundary conditions (nut, k, omega)? Also, you wrote in the private message to me, that Fluent also fails.

 valerio galluzzi May 7, 2014 09:55

1 Attachment(s)
Those are the BB

 RodriguezFatz May 7, 2014 11:16

This file looks really strange. Something is wrong here...

 All times are GMT -4. The time now is 03:12.