フィルターのクリア

Spatial source for diffusion equation

1 回表示 (過去 30 日間)
Stéphane
Stéphane 2016 年 6 月 13 日
コメント済み: Torsten 2016 年 6 月 14 日
Hi all, I would like to solve a diffusion equation -d^2n/dx^2 = S(x) in 1D between -L < x < +L, with a spatial source term, for instance "1" between -0.1L < x < 0.1L and 0 elsewhere. I'm a bit confused by the structure of pdepe. And I can't find an example with a source term.
Can anybody help me ?
Thanks a lot
Stéphane

回答 (1 件)

Torsten
Torsten 2016 年 6 月 14 日
Just take pencil and paper and integrate n''(x)=S(x) twice with respect to x.
If you don't succeed, use bvp4c instead of pdepe since your equation is stationary.
Best wishes
Torsten.
  2 件のコメント
Stéphane
Stéphane 2016 年 6 月 14 日
Thanks a lot for your advice on bvp4c.
I can't see how a pencil will help me for learning matlab syntax of pdepe... Should I use it for pressing the keys on the keyboard ?
Best wishes
Stéphane
Torsten
Torsten 2016 年 6 月 14 日
I don't know if the equation you have in mind is more complex than the one you wrote above. But integrating a piecewise constant function (S(x)) twice is a task I usually accompish without computer support.
Best wishes
Torsten.

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

カテゴリ

Help Center および File ExchangeQuadratic Programming and Cone Programming についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by