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

Experimental initial conditions now possible. Not correct for outside.

parent 5213047b
No related branches found
No related tags found
No related merge requests found
......@@ -19,7 +19,7 @@ if strcmp(mode, 'mov')
plot(T.x, T.sol(i, :), 'LineWidth', 2);
text(abs(-T.a+2), 0.7, num2str(T.t(i)));
shg
% pause();
pause();
% print([num2str(i),'.png'],'-dpng')
end
elseif strcmp(mode, 'plot')
......
......@@ -17,8 +17,8 @@ function [c, f ,s] = flory_hugg_pde(x, t, u, dudx, a, b, e, u0,...
pt = Ternary_model.phi_tot(x, a, b, e, u0);
gra_a = Ternary_model.gradient_analytical(x, a, b, e);
% g0 = Ternary_model.gamma0(x, a, b, e_g0, u_g0);
g0 = 1;
g0 = Ternary_model.gamma0(x, a, b, e_g0, u_g0);
% g0 = 1;
c = 1;
f = g0*(1-pt)/pt*(pt*dudx-u*gra_a);
s = 0;
......@@ -42,6 +42,14 @@ elseif strcmp(ic, 'Gauss')
else
u = 0;
end
elseif isnumeric(ic)
% use ic as initial condition by interpolating the given values between
% 0 and a
if x < -a
u = interp1(linspace(0, -a, length(ic)), ic, x);
else
u = u0-e;
end
else
disp('Initial condition not supported');
end
......
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