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

Fixing c_p. Adding plot of boundary condition for unbleached.

parent 6176e3d6
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,7 @@
% conditions are introduced. Integration of model via pdepe.
pa = '/Users/hubatsch/ownCloud/Dropbox_Lars_Christoph/DropletFRAP/FRAP_paper/';
a = -1;
b = 0.025;
b = 0.000025;
u0 = 0.05;
e = 0.4;
e_g0 = 0.16;
......@@ -26,7 +26,7 @@ tic
t = linspace(0, 50, 250);
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,...
fh_pde = @(x, t, u, dudx) flory_hugg_pde(x, t, u, dudx, a, b, e, u0,...
e_g0, o_g0);
sol = pdepe(2, fh_pde, fh_ic, fh_bc, x, t);
toc
......@@ -39,9 +39,14 @@ for i = 1:length(t)
xlabel('position'); ylabel('volume fraction');
plot(x, phi_tot(x, a, b, e, u0), 'LineWidth', 2, 'LineStyle', '--');
plot(x, sol(i, :), 'LineWidth', 2);
% pause();
print([num2str(i),'.png'],'-dpng')
shg
pause();
% print([num2str(i),'.png'],'-dpng')
end
%% Boundary condition: Jump makes sense
[~, ind] = min(abs(x+a)); % Find x position of boundary
plot(max(sol(:, 1:ind-1), [], 2)./min(sol(:, ind+1:end), [], 2), 'LineWidth', 2)
make_graph_pretty('time', 'ratio outside/inside', 'unbleached component');
%% Figures
% Time course
figure; hold on;
......@@ -79,7 +84,7 @@ plot(s(1:2:100, :)', 'Color', [0.12156 0.4666666 0.7058823], 'LineWidth', 1.
make_graph_pretty('$x [\mu m]$', 'intensity [a.u.]', '');
print('Timecourse_model_only.png','-dpng')
%% Function definitions for pde solver
function [c, f ,s] = flory_hugg_pde(x, t, u, dudx, a, b, e, c_p, u0,...
function [c, f ,s] = flory_hugg_pde(x, t, u, dudx, a, b, e, u0,...
e_g0, o_g0)
% Solve with full ternary model. Analytical derivatives.
% pt ... phi_tot
......
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