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

Changed sign of fluxes. Fluxes do not agree between Stefano/Lars.

parent ad18b356
No related branches found
No related tags found
No related merge requests found
......@@ -59,15 +59,14 @@ u_interp = (u(1:end-1)+u(2:end))/2;
gra_a = Ternary_model.gradient_analytical(x_interp, T_mov.a, T_mov.b,...
T_mov.e, T_mov.v*T_mov.t(i));
dudx = diff(u)./diff(T_mov.x);
f = dudx+chi_phi.*u_interp.*gra_a;
f = -dudx-chi_phi.*u_interp.*gra_a;
figure; hold on;
plot(0:10, zeros(1, 11), 'LineWidth', 2);
plot(x_interp, f, 'LineWidth', 2)
set(gca,'fontsize', 18)
make_graph_pretty(['x [' char(956) 'm]'], 'flux', '', [0, 10, -0.1, 5.2])
% breakyaxis([0.6, 4.5])
% s = '~/Nextcloud/Langevin_vs_MeanField/Data_Figs_FokkPla/Mov_Bou_Flux.csv';
% csvwrite(s, [x_interp; f])
make_graph_pretty(['x [' char(956) 'm]'], 'flux', '', [0, 10, -5.2, 0.1])
s = '~/Nextcloud/Langevin_vs_MeanField/Data_Figs_FokkPla/Mov_Bou_Flux.csv';
csvwrite(s, [x_interp; f])
%% FRAP jump length
t = linspace(0, 5, 300);
T_mov = Ternary_model(0, 'FRAP', {-5, b(7/3, 10^-6), 0.5, e(7/3),...
......@@ -77,7 +76,7 @@ T_mov.solve_tern_frap();
%% Calculate fluxes FRAP
figure(1);
for i = 1:300
for i = 300:300
x_interp = (T_mov.x(1:end-1)+T_mov.x(2:end))/2;
u = T_mov.sol(i, :);
u_interp = (u(1:end-1)+u(2:end))/2;
......@@ -88,12 +87,13 @@ gra_a = Ternary_model.gradient_analytical(x_interp, T_mov.a, T_mov.b,...
g0 = Ternary_model.gamma0(x_interp, T_mov.a+T_mov.v*T_mov.t(i), T_mov.b,...
T_mov.e_g0, T_mov.u_g0, T_mov.v*T_mov.t(i));
dudx = diff(u)./diff(T_mov.x);
f = g0.*(1-pt)./pt.*(pt.*dudx-u_interp.*gra_a);
f = -g0.*(1-pt)./pt.*(pt.*dudx-u_interp.*gra_a);
hold on; cla;
plot(x_interp, f)
pause()
end
csvwrite('FRAP_Flux.csv', [x_interp; f])
s = '~/Nextcloud/Langevin_vs_MeanField/Data_Figs_FokkPla/FRAP_Flux.csv';
csvwrite(s, [x_interp; f])
%% Plot with full ternary model
T_temp = T_mov;
D_m = 1*(1-T_temp.u0-T_temp.e); % to make equal to ternary FRAP
......
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