Incompressible 2D Quadratic MMS

Define the functions

u={t+x^2+y^2,t+2*x^2-2*x*y}

p=x+y-1

T = t+x+y

Density Equation

Qden=Div[rho*u,{x,y}]

Temperature Equation

HSQ=rho*Cp*(S*D[T,t]+Dot[u,Grad[T,{x,y}]])-1/P*Div[k*Grad[T,{x,y}],{x,y}]

Momentum Equations

epsilon=0.5*(Grad[u,{x,y}]+Transpose[Grad[u,{x,y}]])

Qmom=rho*S*D[u,t]+Dot[rho*u,Transpose[Grad[u,{x,y}]]]+Grad[p,{x,y}]-1/R*Div[2*mu*epsilon,{x,y}]

In C Form for MMS

CForm[Qden]

CForm[HSQ]

CForm[Qmom]