!c Description: !c CFL 条件のチェック !c !c Current Code Owner: !c sugiyama@gfd-dennou.org !c !c Copyright (C) SUGIYAMA Ko-ichiro, 2004, All rights reserved subroutine cflchk !--- モジュールの読み込み use gridset, only: DelX use timeset, only: DelTShort, beta use physprm, only: GasR use basicprm, only: ss_VelSoundBasicZ !--- 暗黙の型宣言禁止 implicit none !--- 内部変数 real(8) :: ss_VelSoundMax real(8) :: Cfl !--- 音速と CFL 条件を求める ss_VelSoundMax = maxval(ss_VelSoundBasicZ) Cfl = DelX / ss_VelSoundMax !--- 警告メッセージ if (DelTShort >= Cfl) then write(*,*) "CFL Condition is broken, DelTShort * VelSound > DelX" write(*,*) "sound wave velocity", ss_VelSoundMax write(*,*) "DelX", DelX write(*,*) "DelTShort", DelTShort stop end if !--- 警告メッセージ if (DelTShort >= Cfl * 5.0d-1) then write(*,*) "CFL Condition is nearly broken" write(*,*) "sound wave velocity", ss_VelSoundMax write(*,*) "DelX", DelX write(*,*) "DelTShort", DelTShort end if !--- 警告メッセージ if (ss_VelSoundMax <= 0.0d0) then write(*,*) "sound wave velocity <= 0.0d0" stop end if end subroutine cflchk