LowMach 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+1

rho=Pth/T

Density Equation

Qden=S*D[rho,t]+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}]])

epsilonPrime = epsilon-1/3*Div[u,{x,y}]*IdentityMatrix[2]

Qmom=rho*S*D[u,t]+Dot[rho*u,Transpose[Grad[u,{x,y}]]]+Grad[p,{x,y}]-1/R*Div[2*mu*epsilonPrime,{x,y}] + 1/(F^2)*rho*{0,1}

In C Form for MMS

CForm[Qden]

CForm[HSQ]

CForm[Qmom]