Skip to content
Snippets Groups Projects
Commit 0d3c09bc authored by Lars Hubatsch's avatar Lars Hubatsch
Browse files

WIP: adapt for jumps in to in, out to out.

parent 142b034a
No related branches found
No related tags found
No related merge requests found
...@@ -22,7 +22,7 @@ classdef Ternary_model < handle ...@@ -22,7 +22,7 @@ classdef Ternary_model < handle
u0 = 0.05; u0 = 0.05;
e = 0.4; e = 0.4;
e_g0 = 0.16; % mobility spread. Also used in square mobility ansatz. e_g0 = 0.16; % mobility spread. Also used in square mobility ansatz.
ic_c = 0; % initial concentration inside droplet ic_c % initial concentration inside droplet
u_g0 = 0.2; u_g0 = 0.2;
system_size = 300; system_size = 300;
x0 = 1; % Center of Gauss initial condition x0 = 1; % Center of Gauss initial condition
......
function p = int_prob(l, T, x0, direc, ind_t, bp, ind_delta, T_mov) function p = int_prob(l, T, x0, direc, ind_t, bp, ind_delta, T_mov)
% direc ... change direction of jumps, 1: left->right, -1: right->left % direc ... change direction of jumps, 1: left->right, -1: right->left
% 2: left->left, -2: right->right
% ind_t ... time index at which propagators are evaluated % ind_t ... time index at which propagators are evaluated
% bp ... boundary position at t==ind_t % bp ... boundary position at t==ind_t
delta_x0 = diff(x0); delta_x0 = diff(x0);
...@@ -8,7 +9,11 @@ for i = 1:length(delta_x0) ...@@ -8,7 +9,11 @@ for i = 1:length(delta_x0)
x = (x0(i)+x0(i+1))/2; x = (x0(i)+x0(i+1))/2;
% 1. cond.: corr. starting point? 2. cond: jumped outside of domain? % 1. cond.: corr. starting point? 2. cond: jumped outside of domain?
corr_starting_point = direc*x < direc*bp; corr_starting_point = direc*x < direc*bp;
corr_end_point = direc*(x-l) > direc*(bp-T{i}.v*T{1}.t(ind_delta+1)); if abs(direc) == 1 % jump across the boundary?
corr_end_point = direc*(x-l) > direc*(bp-T{i}.v*T{1}.t(ind_delta+1));
elseif abs(direc) == 2 % jump within the same phase?
corr_end_point = direc*(x-l) < direc*(bp-T{i}.v*T{1}.t(ind_delta+1));
end
if corr_starting_point && corr_end_point if corr_starting_point && corr_end_point
if nargin==7 if nargin==7
p_i = @(j) interp1(T{j}.x, T{j}.sol(ind_t, :), x-l); p_i = @(j) interp1(T{j}.x, T{j}.sol(ind_t, :), x-l);
......
...@@ -399,10 +399,10 @@ end ...@@ -399,10 +399,10 @@ end
%% %%%%%%%%%%%%%%%%%%%%%% FRAP JUMP LENGTH DISTRIBUTION %%%%%%%%%%%%%%%%%%% %% %%%%%%%%%%%%%%%%%%%%%% FRAP JUMP LENGTH DISTRIBUTION %%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
params = {-5, b(7/3, 10^-6), 0.5, e(7/3), 0, 1, 10, 7, 0, 'Constituent'}; params = {-5, b(7/3, 10^-6), 0.5, e(7/3), 0, 1, 10, 7, 0, 'Constituent', 0};
t = linspace(0, 5, 51); t = linspace(0, 5, 51);
direc = 1; % 1: jump from left to right, -1: jump from right to left. direc = 1; % 1: jump from left to right, -1: jump from right to left.
x0 = sort(5-direc*(0:0.002:4.01)); x0 = sort(5-abs(direc)/direc*(0:0.002:4.01));
%% Run simulations for 'delta' IC across outside %% Run simulations for 'delta' IC across outside
F = {}; F = {};
parfor i = 1:length(x0) parfor i = 1:length(x0)
...@@ -415,7 +415,7 @@ end ...@@ -415,7 +415,7 @@ end
%% Calc. probs. for each jump length in ls and sum over time %% Calc. probs. for each jump length in ls and sum over time
T_mov = Ternary_model(0, 'FRAP', params, t, 0.2); T_mov = Ternary_model(0, 'FRAP', params, t, 0.2);
T_mov.solve_tern_frap(); T_mov.solve_tern_frap();
ls = -direc*(0.001:0.04:4); ls = -abs(direc)/direc*(0.001:0.04:4);
n_T=45; n_T=45;
p = nan(length(ls), n_T); p = nan(length(ls), n_T);
for j = 1:n_T for j = 1:n_T
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment