-
-
Notifications
You must be signed in to change notification settings - Fork 404
Description
Problem description
Hello, and thanks for Cantera! I think I have found a physics bug in the plasma phase, or maybe there is something that I do not understand.
A multi-temperature phase, like the Plasma phase, should take into account electron temperature when computing pressure. I think this is not the case in Cantera, when I compare the formula used in Chemkin.
Chemkin
In Chemkin Manual, equation 2-4
Cantera
In Cantera (electronic temperature is not taken into accont to compute the pressure)
For the Ideal Gas Mixture phase, the molar volume of a species is given by the ideal gas law:
For the Plasma phase, there is an electron pressure defined. However, the class Plasma inherits from Ideal Gas Mixture, but the method setPressure from the Ideal Gas Mixture phase is only inherited, and not redefined to consider the electron pressure.
Steps to reproduce
import cantera as ct
# Create the plasma object using a default YAML file.
plasma = ct.Solution(
"example_data/oxygen-plasma-itikawa.yaml",
"isotropic-electron-energy-plasma",
transport_model=None,
)
# Initialize the plasma object with a temperature, pressure, and composition.
plasma.TDX = 300, 0.6415, {"O2": 0.5, "E": 0.5}
# Also initialize the electron temperature.
plasma.Te = 300.0
print(
"Initializing the plasma object:\n"
+ f"T = {plasma.T} K\n"
+ f"rho = {plasma.density} kg/m^3\n"
+ f"X = {plasma.X}\n"
+ f"Te = {plasma.Te} K\n"
)
print(f"Computed (total?) pressure = {plasma.P} Pa")
# >>> 100011.93190795329 Pa, ok
print(f"Computed (electron) pressure = {plasma.Pe} Pa")
# >>> 50005.96595397664 Pa, ok
print("==========================")
# Now, changing the electron temperature.
plasma.Te = 30_000.0
print(
f"Changing the electron temperature to T_e={plasma.Te} K:\n"
+ f"T = {plasma.T} K\n"
+ f"rho = {plasma.density} kg/m^3\n"
+ f"X = {plasma.X}\n"
)
print(f"Computed (total?) pressure = {plasma.P} Pa")
# >>> 100011.93190795329 Pa, NOT ok?
print(f"Computed (electron) pressure = {plasma.Pe} Pa")
# >>> 5000596.595397665, ok
Behavior
In first case, gas temperature and electron temperature are set, as well as density and mole fraction (50% O2 and 50 % E). The pressure computed is around 1 atm, which is correct.
Then, in the second case, electron temperature is multiply by a factor 100, leaving gas temperature, density and mole fraction unchanged. However, the pressure is still exactly the same as before, which does not seem correct.
I also think there is confusion between total pressure and gas pressure:
- If
plasma.Pis the total pressure- In case 1,
$P_{tot}=1atm$ and$P_e = 0.5 atm$ --> ,$P_{gas}=0.5 atm$ which is good. - In case 2,
$P_{tot}=1atm$ and$P_e = 5 atm$ -->$P_{gas}=P_{tot}-P_e=-4.5 atm$ , not good...
- In case 1,
- If
plasma.Pis the gas pressure- In case 1,
$P_{gas}=1atm$ and$P_e = 0.5 atm$ -->$P_{tot}=1.5 atm$ --> not what I expected - In case 2,
$P_{gas}=1atm$ and$P_e = 5 atm$ -->$P_{tot}=P_{gas}+P_e= 6atm$ , maybe?
- In case 1,
System information
- Cantera version: 3.1.0
- OS: Windows 11
- Python versions: 3.11.10