This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/l/shanlin/anaconda3/bin/python | |
import numpy as np | |
import pandas as pd | |
from pandas import DataFrame | |
print("Read results of jamming cases.\n") | |
path= 'log.jamP' | |
ReadLines= open(path,'r') | |
data = [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
""" | |
Created on Wed Nov 22 13:43:04 2017 | |
@author: forest | |
""" | |
# Generate the particle size which has a log-normal distribution with mean value (ln(d50)) and standard deviation sigma(ln((d85/d16)**0.5)) | |
import numpy as np |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/gnuplot | |
# gnuplot model | |
# created by forest, 2018. 03. 11 | |
reset | |
#set term png | |
#set output 'epsilon_0.png' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# clear all contents | |
import sys | |
sys.modules[__name__].__dict__.clear() | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from math import log | |
from math import e |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# plot the analytical solutions | |
print("Calculate the analytical value of T") | |
x = np.arange(0,Lx,0.001) | |
Ta = np.zeros(len(x)) | |
for i in range(len(x)): | |
Ta[i]=Ts+q_prime/k/2*(Lx**2-x[i]**2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/l/shanlin/anaconda3/bin/python | |
print("Read results of jamming cases.\n") | |
path = 'Results.txt' | |
ReadLines= open(path,'r') | |
data = [] | |
for line in ReadLines.readlines():#Results = ReadLines.readlines() | |
Results = [x.strip() for x in line.split(None)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set term png # background "#ffffff" enhanced fontscale 1.0 size 640, 480 dashlength 2 | |
set output 'PressureCompareFixedP.png' | |
# set style line 1 linecolor rgb "red" linewidth 3.000 pointsize default pointinterval 0 | |
# set style line 2 linecolor rgb "orange" linewidth 2.000 pointsize default pointinterval 0 | |
# set style line 3 linecolor rgb "yellow" linewidth 3.000 pointsize default pointinterval 0 | |
# set style line 4 linecolor rgb "green" linewidth 2.000 pointsize default pointinterval 0 | |
#set offsets 0.05, 0.05, 0, 0 | |
#set style function linespoints | |
#unset xtics | |
# set xtics 0.01 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
""" | |
Created on Fri Jan 19 11:23:45 2018 | |
@author: forest | |
""" | |
import numpy | |
import matplotlib.pyplot as plt | |
from matplotlib.patches import Ellipse, Circle |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# include <iostream> | |
using namespace std; | |
int i, j = 0; | |
int nP = 0; | |
int main() | |
{ | |
int reduceNumberFactor; | |
cout <<"test the arithmetic operation"<<endl; | |
cout << "Enter a reduceNumberFactor:" <<endl; | |
cin >> reduceNumberFactor; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
""" | |
Created on Wed Nov 22 13:43:04 2017 | |
@author: forest | |
""" | |
# Generate the particle size which has a log-normal distribution with mean value (ln(d50)) and standard deviation sigma(ln((d85/d16)**0.5)) | |
import numpy as np |
NewerOlder