3939# flame temperature of the methane-air mixture (phi=0.5, P=5)
4040Tf = 1777
4141
42- # unburnt temperature of the propane -air mixture (phi=0.5, P=5)
42+ # unburnt temperature of the methane -air mixture (phi=0.5, P=5)
4343Tu = 673.0
4444Pu = 5.0
4545phi = 0.5
4646# unburnt density at P=5
4747rho_u = 2.52
48- # unburnt thermal conductivity of methane-air at phi=0.5 (phi=0.5, P=5)
48+ # unburnt thermal conductivity of methane-air (phi=0.5, P=5)
4949k_u = 0.0523
50- # unburnt heat capacity of methane-air at phi=0.5 ( P=5)
50+ # unburnt heat capacity of methane-air ( phi=0.5, P=5)
5151cp_u = 1311.0
5252
5353# P = rho*R*T
5454# 5 = 2.55 * R * 673
5555# R = 0.0029
5656
57+
5758# ################################################################## #
5859# create a function for the initial progress variable c #
5960# ################################################################## #
@@ -80,7 +81,6 @@ def SetInitialSpecies(SU2Driver):
8081 coord = allCoords .Get (iPoint )
8182 C = initC (coord )
8283 # now update the initial condition for the species
83- #SU2Driver.SetSolutionVector(iSPECIESSOLVER, iPoint, [C])
8484 SU2Driver .Solution (iSPECIESSOLVER ).Set (iPoint ,0 ,C )
8585
8686# ################################################################## #
@@ -105,11 +105,11 @@ def update_temperature(SU2Driver, iPoint):
105105def zimont (SU2Driver , iPoint ):
106106
107107 iSSTSOLVER = SU2Driver .GetSolverIndices ()['SST' ]
108- #tke, dissipation = SU2Driver.GetSolutionVector(iSSTSOLVER,iPoint)
109108 tke , dissipation = SU2Driver .Solution (iSSTSOLVER )(iPoint )
110109
111110 iSPECIESSOLVER = SU2Driver .GetSolverIndices ()['SPECIES' ]
112- gradc = SU2Driver .GetGradient (iSPECIESSOLVER ,iPoint ,0 )
111+ # get the gradient of species_0
112+ gradc = SU2Driver .Gradient (iSPECIESSOLVER )(iPoint ,0 )
113113 primindex = SU2Driver .GetPrimitiveIndices ()
114114 iDENSITY = primindex .get ("DENSITY" )
115115 iMU = primindex .get ("LAMINAR_VISCOSITY" )
@@ -137,7 +137,7 @@ def zimont(SU2Driver, iPoint):
137137def getsolvar (SU2Driver ):
138138 primindex = SU2Driver .GetPrimitiveIndices ()
139139 iFLOWSOLVER = SU2Driver .GetSolverIndices ()['INC.FLOW' ]
140- nVars = SU2Driver .GetNumberSolverVars (iFLOWSOLVER )
140+ nVars = SU2Driver .Solution (iFLOWSOLVER ). Shape ()[ 1 ]
141141 varindex = primindex .copy ()
142142 for prim in varindex .copy ():
143143 if varindex [prim ] >= nVars :
@@ -177,9 +177,9 @@ def main():
177177 # all the indices and the map to the names of the primitives
178178 primindex = driver .GetPrimitiveIndices ()
179179 nElem = driver .GetNumberElements ()
180- nVars = driver .GetNumberSolverVars (iFLOWSOLVER )
181- nVarsSpecies = driver .GetNumberSolverVars (iSPECIESSOLVER )
182- nVarsTurb = driver .GetNumberSolverVars (iSSTSOLVER )
180+ nVars = driver .Solution (iFLOWSOLVER ). Shape ()[ 1 ]
181+ nVarsSpecies = driver .Solution (iSPECIESSOLVER ). Shape ()[ 1 ]
182+ nVarsTurb = driver .Solution (iSSTSOLVER ). Shape ()[ 1 ]
183183
184184 if rank == 0 :
185185 print ("Dimensions of the problem = " ,nDim )
0 commit comments