superVisc/hypervisc.py
def solveFlow(presDomain,tempDomain,uVelDomain,vVelDomain,
	muDomain,deltat,deltay,deltax,cp,cv,R,tempRef,muRef,adiabatic):
	"""
	We will be using the MacCormack method to solve the 
	Navier-Stokes equation. 
	"""
	################
	#Predictor Step#
	################
	# Calculate tau and q for predictor both F and E
	tauxyE = getTauxyfromPrim(uVelDomain,vVelDomain,muDomain,1,deltay,deltax) # predictor for E values (case1:getTauxyfromPrim)
	tauxyF = getTauxyfromPrim(uVelDomain,vVelDomain,muDomain,2,deltay,deltax) # predictor for F values (case2:getTauxyfromPrim)
	tauxxE = getTauxx(uVelDomain,vVelDomain,muDomain,1,deltay,deltax) # predictor for E values (case1:getTauxx)
	tauyyF = getTauyy(uVelDomain,vVelDomain,muDomain,1,deltay,deltax) # predictor for F values (case1:getTauyy)
	qxE = getqxE(tempDomain,cp,muDomain,deltax,1) # predictor for E values (case1:getqxE)
	qyF = getqyF(tempDomain,cp,muDomain,deltay,1) # predictor for F values (case1:getqyF)
	# Calculate the values for U, E and F arrays
	U1,U2,U3,U5 = getUfromPrim(presDomain,tempDomain,uVelDomain,
		vVelDomain,muDomain,R,cv)
	E1,E2,E3,E5 = getE(tauxyE,tauxyF,tauxxE,tauyyF,presDomain,
		tempDomain,uVelDomain,vVelDomain,qxE,R,cv)
	F1,F2,F3,F5 = getF(tauxyE,tauxyF,tauxxE,tauyyF,presDomain,
		tempDomain,uVelDomain,vVelDomain,qyF,R,cv)
	# Calculate predictor step
	U1Bar,U2Bar,U3Bar,U5Bar = predictor(U1,U2,U3,U5,E1,E2,E3,E5,
		F1,F2,F3,F5,deltat,deltax,deltay)
	# Extract primitives
	presDomain,tempDomain,uVelDomain,vVelDomain = U2Prim(
		U1Bar,U2Bar,U3Bar,U5Bar,R,cv)
	# Update BC's
	if adiabatic == False:
		presDomain,tempDomain,uVelDomain,vVelDomain = updateBoundaryCond(
			presDomain,tempDomain,uVelDomain,vVelDomain) 
	else:
		presDomain,tempDomain,uVelDomain,vVelDomain = updateAdiabaticBoundaryCond(
			presDomain,tempDomain,uVelDomain,vVelDomain) 
	################
	#Corrector Step#
	################
	muDomain = calcMu(muRef,tempDomain,tempRef) # Recalculate mu base on predicted temp
	tauxyE = getTauxyfromPrim(uVelDomain,vVelDomain,muDomain,3,deltay,deltax) # corrector for E values (case3:getTauxyfromPrim)
	tauxyF = getTauxyfromPrim(uVelDomain,vVelDomain,muDomain,4,deltay,deltax) # corrector for F values (case4:getTauxyfromPrim)
	tauxxE = getTauxx(uVelDomain,vVelDomain,muDomain,2,deltay,deltax) # corrector for E values (case2:getTauxx)
	tauyyF = getTauyy(uVelDomain,vVelDomain,muDomain,2,deltay,deltax) # corrector for F values (case2:getTauyy)
	qxE = getqxE(tempDomain,cp,muDomain,deltax,2)
	qyF = getqyF(tempDomain,cp,muDomain,deltay,2)
	U1Bar,U2Bar,U3Bar,U5Bar = getUfromPrim(presDomain,tempDomain,uVelDomain,
		vVelDomain,muDomain,R,cv)
	E1Bar,E2Bar,E3Bar,E5Bar = getE(tauxyE,tauxyF,tauxxE,tauyyF,presDomain,
		tempDomain,uVelDomain,vVelDomain,qxE,R,cv)
	F1Bar,F2Bar,F3Bar,F5Bar = getF(tauxyE,tauxyF,tauxxE,tauyyF,presDomain,
		tempDomain,uVelDomain,vVelDomain,qyF,R,cv)
	# Rearward step
	U1New,U2New,U3New,U5New =  corrector(U1,U2,U3,U5,U1Bar,U2Bar,U3Bar,U5Bar,
		E1Bar,E2Bar,E3Bar,E5Bar,F1Bar,F2Bar,F3Bar,F5Bar,deltat,deltax,deltay)
	presDomain,tempDomain,uVelDomain,vVelDomain = U2Prim(U1New,U2New,U3New,U5New,R,cv)
	# Update BC's
	if adiabatic == False:
		presDomain,tempDomain,uVelDomain,vVelDomain = updateBoundaryCond(
			presDomain,tempDomain,uVelDomain,vVelDomain) 
	else:
		presDomain,tempDomain,uVelDomain,vVelDomain = updateAdiabaticBoundaryCond(
			presDomain,tempDomain,uVelDomain,vVelDomain)  
	return presDomain,tempDomain,uVelDomain,vVelDomain

	We will be using the MacCormack method to solve the 
	Navier-Stokes equation. 
	
We will be using the MacCormack method to solve the
Navier-Stokes equation.
We will be using the MacCormack method to solve the Navier - Stokes equation .
def solveFlow(presDomain,tempDomain,uVelDomain,vVelDomain,
	muDomain,deltat,deltay,deltax,cp,cv,R,tempRef,muRef,adiabatic):
	tauxyE = getTauxyfromPrim(uVelDomain,vVelDomain,muDomain,1,deltay,deltax) 
	tauxyF = getTauxyfromPrim(uVelDomain,vVelDomain,muDomain,2,deltay,deltax) 
	tauxxE = getTauxx(uVelDomain,vVelDomain,muDomain,1,deltay,deltax) 
	tauyyF = getTauyy(uVelDomain,vVelDomain,muDomain,1,deltay,deltax) 
	qxE = getqxE(tempDomain,cp,muDomain,deltax,1) 
	qyF = getqyF(tempDomain,cp,muDomain,deltay,1) 
	U1,U2,U3,U5 = getUfromPrim(presDomain,tempDomain,uVelDomain,
		vVelDomain,muDomain,R,cv)
	E1,E2,E3,E5 = getE(tauxyE,tauxyF,tauxxE,tauyyF,presDomain,
		tempDomain,uVelDomain,vVelDomain,qxE,R,cv)
	F1,F2,F3,F5 = getF(tauxyE,tauxyF,tauxxE,tauyyF,presDomain,
		tempDomain,uVelDomain,vVelDomain,qyF,R,cv)
	U1Bar,U2Bar,U3Bar,U5Bar = predictor(U1,U2,U3,U5,E1,E2,E3,E5,
		F1,F2,F3,F5,deltat,deltax,deltay)
	presDomain,tempDomain,uVelDomain,vVelDomain = U2Prim(
		U1Bar,U2Bar,U3Bar,U5Bar,R,cv)
	if adiabatic == False:
		presDomain,tempDomain,uVelDomain,vVelDomain = updateBoundaryCond(
			presDomain,tempDomain,uVelDomain,vVelDomain) 
	else:
		presDomain,tempDomain,uVelDomain,vVelDomain = updateAdiabaticBoundaryCond(
			presDomain,tempDomain,uVelDomain,vVelDomain) 
	muDomain = calcMu(muRef,tempDomain,tempRef) 
	tauxyE = getTauxyfromPrim(uVelDomain,vVelDomain,muDomain,3,deltay,deltax) 
	tauxyF = getTauxyfromPrim(uVelDomain,vVelDomain,muDomain,4,deltay,deltax) 
	tauxxE = getTauxx(uVelDomain,vVelDomain,muDomain,2,deltay,deltax) 
	tauyyF = getTauyy(uVelDomain,vVelDomain,muDomain,2,deltay,deltax) 
	qxE = getqxE(tempDomain,cp,muDomain,deltax,2)
	qyF = getqyF(tempDomain,cp,muDomain,deltay,2)
	U1Bar,U2Bar,U3Bar,U5Bar = getUfromPrim(presDomain,tempDomain,uVelDomain,
		vVelDomain,muDomain,R,cv)
	E1Bar,E2Bar,E3Bar,E5Bar = getE(tauxyE,tauxyF,tauxxE,tauyyF,presDomain,
		tempDomain,uVelDomain,vVelDomain,qxE,R,cv)
	F1Bar,F2Bar,F3Bar,F5Bar = getF(tauxyE,tauxyF,tauxxE,tauyyF,presDomain,
		tempDomain,uVelDomain,vVelDomain,qyF,R,cv)
	U1New,U2New,U3New,U5New =  corrector(U1,U2,U3,U5,U1Bar,U2Bar,U3Bar,U5Bar,
		E1Bar,E2Bar,E3Bar,E5Bar,F1Bar,F2Bar,F3Bar,F5Bar,deltat,deltax,deltay)
	presDomain,tempDomain,uVelDomain,vVelDomain = U2Prim(U1New,U2New,U3New,U5New,R,cv)
	if adiabatic == False:
		presDomain,tempDomain,uVelDomain,vVelDomain = updateBoundaryCond(
			presDomain,tempDomain,uVelDomain,vVelDomain) 
	else:
		presDomain,tempDomain,uVelDomain,vVelDomain = updateAdiabaticBoundaryCond(
			presDomain,tempDomain,uVelDomain,vVelDomain)  
	return presDomain,tempDomain,uVelDomain,vVelDomain
def solveFlow ( presDomain , tempDomain , uVelDomain , vVelDomain , muDomain , deltat , deltay , deltax , cp , cv , R , tempRef , muRef , adiabatic ) : tauxyE = getTauxyfromPrim ( uVelDomain , vVelDomain , muDomain , 1 , deltay , deltax ) tauxyF = getTauxyfromPrim ( uVelDomain , vVelDomain , muDomain , 2 , deltay , deltax ) tauxxE = getTauxx ( uVelDomain , vVelDomain , muDomain , 1 , deltay , deltax ) tauyyF = getTauyy ( uVelDomain , vVelDomain , muDomain , 1 , deltay , deltax ) qxE = getqxE ( tempDomain , cp , muDomain , deltax , 1 ) qyF = getqyF ( tempDomain , cp , muDomain , deltay , 1 ) U1 , U2 , U3 , U5 = getUfromPrim ( presDomain , tempDomain , uVelDomain , vVelDomain , muDomain , R , cv ) E1 , E2 , E3 , E5 = getE ( tauxyE , tauxyF , tauxxE , tauyyF , presDomain , tempDomain , uVelDomain , vVelDomain , qxE , R , cv ) F1 , F2 , F3 , F5 = getF ( tauxyE , tauxyF , tauxxE , tauyyF , presDomain , tempDomain , uVelDomain , vVelDomain , qyF , R , cv ) U1Bar , U2Bar , U3Bar , U5Bar = predictor ( U1 , U2 , U3 , U5 , E1 , E2 , E3 , E5 , F1 , F2 , F3 , F5 , deltat , deltax , deltay ) presDomain , tempDomain , uVelDomain , vVelDomain = U2Prim ( U1Bar , U2Bar , U3Bar , U5Bar , R , cv ) if adiabatic == False : presDomain , tempDomain , uVelDomain , vVelDomain = updateBoundaryCond ( presDomain , tempDomain , uVelDomain , vVelDomain ) else : presDomain , tempDomain , uVelDomain , vVelDomain = updateAdiabaticBoundaryCond ( presDomain , tempDomain , uVelDomain , vVelDomain ) muDomain = calcMu ( muRef , tempDomain , tempRef ) tauxyE = getTauxyfromPrim ( uVelDomain , vVelDomain , muDomain , 3 , deltay , deltax ) tauxyF = getTauxyfromPrim ( uVelDomain , vVelDomain , muDomain , 4 , deltay , deltax ) tauxxE = getTauxx ( uVelDomain , vVelDomain , muDomain , 2 , deltay , deltax ) tauyyF = getTauyy ( uVelDomain , vVelDomain , muDomain , 2 , deltay , deltax ) qxE = getqxE ( tempDomain , cp , muDomain , deltax , 2 ) qyF = getqyF ( tempDomain , cp , muDomain , deltay , 2 ) U1Bar , U2Bar , U3Bar , U5Bar = getUfromPrim ( presDomain , tempDomain , uVelDomain , vVelDomain , muDomain , R , cv ) E1Bar , E2Bar , E3Bar , E5Bar = getE ( tauxyE , tauxyF , tauxxE , tauyyF , presDomain , tempDomain , uVelDomain , vVelDomain , qxE , R , cv ) F1Bar , F2Bar , F3Bar , F5Bar = getF ( tauxyE , tauxyF , tauxxE , tauyyF , presDomain , tempDomain , uVelDomain , vVelDomain , qyF , R , cv ) U1New , U2New , U3New , U5New = corrector ( U1 , U2 , U3 , U5 , U1Bar , U2Bar , U3Bar , U5Bar , E1Bar , E2Bar , E3Bar , E5Bar , F1Bar , F2Bar , F3Bar , F5Bar , deltat , deltax , deltay ) presDomain , tempDomain , uVelDomain , vVelDomain = U2Prim ( U1New , U2New , U3New , U5New , R , cv ) if adiabatic == False : presDomain , tempDomain , uVelDomain , vVelDomain = updateBoundaryCond ( presDomain , tempDomain , uVelDomain , vVelDomain ) else : presDomain , tempDomain , uVelDomain , vVelDomain = updateAdiabaticBoundaryCond ( presDomain , tempDomain , uVelDomain , vVelDomain ) return presDomain , tempDomain , uVelDomain , vVelDomain
We will be using the MacCormack method to solve the
Navier-Stokes equation.
We will be using the MacCormack method to solve the Navier - Stokes equation .
"""
	We will be using the MacCormack method to solve the 
	Navier-Stokes equation. 
	""" ################ #Predictor Step# ################ # Calculate tau and q for predictor both F and E # predictor for E values (case1:getTauxyfromPrim) # predictor for F values (case2:getTauxyfromPrim) # predictor for E values (case1:getTauxx) # predictor for F values (case1:getTauyy) # predictor for E values (case1:getqxE) # predictor for F values (case1:getqyF) # Calculate the values for U, E and F arrays # Calculate predictor step # Extract primitives # Update BC's ################ #Corrector Step# ################ # Recalculate mu base on predicted temp # corrector for E values (case3:getTauxyfromPrim) # corrector for F values (case4:getTauxyfromPrim) # corrector for E values (case2:getTauxx) # corrector for F values (case2:getTauyy) # Rearward step # Update BC's
presDomain
tempDomain
uVelDomain
vVelDomain
muDomain
deltat
deltay
deltax
cp
cv
R
tempRef
muRef
adiabatic