CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

boundary conditions for simpleFoam calculation

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 19, 2010, 04:49
Default boundary conditions for simpleFoam calculation
  #1
New Member
 
Patrick Wang
Join Date: Dec 2009
Location: Stuttgart, Germany
Posts: 26
Rep Power: 16
foam_noob is on a distinguished road
Hello everyone,

I am currently simulating the airflow over a car. I know what the results should look like, but after changing the boundary condition numerous times I am still unable to get realistic results (tried with both kepsilon model and komega model). I posted a picture of my simulation below (blended out some walls) as well as added the boundary conditions.

fvSchemes and fvSolution were taken from either the motorbike tutorial (for k omega model) or pitzDaily tutorial (k epsilon model). I am calculating with simpleFoam. R, omega and k were also taken from these tutorials.

Appreciate the help .

Patrick


P.S Which model (k epsilon / k omega model) is better for this calculation?

epsilon:

Code:
 
 
dimensions      [0 2 -3 0 0 0 0];
 
internalField   uniform 14.855;
 
boundaryField
{
 
“car_.*”
{
    type            epsilonWallFunction;
    value           uniform 14.855;
}
 
road_noslip
{
    type            epsilonWallFunction;
    value           uniform 14.855;
}
symmetry
{
    type            symmetryPlane;
}
topwall
{
    type            slip;
}
sidewall
{
    type            slip;
}
inlet
{
    type            fixedValue;
    value           uniform 14.855;
}
outlet
{
    type            zeroGradient;
}
roadslip
{
    type            slip;
}
}
nut:

Code:
dimensions      [0 2 -1 0 0 0 0];
 
internalField   uniform 0;
 
boundaryField
{
 
 “car_.*”
 {
     type            nutWallFunction;
     value           uniform 0;
 }
 road_noslip
 {
     type            nutWallFunction;
     value           uniform 0;
 }
 symmetry
 {
     type            symmetryPlane;
 }
 topwall
 {
     type            calculated;
     value           uniform 0;
 }
 sidewall
 {
     type            calculated;
     value           uniform 0;
 }
 inlet
 {
     type            calculated;
     value           uniform 0;
 }
 outlet
 {
     type            calculated;
     value           uniform 0;
 }
 roadslip
 {
     type            calculated;
     value           uniform 0;
 }
}
p:

Code:
dimensions      [0 2 -2 0 0 0 0];
 
internalField   uniform 0;
 
boundaryField
{
 
 “car_.*”
 {
     type            zeroGradient;
 }
 
 road_noslip
 {
     type            zeroGradient;
 }
 symmetry
 {
     type            symmetryPlane;
 }
 topwall
 {
     type            slip;
 }
 sidewall
 {
     type            slip;
 }
 inlet
 {
     type            zeroGradient;
 }
 outlet
 {
     type            fixedValue;
     value           uniform 0;
 }
 roadslip
 {
     type            slip;
 }
}
U:

Code:
dimensions      [0 1 -1 0 0 0 0];
 
internalField   uniform (27.77 0 0);
 
boundaryField
{
 “car_.*”
 {
     type            fixedValue;
     value           uniform (0 0 0);
 }
 
 road_noslip
 {
     type            fixedValue;
     value           uniform (0 0 0);
 }
 symmetry
 {
     type            symmetryPlane;
 }
 topwall
 {
     type            slip;
 }
 sidewall
 {
     type            slip;
 }
 inlet
 {
     type            fixedValue;
     value           uniform (27.77 0 0);
 }
 outlet
 {
     type            zeroGradient;
 }
 roadslip
 {
     type            slip;
 }
}
k:

Code:
dimensions      [0 2 -2 0 0 0 0];
 
internalField   uniform 0.24;
 
boundaryField
{
 “car_.*”
 {
     type            kqRWallFunction;
     value           uniform 0.24;
 }
 road_noslip
 {
     type            kqRWallFunction;
     value           uniform 0.24;
 }
 symmetry
 {
     type            symmetryPlane;
 }
 topwall
 {
     type            slip;
 }
 sidewall
 {
     type            slip;
 }
 inlet
 {
     type            fixedValue;
     value           uniform 0.24;
 }
 outlet
 {
     type            inletOutlet;
     inletValue      uniform 0.24;
     value           uniform 0.24;
 }
 roadslip
 {
     type            slip;
 }
}
omega:

Code:
dimensions      [0 0 -1 0 0 0 0];
 
internalField   uniform 1.78;
 
boundaryField
{
 “car_.*”
 {
     type            omegaWallFunction;
     value           uniform 1.78;
 }
 road_noslip
 {
     type            omegaWallFunction;
     value           uniform 1.78;
 }
 symmetry
 {
     type            symmetryPlane;
 }
 topwall
 {
     type            slip;
 }
 sidewall
 {
     type            slip;
 }
 inlet
 {
     type            fixedValue;
     value           uniform 1.78;
 }
 outlet
 {
     type            fixedValue;
     value           uniform 1.78;
 }
 roadslip
 {
     type            slip;
 }
}
R:

Code:
dimensions      [0 2 -2 0 0 0 0];
 
internalField   uniform (0 0 0 0 0 0);
 
boundaryField
{
 “car_.*”
 {
     type            zeroGradient;
 }
 road_noslip
 {
     type            zeroGradient;
 }
 symmetry
 {
     type            symmetryPlane;
 }
 topwall
 {
     type            slip;
 }
 sidewall
 {
     type            slip;
 }
 inlet
 {
     type            fixedValue;
     value           uniform (0 0 0 0 0 0);
 }
 outlet
 {
     type            zeroGradient;
 }
 roadslip
 {
     type            slip;
 }
}
Attached Images
File Type: jpg simulation1.jpg (16.0 KB, 275 views)
foam_noob is offline   Reply With Quote

Old   February 26, 2010, 03:03
Default
  #2
New Member
 
Patrick Wang
Join Date: Dec 2009
Location: Stuttgart, Germany
Posts: 26
Rep Power: 16
foam_noob is on a distinguished road
problem solved
foam_noob is offline   Reply With Quote

Old   March 2, 2010, 05:04
Default
  #3
bjr
Member
 
Ben Racine
Join Date: Mar 2009
Location: Seattle, WA, USA
Posts: 62
Rep Power: 17
bjr is on a distinguished road
Send a message via AIM to bjr Send a message via Skype™ to bjr
Do you like your drag results?
bjr is offline   Reply With Quote

Old   March 2, 2010, 08:03
Default
  #4
New Member
 
Patrick Wang
Join Date: Dec 2009
Location: Stuttgart, Germany
Posts: 26
Rep Power: 16
foam_noob is on a distinguished road
I haven't had the chance to implement liftDrag from OF 1.2. I have to do that when I have time. If you know a different way to calculate the drag coefficient with OF please share .
foam_noob is offline   Reply With Quote

Old   March 2, 2010, 15:37
Default
  #5
bjr
Member
 
Ben Racine
Join Date: Mar 2009
Location: Seattle, WA, USA
Posts: 62
Rep Power: 17
bjr is on a distinguished road
Send a message via AIM to bjr Send a message via Skype™ to bjr
functions
{
forces
{
type forces;
functionObjectLibs ("libforces.so");
outputControl timeStep;
outputInterval 1;

patches (OBJECT_OBJECT);
pName p;
Uname U;
log true;
rhoName rhoInf;
rhoInf 1.17;
magUInf 0.0045;
CofR (1.25 0 4);
}

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

patches (OBJECT_OBJECT);
pName p;
Uname U;
log true;
rhoName rhoInf;
rhoInf 1.17;
magUInf 0.0045;
CofR (1.25 0 4);

liftDir (0.0 1.0 0.0);
dragDir (1.0 0.0 0.0);
pitchAxis (0 0 0);

lRef 0.5;
Aref 12.56;

}


I use something like this in my /system/controlDict file. You must alter for your case, but this is a start. I'm not sure in which version that a forces function object (vocabulary?) was introduced off-hand.

Regards,
Ben Racine
bjr is offline   Reply With Quote

Old   March 2, 2010, 15:50
Default
  #6
bjr
Member
 
Ben Racine
Join Date: Mar 2009
Location: Seattle, WA, USA
Posts: 62
Rep Power: 17
bjr is on a distinguished road
Send a message via AIM to bjr Send a message via Skype™ to bjr
The following thread is the reference for the above statements.
http://www.cfd-online.com/Forums/ope...es-v1-6-a.html
bjr is offline   Reply With Quote

Old   March 3, 2010, 07:10
Default
  #7
New Member
 
Patrick Wang
Join Date: Dec 2009
Location: Stuttgart, Germany
Posts: 26
Rep Power: 16
foam_noob is on a distinguished road
Hey Ben,

Thanks for the code. I tried it and it worked without any problems.

I have a couple of question regarding this code.

1. Which patches should I use for my simulation? Do I use every patch that defines the vehicle (I split the car into multiple parts: wheels, windshields and so on)?

2. And what is lRef? How do I calculate it?

3. Do you know a method for calculating Aref?

Appreciate the help

Patrick Wang
foam_noob is offline   Reply With Quote

Old   March 3, 2010, 21:17
Default
  #8
bjr
Member
 
Ben Racine
Join Date: Mar 2009
Location: Seattle, WA, USA
Posts: 62
Rep Power: 17
bjr is on a distinguished road
Send a message via AIM to bjr Send a message via Skype™ to bjr
1. Which patches should I use for my simulation? Do I use every patch that defines the vehicle (I split the car into multiple parts: wheels, windshields and so on)? Yes

2. And what is lRef? How do I calculate it?
I believe it's the the length-scale used for finding Re number.

3. Do you know a method for calculating Aref?
Aref is probably best done by doing a 2D frontal area projection of your surface model in some CAD package... as I believe it's typical to use frontal area in vehicle aerodynamics when calculating drag coefficients.

Hope this helps and someone can correct if I'm wrong anywhere.
Ben
bjr is offline   Reply With Quote

Old   July 1, 2015, 09:07
Default baklanton
  #9
New Member
 
Anton
Join Date: Nov 2014
Posts: 2
Rep Power: 0
baklanton is on a distinguished road
Hi Patrick,

I am also experiencing an issue which is similar to the one you explained in your first post. Could you please explain how you solved it?

Thank you!
baklanton 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
Concentric tube heat exchanger (Air-Water) Young CFX 5 October 7, 2008 00:17
Fluent accuracy and boundary conditions Paolo Lampitella FLUENT 0 June 12, 2008 07:25
Pressure boundary conditions Lionel S. Main CFD Forum 1 August 24, 2007 19:03
Please help with flow around car modelling! Tudor Miron CFX 17 March 19, 2004 20:23
A problem about setting boundary conditions lyang Main CFD Forum 0 September 19, 1999 19:29


All times are GMT -4. The time now is 00:33.