#foptions['timeStep'] = 1E-6 #foptions.transient = True #fmodel.init() #kineticmodel=fvm.models.KineticModelD(meshes,flowFields,macroFields,quad) #kineticmodel.init() #cartesian #import ddd quad0 = esbgk.QuadratureD(20, 20, 20, 5.5, 1.0) #cartesian #quad1=esbgk.QuadratureD(2,2,0,12,0,5) #spherical #quad2=esbgk.QuadratureD(16,16,1,8,1,4) #gauss-hermit quadrature and 3/8th rule macroFields = esbgk.MacroFields('flow') esbgk1 = esbgk.KineticModelD(meshes, geomFields, macroFields, quad0) esbgk1options = esbgk1.getOptions() #print esbgk1options['timeStep'] #print esbgk1options # initialize macroparameters to different values esbgk1.InitializeMacroparameters() esbgk1.weightedMaxwellian(1.0, 0.01, 0.0) #initial distribution esbgk1.ComputeMacroparameters() cellSite = meshes[0].getCells() densityField = macroFields.density[cellSite].asNumPyArray() tempField = macroFields.temperature[cellSite].asNumPyArray() #xvelField= macroFields.velocity[cellSite][0].asNumPyArray() collisionFrequencyField = macroFields.collisionFrequency[
if fg.id in [3, 4, 5]: fg.groupType = "wall" print fg.id, " ", fg.groupType #Quadrature- velocity mesh #pd.quad0=esbgk.QuadratureD(20,20,20,5.5,1.0) #cartesian pd.quad0 = esbgk.QuadratureD(14, 14, 14, 5.5, 1.0) #cartesian #quad0=esbgk.QuadratureD(8,8,0,32,0,16) #spherical #quad2=esbgk.QuadratureD(16,16,1,8,1,4) #gauss-hermit quadrature and 3/8th rule #import ddd pd.macroFields = esbgk.MacroFields('flow') print "1" esbgk1 = esbgk.KineticModelD(pd.fluidMeshes, pd.geomFields, pd.macroFields, pd.quad0) print "2" esbgk1options = esbgk1.getOptions() esbgk1options.fgamma = fgamma #0 max, 1 for BGK,2 ES otherwise esbgk1options.ibMethod = pd.ibMethod esbgk1options.printCellNumber = cellno esbgk1options.NewtonsMethod_ktrial = ktrial esbgk1options.setVar('rho_init', pd.rho_init) esbgk1options.setVar('T_init', T_init) esbgk1options.Prandtl = Pr esbgk1options.SpHeatRatio = SpHeatRatio esbgk1options.molecularWeight = molecularWeight