ntrfc.turbo package¶
Subpackages¶
Submodules¶
ntrfc.turbo.bladeloading module¶
- ntrfc.turbo.bladeloading.calc_cf(tau_w, u_inf, rho_inf)¶
Calculates skin friction coefficient
- Parameters:
tau_w (float) – wall shear stress
u_inf (float) – freestream velocity
rho_inf (float) – freestream density
- Returns:
skin friction coefficient
- Return type:
float
- ntrfc.turbo.bladeloading.calc_inflow_cp(px, pt1, p1)¶
- Parameters:
px – pressure at position
pt1 – total pressure inlet
p1 – pressure inlet
- Returns:
lift coefficient
- ntrfc.turbo.bladeloading.calc_zeta(pt1, pt2x, p2)¶
Calculates the Total Pressure Loss Coefficient (Zeta) for a fluid system.
Parameters:¶
pt1 : float : Upstream total pressure [Pa] pt2x : float : Downstream total pressure [Pa] p2 : float : Downstream static pressure [Pa]
Returns:¶
zeta : float : Total Pressure Loss Coefficient (Zeta) [dimensionless]
ntrfc.turbo.cascade_geometry module¶
- ntrfc.turbo.cascade_geometry.calcmidpassagestreamline(x_mcl, y_mcl, beta1, beta2, x_inlet, x_outlet, t)¶
Returns mid-passage line from sceletal-line Returns two lists of Points representing a curve through the passage Input: x_mcl = Tuple y_mcl = Tuple beta1, beta2 = Angle in deg - Beta = Anströmwinkel x_inlet, x_outlet = scalar - representing position x-component of in/outlet t = scalar pitch
ntrfc.turbo.domaingen_cascade module¶
- ntrfc.turbo.domaingen_cascade.cascade_2d_domain(profilepoints2d, x_inlet, x_outlet, pitch, unit, blade_shift, alpha, path=False)¶
profilepoints2d = 2d numpy array
- ntrfc.turbo.domaingen_cascade.cascade_3d_domain(sortedPoly, psPoly, ssPoly, per_y_upper, per_y_lower, inletPoly, outletPoly, zspan, avdr=1, path=None)¶
ntrfc.turbo.integrals module¶
- ntrfc.turbo.integrals.avdr(rho_1, mag_u_1, beta_1, rho_2, mag_u_2, beta_2)¶
- Parameters:
rho_1 – float
mag_u_1 – float
beta_1 – float
rho_2 – float
mag_u_2 – float
beta_2 – float
- Returns:
float
ntrfc.turbo.pointcloud_methods module¶
- ntrfc.turbo.pointcloud_methods.calcMidPassageStreamLine(x_mcl, y_mcl, beta1, beta2, x_inlet, x_outlet, t, verbose=False)¶
Calculate the midpoint stream line curve through a passage.
Parameters:¶
- x_mclarray_like
The x-coordinates of the mid-chord line.
- y_mclarray_like
The y-coordinates of the mid-chord line.
- beta1float
The angle in degrees representing the inflow angle at the inlet.
- beta2float
The angle in degrees representing the outflow angle at the outlet.
- x_inletfloat
The x-coordinate of the inlet position.
- x_outletfloat
The x-coordinate of the outlet position.
- tfloat
The pitch of the midpoint stream line.
- verbosebool, optional
If True, a plot of the midpoint stream line is displayed.
Returns:¶
- x_mpsl_refarray_like
The refined x-coordinates of the midpoint stream line.
- y_mpsl_refarray_like
The refined y-coordinates of the midpoint stream line.
- ntrfc.turbo.pointcloud_methods.extractSidePolys(ind_1, ind_2, sortedPoly, verbose=False)¶
- ntrfc.turbo.pointcloud_methods.extract_geo_paras(polyblade, alpha=None, verbose=False)¶
This function is extracting profile-data as stagger-angle, midline, psPoly, ssPoly and more from a set of points Be careful, you need a suitable alpha-parameter in order to get the right geometry The calculation of the leading-edge and trailing-edge index needs time and its not 100% reliable (yet) Keep in mind, to check the results! :param polyblade: pyvista polymesh of the blade :param alpha: nondimensional alpha-coefficient (calcConcaveHull) :param verbose: bool for plots :return: points, psPoly, ssPoly, ind_vk_, ind_vk, midsPoly, beta_leading, beta_trailing, alpha
- ntrfc.turbo.pointcloud_methods.extract_points_fromsortedpoly(sorted_indices, sorted_poly)¶
Extract a subset of points and associated data from a sorted polygon.
- Parameters:
sorted_indices (numpy.ndarray) – 1D array of shape (n_points,) containing the indices of the points in sorted_poly.points that should be extracted and used to create a new polygon. The indices should be sorted in the order that they should appear in the new polygon.
sorted_poly (pyvista.PolyData) – Polygon represented as a PolyData object from the pyvista library. The sorted_poly.points attribute should be a NumPy array of shape (n_points, 3) containing the 3D coordinates of the polygon vertices, and the sorted_poly.point_data attribute should be a dictionary of NumPy arrays containing additional per-vertex data.
- Returns:
A new PolyData object representing the subset of the original polygon specified by sorted_indices, with all per-vertex data preserved.
- Return type:
pyvista.PolyData
Notes
This function assumes that the input polygon is sorted in a specific way. Specifically, the sorted_indices parameter should contain the indices of the points in the order that they should appear in the new polygon. If the input polygon is not sorted in this way, the resulting polygon may not be valid.
- ntrfc.turbo.pointcloud_methods.mid_length(ind_1, ind_2, sorted_poly)¶
calc length of a midline. currently only used in the iterative computation of LE and TE index of a profile. probably this method is not necessary, as it is only two lines :param ind_1: index LE :param ind_2: index TE :param sorted_poly: pv.PolyData sorted :return: length
- ntrfc.turbo.pointcloud_methods.midline_from_sides(ps_poly, ss_poly)¶
ntrfc.turbo.probegeneration module¶
- ntrfc.turbo.probegeneration.create_midpassageprobes(midspan_z, x_inlet, x_outlet, pitch, beta1, beta2, midspoly, nop_streamline)¶
- ntrfc.turbo.probegeneration.create_profileprobes(ssPoly, psPoly, midspan_z, pden_ps, pden_ss, tolerance=1e-10)¶
Create profile probes from two PolyData objects.
Parameters: - ssPoly: PyVista PolyData object representing the suction side profile. - psPoly: PyVista PolyData object representing the pressure side profile. - midspan_z: Height of the midspan plane along the z-axis. - pden_ps: Density of the pressure side profile points. - pden_ss: Density of the suction side profile points. - tolerance: Small tolerance value to shift the 3D faces along their normals.
Returns: - probes_ss: PyVista PolyData object representing the profile probes on the suction side. - probes_ps: PyVista PolyData object representing the profile probes on the pressure side.
- ntrfc.turbo.probegeneration.create_stagnationpointprobes(length, nop, sortedpoly, ind_vk, u_inlet, midspan_z)¶
ntrfc.turbo.profile_tele_extraction module¶
- ntrfc.turbo.profile_tele_extraction.clean_sites(sites, boundary, tolerance_factor=0.03)¶
- ntrfc.turbo.profile_tele_extraction.extract_vk_hk(sortedPoly, verbose=False)¶
- ntrfc.turbo.profile_tele_extraction.pointcloud_to_profile(points)¶
- ntrfc.turbo.profile_tele_extraction.skeletonline_completion(x_center, y_center, points)¶
- ntrfc.turbo.profile_tele_extraction.voronoi_skeleton_sites(points_2d_closed_refined)¶