CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Tecplot (https://www.cfd-online.com/Forums/tecplot/)
-   -   Lift distribution along span (https://www.cfd-online.com/Forums/tecplot/232665-lift-distribution-along-span.html)

Derplumo December 24, 2020 11:25

Lift distribution along span
 
Hi everyone,

I am new to using Tecplot and I would like to know if there is a simple way of plotting the lift or drag distribution along the span of a wing.

Currently I have seen that on of the easier ways would be to slice the wing and determine the lift or drag coefficients through a script (Matlab/Python), but I would guess there is an easier way of doing things. If so, I would appreciate some tips :D

Kind regards and happy holidays

YoungY January 14, 2021 09:57

Hello Derplumo,


I had a similar question not too long ago. Unfortunately this functionality is not readily available in tecplot, however tecplot support has a macro for this if you contact them.



I found a way around this by creating surface slices along the wingspan, calculating the pressure lift and viscous lift using: {X Grid K Unit Normal}* {Pressure} (for pressure drag) and {Wall shear-1} (for viscous drag) respectively. If you use the Y-version (or Z depending on your domain's orientation) you can get the lift in a similar fashion. If you integrate these over all the surface slices you can extract the lift or drag for all the spanwise locations for which you have slices.


Let me know if you get stuck and I can show you the macros I used!


Good luck!


Cheers,


Y

Derplumo January 17, 2021 09:43

Hi Yannick,

Thank you for your help! I have mailed Tecplot to ask for the macro and tried to extract X Grid K Normal and use it for computing it myself. It seems that I need to use the X and Y values for the J planes though. I can imagine that there should be some form of length included in this equation, because some points are located (much) closer than others...

Using your equation I get results that do not come close to the result I had from the SU2 data file.

However, if I use {Pressure coefficient}*cos({local angle})*{local length}/{chord length} (where local angle and length apply to the x and z coordinates of the airfoil slice) I get a lift coefficient that comes close to the one I had from the data file. Still, if I use the same equation with a sin for determining the drag coefficient I get negative numbers :/

YoungY January 20, 2021 07:07

Hello again,


Since I use fluent, only the K-Normals are important (this has to do with how normals are calculated for an unstructured grid). Let me give you an example of my macro:


$!EXTENDEDCOMMAND
COMMANDPROCESSORID = 'CFDAnalyzer3'
COMMAND = 'Calculate Function=\'GRIDKUNITNORMAL\' Normalization=\'None\' ValueLocation=\'Nodal\' CalculateOnDemand=\'T\' UseMorePointsForFEGradientCalculations=\'F\''

$!ALTERDATA
EQUATION = '{Fx} = ({X Grid K Unit Normal}*{Mean Static Pressure} -{Mean X-Wall Shear Stress})'


$!SLICEATTRIBUTES 1 SHOWGROUP = YES
$!SLICEATTRIBUTES 1 EDGELAYER{SHOW = YES}
$!SLICEATTRIBUTES 1 SLICESOURCE = SURFACEZONES
$!SETCONTOURVAR
VAR = 4
CONTOURGROUP = 1
LEVELINITMODE = RESETTONICE
$!SLICEATTRIBUTES 1 SHOWSTARTENDSLICE = YES
$!SLICEATTRIBUTES 1 SHOWPRIMARYSLICE = NO
$!SLICEATTRIBUTES 1 SLICESURFACE = ARBITRARY
$!SLICEATTRIBUTES 1 NORMAL{X = 0}
$!SLICEATTRIBUTES 1 NORMAL{Z = 0}
$!SLICEATTRIBUTES 1 NORMAL{Y = 1}
$!SLICEATTRIBUTES 1 SHOWPRIMARYSLICE = NO
$!SLICEATTRIBUTES 1 SHOWSTARTENDSLICE = YES
$!SLICEATTRIBUTES 1 STARTPOSITION{X = 0}
$!SLICEATTRIBUTES 1 ENDPOSITION{X = 0}
$!SLICEATTRIBUTES 1 STARTPOSITION{Z = 0}
$!SLICEATTRIBUTES 1 STARTPOSITION{Y = |b0_slice|}
$!SLICEATTRIBUTES 1 ENDPOSITION{Y = |b_slice|}
$!SLICEATTRIBUTES 1 ENDPOSITION{Z = 0}
$!SLICEATTRIBUTES 1 SHOWINTERMEDIATESLICES = YES
$!SLICEATTRIBUTES 1 NUMINTERMEDIATESLICES = |n_intermediate_slices|
$!SLICEATTRIBUTES 1 OBEYSOURCEZONEBLANKING = YES
$!SLICELAYERS SHOW = YES

$!CREATESLICEZONES #Extract slices to zones



$!Loop 4

$!IF |LOOP| == 1
$!VarSet |component| = "Fx"
$!VarSet |var_number| = (122)
$!ENDIF


$!EXTENDEDCOMMAND
COMMANDPROCESSORID = 'CFDAnalyzer3'
COMMAND = 'Integrate [|first_slice_zone|-|last_slice_zone|] VariableOption=\'Scalar\' XOrigin=0 YOrigin=0 ZOrigin=0 ScalarVar=|var_number| Absolute=\'F\' ExcludeBlanked=\'F\' XVariable=1 YVariable=2 ZVariable=3 IntegrateOver=\'Cells\' IntegrateBy=\'Zones\' IRange={MIN =1 MAX = 0 SKIP = 1} JRange={MIN =1 MAX = 0 SKIP = 1} KRange={MIN =1 MAX = 0 SKIP = 1} PlotResults=\'F\' PlotAs=\'Result\' TimeMin=0 TimeMax=0'
$!EXTENDEDCOMMAND
COMMANDPROCESSORID = 'CFDAnalyzer3'
COMMAND = 'SaveIntegrationResults FileName=\'P:\\LD data\\spanwiselift_0deginstall_timeavg_|component| .txt\''




Using the formula {Pressure} * {(direction) Grid K Unit Normal} gives you the instantaneous values in the vector direction specified with (direction) i.e. X, Y or Z. But to obtain the lift at that spanwise location you still need to integrate over the airfoil. This might be the step you are forgetting? As for the drag with negative numbers, it might all depend on how you have defined it!



Hope this helps you out, good luck!


-Y

deenriqu October 15, 2021 14:39

Not sure if anyone can help with this, but I did the above calculations.

The Fz integral over my entire wing surface is accurate. But when I try to integrate each section slice individually, I get negative lift values. Any thoughts?

@ss November 23, 2023 08:32

Contours of the sectional lift coefficients in tecplot
 
hello sir,
I want to plot the Contours of the sectional lift coefficients in tecplot for 3d simulation of flow past an elastically mounted cylinder.
Can anyone tell me how to plot it?


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