Billiald Experience

We are reproducing the billiald simulation in order to understand better our materials parameters.

The simulation was done using the Multi-Object Orientated Simuation Environment (MOOSE), and iterated over a range of values using a python script called billiald_simulation.py. The results where saved in a csv file that will here be extracted in order to be analyzed in compared to the simulation that can be found in Jordan's Billiald paper.


In [2]:
#Importing the libraries required (we will use the pandas library to play with the data

%matplotlib inline 

import numpy as np
import matplotlib.pyplot as plt
import matplotlib as mpl # this actually imports matplotlib
import matplotlib.cm as cm #allows us easy access to colormaps
import matplotlib.pyplot as plt #sets up plotting under plt
import pandas as pd
#sets up pandas table display
pd.set_option('display.width', 500)
pd.set_option('display.max_columns', 100)
pd.set_option('display.notebook_repr_html', True)

The data

The data is saved in a csv file with the following columns: [Alpha, Beta, DV1, ... DV9]

Where DV are the 9 voltages at which we simulated for each set of the material's property.


In [3]:
df4 = pd.read_csv("./data/T_4_lowV_alpha-0.02-1.98-step0.04_beta-81967213.1148.csv",header=None, names = ["alpha","beta","100nA","200nA","300nA",
                                                "400nA","500nA","600nA","700nA","800nA","900nA","1000nA"])
df4.head(2)


Out[3]:
alpha beta 100nA 200nA 300nA 400nA 500nA 600nA 700nA 800nA 900nA 1000nA
0 0.02 8.196721e+07 0.248575 0.307037 0.355682 0.398501 0.437119 0.472468 0.505176 0.535696 0.564374 0.591475
1 0.06 8.196721e+07 0.199837 0.235314 0.268435 0.298797 0.326644 0.352335 0.376208 0.398544 0.419572 0.439478

In [4]:
df5 = pd.read_csv("./data/T_5_lowV_alpha-3.7-5.65-step0.05_beta-81967213.1148.csv",header=None, names = ["alpha","beta","100nA","200nA","300nA",
                                                "400nA","500nA","600nA","700nA","800nA","900nA","1000nA"])
df5.head(2)


Out[4]:
alpha beta 100nA 200nA 300nA 400nA 500nA 600nA 700nA 800nA 900nA 1000nA
0 3.70 8.196721e+07 0.171767 0.176066 0.181788 0.188222 0.194951 0.201746 0.208490 0.215120 0.221609 0.227943
1 3.75 8.196721e+07 0.171741 0.175987 0.181649 0.188023 0.194697 0.201442 0.208139 0.214727 0.221178 0.227477

In [5]:
df6 = pd.read_csv("./data/T_6_alpha-28.0-34.9-step0.1_beta-81967213.1148.csv",header=None, names = ["alpha","beta","100nA","200nA","300nA",
                                                "400nA","500nA","600nA","700nA","800nA","900nA"])
df6.head(2)


Out[5]:
alpha beta 100nA 200nA 300nA 400nA 500nA 600nA 700nA 800nA 900nA
0 28.0 8.196721e+07 0.171094 0.173851 0.177630 0.181972 0.186583 0.191294 0.196010 0.200681 0.205281
1 28.1 8.196721e+07 0.171090 0.173838 0.177606 0.181937 0.186538 0.191239 0.195946 0.200609 0.205202

This code allows to look up at a certain value of the sink

Enter, the sink factor in alpha.


In [8]:
# Choose the index here:
index3 = 1
index4 = 10
index5 = 0
index6 = 1

## Power of 3 REQUIRES SIM TO WORK
#l3=df3.iloc[:,:].values
#Temp = l3[index3].flatten()[2:]
#
I3 = np.arange(100,1100,100)*1E-9
#T3 = [x-0.170 for x in Temp]
#trend = [np.power(i,1.6)*(3E-3/np.power((100E-9),1.6)) for i in I3]

# Power of 4
l4=df4.iloc[:,:].values
Temp4 = l4[index4].flatten()[2:]

I4 = np.arange(100,1100,100)*1E-9
T4 = [x-0.170 for x in Temp4]
trend4 = [np.power(i,1.6)*(3E-3/np.power((100E-9),1.6)) for i in I4]


# Power of 5

l5=df5.iloc[:,:].values
Temp5 = l5[index5].flatten()[2:]

I5 = np.arange(100,1100,100)*1E-9
T5 = [x-0.170 for x in Temp5]
trend5 = [np.power(i,1.6)*(3E-3/np.power((100E-9),1.6)) for i in I5]

# Power of 6
l6=df6.iloc[:,:].values
Temp6 = l6[index6].flatten()[2:]

I6 = np.arange(100,1000,100)*1E-9
T6 = [x-0.170 for x in Temp6]
trend = [np.power(i,1.6)*(3E-3/np.power((100E-9),1.6)) for i in I6]

In [9]:
f, axarr = plt.subplots(2, 2)
#axarr[0, 0].loglog(I, T,"o", basex=10)
axarr[0, 1].loglog(I4, T4,"o", basex=10)
axarr[0, 1].loglog(I4,trend4)
axarr[0, 1].set_title('Power of 4')

axarr[1, 0].loglog(I5, T5,"o", basex=10)
axarr[1, 0].loglog(I5,trend5)
axarr[1, 0].set_title('Power of 5')


Out[9]:
<matplotlib.text.Text at 0x110c10dd0>

In [25]:
## PLOTING ##
plt.close('all')
f, axarr = plt.subplots(2, 2)
#axarr[0, 0].loglog(I, T,"o", basex=10)
axarr[0, 0].loglog(I3,trend)
axarr[0, 0].set_title('Power of 3')

axarr[0, 1].loglog(I4, T4,"o", basex=10)
axarr[0, 1].loglog(I4,trend)
axarr[0, 1].set_title('Power of 4')

axarr[1, 0].loglog(I5, T5,"o", basex=10)
axarr[1, 0].loglog(I5,trend)
axarr[1, 0].set_title('Power of 5')

axarr[1, 1].loglog(I6, T6,"o", basex=10)
axarr[1, 1].loglog(I6,trend)
axarr[1, 1].set_title('Power of 6')
# Fine-tune figure; hide x ticks for top plots and y ticks for right plots
plt.setp([a.get_xticklabels() for a in axarr[0, :]], visible=False)
plt.setp([a.get_yticklabels() for a in axarr[:, 1]], visible=False)


# Print the values of the alphas 
#print "Alpha T^3 = " + str(l3[index3])
print "Alpha T^4 = " + str(l4[index4,0])
print "Alpha T^5 = " + str(l5[index5,0])
print "Alpha T^6 = " + str(l6[index6,0])


Alpha T^4 = 81967213.1148
Alpha T^5 = 3.1
Alpha T^6 = 28.1

In [ ]:


In [ ]: