Borrar filtros
Borrar filtros

is it possible to solve 2 PDEs simultaneously using finite difference method in matlab

2 visualizaciones (últimos 30 días)
I want to model a thermal energy storage system where the temperatures of the HTF and the PCM are given as:
dTf/dt = Af*d^2Tf/dx^2 - Bf*dTf/dx - Cf(Tf - Tpcm) and
dTs/dt = Apcm*d^2Ts/dx^2 - Cpcm(Tpcm - Tf)
where Af, Apcm, Bf, Cf and Cpcm are constants.
Initial conditions are:
Tf(x,0) = 180 degC and Tpcm(x,0) = 25 degC
Boundary conditions:
At x=o: dTf/dx = 0 and Tpcm = 180 degC
At x=0.3: dTpcm/dx = 0 and Tf = 150 degC
I have used the pdepe, but I not happy with the temperature distributions i am getting, maybe I need to adjust my initial and boundary conditions. That's why I am trying to solve the 2 PDEs using finite difference method
  8 comentarios
Torsten
Torsten el 2 de Feb. de 2024
Editada: Torsten el 2 de Feb. de 2024
I will cross check, but I think it should be correct as it is.
If the equations from your above question are correct, it's not correct as is.
You define
f = [Af; Apcm] .*DuDx ;
This means that the thermal diffusivity terms in MATLAB are
d/dx(Af*dTf/dx) = Af*d^2Tf/dx^2 + d/dx(Af) * dTf/dx
d/dx(Apcm*dTs/dx) = Apcm*d^2Ts/dx^2 + d/dx(Apcm) * dTs/dx
and the terms d/dx(Af) and d/dx(Apcm) are not zero because they depend on Tf and Ts.
But you claim your equations read
dTf/dt = Af*d^2Tf/dx^2 - Bf*dTf/dx - Cf(Tf - Ts) and
dTs/dt = Apcm*d^2Ts/dx^2 - Cpcm(Ts - Tf),
not
dTf/dt = Af*d^2Tf/dx^2 + d/dx(Af) * dTf/dx - Bf*dTf/dx - Cf(Tf - Ts) and
dTs/dt = Apcm*d^2Ts/dx^2 + d/dx(Apcm) * dTs/dx - Cpcm(Ts - Tf)

Iniciar sesión para comentar.

Respuestas (0)

Etiquetas

Productos


Versión

R2012a

Community Treasure Hunt

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

Start Hunting!

Translated by