Solving a system of PDE, not on the same control volume

2 ビュー (過去 30 日間)
Bar
Bar 2013 年 12 月 7 日
編集済み: Bar 2013 年 12 月 12 日
Hello, i'm trying to solve a problem similar to the one in the attached photo(not the same one...but the same concept): a system of parabolic PDEs, like the heat transfer problem between different materials. how can i do it with MATLAB? from what i understood, PDEPE can solve a system, but only on the same control volume. any other ideas?
i'll thanks your help in implementing a solution of my problem
Thanks, in advance! Bar
  2 件のコメント
Mohammad Monfared
Mohammad Monfared 2013 年 12 月 7 日
Do you have access to PDE toolbox?
Bar
Bar 2013 年 12 月 8 日
yes

サインインしてコメントする。

採用された回答

Bill Greene
Bill Greene 2013 年 12 月 10 日
Your pdefun function should look something like this:
function [c,f,s] = pdefun(x,t,u,DuDx)
if(x < L)
k = alpha1;
else
k = alpha2;
end
c=1;
f = k*DuDx;
s=0;
end
I probably should also mention that you should experiment with different mesh densities because the mesh affects the accuracy of the pdepe solution. But that recommendation applies whether you have continuous or discontinuous coefficients.
Bill
  2 件のコメント
Bar
Bar 2013 年 12 月 10 日
it works! thanks man. i'll see if i don't get into some more obstacles while using the more complex equations i have.
Bar
Bar 2013 年 12 月 12 日
編集済み: Bar 2013 年 12 月 12 日
Bill, one more question: what if i have a fixed value of u in one point (in the middle, not BC)?
i changed the draw - now it will explain the problem better.
i'm modeling mass transfer between liquid and gas. and in the interface between two part (x=L), i know that i have a fixed value of the concentration, due to liquid-vapor equilibrium. thus, from the left side of x=L (boundary of my left subdomain,the gas), i know the value of the concentration.
it also causes discontinuity in the value of C - as the concentration in the gas phase in much lower. it's like there is a jump in the water concentration right above a water cup bewteen the concetraion in the cup and the humidity abouve it - but there is a flux beteen those two (hope this example helped and did not confuse)
how can i solve this one?
Thanks, Bar

サインインしてコメントする。

その他の回答 (1 件)

Bill Greene
Bill Greene 2013 年 12 月 7 日
Hi,
There is no difficulty using pdepe to solve your equation. You define xmesh over the full 2L length and, for best results, you want to define the number of elements in xmesh so that there is a node point at x=L. Beyond that, in your pdefun function, you just define the flux in terms of a1 if x<L and a2 if x>L.
Bill
  3 件のコメント
Bill Greene
Bill Greene 2013 年 12 月 9 日
By flux term, I simply mean the f output from pdefun. This is the heat flux in your example-- either alpha_1*dT/dx or alpha_2*dT/dx. The only boundary conditions to be specified are at x=0 and x=2L.
Bill
Bar
Bar 2013 年 12 月 10 日
i understand, but how do i define the different alpha, that change at x=L?

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeEigenvalue Problems についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by