概要
ライセンス
gnuplot code
English: All source code are also available same license as this file.
日本語: ソースコードはファイルと同じライセンスで利用可能です。
roscoe.plt
# parametric with p&v
set parametric
set dummy p,v
# constant
N = 2.5
lambda = 0.12
gamma = 2.45
M= 1.40
p0 = 200
#function
NCL(p) = N - lambda * log(p) # v
NCL_p(v) = exp((N - v)/lambda) # p
CSL1(p) = gamma - lambda * log(p) # v
CSL2(p) = M * p # q
CSL3(v) = M * exp((gamma-v)/lambda) # q
CSL1_p(v) = exp((gamma - v)/lambda) # p
CSL_CU_p(p0) = p0 * exp((gamma - N)/lambda)
CSL_CU_v(p0) = NCL(p0)
CSL_CU_q(p0) = CSL2(CSL_CU_p(p0))
CSL_CD_p(p0) = 1/(1-M/3.0) * p0
CSL_CD_v(p0) = CSL1(CSL_CD_p(p0))
CSL_CD_q(p0) = CSL2(CSL_CD_p(p0))
#other constant
vtics = 0.1
ptics = 100
qtics = 200
max_v = ceil(NCL(100) /vtics)*vtics
max_p = ceil(CSL_CD_p(300)/ptics)*ptics
max_q = ceil(CSL2(max_p) /qtics)*qtics
min_v = int(CSL1(max_p) * 0.98 /vtics)*vtics
min_p = 0
min_q = 0
max_x1 = max_p
max_x2 = max_v
min_x1 = -1
min_x2 = min_v
#range
set urange[min_x1:max_x1] # p
set vrange[min_x2:max_x2] # v
set xrange[min_v:max_v] # p
set yrange[min_p:max_p] # v
set zrange[min_q:max_q] # q
#ticslevel
set ticslevel 0
#label
set xlabel "v"
set ylabel "p'"
set zlabel "q"
#grid
set xtics vtics nomirror
set ytics ptics nomirror
set ztics qtics nomirror
set mxtics 2
set mytics 2
set mztics 2
set grid xtics ytics ztics mxtics mytics mztics front lt -1 lw 1, lt 0 lw 1
#border
unset border
# surface settings
set isosample 100
set view 60,120,1,1
# stress path
SP_p(p0, v) = p0 + (CSL_CD_p(p0) - p0) * (v - NCL(p0))/(CSL_CD_v(p0) - NCL(p0))
SP_v(p0, v) = (v > NCL(p0)) ? NCL(p0) : ((v < CSL_CD_v(p0))? CSL_CD_v(p0) : v)
SP_q(p0, v) = CSL_CD_q(p0) * (v - NCL(p0)) / (CSL_CD_v(p0) - NCL(p0))
# plot
splot SP_v(p, v), SP_p(p, SP_v(p, v)), SP_q(p, SP_v(p, v)) title "Roscoe" ls 2 lw 0.5, \
NCL(p), p, 0 title "NCL" ls 1 lw 3, \
CSL1(p), p, 0 notitle ls 3 lw 2, \
min_v, p, CSL2(p) notitle ls 3 lw 2, \
v, 0, CSL3(v) notitle ls 3 lw 2, \
CSL1(p), p, CSL2(p) title "CSL" ls 3 lw 3
# create gif
theta = 0
set terminal gif notransparent size 1280, 960 font "Times New Roman"
load "roscoe_loop.plt"
set output
set terminal wxt
roscoe_loop.plt
set view 60,theta,1,1
set output sprintf("roscoe%3d.gif", theta)
replot
theta = theta + 5
if(theta<360) reread