# Mismatch in FLUENT calculation of Drag coefficient

• 496 Views
• Last Post 06 November 2019
omid1988 posted this 25 October 2019

Hey all,

I have the drag/lift results of simulating a pitching airfoil for which the FLUENT gives me negative drag!

I set pitching motion to the whole domain by UDF in Dynamic mesh. The incoming velocity is also a function of time. However, I am getting negative Cd at a portion of the simulation which does not make sense.
I calculated Cd by using Pressure values on airfoil nodes and got a different number from FLUENT.

Any of you have seen this discrepancy before? Do you have any idea why Cd is negative?

I really appreciate any help,

Omid

Attached Files

rwoolhou posted this 28 October 2019

Simplify the model and review the results: what might be causing the error? Has the model converged? Note, staff are not permitted to open/download attachments.

• Liked by
omid1988 posted this 28 October 2019

For a simpler model, which is just a pitching airfoil I always get positive Cd. However, when I add the fluctuating freestream, I get negative Cd at some portion of the pitching cycle (when airfoil AoA is decreasing).
By the way, the Cd and Cl results get converged at second pitching cycle, and residuals are in the order of O(1e-5)

rwoolhou posted this 29 October 2019

Have you looked (carefully) at the pressure and velocity field around the wing at that point?

omid1988 posted this 29 October 2019

Yes, I got the pressure contour and analyzed the static pressure to calculate the drag force by myself.
I got a completely different value from my calculations, compared to the one from FLUENT. I am trying to check my calculation, however, in FLUENT I am getting negative Cd which doesn't make sense.
The negative values are only while the angle of attack of an airfoil is decreasing from the maximum. For the case of pitching airfoil, I have never got negative Cd, but when I add fluctuation inlet velocity, I get negative Cd sometimes.

abenhadj posted this 29 October 2019

How are you defining the drag? Wrt to which direction? Do you have any reversal flow? Are you rotating the whole domain or adjusting the aoa at inlet?

Best regards,

Amine

omid1988 posted this 29 October 2019

I get drag coefficient from FLUENT, by using force applied on the airfoil along the x-direction (streamwise)

The pitching airfoil (angle of attack change by time) is applied to the whole computational domain by a UDF, which is semi-sinusoidal pattern along time. The incoming velocity is a sinusoidal function of time, applied at the inlet by a UDF. The inlet velocity is fixed in direction (along x).
Worth to mention, I have a C-domain shape, the whole curve at the outer boundary is defined as inlet, and the right edge is outlet (b.c pressure-outlet).

abenhadj posted this 30 October 2019

At the moment Fluent starts reporting negative drag coefficient, can you please check the values of the drag force, contour plots of pressure and velocity vectors?

Best regards,

Amine

• Liked by
omid1988 posted this 31 October 2019

I have got all the plots you mentioned for the starting point of the negative drag coefficient.
Contour plot of absolute pressure:

Velocity vector:

Forces along x-direction (streamwise):

Forces (n)                                      Coefficients

Zone                      Pressure        Viscous         Total           Pressure        Viscous         Total

airfoil                   -0.094787254    0.092667445     -0.0021198094   -0.051584901    0.050431264     -0.0011536378

I would appreciate it if you could guide me on why Cd gets negative. It is interesting that both coefficients from pressure and viscous are in the same order, and finally, it gives negative results for Cd. I have to mention, for the case of only pitching airfoil (pitching applied on the whole domain), I didn't get negative Cd.

abenhadj posted this 31 October 2019

You are bit confusing me now: you said you are getting negative Cd if the whole domain is rotating and now you are negating that. When does this negative Cd happen? Please be more clear here.

The force direction which you did not provide I assume is into the negative x direction. Can you check that?

So negative Cd is obvious here based on the value of the viscous and pressure forces. Can you please add a screenshot of how are you defining the force report.

Best regards,

Amine

rwoolhou posted this 31 October 2019

You're reporting the forces (and coefficients) in the x-direction, not Cd in your last post. Can you review the tutorial for External Compressible flow and post the settings you're using for lift & drag coefficients?

omid1988 posted this 31 October 2019

I am sorry for the confusion. To be more specific:

1- I get negative Cd for the case that I have pitching motion applied to the whole domain besides incoming velocity as a function of time. The negative Cd happens when angle of attack of the airfoil is decreasing from its maximum. It is clear in the previous plots I provided.
2- For the case of pitching motion applied to the domain, with constant incoming velocity, I don't get negative Cd.

Force definition is along the x-direction, similar to the incoming velocity. Here is the snapshot of force report:

omid1988 posted this 31 October 2019

Just to make it clear, I am running transient RANS with constant fluid density (incompressible model) since Mach is much less than 0.1

I set the correct values in Reference parameters, so I think the "Total coefficient" that I get in the Force report should be the same as the drag coefficient, am I right?
There is only one modification that I apply to account for the case of variable incoming velocity (V(t)). In Reference parameters, I set a constant value for velocity. Later in post-processing, I modify the drag coefficient calculate in ANSYS by correcting the refference velocity that corresponds to each timestep. However, that will not change the sign.

abenhadj posted this 01 November 2019

Pressure force is pointing to negative x that is why the total is negative. Can you check if you converged each transient cycle as the aoa starts decreasing. In other words switch to steady state for that particular moment and run for more iterations.

Best regards,

Amine

• Liked by
omid1988 posted this 01 November 2019

I did what you mentioned, changed transient solver to steady for that moment, then freeze the inlet velocity to be constant correspond to that moment. I run for 500 iterations and got positive Cd, but it didn't converge. Here is the pattern of change in Cd versus iterations for that specific moment:

On the other hand, in the transient solver, I used to set 100 iterations per timestep and residuals were small like O(1e-6) for continuity and O(1e-7) for velocity. I checked the pattern of Cd vs iterations for each timestep when it goes negative and realized that it was not completely converged! I don't know if I have to run more iterations per timestep so that it converges!.
Also, I don't know why the Cd values are much different between the steady and transient solvers.

I appreciate any suggestions, and thanks a lot for your time.

Omid

rwoolhou posted this 01 November 2019

Transient solver solves per time step so will inherit a lot of what happened previously into the solution. I'd usually expect a transient model to converge in 10-15 iterations per step, many more and you need to decrease the time step.

With steady you're solving the equilibrium state for those conditions. Given the drag is still changing in that plot you've not reached convergence so need to run the model on.

If steady is not converging check the flow field: chances are something odd is happening to the flow.

• Liked by
omid1988 posted this 01 November 2019

Thanks for the reply and explanation.

I will try to decrease timestep and see how it changes the result. In my simulation, each time step corresponds to 0.05 degree change in the angle of attack. Based on the literature, I expect it to be low enough.
I already checked the pressure and velocity contours and couldn't find anything abnormal. I thought maybe for this case that I have pitching airfoil with fluctuating freestream, FLUENT calculates the pressure in a way that results in a negative drag force. I was wondering if I have to use a different definition for the direction of the drag force in such a case, but not sure!

omid1988 posted this 01 November 2019

Sorry, I have to correct what I said about the convergence pattern in the transient solver. Cd was changing but not much actually in each timestep.
I got the pattern of Cd versus iteration for different timestep. Timestep=1273 is when Cd goes negative, and here is the pattern:

This shows a good convergence in each timestep, also residuals are small enough as well. Maybe there is something in FLUENT that makes this negative Cd and I couldn't figure out what that is.

rwoolhou posted this 04 November 2019

What happens between time step 1272 and 1300?

Check wing orientation during this period too.

omid1988 posted this 04 November 2019

I just reported the behavior of drag coefficient convergence for different time steps as shown in the figure.

Between time step 1272 and 1300, the drag coefficient is all negative. It gets converged, but for some reason that I couldn't figure out yet, FLUENT reports negative value. It doesn't make sense physically though.
During this period, the angle of attack is positive but decreasing. I have seen negative Cd only for a portion of the simulation while the angle of attack is decreasing

abenhadj posted this 04 November 2019

Rerun the steady part using coupled solver and pseudo transient approach.

Best regards,

Amine

• Liked by
omid1988 posted this 04 November 2019

May I know you are referring to what time step exactly? For example, run the steady solver at the timestep when Cd is negative?

Also, I don't know how to apply a pseudo transient approach, but will search that.

abenhadj posted this 04 November 2019

Coupled solver steady and select pseudo transient under Solution Control.

Best regards,

Amine

omid1988 posted this 04 November 2019

Oh, I found it. Thanks!

I haven't used pseudo transient before

omid1988 posted this 05 November 2019

At the timestep when drag goes negative, I changed solver to steady as you said. Instead of a SIMPLE algorithm, I used Coupled with the pseudo transient. However, the continuity residual is not good, also I get this message:

# Divergence detected in AMG for pressure coupled, protective actions enabled!

# Divergence detected in AMG for pressure coupled, temporarily solve with BCGSTAB!

The drag also does not converge, and fluctuates a lot.

rwoolhou posted this 06 November 2019

Sounds promising. Whilst the numerical results may not be much use, what does the flow look like?