当前位置: 首页>>代码示例>>Python>>正文


Python Data.lift_force_vector方法代码示例

本文整理汇总了Python中SUAVE.Core.Data.lift_force_vector方法的典型用法代码示例。如果您正苦于以下问题:Python Data.lift_force_vector方法的具体用法?Python Data.lift_force_vector怎么用?Python Data.lift_force_vector使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SUAVE.Core.Data的用法示例。


在下文中一共展示了Data.lift_force_vector方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: compute_forces

# 需要导入模块: from SUAVE.Core import Data [as 别名]
# 或者: from SUAVE.Core.Data import lift_force_vector [as 别名]
    def compute_forces(self,conditions):
        
        # unpack
        q    = conditions.freestream.dynamic_pressure
        Sref = self.geometry.reference_area
        
        # 
        CL = conditions.aerodynamics.lift_coefficient
        CD = conditions.aerodynamics.drag_coefficient
        
        N = q.shape[0]
        L = np.zeros([N,3])
        D = np.zeros([N,3])

        L[:,2] = ( -CL * q * Sref )[:,0]
        D[:,0] = ( -CD * q * Sref )[:,0]

        results = Data()
        results.lift_force_vector = L
        results.drag_force_vector = D

        return results        
    
        
        
开发者ID:Alexandrovich,项目名称:SUAVE,代码行数:24,代码来源:Aerodynamics.py

示例2: evaluate

# 需要导入模块: from SUAVE.Core import Data [as 别名]
# 或者: from SUAVE.Core.Data import lift_force_vector [as 别名]
    def evaluate(self,conditions):
        """ process vehicle to setup geometry, condititon and settings

            Inputs:
                conditions - DataDict() of aerodynamic conditions

            Outputs:
                CL - array of lift coefficients, same size as alpha
                CD - array of drag coefficients, same size as alpha

            Assumptions:
                linear intperolation surrogate model on Mach, Angle of Attack
                    and Reynolds number
                locations outside the surrogate's table are held to nearest data
                no changes to initial geometry or settings
        """

        # unpack
        settings   = self.settings
        geometry   = self.geometry
        surrogates = self.surrogates
        
        q    = conditions.freestream.dynamic_pressure
        AoA  = conditions.aerodynamics.angle_of_attack
        Sref = geometry.reference_area
        
        wings_lift_model = surrogates.lift_coefficient
        
        # inviscid lift of wings only
        inviscid_wings_lift = wings_lift_model(AoA)
        conditions.aerodynamics.lift_breakdown.inviscid_wings_lift = inviscid_wings_lift
        
        # lift needs to compute first, updates data needed for drag
        CL = compute_aircraft_lift(conditions,settings,geometry)
        
        # drag computes second
        CD = compute_aircraft_drag(conditions,settings,geometry)

        # pack conditions
        conditions.aerodynamics.lift_coefficient = CL
        conditions.aerodynamics.drag_coefficient = CD

        # pack results
        results = Data()
        results.lift_coefficient = CL
        results.drag_coefficient = CD

        N = q.shape[0]
        L = np.zeros([N,3])
        D = np.zeros([N,3])

        L[:,2] = ( -CL * q * Sref )[:,0]
        D[:,0] = ( -CD * q * Sref )[:,0]

        results.lift_force_vector = L
        results.drag_force_vector = D

        return results
开发者ID:aerialhedgehog,项目名称:SUAVE,代码行数:60,代码来源:Fidelity_Zero_old.py

示例3: compute_forces

# 需要导入模块: from SUAVE.Core import Data [as 别名]
# 或者: from SUAVE.Core.Data import lift_force_vector [as 别名]
    def compute_forces(self,conditions):
        """The default function to compute forces.

        Assumptions:
        None

        Source:
        N/A

        Inputs:
        conditions.freestream.
          dynamic_pressure       [Pa]
        conditions.aerodynamics.
          lift_coefficient       [-]
          drag_coefficient       [-]

        Outputs:
        results.
          lift_force_vector      [N]
          drag_force_vector      [N]

        Properties Used:
        self.geometry.reference_area [m^2]
        """          
        
        # unpack
        q    = conditions.freestream.dynamic_pressure
        Sref = self.geometry.reference_area
        
        # 
        CL = conditions.aerodynamics.lift_coefficient
        CD = conditions.aerodynamics.drag_coefficient
        
        N = q.shape[0]
        L = np.zeros([N,3])
        D = np.zeros([N,3])

        L[:,2] = ( -CL * q * Sref )[:,0]
        D[:,0] = ( -CD * q * Sref )[:,0]

        results = Data()
        results.lift_force_vector = L
        results.drag_force_vector = D

        return results        
    
        
        
开发者ID:suavecode,项目名称:SUAVE,代码行数:47,代码来源:Aerodynamics.py


注:本文中的SUAVE.Core.Data.lift_force_vector方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。