I have a code for airflow around an airfoil. When I compare viscous and non-viscous flow at the same Mach number for a cruise, viscous flow has a higher lift to drag ratio than non-viscous flow. Is it this possible?.condition is transonic. here is contour of pressure for non-viscous. for viscous like this but The difference is that l/d for viscous has 5 unit more.
No. There must be something wrong with your code.
Inviscid, subsonic flow around a 2D object should not produce drag - I guess you look at supersonic results, but there, too, viscosity should only add drag, not reduce it.
If you provide more information, I can be more specific. Why don't you plot the pressure distribution for both cases? This will maybe help to find the reason for the wrong result.