Cantera / cantera

Chemical kinetics, thermodynamics, and transport tool suite
https://cantera.org
Other
624 stars 350 forks source link

Revive 1D radiation improvements of PR965 #1799

Open wandadars opened 1 month ago

wandadars commented 1 month ago

I was looking through the open pull requests and saw #965 . It seemed like it was something that could be pushed across the finish line given the recent updates to Cantera that allow for easier handling of data in the YAML file.

Potentially allows for the discussions in https://github.com/Cantera/enhancements/issues/72 to be realized.

I added some of the data from the original pull request into the gri30.yaml file (attached), and ran the 1D diffusion flame example

gri30.txt

From the discussions in the #965 it seemed like there was more than one possibility for handling that absorption coefficient calculation, so I added a keyword of fit-type which can be tableor polynomial. The polynomialtype is what was originally used and the tableis the log linear interpolation data that was apparently better. PMAC is Plank Mean Absorption Coefficient. I'm pretty clueless on radiation modeling, so if anyone else knows more about this, please chime in.

As an example this would be the YAML entry for a species C2H6 that used the log-linear interpolation tabulated data.

- name: C2H6
  composition: {C: 2, H: 6}
  thermo:
    model: NASA7
    temperature-ranges: [200.0, 1000.0, 3500.0]
    data:
    - [4.29142492, -5.5015427e-03, 5.99438288e-05, -7.08466285e-08, 2.68685771e-11,
      -1.15222055e+04, 2.66682316]
    - [1.0718815, 0.0216852677, -1.00256067e-05, 2.21412001e-09, -1.9000289e-13,
      -1.14263932e+04, 15.1156107]
    note: L8/88
  transport:
    model: gas
    geometry: nonlinear
    well-depth: 252.3
    diameter: 4.302
    rotational-relaxation: 1.5
  radiation:
    model: PMAC
    fit-type: table
    temperatures: [200.0, 300.0, 400.0, 500.0, 600.0,
            700.0, 800.0, 900.0, 1000.0, 1100.0, 1200.0, 1300.0, 1400.0, 1500.0, 1600.0,
            1700.0, 1800.0, 1900.0, 2000.0, 2100.0, 2200.0, 2300.0, 2400.0, 2500.0, 2600.0,
            2700.0, 2800.0, 2900.0, 3000.0, 3100.0, 3200.0, 3300.0, 3400.0, 3500.0]
    data: [0.38479552555827473, 0.330335973067736, 0.4412642688261878, 0.7234904395389986,
           1.3047333754840624, 2.4582817867678797,
            4.728954047788753, 9.185141033669707, 17.899543021230603, 34.850795560924084,
            67.58893234939407, 130.26844542962587, 249.09122926085138, 471.9318246172849,
            885.130031885148, 1642.3336783887491, 3013.480869817436, 5466.6396914389925,
            9803.371388627636, 17379.457798083575, 30460.7202083096, 52790.33601327037,
            90480.336797945, 153407.43112853833, 257355.273339689, 427303.61580306507,
            702366.9359563864, 1143267.5642510268, 1843354.9491235327, 2944846.812649131,
            4662659.170473707, 7318745.5983123155, 11391692.329199707, 17587602.579628713]

And for the case where the older polynomial fits (I'm not sure how prevalent/standardized this form is) are used, we specify using:

  radiation:
    model: PMAC
    fit-type: polynomial
    data: [-0.23093, -1.12390, 9.41530, -2.99880, 0.51382, -1.86840e-5]

Tagging the original creator of the pull request and the user who opened the enhancement. @lavrenyukiv @BYUignite

BYUignite commented 1 month ago

We should integrate RadLib into Cantera. The library is written in C++ and has Python and Fortran interfaces. It is well-documented, and published. I can provide details, and would like to be involved.

Repository:

https://github.com/BYUignite/radlib

Publication:

V.B. Stephens, S. Jensen, I. Wheeler, D.O. Lignell, “RadLib: a radiative heat transfer model library for CFD,” Computer Physics Communications, 272:108227https://doi.org/10.1016/j.cpc.2021.108227, (2022).

Documentation:

https://ignite.byu.edu/radlib_documentation RadLib: RadLibhttps://ignite.byu.edu/radlib_documentation ignite.byu.eduhttps://ignite.byu.edu/radlib_documentation [X]https://ignite.byu.edu/radlib_documentation

David O. Lignell Professor, Chemical Engineering Brigham Young University 801-422-1772 | http://ignite.byu.edu

On Oct 21, 2024, at 9:10 PM, Chris Neal @.***> wrote:

I was looking through the open pull requests and saw #965https://github.com/Cantera/cantera/pull/965 . It seemed like it was something that could be pushed across the finish line given the recent updates to Cantera that allow for easier handling of data in the YAML file.

Potentially allows for the discussions in Cantera/enhancements#72https://github.com/Cantera/enhancements/issues/72 to be realized.

I added some of the data from the original pull request into the gri30.yaml file (attached), and ran the 1D diffusion flame examplehttps://cantera.org/examples/python/onedim/diffusion_flame.py.html

gri30.txthttps://github.com/user-attachments/files/17469322/gri30.txt

From the discussions in the #965https://github.com/Cantera/cantera/pull/965 it seemed like there was more than one possibility for handling that absorption coefficient calculation, so I added a keyword of fit-type which can be table or polynomial. The polynomial type is what was originally used and the table is the log linear interpolation data that was apparently better. PMAC is Plank Mean Absorption Coefficient. I'm pretty clueless on radiation modeling, so if anyone else knows more about this, please chime in.

As an example this would be the YAML entry for a species C2H6 that used the log-linear interpolation tabulated data.

And for the case where the older polynomial fits (I'm not sure how prevalent/standardized this form is) are used, we specify using:

radiation: model: PMAC fit-type: polynomial data: [-0.23093, -1.12390, 9.41530, -2.99880, 0.51382, -1.86840e-5]

Tagging the original creator of the pull request and the user who opened the enhancement. @lavrenyukivhttps://github.com/lavrenyukiv @BYUignitehttps://github.com/BYUignite


You can view, comment on, or merge this pull request online at:

https://github.com/Cantera/cantera/pull/1799

Commit Summary

File Changes

(3 fileshttps://github.com/Cantera/cantera/pull/1799/files)

Patch Links:

— Reply to this email directly, view it on GitHubhttps://github.com/Cantera/cantera/pull/1799, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AD5XI7IHQ3XVMWIHZXOSZV3Z4W64HAVCNFSM6AAAAABQLOYRYKVHI2DSMVQWIX3LMV43ASLTON2WKOZSGYYDIMBZG42DANY. You are receiving this because you were mentioned.Message ID: @.***>