Azzera filtri
Azzera filtri

Integration of exiting flow using PDEPE

1 visualizzazione (ultimi 30 giorni)
Dom
Dom il 3 Ott 2018
Commentato: Dom il 9 Ott 2018
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 Commenti
Torsten
Torsten il 4 Ott 2018
Please supply the model equations, initial and boundary conditions in a mathematical notation.
Dom
Dom il 9 Ott 2018
Hi Torsten, thank your for your reply,
c = [1;1];
f = D*DuDx; % D being a constant diffusion coefficient
s = 0;
for the ic:
u1=1;
u2=0;
i hope this is sufficient for my purpose. My big issues have been the outer bcs pr and qr. I try to implement two equations.
1: ur=c_bluk
with c_bulk being the concentration of an adjacent area, which has the following ic:
ic_bulk: u1_bulk=0;
u2_bulk=1;
My second condition is a constant flux going from the inner area to the outer area and vice versa.
f=-D*DuDx % Du=c_bulk-ur
Unfortunatly my mathematical understanding is not sufficient to put this into a single bc and make it look like i want it to look like.

Accedi per commentare.

Risposte (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by