Set up a tridiagonal for a system of equations

  • Thread starter Hypatio
  • Start date
  • #1
151
1
I am trying to solve the system of simultaneous equations:
[tex]\frac{\partial \rho_f\phi}{\partial t}+\frac{\partial}{\partial z}(\rho_f\phi v_f)= \frac{\partial F}{\partial t}[/tex]
[tex]\frac{\partial \rho_s(1-\phi)}{\partial t}+\frac{\partial}{\partial z}(\rho_s(1-\phi) v_s)=-\frac{\partial F}{\partial t}[/tex]
and
[tex]v_f-v_s=-\frac{k}{\phi \mu}\frac{\partial P}{\partial z}[/tex]
where v_s and v_f are unknown except v_s is known at the lower boundary in z.
I will use explicit finite differences such that, I think, the discretized forms are
[tex]\rho_f^n\phi^n-\rho_f^0\phi^0+\frac{\Delta t}{\Delta z}[\rho_f^n\phi^nv_f^n-\rho_f^0\phi^0v_f^0]=F^n-F^0[/tex]
[tex]\rho_s^n(1-\phi^n)-\rho_s^0(1-\phi^0)+\frac{\Delta t}{\Delta z}[\rho_s^n(1-\phi^n)v_s^n-\rho_s^0(1-\phi^0)v_s^0]=-(F^n-F^0)[/tex]
and
[tex]v_f-v_s=-\frac{k}{\phi \mu}\frac{P_{z+1}-P_z}{\Delta z}[/tex]
where superscripts n and 0 are for new time and current time, respectively.
But I do not understand what the strategy should be for building a tridiagonal matrix with these equations. What should I be doing? How can I set this up?

More on terms: v_f and v_s are velocities, rho_f and rho_s are densities, \phi is volume of material moving at velocity v_f, F is a mass flux, and k and
\mu are constants.
 

Answers and Replies

  • #2
18,490
8,355
Thanks for the post! This is an automated courtesy bump. Sorry you aren't generating responses at the moment. Do you have any further information, come to any new conclusions or is it possible to reword the post?
 

Related Threads on Set up a tridiagonal for a system of equations

Replies
0
Views
1K
Replies
1
Views
2K
  • Last Post
Replies
1
Views
3K
  • Last Post
Replies
9
Views
1K
  • Last Post
Replies
1
Views
4K
Replies
0
Views
1K
Replies
2
Views
1K
Replies
4
Views
990
  • Last Post
Replies
1
Views
622
Top