Unwrap a blade’s profile¶
This treatment unwraps a line’s profile.
It must be applied on a 1D line resulting from a cut of a 3D blade.
As a result, nodes’ indices from pressure and suction sides will be available as base’s attributes.
Examples of ‘begin_unwrap’ and ‘d_D_range’ options.
import antares myt = antares.Treatment('unwrapprofil')
The base on which the treatment will be applied.
str, default = ‘Psta’
Name of pressure variable.
str, default = ‘0_1’
Range of the curvilinear reduced coordinates. Either ‘m1_1’ for a range from -1 to 1 or ‘0_1’ for a range from 0 to 1.
str, default = ‘LE’
Convention : ‘LE’ (leading edge) or ‘TE’ (trailing edge). In other words, either sort the blade from the LE to the TE or vice versa. Therefore, if begin_unwrap is set to ‘LE’, the origin of the curvilinear coordinate is at the leading edge.
int, default = None
Number of decimal places to round the coordinates. When the base is multi-zone, it is used to merge the intersection points of the zones. If None, the coordinates will not be rounded.
bool, default = False
If True, the input base is deleted on the fly to limit memory usage.
list(str, str, str), default = [‘x’, ‘y’, ‘z’]
Names of the 3 cartesian coordinates.
str, default = CoordinateReducedMeridional
Name of the reduced meridional coordinate variable.
list(str, str), default = [‘d_D’, ‘d’]
Name of the output reduced curvilinear curvature coordinate and its non reduced form.
The input base is returned, extended with the attribute named ‘Profil’.
This attribute is a dictionary with variables:
Instant’s nodes indices corresponding to the profile’s pressure side.
Instant’s nodes indices corresponding to the profile’s suction side.
The Instant contained in the input base is extended with the following variables:
The profile’s curvilinear curvature coordinate.
Reduced form of the curvilinear curvature coordinate. In other words, profile’s curvilinear curvature coordinate divided by total curvilinear curvature length.
import antares myt = antares.Treatment('UnwrapProfil') myt['base'] = base base = myt.execute()
As you may want to plot data from an extracted profile, here are the instructions. For this exemple, one wants to plot the temperature with respect of reduced curvilinear abscissa coordinate. We use the previous base once the treatment UnwrapProfil has been performed.
import matplotlib.pyplot as plt # First, retrive pressure and suction sides indices : ind_PS = base.attrs['Profil']['IndicesPressureSide'] ind_SS = base.attrs['Profil']['IndicesSuctionSide'] # Get variables you want to plot T = base['T'] d_D = base['d_D'] # Create a basic figure plt.figure() plt.plot(d_D[ind_PS], T[ind_PS], label='Pressure side') plt.plot(d_D[ind_SS], T[ind_SS], label='Suction side') plt.legend() plt.show()