Can I solve a system of nolinear parabolic PDE using PDE toolbox in MATLAB?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have a system of two parabolic PDEs with c coefficient of second equation as a function of solution of both first and second equation. I defined c coefficient as a function handle, but getting error: Function handle specifying a coefficient must accept two input arguments and return one output argument.
My function handle is: function c = ccofficient(region,state)
Dref = 2.592e-5; % reference humidity diffucion coefficient in m^2/day alpha = 0.05; % represents Dh,min/Dh,max n = 10; % characterises spread of the drop in Dh U = 25; % activation energy of moisture diffusion process in kJ/mol Tref = 23; % Reference temperature at which Dh,ref measured te = 28; % hydration period of concrete in days hc = 0.75; % value of pore relative humidity at which Dh drops halfway between Dh,max and Dh,min. R = -0.03056; % gas constant in Joule/(mol^oC) t = state.time; n1 = 2; nr = numel(region.x); c = zeros(n1,nr); c(1,:) = k*ones(1,n1); c(2,:) = Dref*(alpha+(1-alpha)+(1+((1-state.u(:,2,t))/(1-hc)).^n))*exp(U/R*(1/Tref-1/(state.u(:,1,t))))... *0.3+(13/te).^0.5;
Kindly suggest me how to write function handle for this type of nonlinear parabolic system of PDE.
3 commentaires
Réponse acceptée
Ravi Kumar
le 14 Avr 2017
Hi Aditi,
This error generally indicates that the function for c, ccoefficient, did not return a output value. This could be due to a syntax error in the function. You can insert a breakpoint in the function and step through the code to identify the line containing error.
Regards,
Ravi
4 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Eigenvalue Problems dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!