Integration of exiting flow using PDEPE
1 次查看(过去 30 天)
显示 更早的评论
Hi, i am currently working on possible solutions for a system of two components A and B, with A slowly diffusing out of the inner circle and B diffusing into it, resulting in an equally mixed solution inside and outside. So far, this has been my approach:
function [pl,ql,pr,qr] = pdexbc(xl,ul,xr,ur,t)
global ur_development
global t_development
global n_bulk_development
if numel(t_development)>1
while numel(t_development)>=1 && t<=t_development(end)
t_development = t_development(:,1:end-1);
n_bulk_development = n_bulk_development(:,1:end-1);
end
end
setup = initialize_setup();
t_development = [t_development,t];
n_bulk = setup.n_bulk;
if length(t_development(1,:))>=2
n_bulk=n_bulk_development(:,end);
n_bulk_propagation=n_bulk+(t_development(:,end)-t_development(:,end- 1)).*((-n_bulk./setup.V_bulk+ur).*setup.D_i.*(xr^2*pi*4/3));
n_bulk=n_bulk_propagation;
end
n_bulk_development =[n_bulk_development,n_bulk];
pr = -n_bulk./setup.V_bulk+ur;
qr = zeros(setup.index_molecules(end),1);
end
So far, i tried to implement the changning amount of substance in the outer area(n_bulk) by using a discrete approach: n_bulk(t)=n_bulk(t-1)+delta_t*(ur-c_bulk)*D*A in order to change the concentration at the outer boundary, which has not worked, the way i hoped. So my question would be, if you have an alternative idea, for example by using qr for the diffusion, while integrating over the outgoing flux.
Any help would be greatly appreciated.
2 个评论
Torsten
2018-10-4
Please supply the model equations, initial and boundary conditions in a mathematical notation.
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!