CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fidelity CFD (https://www.cfd-online.com/Forums/fidelity-cfd/)
-   -   How to compute viscous forces in OpenLabs script (https://www.cfd-online.com/Forums/fidelity-cfd/191167-how-compute-viscous-forces-openlabs-script.html)

FineUser August 2, 2017 10:47

How to compute viscous forces in OpenLabs script
 
Dear all,

In order to compare different airfoils at the same lift coefficient, I wrote an OpenLabs script* for driving the AoA into a value corresponding to the target CL (e.g. 0.5).

Since OpenLabs do not give access to flow forces or residuals*, I had to compute them in the openLabs script by integrating the pressure on solid walls for the inviscid force and the viscous stresses for the viscous force.

However, when comparing the openLabs results with the forces computed by the solver (in the .wall file) I found the following:

-> The inviscid (pressure) force is exactly the same as in the .wall file.
-> The viscous force is different.

Using SA turbulence model, the error is relatively small but it reaches 30% with Laminar NS computations.

No improvement is obtained by using the "Extrapolate" keyword for the gradient computation at solid boundaries (in this case even the inviscid force value becomes wrong).

Hence my question: How the viscous stress tensor is computed in FineOpen ??

I used the following equation (in index notations):

Tauij = (µ + µt) (dui/dxj +duj/dxi - (2/3) δij duk/dxk)


Below are the Open Labs commands used for the computation of the flow forces:


=>AUXTERMS


# components of the flow forces.

@AUXTERM:PressForceX
->EXPRESSION:INTEG2D(StaticPressure*NormalX,ALLSOLI DS)
@AUXTERM:PressForceY
->EXPRESSION:INTEG2D(StaticPressure*NormalY,ALLSOLI DS)
@AUXTERM:PressForceZ
->EXPRESSION:INTEG2D(StaticPressure*NormalZ,ALLSOLI DS)
@AUXTERM:ViscForceX
->EXPRESSION:INTEG2D(ViscStressX,ALLSOLIDS)
@AUXTERM:ViscForceY
->EXPRESSION:INTEG2D(ViscStressY,ALLSOLIDS)
@AUXTERM:ViscForceZ
->EXPRESSION:INTEG2D(ViscStressZ,ALLSOLIDS)


# components of the viscous force

@AUXTERM:ViscStressX
->EXPRESSION:-Viscosity*(Tauxx*NormalX+Tauxy*NormalY\
+Tauxz*NormalZ)# - sign because the force is applied from fluid to solid
@AUXTERM:ViscStressY
->EXPRESSION:-Viscosity*(Tauxy*NormalX+Tauyy*NormalY\
+Tauyz*NormalZ)
@AUXTERM:ViscStressZ
->EXPRESSION:-Viscosity*(Tauxz*NormalX+Tauyz*NormalY\
+Tauzz*NormalZ)


# components of the viscous stress tensor

@AUXTERM:Tauxx
->EXPRESSION:2*(GRAD(Vx,x)-(GRAD(Vx,x)+GRAD(Vy,y)+GRAD(Vz,z))/3)
@AUXTERM:Tauyy
->EXPRESSION:2*(GRAD(Vy,y)-(GRAD(Vx,x)+GRAD(Vy,y)+GRAD(Vz,z))/3)
@AUXTERM:Tauzz
->EXPRESSION:2*(GRAD(Vz,z)-(GRAD(Vx,x)+GRAD(Vy,y)+GRAD(Vz,z))/3)
@AUXTERM:Tauxy
->EXPRESSION:GRAD(Vx,y)+GRAD(Vy,x)
@AUXTERM:Tauxz
->EXPRESSION:GRAD(Vx,z)+GRAD(Vz,x)
@AUXTERM:Tauyz
->EXPRESSION:GRAD(Vy,z)+GRAD(Vz,y)



* It will be great if Numeca includes this possibility in a future release.

DarylMusashi August 3, 2017 07:15

Dear FineUser,

this is some interesting but really advanced request. I would ask you to state your problem in the official NUMECA forum, which is accessable through the customer portal (portal.numeca.be). There is a special forum for OpenLabs questions (http://portal.numeca.be/forum/viewforum.php?f=23).

The person who is responsible for licensing of our software in your company/institute is called the "Master User". He can create an account for you if you don't have one, in order to have access to the customer area.

Kind regards,
Holger

FineUser August 3, 2017 09:30

Dear Holger,

Thank you for the advise, I will try to ask the question there.

Actually, my AoA controller works fine and converges to the target Cl that I specify. However, as the viscous force is not correctly estimated, the Cl coefficient computed in my OpenLabs script is different from the one computed through FineOpen results.

I will not tell you how many combinations of the gradients * viscosity terms for the stress tensor I tried in order to arrive at a similar viscous force but without success. I have even tested with some simple cases (flat plate, backward facing step ...).

Kind regards,

DarylMusashi August 3, 2017 10:15

(Automatically) modifying the AoA in order to achieve a lift coefficient = 0.5 is exactly the same procedure as in the drag prediction workshops (DPW), in a few of them NUMECA participated, too. You have good chances that someone in our official forum can help you out.

FineUser August 3, 2017 11:00

Actually, I think they participated only in the DPW4, strangely the presentation of Numeca is the only one missing in their website https://aiaa-dpw.larc.nasa.gov/Works...sentations.htm.

Thank you anyway,


All times are GMT -4. The time now is 06:44.