Esempio n. 1
0
import fvm.esbgk_atyped_double as esbgk

#import fvm.MacroParameters as macropr
#import fvm.DistFunctFields as f

#foptions = fmodel.getOptions()
#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()
Esempio n. 2
0
    restartFile = Persistence(restartFileName,'r')
else:
    restartFile = None
# to test quadrature
import fvm.esbgk_atyped_double as esbgk

#facegroups
fgs = meshes[0].getBoundaryFaceGroups()
for fg in fgs:
    #print fg.groupType
    if  fg.id == 4 or fg.id == 6:
        fg.groupType = "realwall"
    print fg.id,"  ",fg.groupType

#Quadrature
quad0=esbgk.QuadratureD(10,10,10,5.5,1.0) #cartesian
#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

macroFields=esbgk.MacroFields('flow')
esbgk1=esbgk.KineticModelD(meshes,geomFields,macroFields,quad0)
esbgk1options = esbgk1.getOptions()

#initialize feq
esbgk1options.fgamma=fgamma;  #0 max, 1 for BGK,2  ES otherwise
esbgk1options.printCellNumber=cellno;
esbgk1options.NewtonsMethod_ktrial=ktrial;
esbgk1options.Prandtl=Pr;
esbgk1options.SpHeatRatio=SpHeatRatio;
esbgk1options.setVar('ToleranceX',tolx);
Esempio n. 3
0
import fvm.esbgk_atyped_double as esbgk

#import fvm.MacroParameters as macropr
#import fvm.DistFunctFields as f

#foptions = fmodel.getOptions()
#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, 10.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 options

#esbgk.KineticModelD.OutputDsfPOINT(esbgk1)
#esbgk1.OutputDsfPOINT()
Esempio n. 4
0
# to test quadrature
import fvm.esbgk_atyped_double as esbgk

#facegroups
fgs = pd.fluidMeshes[0].getBoundaryFaceGroups()
for fg in fgs:
    print fg.groupType
    if fg.id == 6:
        fg.groupType = "wall"
    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