Advection like equation

10 months ago by
Hi there,

I'm working in the following equation

 $w\frac{\partial c}{\partial t}-\left(1-c\right)\frac{\partial w}{\partial t}-\frac{\partial\left[\left(1-c\right)v_xw\right]}{\partial x}-\frac{\partial\left[\left(1-c\right)v_yw\right]}{\partial y}=f$wct (1c)wt [(1c)vxw]x [(1c)vyw]y =ƒ  
here w is width
w_frac = Expression('exp(-x[0]-t)',t=0,degree=1)
w_old = Function(V)
w_old = Interpolate(w_frac,V)

w_frac.t = dt
w_new = Function(V)
w_new = Interpolate(w_frac,V)​

For the velocity I'm using

vel = Expression(('(1)','(0)'),degree=1,domain=mesh)
And for the variational form I'm trying
c = TrialFunction(V)
q = TestFunction(V)
F = w_new*c*q*dx - (1-c)*(w_new-w_old)*q*dx - dot(dot(vel,w_new),grad(1-c))*q*dx - (w_new*c_1+dt*f)*q*dx
a, L = lhs(F), rhs(F)​

Could you please help me defining a better variational form.

Thank you very much for your guidance!!! 

Community: FEniCS Project
Please login to add an answer/comment or follow this question.

Similar posts:
Search »