Question: Generating list of equations to solve

Hi, i'm fairly new to maple and i'm trying to create a list of equations to solve but I can't see where I'm going wrong.

rho_in := fp_5 + fp_7 + fp+8

rho_out := fn_4 + fn_6 + fn_9

massconserv := rho_in = rho_out

w:=[ 4/9, 1/9, 1/9, 1/9, 1/9, 1/36, 1/36, 1/36, 1/36 ]

feq:=i->rho_wall * w[i]

I think this is the bit im messing up with:

col:=seq(fn_i = (1-1/tau) fp_i + 1/tau * feq(i), i=1..9 )

solve({massconserv, col}, { fp_4, fp_5, fp_6, fp_7, fp_8, fp_9, rho_wall } )

 

At the point I declare col, i'm trying to create the system of equations

fn_1 = (1-1/tau)*fp_1+ 1/tau*feq(1)

fn_2 = (1-1/tau)*fp_2 + 1/tau*feq(2)

... etc

Is this the correct way to go about this, or is there a better solution? Thanks in advance,

Kieran

Please Wait...