Skip to content

Update C++ transport docs#1958

Merged
ischoegl merged 9 commits intoCantera:mainfrom
speth:fix-transport-docs
Aug 31, 2025
Merged

Update C++ transport docs#1958
ischoegl merged 9 commits intoCantera:mainfrom
speth:fix-transport-docs

Conversation

@speth
Copy link
Copy Markdown
Member

@speth speth commented Aug 28, 2025

Changes proposed in this pull request

  • Fix formulas for binary diffusion coefficient fits (resolving Incorrect documentation for pure species property fits #1488)
  • Improve formatting of units, equations, and variables in C++ Transport class and derived classes
  • Fix erroneous descriptions of how 2D arrays for diffusion coefficients and fluxes are indexed

If applicable, fill in the issue number this pull request is fixing

Closes #1488

Checklist

  • The pull request includes a clear description of this code change
  • Commit messages have short titles and reference relevant issues
  • Build passes (scons build & scons test) and unit tests address code coverage
  • Style & formatting of contributed code follows contributing guidelines
  • The pull request is ready for review

@codecov
Copy link
Copy Markdown

codecov bot commented Aug 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.99%. Comparing base (38fbee0) to head (4c1e3eb).
⚠️ Report is 9 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1958   +/-   ##
=======================================
  Coverage   74.99%   74.99%           
=======================================
  Files         450      450           
  Lines       56235    56235           
  Branches     9300     9300           
=======================================
  Hits        42173    42173           
  Misses      10930    10930           
  Partials     3132     3132           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@wandadars
Copy link
Copy Markdown
Contributor

Thanks for doing this @speth! Definitely an improvement for clarity.

@speth speth marked this pull request as ready for review August 29, 2025 14:30
Copy link
Copy Markdown
Member

@ischoegl ischoegl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@speth ... likewise, thanks for looking into this!

One comment I have is: if we're starting to touch \brief Doxygen docstrings, would it make sense to provide some guidelines for these also?

Overall, the length has to meet the 'sweet spot' between being informative (important for CLib) while not being overwhelming in length (see various overviews produced by Doxygen, e.g., https://cantera.org/stable/cxx/modules.html, some of which run three lines)

As a nit, ending all \brief docstrings with a period . would make sure we're consistent irrespective of Doxygen docstring styles.

@speth
Copy link
Copy Markdown
Member Author

speth commented Aug 30, 2025

Overall, the length has to meet the 'sweet spot' between being informative (important for CLib) while not being overwhelming in length (see various overviews produced by Doxygen, e.g., https://cantera.org/stable/cxx/modules.html, some of which run three lines)

I think the desired length for the "brief" docstrings depends a little bit on where they end up. In the tabular view of the Modules and Classes lists, some of the longer ones can look a little odd. On the other hand, I don't mind a 2-3 line description appearing on other pages like ones for a specific module or list of class members, as long as it's saying something useful.

Probably the main thing to explain in the developer guide is the fact that the "brief" documentation is used separately from the full docstring in many cases, so it shouldn't just be the start of a longer exposition (the docstring for the spthermo "Species Reference-State Thermodynamic Properties" group is a notable offender in this regard). I can certainly add something to the docs to help cover this.

@ischoegl
Copy link
Copy Markdown
Member

Overall, the length has to meet the 'sweet spot' between being informative (important for CLib) while not being overwhelming in length (see various overviews produced by Doxygen, e.g., https://cantera.org/stable/cxx/modules.html, some of which run three lines)

I think the desired length for the "brief" docstrings depends a little bit on where they end up. In the tabular view of the Modules and Classes lists, some of the longer ones can look a little odd. On the other hand, I don't mind a 2-3 line description appearing on other pages like ones for a specific module or list of class members, as long as it's saying something useful.

Probably the main thing to explain in the developer guide is the fact that the "brief" documentation is used separately from the full docstring in many cases, so it shouldn't just be the start of a longer exposition (the docstring for the spthermo "Species Reference-State Thermodynamic Properties" group is a notable offender in this regard). I can certainly add something to the docs to help cover this.

Yes - this is a great direction. I don’t think that it’s realistic to capture the \details within sourcegen (see Cantera/enhancements#230), so what you suggest is spot on.

@speth speth force-pushed the fix-transport-docs branch from bc233e5 to 85e4c07 Compare August 30, 2025 18:53
@speth
Copy link
Copy Markdown
Member Author

speth commented Aug 30, 2025

Yes - this is a great direction. I don’t think that it’s realistic to capture the \details within sourcegen (see Cantera/enhancements#230), so what you suggest is spot on.

Done.

As a nit, ending all \brief docstrings with a period . would make sure we're consistent irrespective of Doxygen docstring styles.

Doxygen adds the period in the generated output regardless, and I'm not sure pursuing this level of consistency in the code is worthwhile.

Copy link
Copy Markdown
Member

@ischoegl ischoegl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@speth ... I have two minor comments (mostly clarifications).

speth added 5 commits August 30, 2025 23:41
- Eliminate some redundant formulas
- Use eta for dynamic viscosity to avoid overlap with mu as dipole moment
- Fix formatting of various diffusion coefficients
- Convert some plain text formulas to LaTeX
@speth speth force-pushed the fix-transport-docs branch from 85e4c07 to 4c1e3eb Compare August 31, 2025 03:42
@ischoegl ischoegl merged commit b57e643 into Cantera:main Aug 31, 2025
50 of 51 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect documentation for pure species property fits

3 participants