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

Initial condition corrected to match proper client profile.

parent f77666c5
No related branches found
No related tags found
No related merge requests found
......@@ -9,6 +9,7 @@ si = size(T.sol);
if nargin < 3
nth = 1;
color = 'red';
start = 1;
end
if strcmp(mode, 'mov')
figure(20); hold on;
......
......@@ -38,7 +38,19 @@ elseif strcmp(ic, 'Gauss')
u = 0;
end
elseif strcmp(ic, 'phi_tot')
u = Ternary_model.phi_tot(x, a, 0.021282, 0.460977, u0, 0);
% This uses standard phi_tot profile, which is not correct for moving
% boundary with client
% u = Ternary_model.phi_tot(x, a, 0.021282, 0.460977, u0, 0);
% correct form of initial profile for moving boundary with client
chi = -4.530864768482371;
tern = @(x) Ternary_model.phi_tot(x, a, 0.021282, 0.460977, u0, 0);
exp_tern = @(x) exp(-chi*Ternary_model.phi_tot(x, a, 0.021282, 0.460977, u0, 0));
off = tern(200);
P = tern(-200)/tern(200);
A = (P-1)*off/(exp_tern(-200)-exp_tern(200));
B = off - A*exp_tern(200);
u = A*exp_tern(x)+B;
elseif isnumeric(ic)
% use ic as initial condition by interpolating the given values between
% 0 and a
......
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