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

Correcting integral for total entropy production rate.

parent adb20417
No related branches found
No related tags found
No related merge requests found
......@@ -42,9 +42,9 @@ p_in = @(D_p, D_m, ga, x0, x, t) 1./(sqrt(pi*t)*(sqrt(D_m)+...
x_left = linspace(-4, 0, 1000);
x_right = linspace(0, 4, 1000);
%% Moving boundary
t = linspace(0, 10, 300);
t = linspace(0, 10, 900);
tic
T_mov = Ternary_model(0, 'Uniform', {-10, b(7/3, 10^-6), 0.5, e(7/3),...
T_mov = Ternary_model(0, 'phi_tot', {-10, b(7/3, 10^-6), 0.5, e(7/3),...
0, 1, 10, 7, 0.5, 'Client'}, t, 0.02);
T_mov.solve_tern_frap();
toc
......@@ -62,12 +62,13 @@ 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 = -g0*(dudx+chi_phi.*u_interp.*gra_a);
s_dot(i) = sum(x_interp.*f.^2./(g0.*u_interp));
s_dot(i) = sum(diff(T_mov.x).*f.^2./(g0.*u_interp));
% figure(1); 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, -5.2, 0.1])
% make_graph_pretty(['x [' char(956) 'm]'], 'flux', '', [0, 11, -15.2, 0.1])
% pause()
end
s = '~/Nextcloud/Langevin_vs_MeanField/Data_Figs_FokkPla/';
csvwrite([s, 'Mov_Bou_Flux.csv'], [x_interp; f])
......@@ -93,7 +94,7 @@ 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);
s_dot(i) = sum(x_interp.*f.^2./(g0.*(1-pt).*u_interp));
s_dot(i) = sum(diff(T_mov.x).*f.^2./(g0.*(1-pt).*u_interp));
% figure(1); hold on; cla;
% plot(x_interp, f)
% pause()
......
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