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!