From 78f30ac48cee1248795a579a0eb7d1492f28b25d Mon Sep 17 00:00:00 2001 From: PratipRana Date: Wed, 10 Jul 2019 12:31:04 -0400 Subject: [PATCH] 5-8 molecules dohne --- code/Simulation/plot_phase.m | 12 ++++++++++++ code/Simulation/sim_model_prl.py | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 code/Simulation/plot_phase.m diff --git a/code/Simulation/plot_phase.m b/code/Simulation/plot_phase.m new file mode 100644 index 0000000..48883ef --- /dev/null +++ b/code/Simulation/plot_phase.m @@ -0,0 +1,12 @@ +%plot the phase diagram + +T = readtable('dataSimulation8.csv') +res = table2array(T(:,6:end)) + +[argvalue, argmax] = max(res'); + +res2 = reshape(argmax,[20,18]) +imagesc([0.5:0.2:4],[0.1:0.2:4], res2) +xlabel('\tau') +ylabel('T') +saveas(gcf,'phase8.png') \ No newline at end of file diff --git a/code/Simulation/sim_model_prl.py b/code/Simulation/sim_model_prl.py index f4a5069..e1ad50f 100644 --- a/code/Simulation/sim_model_prl.py +++ b/code/Simulation/sim_model_prl.py @@ -90,8 +90,8 @@ def main_prl(N): # run for different parameter combination d=1; v=1; sigma=1 - t_range = np.arange(0.1,4,0.1) - tau_range = np.arange(0.5,4,0.1) + t_range = np.arange(0.1,4.01,0.2) + tau_range = np.arange(0.5,4.01,0.2) Data = np.zeros((len(t_range)*len(tau_range),5+N-1),dtype=float) res = Parallel(n_jobs=16)(delayed(sim)(N,d,v,sigma,i,j) for j in tau_range for i in t_range) res = np.array(res)