CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   Angle of attack input for simpleFoam analyses (https://www.cfd-online.com/Forums/openfoam-pre-processing/99076-angle-attack-input-simplefoam-analyses.html)

bcorr March 25, 2012 21:48

Angle of attack input for simpleFoam analyses
 
Hello,

As a new user, I have a question on angle of attack input for airfoil analyses using simpleFoam. Is the angle of attack inputted during the process when the blockMeshDict is created (i.e. meshing process), or in the "U" velocity file when the freestreamValue is set for the velocity conditions for each of the boundaries. I would appreciate any guidance on this.

lovecraft22 March 26, 2012 02:55

It doesn't make any difference. You can either set your domain at the angle of attack you want and then have the flow entering the inlet plane and going along one direction (say x) or you can have your domain at 0° and then set your flow to enter the domain at the angle you want, in this case you'll probably have to set 2 faces of the domain as an inlet. Of course, if you want to simulate many angles of attack the latter solution is the best because changing the angle of attack would be easier and, more important, your mesh wouldn't change as you change it.

bcorr March 26, 2012 10:04

angle of attack question answered
 
lovecraft22,

Thank-you for your help in clarifying the ways to set the angle of attack.

Regards,

tfuwa December 23, 2013 21:57

Quote:

Originally Posted by lovecraft22 (Post 351419)
It doesn't make any difference. You can either set your domain at the angle of attack you want and then have the flow entering the inlet plane and going along one direction (say x) or you can have your domain at 0° and then set your flow to enter the domain at the angle you want, in this case you'll probably have to set 2 faces of the domain as an inlet. Of course, if you want to simulate many angles of attack the latter solution is the best because changing the angle of attack would be easier and, more important, your mesh wouldn't change as you change it.


I understand the thread is quite old, but is there a way to set the b.c. with an angle of attack in OpenFOAM? Much would be appreciated for any answers on this?

Merry Christmas!

lovecraft22 December 24, 2013 10:40

Well, if you set your inlet as a velocity inlet, then you can set any angle of attack you want simply by imposing two components of the velocity vector…

So, if your flow is mainly in the x direction and the lift direction of your airfoil is in the z direction and you want to impose V as velocity with an angle of attack A, then you just need to set (V*cos(A),0,V*sin(A)) as your inlet velocity.

tfuwa December 25, 2013 02:05

Quote:

Originally Posted by lovecraft22 (Post 467540)
Well, if you set your inlet as a velocity inlet, then you can set any angle of attack you want simply by imposing two components of the velocity vector…

So, if your flow is mainly in the x direction and the lift direction of your airfoil is in the z direction and you want to impose V as velocity with an angle of attack A, then you just need to set (V*cos(A),0,V*sin(A)) as your inlet velocity.

Hi Lore,

Thanks for your quick reply.

Say the computational domain is a rectangular. If the inlet flow is in x direction, then side b.c. (two boundaries parallel to the inlet flow) could be set as symmteryPlane, and outlet velocity could be set as zeroGradient. But these b.c.s are no longer validated if the attack angle is non-zero. Then how to change the sides and outlet boundary conditions accordingly?

lovecraft22 December 25, 2013 11:13

You'll need two inlets + two outlets and you can keep the side walls as symmetry.

tfuwa December 29, 2013 21:15

Quote:

Originally Posted by lovecraft22 (Post 467642)
You'll need two inlets + two outlets and you can keep the side walls as symmetry.

Hi Lore,

Could you please elaborate on "two inlets + two outlets"? As there are only four boundaries, how do you set these boundaries + side symmetry?

lovecraft22 December 30, 2013 02:21

Well, if your domain is rectangular then you have 6 walls which mean 6 boundary conditions to apply.

Now, let's consider a positive value of the angle of attack ( meaning your airfoil is probably generating lift) so that the flow is coming from under the airfoil. To this extent, the bottom wall and the front wall (the one facing the leading edge) will have to be set as inlets as the flow is entering your domain from there. The upper and back wall (the one facing the trailing edge) will have to be set as outlets as the flow is going out of there. The lateral walls instead can be set as symmetry/empty/or whatever you need them to be for you case.

tfuwa January 5, 2014 21:59

Quote:

Originally Posted by lovecraft22 (Post 468064)
Well, if your domain is rectangular then you have 6 walls which mean 6 boundary conditions to apply.

Now, let's consider a positive value of the angle of attack ( meaning your airfoil is probably generating lift) so that the flow is coming from under the airfoil. To this extent, the bottom wall and the front wall (the one facing the leading edge) will have to be set as inlets as the flow is entering your domain from there. The upper and back wall (the one facing the trailing edge) will have to be set as outlets as the flow is going out of there. The lateral walls instead can be set as symmetry/empty/or whatever you need them to be for you case.

Hi Lore,

Many thanks for your answers and patience. Now, it works pretty well with freesteam b.c. condition by two inlets and two outlets. Great help.

alixcattermole March 21, 2018 11:13

Hello,

I previously ran the a case where I modeled the flow around the full DTCHull and got accurate results. Now I am trying to model the flow around the hull at different drift angles by altering the direction of the inlet velocity. I tried changing the velocity internalField to (Vcos(x), Vsin(x), 0) and changing one side to an inlet patch and the other side to an outlet patch but I am getting errors Both sides were previously symmetryPlane faces. Is this method anywhere close to being correct? Any help would be appreciated.

chliu August 8, 2018 11:59

Quote:

Originally Posted by alixcattermole (Post 686037)
Hello,

I previously ran the a case where I modeled the flow around the full DTCHull and got accurate results. Now I am trying to model the flow around the hull at different drift angles by altering the direction of the inlet velocity. I tried changing the velocity internalField to (Vcos(x), Vsin(x), 0) and changing one side to an inlet patch and the other side to an outlet patch but I am getting errors Both sides were previously symmetryPlane faces. Is this method anywhere close to being correct? Any help would be appreciated.

I am also doing the similar research by InterFoam solver, reference the paper "2015_Oldfield-DRDC-Prediction of Warship Manoeuvring Coefficients using CFD". Currently I am focusing in static drift simulation with different angles. At angle 0, The forces compared perfectly with experiment. However, the relative error of forces and moment are nearly 20% at angle 10. How is your simulation result at different drift angle ? I use the mesh similar as DTCHull tutorial by toposetDict and snappyhexMeshDict. How do you generate your mesh?


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