Skip to content

swayli94/cst-modeling3d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CST Modeling

Surface and curve modeling via class shape function transformation (CST) method.

The CST method combines class functions and shape functions to describe an arbitrary geometry and can guarantee airfoil smoothness with comparatively fewer design variables. Usually, a sixth-order Bernstein polynomial is used as the shape function; i.e., seven CST parameters are used to describe upper and lower surfaces.

Reference: Kulfan, B. M., “Universal parametric geometry representation method,” Journal of Aircraft, vol. 45, No. 1, 2008, pp. 142-158. (doi: 10.2514/1.29958)

The curves, e.g., foil's upper and lower surfaces, are constructed via CST method. The multi-section surface is interpolated from several control sections.

Installation

# Install the package from PyPI
pip install cst-modeling3d

# Install the package from the source code
git clone https://github.com/swayli94/cst-modeling3d
cd cst-modeling3d
pip install -e .

Tutorial

https://cst-modeling3d.readthedocs.io/en/latest/

Example

(1) Airfoil

import numpy as np
from cst_modeling.section import cst_foil

cst_u = np.array([ 0.118598,  0.118914,  0.155731,  0.136732,  0.209265,  0.148305,  0.193591])
cst_l = np.array([-0.115514, -0.134195, -0.109145, -0.253206, -0.012220, -0.118463,  0.064100])

x1, yu1, yl1, tmax1, rLE1 = cst_foil(201, cst_u, cst_l, x=None, t=None, tail=0.0)
x2, yu2, yl2, tmax2, rLE2 = cst_foil(201, cst_u, cst_l, x=None, t=None, tail=0.004)
x3, yu3, yl3, tmax3, rLE3 = cst_foil(201, cst_u, cst_l, x=None, t=0.11, tail=0.004)

(2) Wing

from cst_modeling.surface2 import Surface

wing = Surface(n_sec=10, name='Wing-CRM-winglet', nn=201, ns=51, 
                smooth_surface=True, smooth_sections=[(0, 2), (4, 7), (8, 9)],
                rotate_x_section=True, rotation_sections=[(8, 9)])

wing.read_setting('Wing.txt')
wing.prepare()
wing.geo()

(3) Blade

from cst_modeling.surface import Surface
blade = Surface(n_sec=6, name='Blade-simple',nn=101, ns=51, projection=False)
blade.read_setting('Fan.txt', tail=[0.1, 0.1, 0.1, 0.1, 0.1, 0.05])
blade.geo()
blade.smooth(isec0=0, isec1=4)
blade.smooth(isec0=4, isec1=5, smooth0=True)
blade.surf_to_cylinder(flip=True)
blade.output_tecplot(fname='Blade-simple.dat')

(4) Nacelle



(5) Fuselage


(6) Fairing


(7) Delta wing


About

Surface and foil modeling via CST method

Resources

License

Stars

Watchers

Forks

Packages

No packages published