Crank Nicolson method with convective and insulated boundary conditions

2 vues (au cours des 30 derniers jours)
Mahyar Taghizade
Mahyar Taghizade le 29 Nov 2021
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 commentaire
Mahyar Taghizade
Mahyar Taghizade le 29 Nov 2021
This is the code for my boundary conditions.
and this is the error I get:

Connectez-vous pour commenter.

Réponses (1)

Alok Kumar
Alok Kumar le 20 Avr 2022
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;

Catégories

En savoir plus sur Dynamic System Models dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by