Hello,developers!
I’m running the following case,when I change the ratio of methane and oxygen passed in, I get a “float invalid operation in wrap pow” error.This error wouldn’t have occurred before when 0.2 CH4 and 0.8 O2 were passed through the gas, was it because of the excess oxygen?But how do I study the effects of excess air coefficients?
Can you help me check what is wrong with my case?Thank you very much!
(gdb) p (RO_g(IJK) * X_g(IJK,O2))/MW_g(O2)
$10 = 0.0050817876443430285
(gdb) p (RO_g(IJK) * X_g(IJK,CH4))/MW_g(CH4)
$11 = -4.016515149766889e-07
There’s your problem - the c_CH4 has gone negative, and you are trying to take a fractional power. Maybe add a check before line 77 and limit the values to 0 if they are negative. And in general you will have a better experience with writing and debugging UDFs if you have access to Linux.
Hi, I add a check before line 77 and limit the values to 0 if they are negative(as shown in the figure),but a new problem has arisen:Unphysical field variables detected on one or more processes.What’s this about?Thank you!
Thanks, I add another check and limit the values to 0 if they are negative(as shown in the figure),but it still happens that the mass fraction of methane is less than 0. Why is that?
Maybe you are overconsuming CH4. Please double check your reaction rates.
We have data checks that are supposed to clip the species values between 0 and 1, so we need to see why this isn’t applied here.
You can also try with the stiff solver to see if this makes a difference.
I took a closer look. The species mass fractions are bounded, but this occurs before the Crank-Nicholson interpolation. You can turn off Crank-Nicholson to avoid this. We are adding another bounding of the species mass fraction in the next release (24.4) coming up by the end of December.
However, the underlying issue is your reaction rates are too large and CH4 is overconsumed, so you will need to reduce the reaction rates. Otherwise, the simulation will either runs slowly (small time step) or even fail somewhere else.