How to get the u, ux and uy while solving a parabolic PDE?
조회 수: 2 (최근 30일)
이전 댓글 표시
Hello all,
I'm trying to solve a parabolic PDE, which the coefficients may depend on location, time and its partial derivatives.
According to the standard parabolic form in Matlab, the coefficients c, a, f and d need to be prepared. From the Matlab document http://www.mathworks.co.uk/help/pde/ug/scalar-coefficients-in-string-form.html, the coefficients can be written in the "string form" with their dependences:
c = 'pde_coeff_c(x,y,t)';
a = 'pde_coeff_a(x,y,t)';
f = 'pde_coeff_f(x,y,t,u,ux,uy)';
d = 1;
with all the corresponding functions.
Boundary condition and geometry are exported from PDE toolbox GUI as myBoundaryMatrix and myGeomMatrix. Therefore, the mesh is generated as:
[p,e,t] = initmesh(myGeomMatrix, 'hmax', 0.03);
Initial condition u0 is initialised as:
u0 = 0;
and time sequence as:
tlist = 0:0.1:1;
Finally, call the parabolic solver:
u = parabolic(u0,tlist,myBoundaryMatrix,p,e,t,c,a,f,d);
With these configurations, I can successfully use the x, y and t variables to organise my coefficients like c and a. However, I cannot use the u, ux or uy while constructing coefficient f. The u, ux and uy are always empty matrices.
I believe the parabolic coefficients should be able to use u, ux and uy, as mentioned in http://www.mathworks.co.uk/help/pde/ug/pde-coefficients.html:
In all cases, the coefficients d, c, a, and f can be functions of position (x and y) and the subdomain index. For all cases except eigenvalue, the coefficients can also depend on the solution u and its gradient. And for parabolic and hyperbolic equations, the coefficients can also depend on time.
Thank you.
Best Regards,
Bowen
댓글 수: 0
채택된 답변
Bill Greene
2012년 11월 24일
Hi,
Are you by any chance using a version of MATLAB older than R2012b? The capability to have coefficients in parabolic (and hyperbolic) analyses that depend on u, ux, and uy is new in that version of the product.
Bill
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Eigenvalue Problems에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!