Пример #1
0
def advance(ntstep):
    for i in range(0,ntstep):
        print 'step = ',i+1
        
        esbgk1.advance(numIter)
        if esbgk1options.transient:
            print 'converged';
            esbgk1.updateTime()
     
        calculate_rms(i)
        if ((i+1)%output_interval == 0) :
           
            #dsfname = "output_"+string.zfill(str(i+1),5)+"_"+str(MPI.COMM_WORLD.Get_rank())+".dat"
            #esbgk1.OutputDsfBLOCK(dsfname)
            esbgk1.EntropyGeneration()
            filename = "macro_"+string.zfill(str(i+1),5)+".dat"
            tecplotESBGKEntireDomain.esbgkTecplotEntireDomain(1,meshes,meshes_fluent,options.type,macroFields,filename)
Пример #2
0
    DistFunc1=esbgk1.getdsf1()
    for i in range(0,ndir):
        dsfList.append( DistFunc1.getField(i) )
    if  esbgk1options.timeDiscretizationOrder > 1:
        DistFunc2=esbgk1.getdsf2()
        for i in range(0,ndir):
            dsfList.append( DistFunc2.getField(i) )

if restartFile is not None:
    restartFile.readKineticModel(macroFields,esbgk1,meshes,dsfList,ndir)
    restartFile.close()
    print "read f,fgamma,macropr from restart file"
    #esbgk1.initializeMaxwellian()


tecplotESBGKEntireDomain.esbgkTecplotEntireDomain(1,meshes,meshes_fluent,options.type,macroFields,"dump.dat")
esbgk1.ComputeMacroparameters()
if (fgamma==0):
    esbgk1.initializeMaxwellianEq()
else:
    esbgk1.EquilibriumDistributionBGK()
if(fgamma==2):
    esbgk1.EquilibriumDistributionESBGK()

#collision frequency based on Prandlt
esbgk1.ComputeCollisionfrequency()


bcMap = esbgk1.getBCMap()
if 4 in bcMap:
    bcTop = bcMap[4]