# to 5) refine_grid = 1 # 1 to enable refinement, 0 to # disable ################ create the gas object ######################## # # This object will be used to evaluate all thermodynamic, kinetic, # and transport properties # gas = IdealGasMix(rxnmech, mix) # set its state to that of the unburned gas at the burner gas.set(T=tburner, P=p, X=comp) f = BurnerFlame(gas=gas, grid=initial_grid) # set the properties at the burner f.burner.set(massflux=mdot, mole_fractions=comp, temperature=tburner) f.set(tol=tol_ss, tol_time=tol_ts) f.setMaxJacAge(5, 10) f.set(energy='off') f.init() f.showSolution() f.solve(loglevel, refine_grid) f.setRefineCriteria(ratio=200.0, slope=0.0502, curve=0.1) f.set(energy='on') f.solve(loglevel, refine_grid)
# disable ################ create the gas object ######################## # # This object will be used to evaluate all thermodynamic, kinetic, and # transport properties. It is created with two transport managers, to # enable switching from mixture-averaged to multicomponent transport # on the last solution. gas = GRI30('Mix') gas.addTransportModel('Multi') # set its state to that of the unburned gas at the burner gas.setState_TPX(tburner, p, comp) # create the BurnerFlame object. f = BurnerFlame(gas=gas, grid=initial_grid) # set the properties at the burner f.burner.set(massflux=mdot, mole_fractions=comp, temperature=tburner) # read in the fixed temperature profile [zloc, tvalues] = getTempData('tdata.dat') # set the temperature profile to the values read in f.flame.setFixedTempProfile(zloc, tvalues) f.set(tol=tol_ss, tol_time=tol_ts) # show the initial estimate for the solution f.showSolution()
refine_grid = 1 # 1 to enable refinement, 0 to # disable ################ create the gas object ######################## # # This object will be used to evaluate all thermodynamic, kinetic, and # transport properties. It is created with two transport managers, to # enable switching from mixture-averaged to multicomponent transport # on the last solution. gas = GRI30('Mix') gas.addTransportModel('Multi') # set its state to that of the unburned gas at the burner gas.setState_TPX(tburner, p, comp) f = BurnerFlame(gas=gas, grid=initial_grid) # set the properties at the burner f.burner.set(massflux=mdot, mole_fractions=comp, temperature=tburner) f.set(tol=tol_ss, tol_time=tol_ts) f.showSolution() f.set(energy='off') f.setRefineCriteria(ratio=10.0, slope=1, curve=1) f.setMaxJacAge(50, 50) f.setTimeStep(1.0e-5, [1, 2, 5, 10, 20]) f.solve(loglevel, refine_grid) f.save('ch4_flame1.xml', 'no_energy', 'solution with the energy equation disabled')
refine_grid = 1 # 1 to enable refinement, 0 to # disable ################ create the gas object ######################## # # This object will be used to evaluate all thermodynamic, kinetic, # and transport properties # gas = IdealGasMix(rxnmech, mix) # set its state to that of the unburned gas at the burner gas.set(T = tburner, P = p, X = comp) f = BurnerFlame(gas = gas, grid = initial_grid) # set the properties at the burner f.burner.set(massflux = mdot, mole_fractions = comp, temperature = tburner) f.set(tol = tol_ss, tol_time = tol_ts) f.setMaxJacAge(5, 10) f.set(energy = 'off') f.init() f.showSolution() f.solve(loglevel, refine_grid) f.setRefineCriteria(ratio = 200.0, slope = 0.0502, curve = 0.1) f.set(energy = 'on') f.solve(loglevel,refine_grid)
################ create the gas object ######################## # # This object will be used to evaluate all thermodynamic, kinetic, and # transport properties. It is created with two transport managers, to # enable switching from mixture-averaged to multicomponent transport # on the last solution. gas = GRI30('Mix') gas.addTransportModel('Multi') # set its state to that of the unburned gas at the burner gas.setState_TPX(tburner, p, comp) # create the BurnerFlame object. f = BurnerFlame(gas = gas, grid = initial_grid) # set the properties at the burner f.burner.set(massflux = mdot, mole_fractions = comp, temperature = tburner) # read in the fixed temperature profile [zloc, tvalues] = getTempData('tdata.dat') # set the temperature profile to the values read in f.flame.setFixedTempProfile(zloc, tvalues) f.set(tol = tol_ss, tol_time = tol_ts) # show the initial estimate for the solution f.showSolution()
# disable ################ create the gas object ######################## # # This object will be used to evaluate all thermodynamic, kinetic, and # transport properties. It is created with two transport managers, to # enable switching from mixture-averaged to multicomponent transport # on the last solution. gas = GRI30('Mix') gas.addTransportModel('Multi') # set its state to that of the unburned gas at the burner gas.setState_TPX(tburner, p, comp) f = BurnerFlame(gas = gas, grid = initial_grid) # set the properties at the burner f.burner.set(massflux = mdot, mole_fractions = comp, temperature = tburner) f.set(tol = tol_ss, tol_time = tol_ts) f.showSolution() f.set(energy = 'off') f.setRefineCriteria(ratio = 10.0, slope = 1, curve = 1) f.setMaxJacAge(50, 50) f.setTimeStep(1.0e-5, [1, 2, 5, 10, 20]) f.solve(loglevel, refine_grid) f.save('ch4_flame1.xml','no_energy', 'solution with the energy equation disabled')