Crank Nicolson method with convective and insulated boundary conditions

2 ビュー (過去 30 日間)
Mahyar Taghizade
Mahyar Taghizade 2021 年 11 月 29 日
回答済み: Alok Kumar 2022 年 4 月 20 日
Hi!
For one dimensional heat diffusion with Crank Nicolson method, I had trouble writing a code for convective boundary condition at x=L and insulated boundary condition at x=0.
I would really appreciate it if you can help me with these 2 boundary condition codes.
Thank you in advance!
  1 件のコメント
Mahyar Taghizade
Mahyar Taghizade 2021 年 11 月 29 日
This is the code for my boundary conditions.
and this is the error I get:

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

回答 (1 件)

Alok Kumar
Alok Kumar 2022 年 4 月 20 日
leaving -u(n+1,k); shift all other variables to the right hand side of the equals sign
-u(n+1,k)= -u(n,k) -w.*u(n,k)+w.*q;

カテゴリ

Help Center および File ExchangeDynamic System Models についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by