Skip to content

Making IdealGasThermo compatible with Forward Differentiation#10

Open
ngomezve wants to merge 27 commits intoMIT-LAE:mainfrom
ngomezve:dev_derivatives
Open

Making IdealGasThermo compatible with Forward Differentiation#10
ngomezve wants to merge 27 commits intoMIT-LAE:mainfrom
ngomezve:dev_derivatives

Conversation

@ngomezve
Copy link
Contributor

This PR introduces parametric typing for the Gas1D and Gas objects. In the current version, parameters inside these objects are typed as Float64,and so are the inputs to most functions. By relaxing the typing, the package can be compatible with Dual types, which are used by forward-mode automatic differentiation packages such as ForwardDiff.jl.

The PR introduces a new way to instantiate Gas objects via Gas(T,P), with the appropriate typing for the gas parameters being inferred from the inputs.

Tests on automatic differentiation are also included, comparing against finite differences.

@ngomezve
Copy link
Contributor Author

This addresses issue #10

deleting .json file

removed rel tolerance in h
@codecov
Copy link

codecov bot commented Sep 3, 2025

Codecov Report

❌ Patch coverage is 85.40541% with 27 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.52%. Comparing base (a0fe14a) to head (6db1603).

Files with missing lines Patch % Lines
src/Gas.jl 84.70% 13 Missing ⚠️
src/Gas1D.jl 54.54% 10 Missing ⚠️
src/combustion.jl 89.47% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #10      +/-   ##
==========================================
- Coverage   81.54%   81.52%   -0.02%     
==========================================
  Files          11       13       +2     
  Lines         791      812      +21     
==========================================
+ Hits          645      662      +17     
- Misses        146      150       +4     

☔ 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant