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

Adding peaked initial conditions to ternary FRAP. Also adding figure comparing...

Adding peaked initial conditions to ternary FRAP. Also adding figure comparing time course with steady state.
parent aa4c9dd8
No related branches found
No related tags found
No related merge requests found
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
a = -50; a = -50;
b = 0.025; b = 0.025;
c = 1/10000; c = 1/100;
u0 = 0.05; u0 = 0.05;
e = 0.4; e = 0.4;
...@@ -22,7 +22,7 @@ x = [linspace(49.0, g_inv(2), 30), g_inv(3:end-2), ... ...@@ -22,7 +22,7 @@ x = [linspace(49.0, g_inv(2), 30), g_inv(3:end-2), ...
tic tic
% x = [linspace(49.0, 49.8, 30), linspace(49.81, 50.2, 1000), ... % x = [linspace(49.0, 49.8, 30), linspace(49.81, 50.2, 1000), ...
% linspace(50.21, 51, 30) linspace(51.01, 200, 600)]; % linspace(50.21, 51, 30) linspace(51.01, 200, 600)];
t = linspace(0.001, 1, 100); t = linspace(0.001, 4, 500);
fh_ic = @(x) flory_ic(x, a, u0); fh_ic = @(x) flory_ic(x, a, u0);
fh_bc = @(xl, ul, xr, ur, t) flory_bc(xl, ul, xr, ur, t, u0); fh_bc = @(xl, ul, xr, ur, t) flory_bc(xl, ul, xr, ur, t, u0);
fh_pde = @(x, t, u, dudx) flory_hugg_pde(x, t, u, dudx, a, b, e, c, u0); fh_pde = @(x, t, u, dudx) flory_hugg_pde(x, t, u, dudx, a, b, e, c, u0);
...@@ -39,7 +39,16 @@ for i = 1:length(t) ...@@ -39,7 +39,16 @@ for i = 1:length(t)
plot(x, sol(i, :), 'LineWidth', 2); pause(0.06); plot(x, sol(i, :), 'LineWidth', 2); pause(0.06);
% % print([num2str(i),'.png'],'-dpng') % % print([num2str(i),'.png'],'-dpng')
end end
%% Figures
% Time course
figure; hold on;
xlim([49, 53]); ylim([0, 0.5]);
ax = gca;
ax.FontSize = 16;
xlabel('position'); ylabel('volume fraction');
plot(x, sol(1:2:300, :), 'LineWidth', 2, 'Color', [135/255 204/255 250/255]);%[0 0.4470 0.7410]
plot(x, phi_tot(x, a, b, e, u0), 'LineWidth', 4, 'LineStyle', '--', 'Color', [247/255, 139/255, 7/255]);
print('/Users/hubatsch/ownCloud/Dropbox_Lars_Christoph/DropletFRAP/FRAP_paper/ternary_time_course', '-depsc');
%% Plot and check derivatives of pt %% Plot and check derivatives of pt
figure; hold on; figure; hold on;
x = linspace(40, 60, 100000); x = linspace(40, 60, 100000);
...@@ -64,13 +73,12 @@ s = 0; ...@@ -64,13 +73,12 @@ s = 0;
end end
function u = flory_ic(x, a, u0) function u = flory_ic(x, a, u0)
if x < -a % FRAP initial condition
u = 0.0; % if x < -a; u = 0.0; else; u = u0; end
else % Peak outside initial condition
u = u0; if (x < -a+0.2) && (x > -a+0.1); u = 10; else; u = 0; end
end % u = 0.3;
% u0 = 0.3; % u = phi_tot(x, -50, 1);
% u0 = phi_tot(x, -50, 1);
end end
function [pl,ql,pr,qr] = flory_bc(xl, ul, xr, ur, t, u0) function [pl,ql,pr,qr] = flory_bc(xl, ul, xr, ur, t, u0)
......
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