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

Multicomponent transport model fails for single-species phases #1823

Open
speth opened this issue Dec 2, 2024 · 0 comments
Open

Multicomponent transport model fails for single-species phases #1823

speth opened this issue Dec 2, 2024 · 0 comments

Comments

@speth
Copy link
Member

speth commented Dec 2, 2024

Problem description

This is a bit of an oddball edge case, but the multicomponent transport model raises exceptions when computing properties for phases that only define a single species. However, computing properties for a phase where multiple species are defined but representing a pure species state works fine.

Steps to reproduce

>>> import cantera as ct
>>> yaml_ref = """
        phases:
        - name: gas
          thermo: ideal-gas
          species:
          - gri30.yaml/species: [H2]
    """
>>> gas = ct.Solution(yaml=yaml_ref)
>>> gas.transport_model = 'multicomponent'
>>> print(gas.thermal_conductivity)
CanteraError: 
*******************************************************************************
CanteraError thrown by solve(DenseMatrix& A, double* b):
DGETRF returned INFO = 1. U(i,i) is exactly zero. The factorization has been completed, but the factor U is exactly singular, and division by zero will occur if it is used to solve a system of equations.
*******************************************************************************

>>> print(gas.multi_diff_coeffs)
CanteraError: 
*******************************************************************************
CanteraError thrown by invert(DenseMatrix& A, size_t nn):
DGETRS returned INFO = 1
*******************************************************************************

>>> print(gas.thermal_diff_coeffs)
CanteraError: 
*******************************************************************************
CanteraError thrown by solve(DenseMatrix& A, double* b):
DGETRF returned INFO = 1. U(i,i) is exactly zero. The factorization has been completed, but the factor U is exactly singular, and division by zero will occur if it is used to solve a system of equations.
*******************************************************************************

Expected Behavior

I think the computed thermal conductivity should be the pure species thermal conductivity, the multicomponent diffusion coefficients should be a 1x1 matrix of [[0.0]] and the thermal diffusion coefficient should be a 1-element array [0.0].

System information

  • Cantera version: 3.1.0b1
  • OS: macOS Sequoia 15.1
  • Python/MATLAB/other software versions: Python 3.11, Apple Clang 16.0.0
@speth speth added the Transport label Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant