シミュレーション物理 6 運動方程式の方法 : 惑星の軌道 出席のメール ( 件名に学生番号と氏名 ) に, 中点法をサブルーチンを使って書いたプログラムを添付

Similar documents
C-H Activation in Total Synthesis Masayuki Tashiro (M1)

Agilent 4263B LCR Meter Operation Manual. Manual Change. Change 1 Add TAR in Test Signal Frequency Accuracy Test (Page 9-38) as follows.

京都 ATLAS meeting 田代. Friday, June 28, 13

英語問題 (60 分 ) 受験についての注意 3. 時計に組み込まれたアラーム機能 計算機能 辞書機能などを使用してはならない 4. 試験開始前に 監督から指示があったら 解答用紙の受験番号欄の番号が自身の受験番号かどうかを確認し 氏名を記入すること

CMB の温度 偏光揺らぎにおける弱い重力レンズ効果 並河俊弥 ( 東京大学 )

Report on the experiment of vibration measurement of Wire Brushes. mounted on hand held power tools ワイヤ ブラシ取付け時の手持動力工具振動測定調査の実施について

Reactive Fluid Dynamics 1 G-COE 科目 複雑システムのデザイン体系 第 1 回 植田利久 慶應義塾大学大学院理工学研究科開放環境科学専攻 2009 年 4 月 14 日. Keio University

2011/12/25

11/13 Diagonalization. Theorem: The set R of all real numbers is not enumerable. 12/13. 0.a k1 a k2 a k3... where a ij {0, 1,...

Spontaneous magnetization of quark matter in the inhomogeneous chiral phase

日本政府 ( 文部科学省 ) 奨学金留学生申請書

WHO 飲料水水質ガイドライン第 4 版 ( 一部暫定仮訳 ) 第 9 章放射線学的観点 9.4 飲料水中で一般的に検出される放射性核種のガイダンスレベル 過去の原子力緊急事態に起因する長期被ばく状況に関連する可能性のある人工の放射性核種のみならず 飲料水供給で最も一般的に検出される自然由来及び人工

D j a n g o と P H P の仲間たち ( 改変済 ) サイボウズ ラボ株式会社 TSURUOKA Naoya

むらの定量化について IEC-TC110 HHG2 への提案をベースに ソニー株式会社冨岡聡 フラットパネルディスプレイの人間工学シンポジウム

谷本俊郎博士の研究業績概要 谷本俊郎博士は これまで地球内部の大規模なマントルの対流運動を解明するための研究 および 大気 - 海洋 - 固体地球の相互作用に関する研究を様々な角度から進めてきた これらのうち主要な研究成果は 以下の様にまとめることができる

2018 年 ( 平成 30 年 ) 7 月 13 日 ( 金曜日 ) Fri July 13, 2018

車載用高効率燃焼圧センサー基板に最適なランガサイト型結晶の開発 結晶材料化学研究部門 シチズンホールディングス ( 株 )* 宇田聡 八百川律子 * Zhao Hengyu 前田健作 野澤純 藤原航三

新学習指導要領で求められる暗黙知の指導に関する事例研究 保健体育科教育法 Ⅰと器械運動 Ⅱにおける指導内容から

PROTEUS, AND THE NAME OF THE TYPE SPECIES OP THE GENUS HUENIA

XENON SHORT ARC LAMPS キセノンショートアークランプ

Safer Building and Urban Development ( 安全な建物づくり まちづくりづ ) Contents ( 内容 ) 1)Lessons from building damage by earthquake motions and/or tsunami ( 振動被害または

Effects of pairing correlation on the low-lying quasiparticle resonance in neutron drip-line nuclei

Advance Publication by J-STAGE. 日本機械学会論文集 Transactions of the JSME (in Japanese)

近距離重力実験実験室における逆二乗則の法則の検証. Jiro Murata

Day 5. A Gem of Combinatorics 組合わせ論の宝石. Proof of Dilworth s theorem Some Young diagram combinatorics ヤング図形の組合せ論

Thermal Safety Software (TSS) series

21 点 15 点 3 解答用紙に氏名と受検番号を記入し, 受検番号と一致したマーク部分を塗りつぶすこと 受検番号が 0( ゼロ ) から始まる場合は,0( ゼロ ) を塗りつぶすこと

The unification of gravity and electromagnetism.

Illustrating SUSY breaking effects on various inflation models

一体型地上気象観測機器 ( ) の風計測性能評価 EVALUATION OF WIND MEASUREMENT PERFORMANCE OF COMPACT WEATHER SENSORS

超新星残骸からの陽子起源ガンマ線 放射スペクトルの変調機構

高分解能原子核乾板を用いた暗黒物質探索 中竜大 名古屋大学基本粒子研究室 (F 研 ) ICEPP 白馬

Numerical Simulation of Seismic Wave Propagation and Strong Motions in 3D Heterogeneous Structure

Product Specification

一般化川渡り問題について. 伊藤大雄 ( 京都大学 ) Joint work with Stefan Langerman (Univ. Libre de Bruxelles) 吉田悠一 ( 京都大学 ) 組合せゲーム パズルミニ研究集会

非弾性散乱を利用した不安定核 核構造研究 佐藤義輝東京工業大学

din Linguistics 一 一 St1'uctur~s a proposals representagrammati squite incomplete. Although generate al

28 th Conference on Severe Local Storms 11 Nov Eigo Tochimoto and Hiroshi Niino (AORI, The Univ. of Tokyo)

Evaluation of IGS Reprocessed Precise Ephemeris Applying the Analysis of the Japanese Domestic GPS Network Data

Development of Advanced Simulation Methods for Solid Earth Simulations

2018 年度推薦入学選考 (11 月 15 日実施 ) 英語分野問題 ( 1 ページ 8 ページ )

統合シミュレーションコードによる高速点火実験解析大阪大学レーザーエネルギー学研究センター中村龍史

2015 年度研究活動報告理工学術院 先進理工 応用物理学科小澤徹 Department of Applied Physics, Waseda University

Yutaka Shikano. Visualizing a Quantum State

第 6 回 スペースデブリワークショップ 講演資料集 291 E3 デオービット用膜面展開機構の開発 Development of Membran Deployment mechanism for Deorbiting 高井元 ( 宇宙航空研究開発機構 ), 古谷寛, 坂本啓 ( 東京工業大学 ),

BCR30AM-12LB. RJJ03G Rev I T(RMS) 30 A V DRM 600 V I FGT I, I RGT I, I RGT III 50 ma : PRSS0004ZE-A ( : TO-3P) 4 2, 4

NIE を取り入れた教育実践研究 大学 2 年生を対象とした時事教養 Ⅰ の授業実践を通して. Educational Research based on Newspaper In Education (NIE)

Analysis of shale gas production performance by SGPE

HWS150A RELIABILITY DATA 信頼性データ

Hetty Triastuty, Masato IGUCHI, Takeshi TAMEGURI, Tomoya Yamazaki. Sakurajima Volcano Research Center, DPRI, Kyoto University

SML-811x/812x/813x Series

Development of a High-Resolution Climate Model for Model-Observation Integrating Studies from the Earth s Surface to the Lower Thermosphere

Neutron-Insensitive Gamma-Ray Detector with Aerogel for Rare Neutral-Kaon Decay Experiment

69 地盤の水分変化モニタリング技術 比抵抗モニタリングシステムの概要 * 小林剛 Monitoring Technology for a Moisture Change of Subsurface Outline of the Resistivity Monitoring System Tsuyo

高エネルギーニュートリノ : 理論的な理解 の現状

重力波天体の多様な観測による 宇宙物理学の新展開 勉強会 熱海 銀河における元素量の観測. 青木和光 Wako Aoki. 国立天文台 National Astronomical Observatory of Japan

Photoacclimation Strategy in Photosystem II of Prymnesiophyceae Isochrysis galbana

高分解能 GSMaP アルゴリズムの 構造と考え方 牛尾知雄 ( 大阪大 )

Mathematics 数理科学専修. welcome to 統合数理科学を 目 指 す 基礎理工学専攻

1 1 1 n (1) (nt p t) (1) (2) (3) τ T τ. (0 t nt p ) (1) (4) (5) S a (2) (3) 0sin. = ωp

Fast response silicon pixel detector using SOI. 2016/08/10 Manabu Togawa

電離によるエネルギー損失. β δ. Mean ioniza9on energy. 物質のZ/Aに比例 Z/A~1/2, β~1 1.5MeV/(g cm 2 ) 入射粒子の速度 (β) に依存粒子識別が可能低速では1/β 2. 高速ではβ 2 /(1- β 2 ) で上昇 1.

THE HOLISTIC LOVE REPORT

Estimation of Gravel Size Distribution using Contact Time

マテリアルズインフォマティクスの最前線 吉田 亮. サイエンティフィック システム研究会 科学技術計算分科会 2017年度会合

Study of Cloud and Precipitation Processes Using a Global Cloud-system Resolving Model

Relation of machine learning and renormalization group in Ising model

( 主査 ) 教授髙橋秀幸教授山口信次郎准教授佐藤修正

Fusion neutron production with deuterium neutral beam injection and enhancement of energetic-particle physics study in the Large Helical Device

Crustal Deformation Associated with the 2005 West Off Fukuoka Prefecture Earthquake Derived from ENVISAT/InSAR and Fault- slip Modeling

質量起源 暗黒物質 暗黒エネルギー 宇宙線 陽子崩壊 ニュートリノ質量 米国 P5 ニュートリノ CPV 宇宙背景ニュートリノクォーク レプトンマヨラナ粒子 ニュートリノ測定器 陽子崩壊探索. Diagram courtesy of P5. Origin of Mass.

Youhei Uchida 1, Kasumi Yasukawa 1, Norio Tenma 1, Yusaku Taguchi 1, Jittrakorn Suwanlert 2 and Somkid Buapeng 2

October 7, Shinichiro Mori, Associate Professor

TDK Lambda INSTRUCTION MANUAL. TDK Lambda A B 1/40

ATLAS 実験における荷電ヒッグス粒子の探索

Advanced 7 Bio-Inspired System

EU 向けに輸出される食品等に関する証明書の発行に係る事務処理要領 ( 国際 ) 通知に基づき 欧州連合 ( 以下 EU という ) へ輸出される食品及び飼料の証明書の発行条件及び手続きを定めるものとする

結合および相互作用エネルギーの定量的 評価法の開発と新規典型元素化合物の構築

Y. Okayasu for the Jlab E collaboration Department of Physics. Tohoku University

有機金属化学 : 最新論文からのトピックス 4

Experimental and FE Analysis of Seismic Soil-Pile-Superstructure Interaction in Sand. Mahmoud N. HUSSIEN*, Tetsuo TOBITA and Susumu IAI

Video Archive Contents Browsing Method based on News Structure Patterns

Introduction to Multi-hazard Risk-based Early Warning System in Japan

Altitudinal Increasing Rate of UV radiation by the Observations with Brewer Spectrophotometers at Norikura, Suzuran and Tsukuba

2A01 Fourier-transform spectroscopy of D + 2 using intense near-infrared few-cycle laser pulses [Abstract] [Introduction] [Methods]

SAFETY STANDARD APPROVED METALLIZED POLYPROPYLENE CAPACITOR 海外規格メタライズドポリプロピレンコンデンサ TYPE ECQUA

UTokyo OCW. Copyright 2015, The University of Tokyo / UTokyo OCW The Global Focus on Knowledge Lecture Series Copyright 2015, Taro Toyoizumi

数理統計学から た Thermo-Majorization: 統計モデルの 較と情報スペクトル. National Institute of Informatics Keiji Matsumoto

Study of General Dynamic Modeling Using the Craig-Bampton Method

単層カーボンナノチューブ Single-Walled Carbon Nanotubes 1. 幾何学と電子構造 Geometry and Electronic Structure. Contents

最先端有機元素化学 1: 最新論文からのトピックス

Taking an advantage of innovations in science and technology to develop MHEWS

On Attitude Control of Microsatellite Using Shape Variable Elements 形状可変機能を用いた超小型衛星の姿勢制御について

EDL analysis for "HAYABUSA" reentry and recovery operation はやぶさ カプセル帰還回収運用における EDL 解析

Kyoko Kagohara 1, Tomio Inazaki 2, Atsushi Urabe 3 and Yoshinori Miyachi 4 楮原京子

RQ1A070AP. V DSS -12V R DS(on) (Max.) 14mW I D -7A P D 1.5W. Pch -12V -7A Power MOSFET. Datasheet 外観図 内部回路図 特長 1) 低オン抵抗 2) ゲート保護ダイオード内蔵

山口英斉博士の研究業績概要 山口博士は 原子核物理学の実験的研究を専門とし 主に宇宙核物理学分野において 以下に述べる研究業績をあげてきました

Strange nuclear structures with high density formed by single/double K -- meson

中村宏 工学部計数工学科 情報理工学系研究科システム情報学専攻 計算システム論第 2 1

Transcription:

シミュレーション物理 6 運動方程式の方法 : 惑星の軌道 出席のメール ( 件名に学生番号と氏名 ) に, 中点法をサブルーチンを使って書いたプログラムを添付

今回の授業の目的 4 次のRunge-Kutta 法を用いて, 惑星の軌道のシミュレーションを行う 2 d r GMm m = r 2 3 dt r 2 d r GM = 2 (using angular momentum cons.) 2 3 r D dt r 2 2 d r GMT 1 r/ l= rt, / T= t, r 2 = 3 3 dt l r 2 GMT set = 1 3 l 2 d r 1 = rr 2 3, = ( xy, ) dt r

rk4.f90 4 次のルンゲークッタ法 t 4 まで正しい 高精度の数値計算に向いている これ以上次数を上げると, 表式が複雑になりかえって計算時間がかかる

自由落下のプログラムを rk4.f90 を使うよう改良 program freefall! This is a program to investigate the free fall! 2005/5/12 Written by T. Ohtsuki! Runge-Kutta method, subroutine used! derivs is used as a subprogram, using "contains".! This makes parameters in the procedure derivs global variables implicit none! Always begin with this statement integer,parameter::double=selected_real_kind(14) real(kind=double), parameter::zero=0.0_double,one=1.0_double,half=0.5_double real(kind=double),parameter::pi=3.1415926535897932 integer,parameter::nd=2! dimension of the equation real(kind=double),dimension(nd)::y,dydx,yout! 位置, 速度はベクトルで定義 real(kind=double)::deltat,t,tmax,analytic integer::i,nmax real(kind=double),parameter::g=9.8_double,gamma=1.0_double external:: derivsfreefall!---------main program--------- deltat=0.05_double t=zero y(1)=zero! initial velocity, 初期値も当然変わる y(2)=zero! initial position

tmax=5._double nmax=int((tmax-deltat/2._double)/deltat)+1 do i=1,nmax call derivsfreefall(nd,t,y,dydx)! 微分係数を求める call rk4(nd,y,dydx,t,deltat,yout,derivsfreefall)! 微分係数を使って Δt だけ時間発展 y=yout end do tmax=deltat*nmax analytic=-g*tmax/gamma-g/gamma**2*exp(-gamma*tmax)+g/gamma**2! ここら辺もいらない print *,tmax,y(2),analytic end program freefall

微分を求めるサブルーチン, derivsfreefall.f90 として保存!------------------- Subroutines --------------------- SUBROUTINE derivsfreefall(nd,x,y,dydx)! subroutine derivs! nd : dimension of y! x : time (usually time independent)! dydx: first derivative w.r.t. time, not a partial derivative IMPLICIT NONE integer,parameter::double=selected_real_kind(14) integer::nd REAL(kind=double), INTENT(IN) :: x REAL(kind=double), DIMENSION(nd), INTENT(IN) :: y REAL(kind=double), DIMENSION(nd), INTENT(OUT) :: dydx real(kind=double),parameter::g=9.8_double,gamma=1.0_double dydx(1)=-(g+gamma*y(1))!g, gamma are global values! ここは当然変える dydx(2)=y(1) END SUBROUTINE derivsfreefall

SUBROUTINE rk4(nd,y,dydx,x,h,yout,derivs)! This is a Runge-Kutta subroutine! 2005/5/11 Written by T. Ohtsuki IMPLICIT NONE integer,parameter::double=selected_real_kind(14) integer::nd REAL(kind=double), DIMENSION(nd), INTENT(IN) :: y,dydx REAL(kind=double), INTENT(IN) :: x,h REAL(kind=double), DIMENSION(nd), INTENT(OUT) :: yout INTERFACE SUBROUTINE derivs(nd,x,y,dydx) IMPLICIT NONE integer,parameter::double=selected_real_kind(14) integer::nd REAL(kind=double), INTENT(IN) :: x REAL(kind=double), DIMENSION(nd), INTENT(IN) :: y REAL(kind=double), DIMENSION(nd), INTENT(OUT) :: dydx END SUBROUTINE derivs END INTERFACE REAL(kind=double) :: h6,hh,xh REAL(kind=double), DIMENSION(size(y)) :: dym,dyt,yt hh=h*0.5_double h6=h/6.0_double xh=x+hh yt=y+hh*dydx call derivs(nd,xh,yt,dyt) yt=y+hh*dyt call derivs(nd,xh,yt,dym) yt=y+h*dym dym=dyt+dym call derivs(nd,x+h,yt,dyt) yout=y+h6*(dydx+dyt+2.0_double*dym) END SUBROUTINE rk4 これは非常に汎用性が高い rk4.f90 として保存

dahlmanにアップロード, f90 c derivsfreefall.f90 f90 c rk4.f90 f90 freefallrk4.f90 derivsfreefall.o rk4.o a.out 精度が非常によいことを確認する

自由落下のプログラムを惑星の軌道を求めるプログラムに変更 program freefall! Orbit とでもする! This is a program to investigate the free fall! 2005/5/12 Written by T. Ohtsuki! Runge-Kutta method, subroutine used! derivs is used as a subprogram, using "contains".! This makes parameters in the procedure derivs global variables implicit none! Always begin with this statement integer,parameter::double=selected_real_kind(14) real(kind=double), parameter::zero=0.0_double,one=1.0_double,half=0.5_double real(kind=double),parameter::pi=3.1415926535897932 integer,parameter::nd=2! dimension of the equation!, 直線運動でなく面内の運動なので nd=2x2=4 real(kind=double),dimension(nd)::y,dydx,yout real(kind=double)::deltat,t,tmax,analytic integer::i,nmax real(kind=double),parameter::g=9.8_double,gamma=1.0_double, これはいらなくなる External:: derivsfreefall! これは derivsplanet に変更!---------main program--------- deltat=0.05_double t=zero y(1)=zero! initial velocity, 初期値も当然変わる y(2)=zero! initial position

tmax=5._double nmax=int((tmax-deltat/2._double)/deltat)+1 do i=1,nmax! ここは全く変えなくてよい! call derivs(nd,t,y,dydx) call rk4(nd,y,dydx,t,deltat,yout,derivs) y=yout end do tmax=deltat*nmax analytic=-g*tmax/gamma-g/gamma**2*exp(-gamma*tmax)+g/gamma**2! ここら辺もいらない print *,tmax,y(2),analytic end program freefall

プログラムのチェックは? エネルギーの保存則 : 2 2 2 m 2 2 GmM ml v x + v y 1 E = ( vx + vy ) = 2 2 x + y T 2 x + y 2 2 2 2 よって v + v 2 2 2 x y x 1 + y 2 2 が一定である必要がある 2 l 角運動量保存則 : L ( ) ( z = m xvy yvx = m xv y yv x) T よって xv y yv x が一定である必要がある

変数 v x,v y,x,y を y(1),y(2),y(3),y(4) とする 順番は別にどうでもよいが,x, v x,y, v y というように位置と速さが混ざると粒子が増えてきたとき, 面倒になる場合がある

入出力 これまでは, 画面からパラメータを入力して, 画面に結果を書かせていた Read *,x Print *,x など これだとあとで軌道を描かせたりするのが面倒 open,close, read, write を使う open(1,file= planetorbit.txt )! ファイル planetorbit.txt を 1 番の出力先として指定! 別に 1 でなくても 2 でも 10 でも構わない! 複数のファイルをあけて,x は 1 に,y は 10 に書くのも可能 Write(1, (e14.7) )pi**3! ( ) で書き方を指定 これは指数を使うやり方 Write(1, (f14.7) )pi**3! これは指数を使わないやり方!14 個の幅を使い, 有効数字 7 桁という意味! 例えば (i5) なら 5 桁の整数を書く 答えが 3 桁なら 2 個空白となる 6 桁以上だと X close(1) Open(1,file= planetorbit.txt ) Read(1,*) x Close(1)

できあがったプログラムを見てみよう program planetorbit! This is a program to analyze the planetary motion! 2005/5/19 Written by T. Ohtsuki! Runge-Kutta method, subroutine used! derivs is used as a subprogram, using "contains". use ConservationLaw! 保存則をチェックするモジュールを使う implicit none! Always begin with this statement integer,parameter::double=selected_real_kind(14) real(kind=double), parameter::zero=0.0_double,one=1.0_double,half=0.5_double real(kind=double),parameter::pi=3.1415926535897932 integer,parameter::nd=4! dimension of the equation real(kind=double),dimension(nd)::y,dydx,yout real(kind=double)::deltat,t,tmax,energy,angularmomentum integer::i,nmax external:: derivsplanet!---------main program--------- deltat=0.05_double tmax=5._double nmax=int((tmax-deltat/2._double)/deltat)+1

t=zero! y(1):vx,y(2)=vy,y(3)=x,y(4)=y y(1)=one! initial x-velocity y(2)=zero! initial y-velocity y(3)=zero! initial x-position y(4)=one! initial y-position call ConservedVariables(nd,y,energy,AngularMomentum) open(1,file='planetorbit.txt') write(1,'(5f14.7)')t,y(3),y(4),energy,angularmomentum ---------! beginning of the time evolution --------- do i=1,nmax call derivsplanet(nd,t,y,dydx) call rk4(nd,y,dydx,t,deltat,yout,derivsplanet) y=yout t=t+deltat call ConservedVariables(nd,y,energy,AngularMomentum) write(1,'(5f14.7)')t,y(3),y(4),energy,angularmomentum end do close(1) end program planetorbit

!------------------- Subroutines --------------------- SUBROUTINE derivsplanet(nd,x,y,dydx)! subroutine derivsplanet! nd : dimension of y! x : time (usually time independent)! dydx: first derivative w.r.t. time, not a partial derivative IMPLICIT NONE integer,parameter::double=selected_real_kind(14) integer::nd REAL(kind=double), INTENT(IN) :: x REAL(kind=double), DIMENSION(nd), INTENT(IN) :: y REAL(kind=double), DIMENSION(nd), INTENT(OUT) :: dydx これを derivsplanet.f90 として保存 dydx(1)=-y(3)/sqrt(y(3)**2+y(4)**2)**3 dydx(2)=-y(4)/sqrt(y(3)**2+y(4)**2)**3 dydx(3)=y(1) dydx(4)=y(2) END SUBROUTINE derivsplanet

保存則はモジュールで計算,conservationlaw.f90 というファイルを用意 module ConservationLaw implicit none contains subroutine ConservedVariables(nd,y,energy,AngularMomentum)! subroutine for examining the conserved quantity IMPLICIT NONE integer::nd integer,parameter::double=selected_real_kind(14) REAL(kind=double), dimension(nd),intent(in) ::y REAL(kind=double), INTENT(OUT)::energy,AngularMomentum energy=(y(1)**2+y(2)**2)/2._double-1._double/sqrt(y(3)**2+y(4)**2) AngularMomentum=y(3)*y(2)-y(4)*y(1) END subroutine ConservedVariables end module ConservationLaw

実行のさせ方 まずモジュールをコンパイル f90 c conservationlaw.f90 次に rk4.f90,derivsplanet.f90 をコンパイル ( 申してある場合はよい ) f90 c rk4.f90 f90 c derivsplanet.f90 最後に実行ファイルを作る f90 planetrk4.f90 conservationlaw.o rk4.o derivsplanet.o 実行ファイル名を例えば orbit.out にしたければ f90 o orbit.out planetrk4.f90 conservationlaw.o rk4.o derivsplanet.o

課題 いろいろな初期条件で, 軌道を描かせる 軌道はffftpでダウンロードし, エクセルで描かせる 来週はフォローアップ, 今週で来た人は来なくてよい 出席は取りません