Sunteți pe pagina 1din 5

Como calcular fuerzas de arrastre en

OpenFoam

Calculation Mode in OpenFOAM:


Calculates the forces and moments
by integrating the pressure and
skin-friction forces over a given list
of patches.
By Juan S. Cardona

/*--------------------------------*- C++ -*----------------------------------*\


| =========

| \\

/ F ield

| \\

/ O peration

| OpenFOAM: The Open Source CFD Toolbox

| \\ / A nd
|

\\/

| Version: 2.1.1
| Web:

www.OpenFOAM.org

M anipulation |

|
|

\*---------------------------------------------------------------------------*/
forces
{
type forces;
functionObjectLibs ("libforces.so");
patches (Nadador);
pName p;
UName U;
rhoName rhoInf;
rhoInf 1000;

// Reference density, fluid

CofR (-2.5 0 0);

// Origin for moment calculations

outputControl timeStep;
OutputInterval 50;
}

Crear un nuevo archivo


llamado force

Al ejecutar el solucionador, este


script llama a la librera
"libforces.so" y calcula las
fuerzas en el parche llamado
Nadador. Crea un directorio
de fuerzas donde escribe los
resultados en cada
outputControl que es igual a
cada timeStep de 0.1

/*--------------------------------*- C++ -*---------------------------------*\


| =========
|
|
| \\ / F ield
| OpenFOAM: The Open Source CFD
Toolbox
|
| \\ / O peration | Version: 2.1.1
|
| \\ / A nd
| Web: www.OpenFOAM.org
|
| \\/ M anipulation |
|
\*---------------------------------------------------------------------------*/
forcesCoeffs
Boundaries where you would like to monitor the
{
type
forceCoeffs;
forces, drag or lift are written within the patches.
functionObjectLibs ( "libforces.so" );

OutputInterval : internal at which output will


outputControl timeStep;
be reported
outputInterval 1;

Crear un nuevo archivo llamado


forceCoeffs

patches ( "Mariposa.*" );
pName
p;
UName
U;
rhoName rhoInf; // Indicates incompressible
log
true;
rhoInf 1;
// Redundant for incompressible
liftDir (0 0 1);
dragDir (1 0 0);
CofR
(0.72 0 0); // Axle midpoint on ground
pitchAxis (0 1 0);
magUInf 20;
lRef
1.42;
// Wheelbase length
Aref
0.75;
// Estimated
}

rhoInf : is the free stream density.

MagUinf : is the magnitude of the free


stream velocity.

Aref : referece area

liftDSir and dragDir : Lift and Drag direction


vectors are specified

The forceCoeffs functionObject prints out the


lift and drag coefficients.

/*--------------------------------*- C++ -*----------------------------------*\


| =========
| \\

/ F ield

| OpenFOAM: The Open Source CFD Toolbox

| \\ / O peration
| \\ / A nd
| \\/

| Version: 2.1.1
| Web:

M anipulation |

Modificar el Diccionario
ControlDict

www.OpenFOAM.org

|
|

writeControl timeStep;
writeInterval 100;

\*---------------------------------------------------------------------------*/

purgeWrite

0;

FoamFile

writeFormat

ascii;

writePrecision 6;
version

2.0;

writeCompression compressed;

format

ascii;

timeFormat

general;

class

dictionary;

timePrecision 6;

object

controlDict;

runTimeModifiable true;

functions

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application

simpleFoam;

startFrom

latestTime;

startTime

0;

stopAt
endTime
deltaT

{
#include "forces"
#include "forceCoeffs"

endTime;
500;
1;

Resultados de Coeficientes
Time

Cd

Cl

0.1

2345.56

5.95693

-251.284

0.2

4643.53

1271.1

-9114.97

0.3

-5.43946e+11 3.42022e+12

-1.6541e+14

0.4

-6.06731e+29 1.3728e+29

7.81321e+30

0.5

5.70247e+51

4.90589e+49

3.46159e+51

0.6

2.15216e+68

-3.0019e+66

3.80131e+69

0.7

4.20393e+82

1.83888e+82

-1.67758e+83

0.8

1.95549e+99

7.70646e+97

-5.52581e+100

0.9

-2.53782e+118 -6.83676e+116 3.54139e+118

1.76237e+136 4.99239e+136 -5.76987e+138

1.1

3.63465e+156 -1.07323e+157 2.51636e+158

1.2

3.68787e+174 -3.10643e+174 5.82701e+175

1.3

-7.64079e+192 -3.31436e+191 3.23269e+193

Cm

Cd: Coeficiente de
arrastre.
Cl: Coeficiente de
sustentacion.
Cm: Coeficiente de
cabeceo.

S-ar putea să vă placă și