Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement SH (entropy+enthalpy) setter for ThermoPhase #172

Open
speth opened this issue Apr 18, 2023 · 1 comment
Open

Implement SH (entropy+enthalpy) setter for ThermoPhase #172

speth opened this issue Apr 18, 2023 · 1 comment
Labels
feature-request New feature request

Comments

@speth
Copy link
Member

speth commented Apr 18, 2023

Abstract

The ThermoPhase class provides declarations for setting most pairs of properties, but only provides implementations for some of them. The SH setter would simplify modeling of some thermodynamic systems, such as turbojet engines.

Motivation

Describe the need for the proposed change:

  • What problem is it trying to solve?
    • Simplify setting the state in situations where entropy and enthalpy are known, but the intrinsic state variables (T and density) are not. Currently, this requires the user to implement their own iterative solver on top of Cantera.
  • Who is affected by the change?
    • Users modeling thermodynamic systems such as turbojet engines. Neglecting losses, the entropy change across the turbine is zero, and the enthalpy change corresponds to the work done by the compressor.
  • Why is this a good solution?
    • We can provide a robust iterative solver, relieving users of the need to implement their own ad hoc solvers.

Possible Solutions

The implementation of ThermoPhase.setState_SH could follow the implementation of this setter that is implemented for pure fluid phases in Substance::set_xy, which is a fairly simple truncated Newton solver.

@speth speth added the feature-request New feature request label Apr 18, 2023
@kyleniemeyer
Copy link
Member

This would be very helpful - this limitation actually came up in the graduate thermodynamics class I teach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature request
Projects
None yet
Development

No branches or pull requests

2 participants