In [1]:
# http://matplotlib.org/
import matplotlib.pyplot as plt
from matplotlib import ticker
%matplotlib inline
In [2]:
import numpy as np
In [3]:
from libocpy import *
In [4]:
tqini()
tqrpfil('database/Co_Chimad.TDB',('CO','NI','AL','W'))
In [5]:
element_name = tqgcom()
print "element name: ",element_name
In [6]:
number_phase = tqgnp()
print "# of phases: ",number_phase
In [7]:
phase_name = tqgpn()
print "phase name: ",phase_name
print len(phase_name)
In [8]:
tqsetc('N',0,1.)
tqsetc('P',0,1E5)
tqsetc('T',0,900)
tqsetc('X','NI',0.1)
tqsetc('X','AL',0.12)
tqsetc('X','W',0.15)
In [10]:
tqce()
In [11]:
phase_name = tqgpn()
for i in range(len(phase_name)):
print phase_name[i],tqgetv('NP',phase_name[i],'NA')
In [12]:
tqsetcs({'T':900,'P':1E5,'N':1.,'X(NI)':0.1,'X(AL)':0.12,'X(W)':0.15})
tqce()
phase_name = tqgpn()
for i in range(len(phase_name)):
print phase_name[i],tqgetv('NP',phase_name[i],'NA')
In [18]:
T = np.linspace(500,1500,50)
tqphsts("*","SUS",0.)
tqphsts("BCC","ENT",1.)
tqphsts("L12","ENT",1.)
In [21]:
GM_FCC = []
for i in range(len(T)):
tqsetc('T',0,T[i])
tqce()
GM_FCC.append(tqgetv('NP','BCC','NA'))
for i in range(len(T)):
print T[i],GM_FCC[i]
In [ ]: