1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Enthalpy equation

  1. Jun 28, 2008 #1
    Hi guys,

    I'm trying to implement the enthalpy equation in C++ converting it from an excel macro I found on this forum. I'm having a problem with the results which I think is as a result of having the incorrect order of operations. Can somebody help with the order of operations for this with brackets? Any help is much appreciated.

    The enthalpy equation:
    Code (Text):
    H/(R*T) = A1 + A2*T/2 + A3*T^2/3 + A4*T^3/4 + A5*T^4/5 + A6/T
     
    The macro equation:
    Code (Text):

    H = H + W * r * t * (a1 + t * a2 / 2 + t ^ 2 * a3 / 3 + t ^ 3 * a4 / 4 + t ^ 4 * a5 / 5 + a6 / t)
    My Implementation:
    Code (Text):
    ocpcOxidantEnthalpy += w * universalGasConstant * ocpcOxidantTemperature * (fuelContainer.a1 + ocpcOxidantTemperature * fuelContainer.a2 / 2 + Math::Pow(ocpcOxidantTemperature,2) * fuelContainer.a3 / 3 + Math::Pow(ocpcOxidantTemperature,3) * fuelContainer.a4 / 4 + Math::Pow(ocpcOxidantTemperature,4) * fuelContainer.a5 / 5 + fuelContainer.a6 / ocpcOxidantTemperature);
     
  2. jcsd
  3. Sep 16, 2008 #2
    I think that power is fractional 2/3, 3/4, 4/5.
    Could you please provide the values of A1 to A6 you are using?
    Regards,
    Mike.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Enthalpy equation
  1. Entropy and enthalpy (Replies: 38)

  2. Enthalpy of expansion (Replies: 1)

  3. Enthalpy of reaction (Replies: 6)

Loading...