diffusion from point source boundary conditions

7 ビュー (過去 30 日間)
Juliana
Juliana 2022 年 7 月 20 日
編集済み: Juliana 2022 年 7 月 25 日
I am using MATLAB's pdepe partial diffeq solver to solve diffusion of a solute. I have a point source at r=0 where there should be intake of solute (so a sink, or negative source). if i use the "s" variable for the solver, does this input it at r=0, or for every value of r? if the latter, then should i incorporate the source term in my BC somehow?
any help is appreciated. thanks.

採用された回答

Torsten
Torsten 2022 年 7 月 20 日
編集済み: Torsten 2022 年 7 月 20 日
if i use the "s" variable for the solver, does this input it at r=0, or for every value of r?
For every value of r (at least if you don't restrict s to special r-values by an if-statement).
if the latter, then should i incorporate the source term in my BC somehow?
The boundary condition at r=0 must be dc/dr = 0 - all other boundary conditions will be ignored.
In my opinion, you have two options:
Define a sphere with a hole in the middle of a certain radius and set the sink term in the boundary conditions part of the code as a flux over the inner surface (mol/(m^2*s)) or
Define a volume source in the s-term (mol/m^3*s) and restrict it to a specified inner radius:
rmin = ...;
if r <= rmin
s = ...
end
In either case: These are difficult error-prone and numerically challenging settings and you should verify your results by making a global molar or mass balance.
  12 件のコメント
Torsten
Torsten 2022 年 7 月 25 日
編集済み: Torsten 2022 年 7 月 25 日
Setting s = -20*u(1) means that a 1st order reaction takes places that consumes u at a rate -20*u.
I don't understand what you mean by "u(last value)". The "last value" is always the "actual value", and this actual value is taken when you set s = -20*u(1). If the source term depends on a concentration in the past (u(t-tau) for some tau > 0), you have a delay PDE. Such a construct cannot be solved with pdepe.
What doesn't look right to you ? The concentration profile ?
Juliana
Juliana 2022 年 7 月 25 日
編集済み: Juliana 2022 年 7 月 25 日
i see, youre right its the same as u(1), but yeah i would expect the concentration profile to look much different, but i guess im wrong idk

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangePartial Differential Equation Toolbox についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by