Questions tagged [cantera]

27 questions
6
votes
0 answers

Python Cantera MassFlowController won't extract mass from reactor

I am trying to build a hydrogen tank model (liquid-vapour) that includes heat addition over time through the tank walls, a venting valve that is activated at a given pressure and a constant fuel cell supply that is activated after a dormancy…
Repiklis
  • 399
  • 6
  • 20
3
votes
3 answers

trouble compiling and installing cantera python module

I'm attempting to install the Cantera as a python module within Ubuntu linux. For reference I used these instructions: Installing Cantera. After running ./preconfig and make, I get the following error: fatal error: numarray/arrayobject.h: No such…
Chad
  • 1,434
  • 1
  • 15
  • 30
2
votes
1 answer

How to calculate more time in custom.py in cantera?

I want to calculate auto-ignition delay time by using cantera in python linux. Here, I only change the t_end = 40 , dt = 1,and gas.TPX = 801, P, 'H2:0.1667,O2:0.0833,N2:0.75' in custom.py example from Official Website. But, the result only calculate…
YOU
  • 29
  • 3
2
votes
0 answers

Why does __init__ call the parent class's __init__ before the derived class's __init__?

I am using the cantera module in python, specifically trying to extend the class cantera.Solution using inheritance. The base class can be called like this: gas = cantera.Solution("gri30.ct") Where "gri30.cti" is the file name of the chemistry…
Bryan M
  • 21
  • 1
2
votes
1 answer

How can I reverse the program adiabetic.py in CANTERA Python module such that it inputs the adiabetic temperature and gives output inlet temperature?

I am doing a project on numerical analysis of laminar premixed flames at different level of complexities. I am in severe need of help as I am new to Python and Cantera. I have the following queries: Can I modify the adiabetic.py module which…
Shiny
  • 41
  • 4
1
vote
2 answers

Python: Computation in for loop doesn't match result of manual computation

I'm currently working on a project researching properties of some gas mixtures. Testing my code with different inputs, I came upon a bug(?) which I fail to be able to explain. Basically, it's concerning a computation on a numpy array in a for loop.…
1
vote
2 answers

How to save data to csv Cantera and error

I have this script on Cantera. I want to save data into csv for both the two parts of the script: the first that evaluate Tfinal vs autoignition delay time and the second that evalutate the NTC behavior. In the first part the example suggests to…
wundolab
  • 177
  • 10
1
vote
1 answer

trouble with Cantera install with old(?) Python3 module on Debian Testing to run a SCons script

UPDATE Here is the link to cantera: enter link description here and I do have scons installed; apt-cache policy scons* scons: Installed: 4.0.1+dfsg-2 Candidate: 4.0.1+dfsg-2 Version table: *** 4.0.1+dfsg-2 900 900…
nate
  • 269
  • 2
  • 11
1
vote
1 answer

IndexError: List index out of range with glob(), rsplit()

I am trying to execute a python script which is giving me an IndexError. I understood that the rsplit() method failed to split the string. I don't exactly know why it is showing index out of range. Could anyone tell me how to solve this problem…
spkumar
  • 15
  • 4
1
vote
1 answer

Superclass __init__ overrides subclass constructor

I am working with cantera, trying to create an expansion of cantera.Solution class by creating a subclass Flow. This is basically to expand description of gas phase with parameters of its movement. Solution is constructed by using certain **kwargs.…
1
vote
1 answer

Use biomass pyrolysis kinetics in Cantera reactor

I'm trying to use Cantera with a kinetic scheme for biomass pyrolysis to look at concentration changes over time in a batch reactor. An overview of the kinetics is shown below along with a reference to the paper. Notice that species concentrations…
wigging
  • 8,492
  • 12
  • 75
  • 117
1
vote
1 answer

Cantera 'module' object has no attribute 'Solution'

My question is the same as the one here. Module object has no attribute [CANTERA] Ray Speth commented but the OP of that post never responded so I'm hoping that maybe Ray could help me out. I installed Cantera and did tried to make a gas doing the…
mnal
  • 65
  • 1
  • 10
1
vote
1 answer

Cantera problems in python 2.7

I try to start a program in Spyder. What I need to get start it is : from Cantera import * from Cantera.Reactor import * from Cantera.Func import * from Cantera import rxnpath what I get is: ImportError: No module named Cantera and what I try so…
Solphae
  • 11
  • 2
1
vote
0 answers

Module object has no attribute [CANTERA]

I've been trying out the simpliest basics of Cantera. I'm using Cantera 2.2.1 installed on CAE Linux (Xubuntu 12.04) along with iPython. I first import: import cantera as ct Then I try creating a gas: gas = ct.Solution('gri30.xml') That is just a…
0
votes
1 answer

Removing sundials package in Ubuntu 22.04

I am trying to install Cantera 1.8 due to some reason. I have installed the latest sundial version which is not working (problem with cvodes). Now I need to remove the sundials but I am unable to do so. I have used the following commands: sudo…
Anirudh
  • 1
  • 1
1
2