Reputation: 11
The term I want to express is a part of N-S equation. u,v are the component of flow velocity
Is the following code correct?
u = CellVariable(mesh=mesh,hasOld=1,value=0.0)
v = CellVariable(mesh=mesh,hasOld=1,value=0.0)
coeff_con = FaceVariable(mesh=mesh,rank=1)
coeff_con.setValue([u.arithmeticFaceValue,v.arithmeticFaceValue])
ConvectionTerm(coeff=coeff_con,var=u)
I will reset the value of coeff_con whenever the u, v updates.
Upvotes: 1
Views: 61