From 594c6e92530039989f8bbc8fa0e2fc572e4cb2c5 Mon Sep 17 00:00:00 2001 From: Lars Hubatsch <hubatsch@pks.mpg.de> Date: Wed, 15 Jan 2020 11:16:30 +0100 Subject: [PATCH] Adding peaked initial conditions to ternary FRAP. Also adding figure comparing time course with steady state. --- ternary_frap.m | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/ternary_frap.m b/ternary_frap.m index ac14a98..d726a84 100644 --- a/ternary_frap.m +++ b/ternary_frap.m @@ -5,7 +5,7 @@ a = -50; b = 0.025; -c = 1/10000; +c = 1/100; u0 = 0.05; e = 0.4; @@ -22,7 +22,7 @@ x = [linspace(49.0, g_inv(2), 30), g_inv(3:end-2), ... tic % x = [linspace(49.0, 49.8, 30), linspace(49.81, 50.2, 1000), ... % 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_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); @@ -39,7 +39,16 @@ for i = 1:length(t) plot(x, sol(i, :), 'LineWidth', 2); pause(0.06); % % print([num2str(i),'.png'],'-dpng') 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 figure; hold on; x = linspace(40, 60, 100000); @@ -64,13 +73,12 @@ s = 0; end function u = flory_ic(x, a, u0) - if x < -a - u = 0.0; - else - u = u0; - end -% u0 = 0.3; -% u0 = phi_tot(x, -50, 1); + % FRAP initial condition +% if x < -a; u = 0.0; else; u = u0; end + % Peak outside initial condition + if (x < -a+0.2) && (x > -a+0.1); u = 10; else; u = 0; end +% u = 0.3; +% u = phi_tot(x, -50, 1); end function [pl,ql,pr,qr] = flory_bc(xl, ul, xr, ur, t, u0) -- GitLab