Error using Time dependant Boundary Conditions with PDEPE
Afficher commentaires plus anciens
I have defined a system of six pde equations to solve a diffussion model. As boundary condition on the right side I need to introduce experimental values that are differerent for each time and cannot be adjusted to a curve. Thus, they have to be introduce as a vector of numbers.... Is this possible??
My code for the Boundary Conditions is the following:
function [pl,ql,pr,qr] = pdebc(xl,ul,xr,ur,t) % Boundary Conditions
global data Nt
pl = [0; 0; 0; 0; 0; 0];
ql = [1; 1; 1; 1; 1; 1];
pr = [data(1,t)-ur(1); data(2,t)-ur(2); data(3,t)-ur(3); data(4,t)-ur(4); (data(2,t)+data(3,t)+2*data(4,t))-ur(5); (data(1,1)-data(1,t)-data(2,t)-data(3,t)-data(4,t))-ur(6)];
qr = [0; 0; 0; 0; 0; 0];
end
In the previous code, the matrix "data" contains the experimental data of 4 of the dependant variables. The BC for the last two dependant variables in the term "pr" can be calculated from the other.
Any help would be great. Thanks!
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Numerical Integration and Differentiation dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


