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

Cosmetic changes.

parent 1fee104a
No related branches found
No related tags found
No related merge requests found
......@@ -68,7 +68,9 @@ for i = 1:length(T)
csvwrite(['sol_X73_', num2str(x0(i)), '.csv'], T_diff_x0(i).sol(:, :));
end
%% Frank's/Stefano via Laplace transform vs Fokker Planck
%% %%%%%% Frank's/Stefano via Laplace transform vs Fokker Planck %%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
t = linspace(0, 10, 1000);
tic
T_mov = Ternary_model(0, 'Gauss', {-6, b(7/3, 10^-15), 0.5, e(7/3),...
......@@ -105,7 +107,10 @@ for i = 1:100%length(T_mov.t)
% print([num2str(i),'.png'],'-dpng')
shg; pause();
end
%% Moving boundary
%% %%%%%%%%%%%%%%%%%%% MOVING BOUNDARY TIME COURSE %%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
t = linspace(0, 10, 9000);
tic
T_mov = Ternary_model(0, 'phi_tot', {-10, b(7/3, 10^-6), 0.5, e(7/3),...
......@@ -140,7 +145,10 @@ s_dot(i) = sum(diff(T_mov.x).*f.^2./(g0.*u_interp));
end
csvwrite([s, 'Mov_Bou_Flux.csv'], [x_interp; f])
csvwrite([s, 'Mov_Bou_Entr.csv'], [T_mov.t; s_dot])
%% FRAP jump length
%% %%%%%%%%%%%%%%%%%%%%%% FRAP TIME COURSE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
t = linspace(0, 5, 300);
T_mov = Ternary_model(0, 'FRAP', {-5, b(7/3, 10^-6), 0.5, e(7/3),...
0, 1, 10, 7, 0, 'Constituent'}, t, 0.2);
......@@ -187,25 +195,25 @@ T_prec(5).plot_sim('plot', 10, 'blue');
%% Check whether partitioning factor is kept throughout simulation.
% This should work for steep boundaries.
for i = 1:4
pks_min = findpeaks(-T_prec(5).sol(i, :));
pks_max = findpeaks(T_prec(5).sol(i, :));
pks_max(1)/pks_min(1)
pks_min = findpeaks(-T_prec(5).sol(i, :));
pks_max = findpeaks(T_prec(5).sol(i, :));
pks_max(1)/pks_min(1)
end
%% Solve integrals for jump length distribution @ steady state.
% Set parameters
%% %%%%%%%%%%%%%%%%% STEADY STATE JUMP LENGTH DISTRIBUTION %%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
params = {-5, b(7.7/3, 10^-6), 0.5, e(7.7/3), 0, 1, 10, 7, 0, 'Constituent'};
t = [0, 0.05, 0.1];
x0 = 5.0:0.002:7.01;
%% Run simulations with 'delta' IC across outside
T = {};
parfor i = 1:length(x0)
tic
T{i} = Ternary_model(0, 'Gauss', params, t, 0.2);
T{i}.x0 = x0(i);
T{i}.solve_tern_frap();
toc
tic
T{i} = Ternary_model(0, 'Gauss', params, t, 0.2);
T{i}.x0 = x0(i);
T{i}.solve_tern_frap();
toc
end
% save prob_laplace_X_7_7_short_2
%% Calculate probabilities for each jump length in ls.
......@@ -213,7 +221,7 @@ ls = 0.0005:0.005:2;
p = nan(1, length(ls));
tic
parfor i = 1:length(ls)
p(i) = int_prob(ls(i), T, x0, 0);
p(i) = int_prob(ls(i), T, x0, 0);
end
toc
%% Test integrals
......
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