Skip to content

Instantly share code, notes, and snippets.

View ina111's full-sized avatar

ina111 ina111

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# -*- coding: utf-8 -*-
import sys
reload(sys)
import platform
# デフォルトの文字コードを変更する.
sys.setdefaultencoding('utf-8')
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.font_manager
@ina111
ina111 / matplotlib_PDF_ja.py
Last active March 21, 2016 12:04
MacでMatplotlibで日本語の画像とPDFを作る
# -*- coding: utf-8 -*-
"""
Mac OSXのmatplotlibで日本語フォント(Osaka)を使うサンプル
python2.7(anaconda-2.1.0)
cf. http://matplotlib.org/users/customizing.html
"""
# デフォルトの文字コードを変更する.
import sys
reload(sys)
sys.setdefaultencoding('utf-8')

##概要 JAXA(旧NAL)の1984年の航空宇宙技術研究所報告(NAL TR-797)

「非平面翼の最適設計-揚力と翼根曲げモーメントを与えた時の最小誘導抵抗-」

の数値計算部分をMatlab(Octaveで動作確認)で実装しました. 人力飛行機を念頭にした数値を入れてあります. 論文は汎用的なものなのでConstantの部分の数字を変えれば汎用的に使えます.

論文中では非平面翼の計算を行なっていますが,ここに置いているスクリプトは平面翼です.

% -----------
% Optimum Design of Nonplanar wings-Minimum Induced Drag
% for A Given Lift and Wing Root Bending Moment (NAL TR-797)
%
% Created by Takahiro Inagawa on 2013-2-28.
% Copyright (c) 2013 Takahiro Inagawa. All rights reserved.
% -----------
clear all
tic; %Computation time measurement