Skip to content
  • 最新
  • 版块
  • 东岳流体
  • 随机看[请狂点我]
皮肤
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • 默认(不使用皮肤)
  • 不使用皮肤
折叠
CFD中文网

CFD中文网

  1. CFD中文网
  2. OpenFOAM
  3. cantera计算一维对冲火焰,grid=0时与边界设置条件相差大。

cantera计算一维对冲火焰,grid=0时与边界设置条件相差大。

已定时 已固定 已锁定 已移动 OpenFOAM
3 帖子 2 发布者 1.2k 浏览
  • 从旧到新
  • 从新到旧
  • 最多赞同
回复
  • 在新帖中回复
登录后回复
此主题已被删除。只有拥有主题管理权限的用户可以查看。
  • R 离线
    R 离线
    Rachel0096
    写于 最后由 Rachel0096 编辑
    #1

    我参考cantera官网示例中的diffusion_flame_batch.py,设置一批应变率变化时的一维对冲火焰解。通过反复调用前一计算结果作为初始解,来逐渐增加或降低应变率,从而得到计算结果。当我按照代码设置应变率上升时(即和源代码中一样设置strain_factor = 1.25),边界结果无明显问题。但当我设置应变率下降时(将strain_factor改为0.8),在燃料侧的grid=0处,其结果中的组分组成随应变率下降而逐渐偏离边界条件。我的燃料设置为Y_O2:0.2,Y_NH3:0.1417,Y_N2:0.6583。取应变率下降循环第50次的结果而言,grid=0处的O2仅为0.15左右,NH3也偏差很大。这个可能是什么原因引起的?

    示例中的源代码部分如下:

    # PART 3: STRAIN RATE LOOP
    
    # Compute counterflow diffusion flames at increasing strain rates at 1 bar
    # The strain rate is assumed to increase by 25% in each step until the flame is
    # extinguished
    strain_factor = 1.25
    
    # Exponents for the initial solution variation with changes in strain rate
    # Taken from Fiala and Sattelmayer (2014)
    exp_d_a = - 1. / 2.
    exp_u_a = 1. / 2.
    exp_V_a = 1.
    exp_lam_a = 2.
    exp_mdot_a = 1. / 2.
    
    # Restore initial solution
    file_name, entry = names("initial-solution")
    f.restore(file_name, name=entry)
    
    # Counter to identify the loop
    n = 0
    # Do the strain rate loop
    while np.max(f.T) > temperature_limit_extinction:
        n += 1
        print('strain rate iteration', n)
        # Create an initial guess based on the previous solution
        # Update grid
        f.flame.grid *= strain_factor ** exp_d_a
        normalized_grid = f.grid / (f.grid[-1] - f.grid[0])
        # Update mass fluxes
        f.fuel_inlet.mdot *= strain_factor ** exp_mdot_a
        f.oxidizer_inlet.mdot *= strain_factor ** exp_mdot_a
        # Update velocities
        f.set_profile('velocity', normalized_grid,
                      f.velocity * strain_factor ** exp_u_a)
        f.set_profile('spread_rate', normalized_grid,
                      f.spread_rate * strain_factor ** exp_V_a)
        # Update pressure curvature
        f.set_profile('lambda', normalized_grid, f.L * strain_factor ** exp_lam_a)
        try:
            # Try solving the flame
            f.solve(loglevel=0)
    
    1 条回复 最后回复
  • 李东岳李 离线
    李东岳李 离线
    李东岳 管理员
    写于 最后由 编辑
    #2

    好像误入OpenFOAM社区 :haqi: :haqi:

    http://dyfluid.com/index.html
    需要帮助debug算例的看这个 https://cfd-china.com/topic/8018

    1 条回复 最后回复
  • R 离线
    R 离线
    Rachel0096
    写于 最后由 编辑
    #3

    是想用cantera算一维火焰做FGM表,用在openfoam计算里ToT

    1 条回复 最后回复

  • 登录

  • 登录或注册以进行搜索。
  • 第一个帖子
    最后一个帖子
0
  • 最新
  • 版块
  • 东岳流体
  • 随机看[请狂点我]