BOR Functions¶
This group of API functions provides capabilities related to the body of revolution (BOR) geometry type in OpenVSP.
|
Set the propeller to write when a BEM file is exported. |
|
Set the XSec type for a BOR component |
|
Get the XSec type for a BOR component |
|
Set the coordinate points for a specific BOR. |
|
Set the coordinate points for a specific BOR. |
|
Set the points of a body of revolution's file XSec. |
|
Compute 3D coordinate for a point on a BOR XSecCurve given the parameter value (U) along the curve |
|
Compute the tangent vector of a point on a BOR XSecCurve given the parameter value (U) along the curve |
|
Read in shape from airfoil file and set to the specified BOR XSecCurve. |
|
Set the upper points for an airfoil on a BOR. |
|
Set the lower points for an airfoil on a BOR. |
|
Set the upper and lower points for an airfoil on a BOR. |
|
Get the coordinate points for the upper surface of an airfoil on a BOR. |
|
Get the coordinate points for the lower surface of an airfoil of a BOR. |
|
Get the CST coefficients for the upper surface of an airfoil of a BOR. |
|
Get the CST coefficients for the lower surface of an airfoil of a BOR. |
|
Get the CST degree for the upper surface of an airfoil of a BOR. |
|
Get the CST degree for the lower surface of an airfoil of a BOR. |
|
Set the CST degree and coefficients for the upper surface of an airfoil of a BOR. |
|
Set the CST degree and coefficients for the lower surface of an airfoil of a BOR. |
|
Promote the CST for the upper airfoil surface of a BOR. |
|
Promote the CST for the lower airfoil surface of a BOR. |
|
Demote the CST for the upper airfoil surface of a BOR. |
|
Demote the CST for the lower airfoil surface of a BOR. |
|
Fit a CST airfoil for an existing airfoil of a BOR of type XS_FOUR_SERIES, XS_SIX_SERIES, XS_FOUR_DIGIT_MOD, XS_FIVE_DIGIT, XS_FIVE_DIGIT_MOD, XS_ONE_SIX_SERIES, or XS_FILE_AIRFOIL. |
Details¶
- openvsp.SetBEMPropID(prop_id)[source]¶
Set the propeller to write when a BEM file is exported. Without this the first propeller found is used.
prop_id = AddGeom( "PROP" ) Update() SetBEMPropID( prop_id ) assert GetBEMPropID() == prop_id, "SetBEMPropID did not take"
See also: GetBEMPropID, ExportFile :param [in]: prop_id string Propeller Geom ID to write
- openvsp.ChangeBORXSecShape(bor_id, type)[source]¶
Set the XSec type for a BOR component
# Add Body of Recolution bor_id = AddGeom( "BODYOFREVOLUTION", "" ) ChangeBORXSecShape( bor_id, XS_ROUNDED_RECTANGLE ) if GetBORXSecShape( bor_id ) != XS_ROUNDED_RECTANGLE : print( "ERROR: ChangeBORXSecShape" ) assert False, "ERROR: ChangeBORXSecShape"
See also: XSEC_CRV_TYPE :param [in]: bor_id string Body of revolution Geom ID :param [in]: type int XSec type enum (i.e. XS_ROUNDED_RECTANGLE)
- openvsp.GetBORXSecShape(bor_id)[source]¶
Get the XSec type for a BOR component
# Add Body of Recolution bor_id = AddGeom( "BODYOFREVOLUTION", "" ) ChangeBORXSecShape( bor_id, XS_ROUNDED_RECTANGLE ) if GetBORXSecShape( bor_id ) != XS_ROUNDED_RECTANGLE : print( "ERROR: GetBORXSecShape" ) assert False, "ERROR: GetBORXSecShape"
- Parameters:
[in] – bor_id string Body of revolution Geom ID
- Return type:
int
- Returns:
int XSec type enum (i.e. XS_ROUNDED_RECTANGLE)
- openvsp.ReadBORFileXSec(bor_id, file_name)[source]¶
Set the coordinate points for a specific BOR. The BOR XSecCurve must be of type XS_FILE_FUSE.
# Add Body of Recolution bor_id = AddGeom( "BODYOFREVOLUTION", "" ) ChangeBORXSecShape( bor_id, XS_FILE_FUSE ) vec_array = ReadBORFileXSec( bor_id, "TestXSec.fxs" ) Update() # The file holds a closed curve, and the section it produced is the one the # body is now built on. assert len( vec_array ) >= 3, "ReadBORFileXSec returned too few points" assert dist( vec_array[0], vec_array[-1] ) < 1e-8, "ReadBORFileXSec returned an open curve" assert GetBORXSecShape( bor_id ) == XS_FILE_FUSE, "ReadBORFileXSec changed the section type" # The section curve closes on itself. assert dist( ComputeBORXSecPnt( bor_id, 0.0 ), ComputeBORXSecPnt( bor_id, 1.0 ) ) < 1e-6, "the BOR section does not close"
- Parameters:
[in] – bor_id string Body of revolution Geom ID
[in] – file_name string Fuselage XSec file name
- Return type:
std::vector< vec3d,std::allocator< vec3d > >
- Returns:
vector<vec3d> Array of coordinate points read from the file and set to the XSec
- openvsp.GetBORXSecPnts(bor_id)[source]¶
Set the coordinate points for a specific BOR. The BOR XSecCurve must be of type XS_FILE_FUSE.
# Add Body of Recolution bor_id = AddGeom( "BODYOFREVOLUTION", "" ) ChangeBORXSecShape( bor_id, XS_FILE_FUSE ) # ReadBORFileXSec hands back a tuple, so copy it into a list to edit it. vec_array = list( ReadBORFileXSec( bor_id, "TestXSec.fxs" ) ) Update() before = ComputeBORXSecPnt( bor_id, 0.0 ) assert len( vec_array ) > 0, "ReadBORFileXSec returned no points" # The Python vec3d carries no arithmetic operators, so scale by component. vec_array[1] = vec3d( vec_array[1].x() * 2.0, vec_array[1].y() * 2.0, vec_array[1].z() * 2.0 ) vec_array[3] = vec3d( vec_array[3].x() * 2.0, vec_array[3].y() * 2.0, vec_array[3].z() * 2.0 ) SetBORXSecPnts( bor_id, vec_array ) Update() after = ComputeBORXSecPnt( bor_id, 0.0 ) # Points 1 and 3 are the top and bottom of the diamond read from file, so # doubling them doubles the height of the section while leaving its width # alone. The section is normalized to the body diameter by its height, so # the section grows half as wide as it was. assert abs( after.x() - 0.5 * before.x() ) < 1e-6, "SetBORXSecPnts did not reshape the section"
- Parameters:
[in] – bor_id string Body of revolution Geom ID
[in] – pnt_vec vector<vec3d> Vector of XSec coordinate points
Get the coordinate points for a specific BOR. The BOR XSecCurve must be of type XS_FILE_FUSE. The points are returned normalized to the section’s width and height.
# Add Body of Recolution bor_id = AddGeom( "BODYOFREVOLUTION", "" ) ChangeBORXSecShape( bor_id, XS_FILE_FUSE ) vec_array = list( ReadBORFileXSec( bor_id, "TestXSec.fxs" ) ) # The points that were read are the points the section is carrying. check_array = GetBORXSecPnts( bor_id ) assert len( check_array ) > 0, "GetBORXSecPnts returned nothing" # The stored points are normalized, so they fit in the unit box, and the # curve closes on itself. for p in check_array: assert abs( p.x() ) <= 0.5 + 1e-9, "GetBORXSecPnts returned a point outside the unit box" assert abs( p.y() ) <= 0.5 + 1e-9, "GetBORXSecPnts returned a point outside the unit box" assert dist( check_array[0], check_array[-1] ) < 1e-8, "GetBORXSecPnts returned an open curve"
See also: SetBORXSecPnts, ReadBORFileXSec :param [in]: bor_id string Body of revolution Geom ID :rtype: std::vector< vec3d,std::allocator< vec3d > > :return: vector<vec3d> Vector of XSec coordinate points
- openvsp.SetBORXSecPnts(bor_id, pnt_vec)[source]¶
Set the points of a body of revolution’s file XSec. The BOR’s XSec must be of type XS_FILE_FUSE.
bid = AddGeom( "BODYOFREVOLUTION", "" ) ChangeBORXSecShape( bid, XS_FILE_FUSE ) Update() # Take the section's own points and hand back a squashed copy of them. pnt_vec = [ vec3d( p.x(), 0.5 * p.y(), p.z() ) for p in GetBORXSecPnts( bid ) ] SetBORXSecPnts( bid, pnt_vec ) Update() assert len( GetBORXSecPnts( bid ) ) == len( pnt_vec ), "SetBORXSecPnts did not take the points"
See also: GetBORXSecPnts, ChangeBORXSecShape :param [in]: bor_id string Body of revolution Geom ID :param [in]: pnt_vec vector<vec3d> Points defining the section
- openvsp.ComputeBORXSecPnt(bor_id, fract)[source]¶
Compute 3D coordinate for a point on a BOR XSecCurve given the parameter value (U) along the curve
#==== Add Geom ====// # Add Body of Recolution bor_id = AddGeom( "BODYOFREVOLUTION", "" ) u_fract = 0.25 pnt = ComputeBORXSecPnt( bor_id, u_fract ) # The section is a closed curve, so the ends meet. assert dist( ComputeBORXSecPnt( bor_id, 0.0 ), ComputeBORXSecPnt( bor_id, 1.0 ) ) < 1e-6, "the BOR section does not close" # The section lies in a plane of constant Z. assert abs( pnt.z() - ComputeBORXSecPnt( bor_id, 0.0 ).z() ) < 1e-9, "the BOR section is not planar" # Walking the curve has to move, not sit still. assert dist( pnt, ComputeBORXSecPnt( bor_id, u_fract + 0.25 ) ) > 1e-9, "ComputeBORXSecPnt does not advance along the curve"
- Parameters:
[in] – bor_id string Body of revolution Geom ID
[in] – fract double Curve parameter value (range: 0 - 1)
- Return type:
- Returns:
vec3d Coordinate point on curve
- openvsp.ComputeBORXSecTan(bor_id, fract)[source]¶
Compute the tangent vector of a point on a BOR XSecCurve given the parameter value (U) along the curve
# Add Body of Recolution bor_id = AddGeom( "BODYOFREVOLUTION", "" ) u_fract = 0.25 tan = ComputeBORXSecTan( bor_id, u_fract ) # A tangent is a direction, so it has to have some length. assert tan.mag() > 1e-9, "ComputeBORXSecTan returned a degenerate tangent" # The tangent has to follow the curve, so stepping along the curve from the # point has to line up with it. du = 1.0e-5 p0 = ComputeBORXSecPnt( bor_id, u_fract ) p1 = ComputeBORXSecPnt( bor_id, u_fract + du ) fd = vec3d( p1.x() - p0.x(), p1.y() - p0.y(), p1.z() - p0.z() ) assert fd.mag() > 1e-12, "the BOR section does not advance" align = ( fd.x() * tan.x() + fd.y() * tan.y() + fd.z() * tan.z() ) / ( fd.mag() * tan.mag() ) assert align > 0.999, "ComputeBORXSecTan does not follow the curve"
- Parameters:
[in] – bor_id string Body of revolution Geom ID
[in] – fract double Curve parameter value (range: 0 - 1)
- Return type:
- Returns:
vec3d Tangent vector on curve
- openvsp.ReadBORFileAirfoil(bor_id, file_name)[source]¶
Read in shape from airfoil file and set to the specified BOR XSecCurve. The XSecCurve must be of type XS_FILE_AIRFOIL. Airfoil files may be in Lednicer or Selig format with *.af or *.dat extensions.
# Add Body of Recolution bor_id = AddGeom( "BODYOFREVOLUTION", "" ) ChangeBORXSecShape( bor_id, XS_FILE_AIRFOIL ) ReadBORFileAirfoil( bor_id, "airfoil/N0012_VSP.af" ) up_array = GetBORAirfoilUpperPnts( bor_id ) low_array = GetBORAirfoilLowerPnts( bor_id ) assert len( up_array ) > 0, "ReadBORFileAirfoil did not read matching surfaces" assert len( up_array ) == len( low_array ), "ReadBORFileAirfoil did not read matching surfaces" # The points run from the leading edge to the trailing edge on a unit chord, # and a NACA 0012 is symmetric top to bottom. assert abs( up_array[0].x() ) < 1e-6, "ReadBORFileAirfoil did not normalize the chord" assert abs( up_array[-1].x() - 1.0 ) < 1e-6, "ReadBORFileAirfoil did not normalize the chord" for i in range( len( up_array ) ): assert abs( low_array[i].y() + up_array[i].y() ) < 1e-6, "ReadBORFileAirfoil did not read a symmetric section" max_up = max( [ p.y() for p in up_array ] ) assert abs( 2.0 * max_up - 0.12 ) < 1e-3, "ReadBORFileAirfoil did not read a twelve percent section"
- Parameters:
[in] – bor_id string Body of revolution Geom ID
[in] – file_name string Airfoil XSec file name
- openvsp.SetBORAirfoilUpperPnts(bor_id, up_pnt_vec)[source]¶
Set the upper points for an airfoil on a BOR. The BOR XSecCurve must be of type XS_FILE_AIRFOIL.
# Add Body of Recolution bor_id = AddGeom( "BODYOFREVOLUTION", "" ) ChangeBORXSecShape( bor_id, XS_FILE_AIRFOIL ) ReadBORFileAirfoil( bor_id, "airfoil/N0012_VSP.af" ) up_array = GetBORAirfoilUpperPnts( bor_id ) for i in range(int( len(up_array) )): up_array[i].scale_y( 2.0 ) SetBORAirfoilUpperPnts( bor_id, up_array ) # The doubled upper surface has to come back doubled, and the lower surface # has to be left alone. check_array = GetBORAirfoilUpperPnts( bor_id ) low_array = GetBORAirfoilLowerPnts( bor_id ) assert len( check_array ) == len( up_array ), "SetBORAirfoilUpperPnts point count" for i in range( len( up_array ) ): assert dist( check_array[i], up_array[i] ) < 1e-6, "SetBORAirfoilUpperPnts did not store point " + str( i ) max_up = max( [ p.y() for p in check_array ] ) min_low = min( [ p.y() for p in low_array ] ) assert abs( max_up + 2.0 * min_low ) < 1e-6, "SetBORAirfoilUpperPnts did not leave the lower surface alone"
- Parameters:
[in] – bor_id string Body of revolution Geom ID
[in] – up_pnt_vec vector<vec3d> Vector of points defining the upper surface of the airfoil
- openvsp.SetBORAirfoilLowerPnts(bor_id, low_pnt_vec)[source]¶
Set the lower points for an airfoil on a BOR. The BOR XSecCurve must be of type XS_FILE_AIRFOIL.
# Add Body of Recolution bor_id = AddGeom( "BODYOFREVOLUTION", "" ) ChangeBORXSecShape( bor_id, XS_FILE_AIRFOIL ) ReadBORFileAirfoil( bor_id, "airfoil/N0012_VSP.af" ) low_array = GetBORAirfoilLowerPnts( bor_id ) for i in range(int( len(low_array) )): low_array[i].scale_y( 0.5 ) SetBORAirfoilLowerPnts( bor_id, low_array ) # The halved lower surface has to come back halved, and the upper surface has # to be left alone. check_array = GetBORAirfoilLowerPnts( bor_id ) up_array = GetBORAirfoilUpperPnts( bor_id ) assert len( check_array ) == len( low_array ), "SetBORAirfoilLowerPnts point count" for i in range( len( low_array ) ): assert dist( check_array[i], low_array[i] ) < 1e-6, "SetBORAirfoilLowerPnts did not store point " + str( i ) max_up = max( [ p.y() for p in up_array ] ) min_low = min( [ p.y() for p in check_array ] ) assert abs( 0.5 * max_up + min_low ) < 1e-6, "SetBORAirfoilLowerPnts did not leave the upper surface alone"
- Parameters:
[in] – bor_id string Body of revolution Geom ID
[in] – low_pnt_vec vector<vec3d> Vector of points defining the lower surface of the airfoil
- openvsp.SetBORAirfoilPnts(bor_id, up_pnt_vec, low_pnt_vec)[source]¶
Set the upper and lower points for an airfoil on a BOR. The BOR XSecCurve must be of type XS_FILE_AIRFOIL.
# Add Body of Recolution bor_id = AddGeom( "BODYOFREVOLUTION", "" ) ChangeBORXSecShape( bor_id, XS_FILE_AIRFOIL ) ReadBORFileAirfoil( bor_id, "airfoil/N0012_VSP.af" ) up_array = GetBORAirfoilUpperPnts( bor_id ) low_array = GetBORAirfoilLowerPnts( bor_id ) for i in range(int( len(up_array) )): up_array[i].scale_y( 2.0 ) low_array[i].scale_y( 0.5 ) SetBORAirfoilPnts( bor_id, up_array, low_array ) check_up = GetBORAirfoilUpperPnts( bor_id ) check_low = GetBORAirfoilLowerPnts( bor_id ) assert len( check_up ) == len( up_array ), "SetBORAirfoilPnts point count" assert len( check_low ) == len( low_array ), "SetBORAirfoilPnts point count" for i in range( len( up_array ) ): assert dist( check_up[i], up_array[i] ) < 1e-6, "SetBORAirfoilPnts did not store point " + str( i ) assert dist( check_low[i], low_array[i] ) < 1e-6, "SetBORAirfoilPnts did not store point " + str( i ) # The section started symmetric; doubling the top and halving the bottom # leaves the top four times as deep as the bottom. max_up = max( [ p.y() for p in check_up ] ) min_low = min( [ p.y() for p in check_low ] ) assert abs( max_up + 4.0 * min_low ) < 1e-6, "SetBORAirfoilPnts did not scale the two surfaces apart"
- Parameters:
[in] – bor_id string Body of revolution Geom ID
[in] – up_pnt_vec vector<vec3d> Vector of points defining the upper surface of the airfoil
[in] – low_pnt_vec vector<_>vec3d> Vector of points defining the lower surface of the airfoil
- openvsp.GetBORAirfoilUpperPnts(bor_id)[source]¶
Get the coordinate points for the upper surface of an airfoil on a BOR. The BOR XSecCurve must be of type XS_FILE_AIRFOIL
# Add Body of Recolution bor_id = AddGeom( "BODYOFREVOLUTION", "" ) ChangeBORXSecShape( bor_id, XS_FILE_AIRFOIL ) ReadBORFileAirfoil( bor_id, "airfoil/N0012_VSP.af" ) up_array = GetBORAirfoilUpperPnts( bor_id ) assert len( up_array ) > 0, "GetBORAirfoilUpperPnts returned nothing"
See also: SetAirfoilPnts :param [in]: bor_id string Body of revolution Geom ID :rtype: std::vector< vec3d,std::allocator< vec3d > > :return: vector<vec3d> Vector of coordinate points for the upper airfoil surface
- openvsp.GetBORAirfoilLowerPnts(bor_id)[source]¶
Get the coordinate points for the lower surface of an airfoil of a BOR. The XSecCurve must be of type XS_FILE_AIRFOIL
# Add Body of Recolution bor_id = AddGeom( "BODYOFREVOLUTION", "" ) ChangeBORXSecShape( bor_id, XS_FILE_AIRFOIL ) ReadBORFileAirfoil( bor_id, "airfoil/N0012_VSP.af" ) low_array = GetBORAirfoilLowerPnts( bor_id ) assert len( low_array ) > 0, "GetBORAirfoilLowerPnts returned nothing"
See also: SetAirfoilPnts :param [in]: bor_id string Body of revolution Geom ID :rtype: std::vector< vec3d,std::allocator< vec3d > > :return: vector<vec3d> Vector of coordinate points for the lower airfoil surface
- openvsp.GetBORUpperCSTCoefs(bor_id)[source]¶
Get the CST coefficients for the upper surface of an airfoil of a BOR. The XSecCurve must be of type XS_CST_AIRFOIL
bid = AddGeom( "BODYOFREVOLUTION", "" ) ChangeBORXSecShape( bid, XS_CST_AIRFOIL ) Update() coefs = GetBORUpperCSTCoefs( bid ) assert len( coefs ) > 0, "GetBORUpperCSTCoefs returned nothing"
See also: SetUpperCST :param [in]: bor_id string Body of revolution Geom ID :rtype: std::vector< double,std::allocator< double > > :return: vector<double> Vector of CST coefficients for the upper airfoil surface
- openvsp.GetBORLowerCSTCoefs(bor_id)[source]¶
Get the CST coefficients for the lower surface of an airfoil of a BOR. The XSecCurve must be of type XS_CST_AIRFOIL
bid = AddGeom( "BODYOFREVOLUTION", "" ) ChangeBORXSecShape( bid, XS_CST_AIRFOIL ) Update() coefs = GetBORLowerCSTCoefs( bid ) assert len( coefs ) > 0, "GetBORLowerCSTCoefs returned nothing"
See also: SetLowerCST :param [in]: bor_id string Body of revolution Geom ID :rtype: std::vector< double,std::allocator< double > > :return: vector<double> Vector of CST coefficients for the lower airfoil surface
- openvsp.GetBORUpperCSTDegree(bor_id)[source]¶
Get the CST degree for the upper surface of an airfoil of a BOR. The XSecCurve must be of type XS_CST_AIRFOIL
bid = AddGeom( "BODYOFREVOLUTION", "" ) ChangeBORXSecShape( bid, XS_CST_AIRFOIL ) Update() assert GetBORUpperCSTDegree( bid ) >= 1, "GetBORUpperCSTDegree returned a degenerate degree"
See also: SetUpperCST :param [in]: bor_id string Body of revolution Geom ID :rtype: int :return: int CST Degree for upper airfoil surface
- openvsp.GetBORLowerCSTDegree(bor_id)[source]¶
Get the CST degree for the lower surface of an airfoil of a BOR. The XSecCurve must be of type XS_CST_AIRFOIL
bid = AddGeom( "BODYOFREVOLUTION", "" ) ChangeBORXSecShape( bid, XS_CST_AIRFOIL ) Update() assert GetBORLowerCSTDegree( bid ) >= 1, "GetBORLowerCSTDegree returned a degenerate degree"
See also: SetLowerCST :param [in]: bor_id string Body of revolution Geom ID :rtype: int :return: int CST Degree for lower airfoil surface
- openvsp.SetBORUpperCST(bor_id, deg, coefs)[source]¶
Set the CST degree and coefficients for the upper surface of an airfoil of a BOR. The number of coefficients should be one more than the CST degree. The XSecCurve must be of type XS_CST_AIRFOIL
bid = AddGeom( "BODYOFREVOLUTION", "" ) ChangeBORXSecShape( bid, XS_CST_AIRFOIL ) Update() coefs = GetBORUpperCSTCoefs( bid ) SetBORUpperCST( bid, GetBORUpperCSTDegree( bid ), coefs ) Update()
See also: GetUpperCSTDegree, GetUpperCSTCoefs :param [in]: bor_id string Body of revolution Geom ID :param [in]: deg int CST degree of upper airfoil surface :param [in]: coefs vector<double> Array of CST coefficients for the upper airfoil surface
- openvsp.SetBORLowerCST(bor_id, deg, coefs)[source]¶
Set the CST degree and coefficients for the lower surface of an airfoil of a BOR. The number of coefficients should be one more than the CST degree. The XSecCurve must be of type XS_CST_AIRFOIL
bid = AddGeom( "BODYOFREVOLUTION", "" ) ChangeBORXSecShape( bid, XS_CST_AIRFOIL ) Update() coefs = GetBORLowerCSTCoefs( bid ) SetBORLowerCST( bid, GetBORLowerCSTDegree( bid ), coefs ) Update()
See also: GetLowerCSTDegree, GetLowerCSTCoefs :param [in]: bor_id string Body of revolution Geom ID :param [in]: deg int CST degree of lower airfoil surface :param [in]: coefs vector<double> Vector of CST coefficients for the lower airfoil surface
- openvsp.PromoteBORCSTUpper(bor_id)[source]¶
Promote the CST for the upper airfoil surface of a BOR. The XSecCurve must be of type XS_CST_AIRFOIL
bid = AddGeom( "BODYOFREVOLUTION", "" ) ChangeBORXSecShape( bid, XS_CST_AIRFOIL ) Update() deg = GetBORUpperCSTDegree( bid ) PromoteBORCSTUpper( bid ) assert GetBORUpperCSTDegree( bid ) == deg + 1, "PromoteBORCSTUpper did not raise the degree"
See also: GetUpperCSTDegree :param [in]: bor_id string Body of revolution Geom ID
- openvsp.PromoteBORCSTLower(bor_id)[source]¶
Promote the CST for the lower airfoil surface of a BOR. The XSecCurve must be of type XS_CST_AIRFOIL
bid = AddGeom( "BODYOFREVOLUTION", "" ) ChangeBORXSecShape( bid, XS_CST_AIRFOIL ) Update() deg = GetBORLowerCSTDegree( bid ) PromoteBORCSTLower( bid ) assert GetBORLowerCSTDegree( bid ) == deg + 1, "PromoteBORCSTLower did not raise the degree"
See also: GetLowerCSTDegree :param [in]: bor_id string Body of revolution Geom ID
- openvsp.DemoteBORCSTUpper(bor_id)[source]¶
Demote the CST for the upper airfoil surface of a BOR. The XSecCurve must be of type XS_CST_AIRFOIL
bid = AddGeom( "BODYOFREVOLUTION", "" ) ChangeBORXSecShape( bid, XS_CST_AIRFOIL ) Update() PromoteBORCSTUpper( bid ) deg = GetBORUpperCSTDegree( bid ) DemoteBORCSTUpper( bid ) assert GetBORUpperCSTDegree( bid ) == deg - 1, "DemoteBORCSTUpper did not lower the degree"
See also: GetUpperCSTDegree :param [in]: bor_id string Body of revolution Geom ID
- openvsp.DemoteBORCSTLower(bor_id)[source]¶
Demote the CST for the lower airfoil surface of a BOR. The XSecCurve must be of type XS_CST_AIRFOIL
bid = AddGeom( "BODYOFREVOLUTION", "" ) ChangeBORXSecShape( bid, XS_CST_AIRFOIL ) Update() PromoteBORCSTLower( bid ) deg = GetBORLowerCSTDegree( bid ) DemoteBORCSTLower( bid ) assert GetBORLowerCSTDegree( bid ) == deg - 1, "DemoteBORCSTLower did not lower the degree"
See also: GetLowerCSTDegree :param [in]: bor_id string Body of revolution Geom ID
- openvsp.FitBORAfCST(bor_id, deg)[source]¶
Fit a CST airfoil for an existing airfoil of a BOR of type XS_FOUR_SERIES, XS_SIX_SERIES, XS_FOUR_DIGIT_MOD, XS_FIVE_DIGIT, XS_FIVE_DIGIT_MOD, XS_ONE_SIX_SERIES, or XS_FILE_AIRFOIL.
bid = AddGeom( "BODYOFREVOLUTION", "" ) ChangeBORXSecShape( bid, XS_FOUR_SERIES ) Update() FitBORAfCST( bid, 5 ) Update()
- Parameters:
[in] – bor_id string Body of revolution Geom ID
[in] – deg int CST degree