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

Now also with fixed concentration on right boundary. Need to do left boundary properly.

parent 8f4f49d6
No related branches found
No related tags found
No related merge requests found
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
%% Solve pde %% Solve pde
x = linspace(49, 80, 700); x = linspace(49, 80, 700);
t = linspace(0, 6, 1000); t = linspace(0, 100, 1000);
sol = pdepe(0, @flory_hugg_a, @flory_ic, @flory_bc, x, t); sol = pdepe(0, @flory_hugg_a, @flory_ic, @flory_bc, x, t);
%% Plotting %% Plotting
figure(1); hold on; figure(1); hold on;
for i = 1:500 for i = 1:500
cla; xlim([49, 52]); ylim([0, 1.5]); cla; xlim([49, 53]); ylim([0, 1.5]);
plot(x, phi_tot(x, -50, 0.25)); plot(x, sol(i, :)); pause(0.01); plot(x, phi_tot(x, -50, 0.25)); plot(x, sol(i, :)); pause(0.01);
end end
...@@ -46,8 +46,12 @@ end ...@@ -46,8 +46,12 @@ end
function [pl,ql,pr,qr] = flory_bc(xl,ul,xr,ur,t) function [pl,ql,pr,qr] = flory_bc(xl,ul,xr,ur,t)
pl = 0; pl = 0;
ql = 1; ql = 1;
pr = 0;%ur - 0.01; % % No flux
qr = 1; % pr = 0;%ur - 0.01;
% qr = 1;
% Dirichlet BC
pr = ur- 0.3;
qr = 0;
end end
function p = phi_tot(x, a, b) function p = phi_tot(x, a, b)
......
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