Error using deval (line 132) - Attempting to evaluate the solution outside the interval where it is defined.

7 ビュー (過去 30 日間)
Using Partial Diff Eq Toolbox. System of 2 coupled DPE's, both parabolic, first one non-linear, both with 2 Dim mesh. Have used simplified numbers for Initial Cond and Bound Cond on this code snipet, reduced time scale. Having trouble when solvepde is reached:
Error using deval (line 132) - Attempting to evaluate the solution outside the interval [0.000000e+00, 2.146039e-20] where it is defined.
CODE:
function f = fcoeffunc_irradInt_cleavConc(location,state)
nr = length(state.ux(1,:)); % Number of columns
f = zeros(2,nr);
f(1,:) = state.ux(1,:);
end
function f = acoeffunc_irradInt_cleavConc(location,state)
f(1,:) = 2.3*state.u(1,:).*molarAbsorpt_specie.*state.ux(2,:); % coupling eq1 needs u of eq2, calculated on previous iteration
f(2,:) = state.ux(1,:).*cleavConc_factor.*state.ux(2,:); % coupling eq2 needs u of u1 of this same iteration
end
.............
model_polym_appr1_irradInt_cleavConc = createpde(2);
% Geometry
R_polim = [3,4,-1,1,1,-1,0,0,-2,-2]'; ... geometryFromEdges(model_polym_appr1_irradInt_cleavConc,geometry);
........
m=0;
d=1;
c=[2;3];
a=@acoeffunc_irradInt_cleavConc;
f=@fcoeffunc_irradInt_cleavConc;
specifyCoefficients(model_polym_appr1_irradInt_cleavConc,'m',m,'d',d,'c',c,'a',a,'f',f);
.....
applyBoundaryCondition(model_polym_appr1_irradInt_cleavConc,'dirichlet','Edge',1,'r',[1;1],'h',[1;1;1;1]);
applyBoundaryCondition(model_polym_appr1_irradInt_cleavConc,'neumann','Edge',3,'q',0,'g',[0;1]);
..
u0 = [1;1]; setInitialConditions(model_polym_appr1_irradInt_cleavConc,u0);
...
mesh_polym_appr2_photFlu = generateMesh(model_polym_appr1_irradInt_cleavConc, 'Hmax',mesh_Hmax);
figure;
pdemesh(model_polym_appr1_irradInt_cleavConc); axis equal
.....
tlist = linspace(0,0.0002,2);
result= solvepde(model_polym_appr1_irradInt_cleavConc,tlist);
r = result.NodalSolution;
--- THANK YOU

回答 (0 件)

カテゴリ

Help Center および File ExchangeGeneral PDEs についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by