-
-
Notifications
You must be signed in to change notification settings - Fork 346
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
Integration of reactor with water fails below Temperature of 328 K #475
Comments
This is expected behavior. The minimum temperature allowed for the
|
On second thought, the You can get this to advance if you turn off the energy equation:
Can you please give some more detail of your use case that raises this issue? |
I am interested in the temperature of a reactive gas pressurized in a reactor with water. The inflow of water is modeled with a valve. Also the heat transfer to the water is needed in this case. |
@bryanwweber could this be due to the FD Jacobian? edit: on second thought, that looks like a pretty large deltaT to be evaluating at |
@ulrich1a Can you provide a complete script that worked with Cantera 2.2? |
Here is a version, that worked with water, although I used here |
With the script you provided and Cantera 2.2.1 (and 2.2.0), I get an |
I also couldn't get this to work with Cantera 2.2, but the changes that generate the current behavior are the ones introduced in 1dc0ced which were implemented to resolve #257. I think the issue here is that while the |
The code in 1dc0ced contains the line: + TT = bmt::bracket_and_solve_root(
+ u_err, T, 1.2, true, bmt::eps_tolerance<double>(48), maxiter); The reported temperature in the error message is just by a factor 1/1.2 smaller than the starting temperature. So for me it seems, that the factor 1.2 hardcoded in the function call has to be adjusted in case of pure liquids to avoid a temperature outside of the limits. The following script was running without error in version 2.2.1: # -*- coding: utf-8 -*-
import cantera as ct
#myWater = ct.Water()
myWater = ct.Solution('liquidvapor.xml', 'water')
#myWater.TP = 328.0, 7.0*ct.one_atm
#myWater.TX = 328.0, 1.0
myWater.TPX = (300.0, 7.0*ct.one_atm, 'H2O:1.0') # Temperatur 35°C
r2 = ct.Reactor(contents=myWater)
#r2.volume = 0.000001
r2.syncState()
print('Temperatur 1:',r2.T)
print(r2.thermo.P)
sim = ct.ReactorNet([r2])
sim.verbose = True
#print(r2.get_state())
sim.advance(4.e-4)
print('Temperatur 2:',r2.T)
print(r2.thermo.P) |
Cantera version 2.3
Operating System: Windows 10 64-bit
Python 3.5
Expected Behavior: reactor should integrate to next time step
Actual Behavior:
CanteraError thrown by Substance::set_T:
illegal temperature: 272.5
Steps to reproduce: run the following python script
import cantera as ct
myWater = ct.Water()
myWater.TP = 327.0, 1.0*ct.one_atm
r2 = ct.Reactor(contents=myWater)
sim = ct.ReactorNet([r2])
sim.advance(4.e-4)
The text was updated successfully, but these errors were encountered: