I am trying to solve a following problem: (1+2/(1+q(x,t))^2) * dq(x,t)/dt=D*d/dx(dq(x,t)/dx)
In a published paper, I found that it is solved by Solve initial-boundary value problems for parabolic-elliptic PDEs in 1-D. But the complication comes the q(x,t) is outside the derivative. I don't found any example for this kind of problem. However, I tried few way but failed.
I appreciate any help

 채택된 답변

Torsten
Torsten 2016년 6월 27일
편집: Torsten 2016년 6월 27일

0 개 추천

Set the coefficient c in "pdepe" to 1+2./(1+u.^2).
Best wishes
Torsten.

댓글 수: 3

Md Masum Billah
Md Masum Billah 2016년 6월 27일
thanks. I did this way and it works.
Mohammed Thaiki
Mohammed Thaiki 2016년 12월 1일
Hello ; I have a problem with a heat transfer script, below the script:
clear all; x=linspace(0,.01,50);%We use 50 values from 0 to 0.01 t=linspace(0,1,60);%We used 60 points from 0 to 1 m=0; sol=pdepe(m,@ecuation,@initialcond,@boundary,x,t) u=sol(:,:,1); % Surface plot command and data surf(x,t,u) colormap([gray]) xlabel('\delta (m)') ylabel('L (m)') zlabel('C_a (M)') shading interp figure for j=1:length(t) plot(x,u(j,:),'k') xlabel('\delta (m)') ylabel('C_a (M)') hold on end
and the three files :
1. @ecuation function [c,f,s]=ecuation(x,t,u,DuDx) c=2*0.5*((x/0.01)-0.5*(x/0.01)^2)/2.1e-5;%term (C) f=DuDx;%Flow term (F) s=0;%source term (S)
2. @initialcond %Initial conditions. function u0=initialcond(x) u0=0;
3. @boundary %Boundary conditions. function [pl,ql,pd,qd]=boundary(xl,ul,xd,ud,t) %for y = 0 pl=0; ql=1; %%for y = δ pd=ur-.1; qd=0;
MATLAB gives error in line :
sol=pdepe(m,@ecuation,@initialcond,@boundary,x,t)
I am waiting for your ideas to solve this problem thank you
Torsten
Torsten 2016년 12월 2일
Please format your code with the {} button.
At present, it's unreadable.
Best wishes
Torsten.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

질문:

2016년 6월 24일

댓글:

2016년 12월 2일

Community Treasure Hunt

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

Start Hunting!

Translated by