配管保温計算

 投稿者:ちゃとら  投稿日:2018年12月 3日(月)12時06分15秒
  配管の保温計算を行うプログラムを作成しましたので投稿させて頂きます。

白石様、しばっち様、nagram様 有り難うございました。

その1
REM **********************************************************************
REM       配管保温計算
REM    4種類の配管の保温計算を行います。保温材は2層保温までとします。
REM    配管サイズ、保温材種類に不足がある場合は該当するデータを書き換えて
REM  使用してください。
REM *********************************************************************

DECLARE EXTERNAL SUB aa.airpro      ! 混合気体の物性値計算
DIM pipe(19,4)                      ! 配管サイズの設定
DIM ps(4)                           ! 配管サイズ番号
DIM ins$(10)                        ! 保温材名称
DIM insm(4,2)                       ! 1,2層目保温材番号
DIM insth(4,3)                      ! 1,2層目保温厚さ、全厚
DIM ins(10,3)                       ! 保温材番号順の熱伝導率データ
DIM facek(4)                        ! 保温表面温度  K
DIM airdat(4,8)                     ! 各保温表面温度  K と外気の平均温度に於ける気体物性値
DIM midt(4,2)
DIM t(4)                            ! 仮2層保温中間温度
DIM kekka(4,14)                     ! 計算結果
DIM Rth(4,4)                        ! 熱抵抗
REM **********************************************************************
MAT READ pipe(19,4)              ! 配管サイズの設定
MAT READ ins$(10)                ! 保温材名称
MAT READ ins(10,3)               ! 保温材データの設定
REM ******************************************
INPUT PROMPT "配管ライン名称      ":name$
INPUT PROMPT "保 持 温 度     (C')":maint
INPUT PROMPT "外 気 温 度    (C')":ambi
INPUT PROMPT "風       速    (m/s)":wv
INPUT PROMPT "設 計 裕 度         ":df
INPUT PROMPT "効       率         ":eff

PRINT "   番号   配管 (A)    番号   配管 (A)    番号   配管 (A)"
PRINT "    1       15         7       65         14     200 "
PRINT "    2       20         8       80         15     250 "
PRINT "    3       25         9       90         16     300 "
PRINT "    4       32        10      100         17     350 "
PRINT "    5       40        11      125         18     400 "
PRINT "    6       50        12      150         19     450 "

LET pn=1
INPUT PROMPT "配管 1  番号        ":ps(1)
INPUT PROMPT "配管 2  番号 無い場合は 0":ps(2)
LET pn=2
IF ps(2)=0 THEN
   LET ps(2)=ps(1)
   LET ps(3)=ps(1)
   LET ps(4)=ps(1)
   LET pn=1
END IF
IF pn=2 THEN
   INPUT PROMPT "配管 3  番号 無い場合は 0":ps(3)
   LET pn=3
   IF ps(3)=0 THEN
      LET ps(3)=ps(1)
      LET ps(4)=ps(1)
      LET pn=2
   END IF
END IF
IF pn=3 THEN
   INPUT PROMPT "配管 4  番号 無い場合は 0":ps(4)
   LET pn=4
   IF ps(4)=0 THEN
      LET ps(4)=ps(1)
      LET pn=3
   END IF
END IF
PRINT "    bangou   kigou         λ0        λ1       λ3        "
PRINT "       1     clc13-300   0.04070   1.28E-04       0        "
PRINT "       2     clc13-800   0.05550   2.05E-05   1.93E- 7     "
PRINT "       3     clc22-300   0.05350   1.16E-04       0        "
PRINT "       4     clc22-800   0.06120   3.38E-05   1.95E-07     "
PRINT "       5     gwc         0.03330   1.21E-04   6.56E-07     "
PRINT "       6     T#1260      0.11000   -1.40E-04  2.60E-07     "
PRINT "       7     rwc100      0.03140   1.74E-04       0        "
PRINT "       8     rwc600      0.04070   1.16E-04   7.67E-07     "
PRINT "       9     T#5120      0.02470   1.014E-04  7.55E-08     "
IF pn=1 THEN
   LET insmn=1
   INPUT PROMPT "配管1  1層目 保温材番号,厚みmm":insm(1,1),insth(1,1)
   INPUT PROMPT "配管 1  2層目 保温材番号,厚みmm 無い場合は ”0,0”":insm(1,2),insth(1,2)
   IF insm(1,2)=0 THEN
      LET insmn=0
      LET insm(1,2)=insm(1,1)
      LET insth(1,2)=0
   END IF
   LET insm(2,1)=insm(1,1)
   LET insth(2,1)=insth(1,1)
   LET insm(2,2)=insm(1,2)
   LET insth(2,2)=insth(1,2)
   LET insm(3,1)=insm(1,1)
   LET insth(3,1)=insth(1,1)
   LET insm(3,2)=insm(1,2)
   LET insth(3,2)=insth(1,2)
   LET insm(4,1)=insm(1,1)
   LET insth(4,1)=insth(1,1)
   LET insm(4,2)=insm(1,2)
   LET insth(4,2)=insth(1,2)
END IF
IF pn=2 THEN
   LET insmn=1
   INPUT PROMPT "配管1  1層目 保温材番号,厚みmm":insm(1,1),insth(1,1)
   INPUT PROMPT "配管 1  2層目 保温材番号,厚みmm 無い場合は”0,0”":insm(1,2),insth(1,2)
   IF insm(1,2)=0 THEN
      LET insmn=0
      LET insm(1,2)=insm(1,1)
      LET insth(1,2)=0
   END IF
   LET insmn=1
   INPUT PROMPT "配管 2  1層目 保温材番号,厚みmm":insm(2,1),insth(2,1)
   INPUT PROMPT "配管 2  2層目 保温材番号,厚みmm 無い場合は”0,0”":insm(2,2),insth(2,2)
   IF insm(2,2)=0 THEN
      LET insmn=0
      LET insm(2,2)=insm(2,1)
      LET insth(2,2)=0
   END IF
   LET insm(3,1)=insm(1,1)
   LET insth(3,1)=insth(1,1)
   LET insm(3,2)=insm(1,2)
   LET insth(3,2)=insth(1,2)
   LET insm(4,1)=insm(1,1)
   LET insth(4,1)=insth(1,1)
   LET insm(4,2)=insm(1,2)
   LET insth(4,2)=insth(1,2)
END IF
IF pn=3 THEN
   LET insmn=1
   INPUT PROMPT "配管1  1層目 保温材番号,厚みmm":insm(1,1),insth(1,1)
   INPUT PROMPT "配管 1  2層目 保温材番号,厚みmm 無い場合は”0,0”":insm(1,2),insth(1,2)
   IF insm(1,2)=0 THEN
      LET insmn=0
      LET insm(1,2)=insm(1,1)
      LET insth(1,2)=0
   END IF
   LET insmn=1
   INPUT PROMPT "配管 2  1層目 保温材番号,厚みmm":insm(2,1),insth(2,1)
   INPUT PROMPT "配管 2  2層目 保温材番号,厚みmm 無い場合は”0,0”":insm(2,2),insth(2,2)
   IF insm(2,2)=0 THEN
      LET insmn=0
      LET insm(2,2)=insm(2,1)
      LET insth(2,2)=0
   END IF
   LET insmn=1
   INPUT PROMPT "配管 3  1層目 保温材番号,厚みmm":insm(3,1),insth(3,1)
   INPUT PROMPT "配管 3  2層目 保温材番号,厚みmm 無い場合は”0,0”":insm(3,2),insth(3,2)
   IF insm(3,2)=0 THEN
      LET insmn=0
      LET insm(3,2)=insm(3,1)
      LET insth(3,2)=0
   END IF
   LET insm(4,1)=insm(1,1)
   LET insth(4,1)=insth(1,1)
   LET insm(4,2)=insm(1,2)
   LET insth(4,2)=insth(1,2)
END IF
IF pn=4 THEN
   LET insmn=1
   INPUT PROMPT "配管1  1層目 保温材番号,厚みmm":insm(1,1),insth(1,1)
   INPUT PROMPT "配管 1  2層目 保温材番号,厚みmm 無い場合は”0,0”":insm(1,2),insth(1,2)
   LET insm(1,2)=0
   LET insth(1,2)=0
   IF insm(1,2)=0 THEN
      LET insmn=0
      LET insm(1,2)=insm(1,1)
      LET insth(1,2)=0
   END IF
   LET insmn=1
   iNPUT PROMPT "配管 2  1層目 保温材番号,厚みmm":insm(2,1),insth(2,1)
   INPUT PROMPT "配管 2  2層目 保温材番号,厚みmm 無い場合は”0,0”":insm(2,2),insth(2,2)
   IF insm(2,2)=0 THEN
      LET insmn=0
      LET insm(2,2)=insm(2,1)
      LET insth(2,2)=0
   END IF
   LET insmn=1
   INPUT PROMPT "配管 3  1層目 保温材番号,厚みmm":insm(3,1),insth(3,1)
   INPUT PROMPT "配管 3  2層目 保温材番号,厚みmm 無い場合は”0,0”":insm(3,2),insth(3,2)
   IF insm(3,2)=0 THEN
      LET insmn=0
      LET insm(3,2)=insm(3,1)
      LET insth(3,2)=0
   END IF
   LET insmn=1
   INPUT PROMPT "配管 4  1層目 保温材番号,厚みmm":insm(4,1),insth(4,1)
   INPUT PROMPT "配管 4  2層目 保温材番号,厚みmm 無い場合は”0,0”":insm(4,2),insth(4,2)
   IF insm(4,2)=0 THEN
      LET insmn=0
      LET insm(4,2)=insm(4,1)
      LET insth(4,2)=0
   END IF
END IF
REM ********** 初期温度の設定 **********
LET face1 = ambi+273+0.1
FOR i=1 TO 4
   LET facek(i)=face1                                ! 仮保温表面温度
   LET t(i)=(maint+(facek(i)-273))/2                ! 仮2層保温中間温度
NEXT i
REM ********** 保温材熱伝導率の計算  **************************
FOR i=1 TO 4
   LET t1=(maint+t(i))/2
   LET t2=(t(i)+(facek(i)-273))/2
   LET x=1
   DO
      REM ********** 空気物性値の計算  ****************************
      CALL airpro(facek(i)-273,k2,k3,k4,k5,k6,k7,k8)
      LET airdat(i,2)=k2         !  比重          kg/m^3
      LET airdat(i,3)=k3         !  比熱          kJ/kgK
      LET airdat(i,4)=k4         !  粘性係数      μPa・S
      LET airdat(i,5)=k5         !  動粘性係数    mm^2/S
      LET airdat(i,6)=k6         !  熱伝導率      mW/mK
      LET airdat(i,7)=k7         !  温度伝導率    mm^2/S
      LET airdat(i,8)=k8         !  プラントル数
      LET d0=pipe(ps(i),4)                                                                  ! 保温材内径
      LET d1=pipe(ps(i),4)+2*insth(i,1)/1000                                                ! 1層目保温材外径
      LET d2=pipe(ps(i),4)+2*insth(i,1)/1000+2*insth(i,2)/1000                              ! 2層目保温材外径
      LET t1=(maint+t(i))/2                                                                 ! 1層目保温平均温度
      LET c1=(maint^2+maint*t(i)+t(i)^2)/3                                                  ! 熱伝導率計算係数
      LET r1=(ins(insm(i,1),1)+ins(insm(i,1),2)*t1+ins(insm(i,1),3)*c1 )                    ! 保温材熱伝導率
      LET Rth(i,1)=1/(2*PI*r1)*LOG(d1/d0)                                                   ! 1層目保温層熱抵抗
      LET t2=(t(i)+(facek(i)-273))/2                                                        ! 2層目保温平均温度
      LET c2=(t(i)^2+t(i)*(facek(i)-273)+(facek(i)-273)^2)/3                                ! 熱伝導率計算係数
      LET r2=(ins(insm(i,2),1)+ins(insm(i,2),2)*t2+ins(insm(i,2),3)*c2 )                    ! 保温材熱伝導率
      LET Rth(i,2)=1/(2*PI*r2)*LOG(d2/d1)
      LET re=wv*3600*d2/(airdat(i,5)*3600/1000000)
      LET ac=1.12*(0.373*re^0.5+0.057*re^(2/3))*airdat(i,8)^(1/3)*airdat(i,6)/1000/d2
      LET ar=0.8*5.67E-8*(faceK(i)^4-(ambi+273)^4)/(facek(i)-(ambi+273))
      LET Rth(i,3)=1/(PI*d2*(ac+ar))
      LET Rth(i,4)=Rth(i,1)+Rth(i,2)+Rth(i,3)
      LET hloss=(maint-ambi)/Rth(i,4)
      LET fk=hloss*Rth(i,3)+ambi+273
      LET faceK(i) = fk
      LET t(i)=hloss*(Rth(i,2)+Rth(i,3))+ambi
      LET x=x+1
   LOOP WHILE X<=20
   LET kekka(i,1)=t1
   LET kekka(i,2)=c1
   LET kekka(i,3)=r1
   LET kekka(i,4)=t2
   LET kekka(i,5)=c2
   LET kekka(i,6)=r2
   LET kekka(i,7)=re
   LET kekka(i,8)=ac
   LET kekka(i,9)=ar
   LET kekka(i,10)=fk
   LET kekka(i,11)=t(i)
   LET kekka(i,12)=d0
   LET kekka(i,13)=d1
   LET kekka(i,14)=d2
NEXT i
REM *********************** 計算結果の表示  ***********************
PLOT TEXT ,AT 0.1,0.95:"配管ライン名称      "
PLOT TEXT ,AT 0.35,0.95: name$
PLOT TEXT ,AT 0.1,0.92:"保 持 温 度     (C')"
PLOT TEXT ,AT 0.35,0.92: STR$(maint)
PLOT TEXT ,AT 0.1,0.89:"外 気 温 度     (C')"
PLOT TEXT ,AT 0.35,0.89: STR$(ambi)
PLOT TEXT ,AT 0.5,0.95:"風       速    (m/s)"
PLOT TEXT ,AT 0.75,0.95: STR$(wv)
PLOT TEXT ,AT 0.5,0.92:"設 計 裕 度         "
PLOT TEXT ,AT 0.75,0.92: STR$(df)
PLOT TEXT ,AT 0.5,0.89:"効       率         "
PLOT TEXT ,AT 0.75,0.89: STR$(eff)
PLOT TEXT ,AT 0.25,0.85:"配管サイズ"
PLOT TEXT ,AT 0.40,0.85:"保温層"
PLOT TEXT ,AT 0.50,0.85:"保温材"
PLOT TEXT ,AT 0.60,0.85:"保温厚さ"
PLOT TEXT ,AT 0.15,0.82:"配管  1"
PLOT TEXT ,AT 0.28,0.82,USING"###": pipe(ps(1),1)
PLOT TEXT ,AT 0.40,0.82:"1層目"
PLOT TEXT ,AT 0.49,0.82:ins$(insm(1,1))
PLOT TEXT ,AT 0.62,0.82,USING"###":insth(1,1)
LET ygyou =0.82
IF insth(1,2)<>0 THEN LET ygyou=ygyou-0.02
IF insth(1,2)<>0 THEN PLOT TEXT ,AT 0.40,ygyou :"2層目"
IF insth(1,2)<>0 THEN PLOT TEXT ,AT 0.49,ygyou :ins$(insm(1,2))
IF insth(1,2)<>0 THEN PLOT TEXT ,AT 0.62,ygyou ,USING"###":insth(1,2)
IF pn => 2 THEN LET ygyou=ygyou-0.02
IF pn => 2 THEN PLOT TEXT ,AT 0.15,ygyou :"配管  2"
IF pn => 2 THEN PLOT TEXT ,AT 0.28,ygyou ,USING"###": pipe(ps(2),1)
IF pn => 2 THEN PLOT TEXT ,AT 0.40,ygyou :"1層目"
IF pn => 2 THEN PLOT TEXT ,AT 0.49,ygyou :ins$(insm(2,1))
IF pn => 2 THEN PLOT TEXT ,AT 0.62,ygyou ,USING"###":insth(2,1)
IF pn => 2 AND insth(2,2)<>0 THEN LET ygyou =ygyou-0.02
IF pn => 2 AND insth(2,2)<>0 THEN PLOT TEXT ,AT 0.40,ygyou :"2層目"
IF pn => 2 AND insth(2,2)<>0 THEN PLOT TEXT ,AT 0.49,ygyou :ins$(insm(2,2))
IF pn => 2 AND insth(2,2)<>0 THEN PLOT TEXT ,AT 0.62,ygyou ,USING"###":insth(2,2)
IF pn => 3 THEN LET ygyou=ygyou-0.02
IF pn => 3 THEN PLOT TEXT ,AT 0.15,ygyou:"配管  3"
IF pn => 3 THEN PLOT TEXT ,AT 0.28,ygyou,USING"###": pipe(ps(3),1)
IF pn => 3 THEN PLOT TEXT ,AT 0.40,ygyou:"1層目"
IF pn => 3 THEN PLOT TEXT ,AT 0.49,ygyou:ins$(insm(3,1))
IF pn => 3 THEN PLOT TEXT ,AT 0.62,ygyou,USING"###":insth(3,1)
IF pn => 3 AND insth(3,2)<>0 THEN LET ygyou=ygyou-0.02
IF pn => 3 AND insth(3,2)<>0 THEN PLOT TEXT ,AT 0.40,ygyou:"2層目"
IF pn => 3 AND insth(3,2)<>0 THEN PLOT TEXT ,AT 0.49,ygyou:ins$(insm(3,2))
IF pn => 3 AND insth(3,2)<>0 THEN PLOT TEXT ,AT 0.62,ygyou,USING"###":insth(3,2)
IF pn = 4 THEN LET ygyou=ygyou-0.02
IF pn = 4 THEN PLOT TEXT ,AT 0.15,ygyou:"配管  4"
IF pn = 4 THEN PLOT TEXT ,AT 0.28,ygyou,USING"###": pipe(ps(4),1)
IF pn = 4 THEN PLOT TEXT ,AT 0.40,ygyou:"1層目"
IF pn = 4 THEN PLOT TEXT ,AT 0.49,ygyou:ins$(insm(4,1))
IF pn = 4 THEN PLOT TEXT ,AT 0.62,ygyou,USING"###":insth(4,1)
IF pn = 4  AND insth(4,2)<>0 THEN LET ygyou=ygyou-0.02
IF pn = 4  AND insth(4,2)<>0 THEN PLOT TEXT ,AT 0.40,ygyou:"2層目"
IF pn = 4  AND insth(4,2)<>0 THEN PLOT TEXT ,AT 0.49,ygyou:ins$(insm(4,2))
IF pn = 4  AND insth(4,2)<>0 THEN PLOT TEXT ,AT 0.62,ygyou,USING"###":insth(4,2)
LET ygyou=ygyou-0.02*2
PLOT TEXT ,AT 0.25,ygyou:"保温筒内径   保温筒外径     Re      αc     αr      α    "
LET ygyou=ygyou-0.02
PLOT TEXT ,AT 0.15,ygyou:"配管  1"
PLOT TEXT ,AT 0.27,ygyou,USING"%.###        %.###     ######    ###.#    ##.#     ###.# ":kekka(1,12),kekka(1,13),kekka(1,7),kekka(1,8),kekka(1,9),kekka(1,8)+kekka(1,9)
IF insth(1,2)<>0 THEN  LET ygyou=ygyou-0.02
IF insth(1,2)<>0 THEN  PLOT TEXT ,AT 0.27,ygyou,USING"%.###        %.###":kekka(1,13),kekka(1,14)
IF pn => 2 THEN LET ygyou=ygyou-0.02
IF pn => 2 THEN PLOT TEXT ,AT 0.15,ygyou:"配管  2"
IF pn => 2 THEN PLOT TEXT ,AT 0.27,ygyou,USING"%.###        %.###     ######    ###.#    ##.#     ###.# ":kekka(2,12),kekka(2,13),kekka(2,7),kekka(2,8),kekka(2,9),kekka(2,8)+kekka(2,9)
IF pn => 2 AND insth(2,2)<> 0 THEN LET ygyou=ygyou-0.02
IF pn => 2 AND insth(2,2)<> 0 THEN PLOT TEXT ,AT 0.27,ygyou,USING"%.###        %.###":kekka(2,13),kekka(2,14)
IF pn => 3 THEN LET ygyou=ygyou-0.02
IF pn => 3 THEN PLOT TEXT ,AT 0.15,ygyou:"配管  3"
IF pn => 3 THEN PLOT TEXT ,AT 0.27,ygyou,USING"%.###        %.###     ######    ###.#    ##.#     ###.# ":kekka(3,12),kekka(3,13),kekka(3,7),kekka(3,8),kekka(3,9),kekka(3,8)+kekka(3,9)
IF pn => 3 AND insth(3,2)<>0 THEN LET ygyou=ygyou-0.02
IF pn => 3 AND insth(3,2)<>0 THEN PLOT TEXT ,AT 0.27,ygyou,USING"%.###        %.###":kekka(3,13),kekka(3,14)
IF pn = 4 THEN LET ygyou=ygyou-0.02
IF pn = 4 THEN PLOT TEXT ,AT 0.15,ygyou:"配管  4"
IF pn = 4 THEN PLOT TEXT ,AT 0.27,ygyou,USING"%.###        %.###     ######    ###.#    ##.#     ###.# ":kekka(4,12),kekka(4,13),kekka(4,7),kekka(4,8),kekka(4,9),kekka(4,8)+kekka(4,9)
IF pn = 4 AND insth(4,2)<>0 THEN LET ygyou=ygyou-0.02
IF pn = 4 AND insth(4,2)<>0 THEN PLOT TEXT ,AT 0.27,ygyou,USING"%.###        %.###":kekka(4,13),kekka(4,14)
LET ygyou=ygyou-0.02*3
PLOT TEXT ,AT 0.25,ygyou:"  Rth1    Rth2    Rth3     Rth     hloss     Pr      θmid      θf"
LET ygyou=ygyou-0.02
PLOT TEXT ,AT 0.25,ygyou:"                          C'm/W     W/m      W/m       C'        C' "
LET ygyou=ygyou-0.02
PLOT TEXT ,AT 0.15,ygyou:"配管  1"
PLOT TEXT ,AT 0.26,ygyou,USING"##.##   ##.##    %.##    ##.##    ###.#    ###.#    ###.#    ###.#    ##.##":Rth(1,1),Rth(1,2),Rth(1,3),Rth(1,4),(maint-ambi)/Rth(1,4),(maint-ambi)/Rth(1,4)*df/eff,kekka(1,11),kekka(1,10)-273
LET ygyou=ygyou-0.02
IF pn => 2 THEN PLOT TEXT ,AT 0.15,ygyou:"配管  2"
IF pn => 2 THEN PLOT TEXT ,AT 0.26,ygyou,USING"##.##   ##.##    %.##    ##.##    ###.#    ###.#    ###.#    ###.#    ##.##":Rth(2,1),Rth(2,2),Rth(2,3),Rth(2,4),(maint-ambi)/Rth(2,4),(maint-ambi)/Rth(2,4)*df/eff,kekka(2,11),kekka(2,10)-273
LET ygyou=ygyou-0.02
IF pn => 3 THEN PLOT TEXT ,AT 0.15,ygyou:"配管  3"
IF pn => 3 THEN PLOT TEXT ,AT 0.26,ygyou,USING"##.##   ##.##    %.##    ##.##    ###.#    ###.#    ###.#    ###.#    ##.##":Rth(3,1),Rth(3,2),Rth(3,3),Rth(3,4),(maint-ambi)/Rth(3,4),(maint-ambi)/Rth(3,4)*df/eff,kekka(3,11),kekka(3,10)-273
LET ygyou=ygyou-0.02
IF pn = 4 THEN PLOT TEXT ,AT 0.15,ygyou:"配管  4"
IF pn = 4 THEN PLOT TEXT ,AT 0.26,ygyou,USING"##.##   ##.##    %.##    ##.##    ###.#    ###.#    ###.#    ###.#    ##.##":Rth(4,1),Rth(4,2),Rth(4,3),Rth(4,4),(maint-ambi)/Rth(4,4),(maint-ambi)/Rth(4,4)*df/eff,kekka(4,11),kekka(4,10)-273
REM ********** 配管データ **********
REM  si     d2        t      di
DATA 15 , 0.0217 , 0.0028 , 0.034
DATA 20 , 0.0272 , 0.0029 , 0.034
DATA 25 , 0.034  , 0.0034 , 0.0427
DATA 32 , 0.0427 , 0.0036 , 0.0486
DATA 40 , 0.0486 , 0.0037 , 0.0605
DATA 50 , 0.0605 , 0.0039 , 0.0763
DATA 65 , 0.0763 , 0.0052 , 0.0891
DATA 80 , 0.0891 , 0.0055 , 0.1016
DATA 90 , 0.1016 , 0.0057 , 0.1143
DATA 100, 0.1143 , 0.0060 , 0.1398
DATA 125, 0.1398 , 0.0066 , 0.1652
DATA 150, 0.1652 , 0.0071 , 0.1910
DATA 200, 0.2163 , 0.0082 , 0.2419
DATA 250, 0.2674 , 0.0093 , 0.2930
DATA 300, 0.3185 , 0.0103 , 0.3370
DATA 350, 0.3556 , 0.0111 , 0.3810
DATA 400, 0.4064 , 0.0127 , 0.4320
DATA 450, 0.4572 , 0.0143 , 0.4830
DATA 500, 0.5080 , 0.0151 , 0.5330
REM *********************************
REM ********** 保温材データ **********
DATA clc13-300 , clc13-800 , clc22-300 , clc22-800 , gwc
DATA Ts1260    , rwc100    , rwc600    , Ts5120    , daipa
REM ********** 保温材熱伝導率 **********
REM     r1         r2         r3
DATA 0.04070 , 1.28E-04 , 0
DATA 0.05550 , 2.05E-05 , 1.93E-07
DATA 0.05350 , 1.16E-04 , 0
DATA 0.06120 , 3.38E-05 , 1.95E-07
DATA 0.03330 , 1.21E-04 , 6.56E-07
DATA 0.11000 , -1.40E-04, 2.60E-07
DATA 0.03140 , 1.74E-04 , 0
DATA 0.04070 , 1.16E-04 , 7.67E-07
DATA 0.02470 , 1.14E-04 , 7.55E-08
DATA 0.05550 , 2.05E-05 , 1.93E-07
REM ***********************************
END
 

配管保温計算

 投稿者:ちゃとら  投稿日:2018年12月 3日(月)12時07分15秒
  配管の保温計算を行うプログラムを作成しましたので投稿させて頂きます。

白石様、しばっち様、nagram様 有り難うございました。

その2

REM *****************************************************************
MODULE aa                        ! モジュール名 aa
REM SET WINDOW 0,1.0,0,1.0
SHARE NUMERIC n
LET n=6                               !対象気体数      6種類  N2,O2,CO2,CO,He,Air
REM TK                                !絶対温度    K
REM Pa                                !圧力  パスカル
SHARE NUMERIC  rho(7)                 !各気体の密度
SHARE NUMERIC  CP(7)                  !  〃    定圧比熱
SHARE NUMERIC CVv(7)                  !  〃    定容比熱
SHARE NUMERIC CPO(7)                  !  〃    定圧分子熱
SHARE STRING  n$(6)                   !気体名称    N2  ,  O2  ,  CO2  ,  CO  ,  He  ,  Air
SHARE NUMERIC mwp(6)                  !質量分率    重量%
SHARE NUMERIC mw(6)                   !分子量      molecular weight
REM Mave                              !平均モル質量
SHARE NUMERIC Xmol(7)                 !モル数
SHARE NUMERIC Xmolb(6)                !モル分率(体積分率)
SHARE NUMERIC mu(7)                   !粘性係数
SHARE NUMERIC phi(6,6)                !粘性係数計算係数
SHARE NUMERIC phix(6,6)
SHARE NUMERIC nu(7)                   !動粘性係数
SHARE NUMERIC alpha(7)                !温度伝導率
SHARE NUMERIC Pr(7)                   !プラントル数
SHARE NUMERIC kk(6)
SHARE NUMERIC lambda(7)               !熱伝導率
SHARE NUMERIC Tc(6)                   !臨界温度    critical temperature
SHARE NUMERIC Pc(6)                   !臨界圧力    critical pressure
SHARE NUMERIC zeta(6)                 !偏心因子
SHARE NUMERIC Ac0(6)                  !Ac0         定圧分子熱の推算式に於ける係数
SHARE NUMERIC Bc0(6)                  !Bc0              〃              〃
SHARE NUMERIC Cc0(6)                  !Cc0              〃              〃
SHARE NUMERIC Dc0(6)                  !Dc0              〃              〃
SHARE NUMERIC Ac1(6)                  !Ac1         定圧比熱の推算式に於ける係数
SHARE NUMERIC Bc1(6)                  !Bc1              〃              〃
SHARE NUMERIC Cc1(6)                  !Cc1              〃              〃
SHARE NUMERIC Dc1(6)                  !Dc1              〃              〃
SHARE NUMERIC Ac2(6)                  !Ac2         定容比熱の推算式に於ける係数
SHARE NUMERIC Bc2(6)                  !Bc2              〃              〃
SHARE NUMERIC Cc2(6)                  !Cc2              〃              〃
SHARE NUMERIC Dc2(6)                  !Dc2              〃              〃
SHARE NUMERIC shiguma (6)             ! σ          各成分気体の特性直径
SHARE NUMERIC epsilonk(6)             ! ε/k        各成分気体の特性エネルギー
SHARE NUMERIC ohmv(6)                 ! Ωv         粘性の衝突積分
SHARE NUMERIC ohmd(8)                 ! Ωd         拡散の衝突積分
SHARE NUMERIC Av,Bv,Cv,Dv,Ev,Fv,Ad,Bd,Cd,Dd,Ed,Fd,Gd,Hd
REM       N2        O2        CO2       CO        He        Air
DATA      N2   ,    O2   ,    CO2  ,    CO   ,    He   ,    Air
DATA  28.0134  ,31.999   ,44.010   ,28.010   ,4.0026   ,28.964   !molecular weight 分子量
DATA    126.2  ,154.6    ,304.2    ,132.9    ,5.19     ,132.5    !Tc               臨界温度    K
DATA     33.5  ,50.1     ,72.8     ,34.5     ,2.24     ,37.2     !Pc               臨界圧力    atm  760mmhg  101325Pa
DATA    0.040  ,0.021    ,0.225    ,0.049    ,-0.387   ,0        !ζ   zeta        偏心因子
DATA    7.440  ,6.713    ,4.728    ,7.373    ,0        ,0        !Ac0              定圧分子熱の推算式に於ける係数
DATA   -0.324  ,-8.79E-5 ,1.754    ,-0.307   ,0        ,0        !Bc0(×10^-2)          〃              〃
DATA    6.400  ,4.170    ,-13.38   ,6.662    ,0        ,0        !Cc0(×10^-6)          〃              〃
DATA   -2.790  ,-2.544   ,4.097    ,-3.037   ,0        ,0        !Dc0(×10^-9)          〃              〃
DATA  0.938314 ,0.817026 ,0.618542 ,0.929207 ,0        ,0.905673 !Ac1              定圧比熱の推算式に於ける係数
DATA  2.95732  ,3.87124  ,9.43157  ,3.43656  ,0        ,3.10391  !Bc1(×10^-4)          〃              〃
DATA -7.31507  ,-14.1476 ,-39.2290 ,-10.0711 ,0        ,-8.59483 !Cc1(×10^-8)          〃              〃
DATA  5.81796  ,19.9678  ,54.4078  ,10.1493  ,0        ,8.56212  !Dc1(×10^-12)         〃              〃
DATA  0.656848 ,0.547045 ,0.396046 ,0.641668 ,0        ,0.625027 !Ac2              定容比熱の推算式に於ける係数
DATA  2.46015  ,4.12982  ,10.5300  ,3.13564  ,0        ,2.89050  !Bc2(×10^-4)          〃              〃
DATA -3.16796  ,-16.1964 ,-48.3891 ,-7.57080 ,0        ,-6.76530 !Cc2(×10^-8)          〃              〃
DATA -3.91928  ,24.6892  ,75.8699  ,4.29183  ,0        ,4.17504  !Dc2(×10^-12)         〃              〃
DATA  3.798    ,3.467    ,3.941    ,3.690    ,2.551    ,3.711    !σ               各成分気体の特性直径
DATA  71.4     ,106.7    ,195.2    ,91.7     ,10.22    ,78.6     !ε/k                     と特性エネルギー
REM     Av        Bv        Cv        Dv        Ev        Fv      Ωv              粘性の衝突積分
DATA  1.16145  ,0.14874  ,0.52487  ,0.77320  ,2.16178  ,2.43787  !
REM     Ad        Bd        Cd        Dd        Ed        Fd        Gd        Hd         !Ωd    拡散の衝突積分
DATA  1.06036  ,0.15610  ,0.19300  ,0.47635  ,1.03587  ,1.52996   ,1.76474  ,3.89411     !
REM *******************************************************************
REM *           定数の読み込み                                        *
REM *******************************************************************
FOR i=1 TO n
   READ n$(i)
NEXT i
FOR i=1 TO n
   READ mw(i)
NEXT i
FOR i=1 TO n
   READ Tc(i)
NEXT i
FOR i=1 TO n
   READ Pc(i)
NEXT i
FOR i=1 TO n
   READ zeta(i)
NEXT i
FOR i=1 TO n
   READ Ac0(i)
NEXT i
FOR i=1 TO n
   READ Bc0(i)
   LET Bc0(i)=Bc0(i)*1E-2
NEXT i
FOR i=1 TO n
   READ Cc0(i)
   LET Cc0(i)=Cc0(i)*1E-6
NEXT i
FOR i=1 TO n
   READ Dc0(n)
   LET Dc0(i)=Dc0(i)*1E-9
NEXT i
FOR i=1 TO n
   READ Ac1(i)
NEXT i
FOR i=1 TO n
   READ Bc1(i)
   LET Bc1(i)=Bc1(i)*1E-4
NEXT i
FOR i=1 TO n
   READ Cc1(i)
   LET Cc1(i)=Cc1(i)*1E-8
NEXT i
FOR i=1 TO n
   READ Dc1(i)
   LET Dc1(i)=Dc1(i)*1E-12
NEXT i
FOR i=1 TO n
   READ Ac2(i)
NEXT i
FOR i=1 TO n
   READ Bc2(i)
   LET Bc2(i)=Bc2(i)*1E-4
NEXT I
FOR i=1 TO n
   READ Cc2(i)
   LET Cc2(i)=Cc2(i)*1E-8
NEXT i
FOR i=1 TO n
   READ Dc2(i)
   LET Dc2(i)=Dc2(i)*1E-12
NEXT i
FOR i=1 TO n
   READ shiguma(i)
NEXT i
FOR i=1 TO n
   READ epsilonk(i)
NEXT i

READ Av
READ Bv
READ Cv
READ Dv
READ Ev
READ Fv
READ Ad
READ Bd
READ Cd
READ Dd
READ Ed
READ Fd
READ Gd
READ Hd


EXTERNAL SUB airpro(k,rho7,cp7,mu7,nu7,lambda7,alpha7,pr7)

   REM *****************************************************
   REM *     各気体の質量分率=重量%を入力                *
   REM *****************************************************
   REM PRINT"各気体の重量%を入力してください"
   REM DO WHILE mwp(1)+mwp(2)+mwp(3)+mwp(4)+mwp(5)+mwp(6)<>100
   REM    INPUT PROMPT"N2 , O2 , CO2 , CO , He , Air":mwp(1),mwp(2),mwp(3),mwp(4),mwp(5),mwp(6)
   REM LOOP
   LET mwp(1)=0
   LET mwp(2)=0
   LET mwp(3)=0
   LET mwp(4)=0
   LET mwp(5)=0
   LET mwp(6)=100
   LET Mkongou=0
   FOR i=1 TO n
      IF mwp(i)<>0 THEN
         LET Mkongou=(mwp(i)/100/mw(i))+Mkongou
      END IF
   NEXT i
   LET Mkongou=1/Mkongou                                    ! 混合気体の分子量
   FOR i = 1 TO n
      IF mwp(i)<>0 THEN
         LET Xmolb(i)=Mkongou/mw(i)*mwp(i)                  ! 体積分率の計算
      END IF
   NEXT i
   FOR i=1 TO n
      LET Xmol(i)=mwp(i)/mw(i)
   NEXT i
   REM *****************************************************
   REM *     圧力、温度の設定                              *
   REM *****************************************************
   REM PRINT"計算条件  温度(℃) , 圧力を指示してください。"
   REM INPUT PROMPT"    T  C'   ,    P  atm      ":T,Patm      !T  C' : T  ℃      P  atm  : P 気圧
   LET T=k
   LET Patm=1.0
   LET TK=T+273.15                                         !TK    :  絶対温度  K
   LET Pa=Patm*101325                                      !Pa    :  パスカル
   REM PRINT TK ;"K  " ; TK-273.15;"C'  ";Pa;"Pa  "
   REM *****************************************************
   REM *     密度の計算  kg/m^3                            *
   REM *****************************************************
   LET rho(7)=0
   FOR i=1 TO n
      LET rho(i)=Pa*mw(i)/8.314/TK/1000
      LET rho(7)=rho(i)*Xmolb(i)/100+rho(7)
   NEXT i
   LET rho7=rho(7)
   REM *****************************************************
   REM *    定圧比熱の計算   KJ/kgK                        *
   REM *****************************************************
   LET CP(7)=0
   FOR i=1 TO n
      IF i=5 THEN
         LET CP(i)=5193/1000
      ELSE
         LET CP(i)=Ac1(i)+Bc1(i)*TK+Cc1(i)*TK^2+Dc1(i)*TK^3
      END IF
      LET CP0=CP(i)*Xmolb(i)/100+CP0
   NEXT i
   REM PRINT CP0
   REM LET Mmix=0
   REM FOR i=1 TO n
   REM    LET Mmix=mw(i)*Xmolb(i)/100+Mmix
   REM NEXT i
   REM PRINT Mmix
   LET CP(7)=CP0
   LET cp7=cp(7)
   REM ****************************************************
   REM *    粘性率の計算     Pa・s                        *
   REM ****************************************************
   FOR i=1 TO  n
      LET tdot=TK/epsilonk(i)
      IF i=5 THEN
         IF  TK>1100 THEN
            LET visc =Av/tdot^Bv
         ELSE
            LET visc=Av/tdot^Bv+Cv/EXP(Dv*tdot)
         END IF
         LET mu(i)=26.69*SQR(mw(i)*TK)/shiguma(i)^2/visc*1E-7*1E6
      ELSE
         LET ohmv(i)=(Av/tdot^Bv+Cv/EXP(Dv*tdot)+Ev/EXP(Fv*tdot))
         LET mu(i)=26.69*SQR(mw(i)*TK)/shiguma(i)^2/ohmv(I)*1E-7*1E6
      END IF
   NEXT i
   LET mu(7)=0
   FOR i=1 TO n
      FOR j=1 TO n
         IF mwp(j)<>0 THEN
            IF mwp(i)<>0 THEN
               LET phi(i,j)=(1+(mu(i)/mu(j))^0.5*(mw(j)/mw(i))^0.25)^2/(8*(1+mw(i)/mw(j)))^0.5
            END IF
         END IF
      NEXT j
   NEXT i
   LET ZZ=0
   FOR i=1 TO n
      IF mwp(i)<>0 THEN
         LET Z=0
         FOR j= 1 TO n
            IF mwp(j)<>0 THEN
               LET Z=Z+xmolb(j)*phi(i,j)
            END IF
         NEXT j
         LET ZZ=ZZ+Xmolb(i)*mu(i)/Z
      END IF
   NEXT i
   LET mu(7)=ZZ
   LET mu7=mu(7)
   REM ***************************************************
   REM *    熱伝導率の計算  mW/mK                        *
   REM ***************************************************
   FOR i=1 TO n
      LET CVv(i)=Ac2(i)+Bc2(i)*TK+Cc2(i)*TK^2+Dc2(i)*TK^3
      LET tdot=TK/epsilonk(i)
      IF i=5 THEN
         LET CVv(i)=3114
         IF  TK > 1100 THEN
            LET Ohmvh=Av/tdot^Bv
         ELSE
            LET ohmvh=Av/tdot^Bv+Cv/EXP(Dv*tdot)
         END IF
         LET lambdahe=2.669*SQR(mw(i)*TK)/shiguma(i)^2/ohmvh*1E-7*1E6
         LET lambda(i)=(1.32*CVv(i)*mw(i)*0.001/4.186+3.52)*lambdahe/mw(i)*4.186*10
      ELSE
         LET lambda(i)=(1.32*CVv(i)*mw(i)/4.186+3.52)*mu(i)/mw(i)*4.186
      END IF
   NEXT i
   LET lambda(7)=0
   FOR i=1 TO n
      FOR j=1 TO n
         IF mwp(j)<>0 THEN
            IF mwp(i)<>0 THEN
               LET phi(i,j)=(1+(lambda(i)/lambda(j))^0.5*(mw(j)/mw(i))^0.25)^2/(8*(1+mw(i)/mw(j)))^0.5
            END IF
         END IF
      NEXT j
   NEXT i
   LET ZZ=0
   FOR i=1 TO n
      IF mwp(i)<>0 THEN
         LET Z=0
         FOR j= 1 TO n
            IF mwp(j)<>0 THEN
               LET Z=Z+xmolb(j)*phi(i,j)
            END IF
         NEXT j
         LET ZZ=ZZ+Xmolb(i)*lambda(i)/Z
      END IF
   NEXT i
   LET lambda(7)=ZZ
   LET lambda7=lambda(7)
   REM *************************************************
   REM *    動粘性係数    mm^2/s                       *
   REM *************************************************
   FOR i= 1TO 7
      IF rho(i)<>0 THEN
         LET nu(i)=mu(i)/rho(i)
      END IF
   NEXT i
   LET nu7=nu(7)
   REM *************************************************
   REM *    温度伝導率    mm^2/s                       *
   REM *************************************************
   FOR i=1 TO 7
      IF Rho(i)<> 0 THEN
         LET alpha(i)=lambda(i)/rho(i)/CP(I)
      END IF
   NEXT i
   LET alpha7=alpha(7)
   REM *************************************************
   REM *    プラントル数                                   *
   REM *************************************************
   FOR i=1TO 7
      IF alpha(i)<>0 THEN
         LET Pr(i)=nu(i)/alpha(i)
      END IF
   NEXT i
   LET pr7=pr(7)
   REM *************************************************
   REM *    計算結果  打ち出し                         *
   REM *************************************************
   REM PLOT TEXT ,AT 0.05,0.95 ,USING "温度、圧力           絶対温度  ---%.# K    摂氏  ---%.# ℃      圧力  -%.##MPa           ":TK,T,Pa/1000000
   REM PLOT TEXT ,AT 0.05,0.90:"                       N2         O2        CO2         CO         He        Air "
   REM PLOT TEXT ,AT 0.05,0.88 ,USING "質量分率     ##    ---%.#     ---%.#     ---%.#     ---%.#     ---%.#     ---%.#   ":"%",mwp(1),mwp(2),mwp(3),mwp(4),mwp(5),mwp(6)
   REM PLOT TEXT ,AT 0.05,0.86 ,USING "モル数    n mol    ---%.##    ---%.##    ---%.##    ---%.##    ---%.##    ---%.##":Xmol(1),Xmol(2),Xmol(3),Xmol(4),Xmol(5),Xmol(6)
   REM PLOT TEXT ,AT 0.05,0.84 ,USING "体積分率     ##    ---%.##    ---%.##    ---%.##    ---%.##    ---%.##    ---%.##":"%",Xmolb(1),Xmolb(2),Xmolb(3),Xmolb(4),Xmolb(5),Xmolb(6)
   REM PLOT TEXT ,AT 0.05,0.80 ,USING "混合気体分子量       ---%.##":Mkongou
   REM PLOT TEXT ,AT 0.05,0.76: "                       N2         O2        CO2         CO         He         Air        Mix"
   REM PLOT TEXT ,AT 0.05,0.74 ,USING "密度  ######         -%.####    -%.####    -%.####    -%.####    -%.####    -%.####    -%.####":"kg/m^3",rho(1),rho(2),rho(3),rho(4),rho(5),rho(6),rho(n+1)
   REM PLOT TEXT ,AT 0.05,0.72 ,USING "定圧比熱  ######     -%.####    -%.####    -%.####    -%.####    -%.####    -%.####    -%.####":"KJ/kgK",CP(1),CP(2),CP(3),CP(4),CP(5),CP(6),CP(n+1)
   REM PLOT TEXT ,AT 0.05,0.70 ,USING "粘性率の計算 ###### --%.##     --%.##     --%.##     --%.##     --%.##     --%.##      --%.##":"uPa.s",mu(1),mu(2),mu(3),mu(4),mu(5),mu(6),mu(n+1)
   REM PLOT TEXT ,AT 0.05,0.68 ,USING "動粘性係数 #####   ---%.##    ---%.##    ---%.##    ---%.##    ---%.##    ---%.##    ---%.##":"mm2/s",nu(1),nu(2),nu(3),nu(4),nu(5),nu(6),nu(n+1)
   REM PLOT TEXT ,AT 0.05,0.66 ,USING "熱伝導率  #####    ---%.##    ---%.##    ---%.##    ---%.##    ---%.##    ---%.##    ---%.##":"mW/mK",lambda(1),lambda(2),lambda(3),lambda(4),lambda(5),lambda(6),lambda(n+1)
   REM PLOT TEXT ,AT 0.05,0.64 ,USING "温度伝導率  #####  ---%.##    ---%.##    ---%.##    ---%.##    ---%.##    ---%.##    ---%.##":"mm2/s",alpha(1),alpha(2),alpha(3),alpha(4),alpha(5),alpha(6),alpha(n+1)
   REM PLOT TEXT ,AT 0.05,0.62 ,USING "プラントル数             -%.####    -%.####    -%.####    -%.####    -%.####    -%.####    -%.####":Pr(1),Pr(2),Pr(3),Pr(4),Pr(5),Pr(6),Pr(n+1)

END SUB
END MODULE
 

戻る