Why is the heat of reaction of an endothermic reaction negative

I’ve added code to detect the value of RXNS_Qs (NP). But the decomposition reaction of CaCO3 that I simulated should be endothermic, but the values of RXNS_Qs (NP) are all negative?

Please attach your files if you want help.

Hi, I noticed that when I set Hf/R to 0, the heat of reaction is positive now. What is the role of Hf/R, please?

Please see for example https://en.wikipedia.org/wiki/Standard_enthalpy_of_formation#Use_in_calculation_for_other_reactions :

The standard enthalpy change of any reaction can be calculated from the standard enthalpies of formation of reactants and products using Hess’s law. A given reaction is considered as the decomposition of all reactants into elements in their standard states, followed by the formation of all products. The heat of reaction is then minus the sum of the standard enthalpies of formation of the reactants (each being multiplied by its respective stoichiometric coefficient, ν) plus the sum of the standard enthalpies of formation of the products (each also multiplied by its respective stoichiometric coefficient)

If the standard enthalpy of the products is less than the standard enthalpy of the reactants, the standard enthalpy of reaction is negative. This implies that the reaction is exothermic. The converse is also true; the standard enthalpy of reaction is positive for an endothermic reaction.

Thank you! There is also a question I would like to ask you, why is the source term of a chemical reaction opposite to the heat of reaction in mfix?

I’m not sure I understand the question. Are you perhaps confusing heat of reaction with heat of formation?





For example, this equation for the conservation of internal energy in particles. Why is the reaction heat preceded by a minus sign?