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

Enable multiphase equilibrium calculations involving surface phases #1720

Open
speth opened this issue Jun 21, 2024 · 0 comments
Open

Enable multiphase equilibrium calculations involving surface phases #1720

speth opened this issue Jun 21, 2024 · 0 comments

Comments

@speth
Copy link
Member

speth commented Jun 21, 2024

Problem description

Equilibrating a mixture that contains an interface phase fails. I don't think there's any fundamental reason why such phases shouldn't be able to be included in a multiphase equilibrium calculation.

Steps to reproduce

import cantera as ct
surf = ct.Interface('diamond.yaml', 'diamond_100')
mix = ct.Mixture([
    (surf, 1e-5),
    (surf.adjacent['diamond'], 1.0),
    (surf.adjacent['gas'], 0.4)
])
mix.equilibrate('TP')

Behavior

File ~/src/cantera/build/python/cantera/mixture.pyx:330, in cantera.mixture.Mixture.equilibrate()
    328     successively more verbose information.
    329 """
--> 330 self.mix.equilibrate(stringify(XY.upper()), stringify(solver), rtol,
    331                      max_steps, max_iter, estimate_equil, log_level)

CanteraError: 
*******************************************************************************
CanteraError thrown by Phase::assignDensity:
density must be positive. density = nan
*******************************************************************************

System information

  • Cantera version: main branch at 4565a55

Additional context

Originally reported on the Users' Group.

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

2 participants