⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 surfacearea.m

📁 isight调用matlab接口进行优化的例子
💻 M
字号:


% Function OgiveSurfaceArea(Length, BaseDiameter)
%
%This function will estimate the SurfaceArea of an Ogive nose with the specified length and
% base diameter
%
% Functions/Subroutines Required
%       OgiveRadius
%
%       Length           - Length of Ogive Nose
%       BaseDiameter     - Diameter of the base of the Ogive Nose
%
%       Total Surface area of the Ogive nose

% Length = 25.0
% BaseDiameter = 10.0

NumberOfSlices = 25

DeltaX = Length / NumberOfSlices

RMid = BaseDiameter / 2

FinenessRatio = Length / BaseDiameter
RBar = (FinenessRatio ^ 2) + 0.25
RadiusOfCurvature = RBar * BaseDiameter
XBar = DeltaX / Length

TermA = (FinenessRatio ^ 2) / (RBar ^ 2)
TermB = (1 - TermA * ((1 - XBar) ^ 2)) ^ 0.5
TermC = 1 - (2 * RBar * (1 - TermB))
Radius = RMid * TermC
if (Radius < 0) 
    OgiveRadius = 0
else
    OgiveRadius = RMid * TermC
end ;





SurfaceArea = 3.14 * OgiveRadius * sqrt((OgiveRadius ^ 2) + (DeltaX ^ 2))
XOld = DeltaX
RadiusOld = OgiveRadius

i = 1

while ( i <= (NumberOfSlices - 1) )
    X = XOld + DeltaX
    
     
    
    RMid = BaseDiameter / 2
    
    FinenessRatio = Length / BaseDiameter
    RBar = (FinenessRatio ^ 2) + 0.25
    RadiusOfCurvature = RBar * BaseDiameter
    XBar = DeltaX / Length
    
    TermA = (FinenessRatio ^ 2) / (RBar ^ 2)
    TermB = (1 - TermA * ((1 - XBar) ^ 2)) ^ 0.5
    TermC = 1 - (2 * RBar * (1 - TermB))
    Radius = RMid * TermC
    if (Radius < 0) 
        Radius = 0
    else
        Radius = RMid * TermC
   end ;
    
    
    
    SArea = 3.14 * (Radius + RadiusOld) * sqrt(((Radius - RadiusOld) ^ 2) + DeltaX ^ 2)
    SurfaceArea = SurfaceArea + SArea
    XOld = X
    RadiusOld = Radius
    
    i = i + 1
end 

OgiveSurfaceArea = SurfaceArea

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -