Sensitivity Analysis for chemical kinetic simulation (H2 combustion with lubricant oil) with the Cantera toolbox

8 vues (au cours des 30 derniers jours)
Dear Matlab community!
As part of my Bachelor Thesis work I have to model the combustion of H2 under internal combustion engine conditions (pressure, temperature) in a 0 dimensional reactor using the chemical kinetics simulation toolbox Cantera, version 3.0.0. The current script is attached.
The goal is to analyze the impact of lubricant oils (represented by a single surrogate molecule) on the combustion process.
Hence it is neccesary to conduct a sensitivity analysis like in this example (for python. however i have to use matlab with the cantera toolbox instead): https://cantera.org/stable/examples/python/onedim/flamespeed_sensitivity.htmlOr in my zero dimenstional case, https://cantera.org/stable/python/zerodim.html#cantera.ReactorNet.sensitivities.
However the Matlab toolbox doesnt contain this function.
What could i do to still perform this analysis? Is there any way to manually program such a function or is there an available downloadable version for this that I can add to my toolbox?
Thanks in advance
Long Yu
  7 commentaires
Long Runjia Yu
Long Runjia Yu le 22 Mar 2025
Thank you very much for your answer. I was not aware of this aspect of Matlab.
Does this effectively mean that with a py. prefix i get to use Python package functions without ever leaving my Matlab script?
Yifeng Tang
Yifeng Tang le 24 Mar 2025
That's my understanding, although I've used it only in very limited cases, like using an existing .py script to import data in certain format.
The documentation page should have plenty of examples you can follow.
I've also seen lots of videos on this topic: https://www.mathworks.com/videos/search.html?q=python&page=1

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Call Python from MATLAB dans Help Center et File Exchange

Produits


Version

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by