From 45e9b8bbf75a1812f4485f4564fe3863f3a1f6e8 Mon Sep 17 00:00:00 2001 From: Lars Hubatsch <hubatsch@pks.mpg.de> Date: Tue, 8 Sep 2020 12:02:26 +0200 Subject: [PATCH] Fluxes can be mapped by stretching and scaling. --- @Ternary_model/create_mesh.m | 2 +- prob_laplace.m | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/@Ternary_model/create_mesh.m b/@Ternary_model/create_mesh.m index fed4a54..bfcaafd 100644 --- a/@Ternary_model/create_mesh.m +++ b/@Ternary_model/create_mesh.m @@ -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); diff --git a/prob_laplace.m b/prob_laplace.m index 2c4a3c0..d656563 100644 --- a/prob_laplace.m +++ b/prob_laplace.m @@ -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)); -- GitLab