Hi @wangjinjing,
I’d grab a drink, cause this is going to be a long one!
The error might be occurring due to a variable, either a user-defined variable that’s a function of field variables or just a field variable itself, not being an “appropriate value”. As an example, say you’re calculating a gaseous concentration in your simulation, the concentration could take on a negative number which would likely spit out the “float invalid operation” error - this would either be likely due to a mass fraction or the gas phase density becoming negative (without looking at your code/simulation, I wouldn’t be able to deduce the cause of the error).
In simple terms, all conditional evalutions are, essentially, boolean expressions but not all boolean expressions are conditional evaluations. A boolean expression either returns true or false (e.g., 5>3) while a conditional evaluation evaluates the “condition” of an expression to check if it’s either true or false. IFF (if and only if) the expression is true, say 5>3, then sub-expressions will be computed (this is where an if statement is invoked). If the boolean expression is not true, say 3>5, then the sub-expressions will not be computed. So, a boolean expression is, essentially, inside of a conditional evaluation. Here’s an example from my code:
The first if statement checks the condition of the expression EP_g > ZERO_EP_g - i.e., if the volume fraction of gas is greater than some constant, ZERO_EP_g in this instance, then the sub-expressions are evaluated. If not, the simulation skips over this block of code.
Without looking at your code, I’d recommend invoking a few of these, if you haven’t already, as they allow you to control the flow of your code. Regarding parameters, I didn’t change any of the kinetic parameters of the reactions I’m modeling. Rather, I used print statements:
to check (field) variables that are scattered around the code (this helped me debug since I’m operating on Windows). I’m unsure of the complexity of your reaction network, but I’d try making a simpler model if the problem persists. In my case, I created a separate file just for the noncatalytic reactions that are a part of my network to work out some of the kinks in my code. Hope this helps!