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

Adding entropy change.

parent 97eb2c59
No related branches found
No related tags found
No related merge requests found
......@@ -72,11 +72,10 @@ 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);
T_mov.solve_tern_frap();
% csvwrite('FRAP.csv', [T_mov.x', T_mov.sol(1, :)', T_mov.sol(end, :)'])
csvwrite('FRAP.csv', [T_mov.x', T_mov.sol(1, :)', T_mov.sol(end, :)'])
%% Calculate fluxes FRAP
figure(1);
for i = 300:300
for i = 1:length(T_mov.t)
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,14 @@ 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);
hold on; cla;
plot(x_interp, f)
pause()
s_dot(i) = sum(x_interp.*f.^2./(g0.*(1-pt).*u_interp));
% figure(1); hold on; cla;
% plot(x_interp, f)
% pause()
end
s = '~/Nextcloud/Langevin_vs_MeanField/Data_Figs_FokkPla/FRAP_Flux.csv';
csvwrite(s, [x_interp; f])
s = '~/Nextcloud/Langevin_vs_MeanField/Data_Figs_FokkPla/';
% csvwrite([s, 'FRAP_Flux.csv'], [x_interp; f])
csvwrite([s, 'FRAP_entropy.csv'], [T_mov.t; s_dot]);
%% 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