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

Fluxes can be mapped by stretching and scaling.

parent 1885499d
No related branches found
No related tags found
No related merge requests found
......@@ -29,7 +29,7 @@ if strcmp(T.mode, 'Constituent')
% ceil((T.x(ind+20)-T.x(ind-20))*200)),...
% T.x(ind+21:end)];
% end
T.x = [linspace(0, 0.98, 100), linspace(0.9801, 1.02, 2000), linspace(1.021, 2, 100),...
T.x = [linspace(0, 0.98, 100), linspace(0.9801, 1.06, 2000), linspace(1.061, 2, 100),...
linspace(2.01, 10, 100), linspace(10.01, 300, 200)];
elseif strcmp(T.mode, 'Client')
T.x = linspace(0, 20, 24000);
......
......@@ -33,16 +33,22 @@ Tpt1 = Ternary_model(0, 'FRAP', {-1, b(7/3, 10^-18), 0.5, e(7/3),...
t, 0.3);
Tpt1.solve_tern_frap();
%% Calculate flux for Tpt1 at t=0
[dudx, x, sol, flux] = calc_flux(Tga1, 4);
[dudx1, x1, sol1, flux1] = calc_flux(Tpt1, 4);
fac = 3.58;
[dudx, x, sol, flux] = calc_flux(Tga1, 2);
[dudx1, x1, sol1, flux1] = calc_flux(Tpt1, 2);
figure; hold on; title('flux');
plot(x, flux);
plot(x1, 3.47*flux1);
plot(x1, fac*flux1);
axis([0.90, 1.11, 0, inf]);
figure; hold on; title('flux stretched');
plot(0.9*fac*(x-1), flux);
plot(x1-1, fac*flux1);
axis([-0.1, 0.11, 0, inf]);
figure; hold on; title('dudx');
plot(x, dudx);
plot(x1, 3.47*dudx1);
plot(x1, dudx1);
axis([0.99, 1.01, 0, inf]);
fluxratio = flux1./flux;
%%
% Rescale mobility, such that phi_tot=1 everywhere achieves same flux
Gi = 1;%(1-Tpt1.phi_t(1))/(1-Tpt1.phi_t(1));
......
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