Skip to content

Commit

Permalink
Improve logic for liquid vapourization enthalpy
Browse files Browse the repository at this point in the history
  • Loading branch information
davidschlachter committed Nov 15, 2017
1 parent 7df175b commit 1aed95d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Enthalpy.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,15 @@ public double testFunction(double testTemp){
} else {
lBound = outletBubbleTemperature;
}
result += inletLiquidFlowRate*HeatCapacity.integrate(this.inlet.getFlowSpecies().get(i), initialTemperature, lBound, "liquid");
result += outletVapourFlowRate*HeatCapacity.integrate(this.inlet.getFlowSpecies().get(i), lBound, finalTemperature, "vapour");
// Liquid that was vapourized
result += (inletLiquidFlowRate-outletLiquidFlowRate)*HeatCapacity.integrate(this.inlet.getFlowSpecies().get(i), initialTemperature, lBound, "liquid");
// Liquid that was heated but not vapourized
result += outletLiquidFlowRate*HeatCapacity.integrate(this.inlet.getFlowSpecies().get(i), initialTemperature, finalTemperature, "liquid");
// Vapour that was formed
result += (outletVapourFlowRate-inletVapourFlowRate)*HeatCapacity.integrate(this.inlet.getFlowSpecies().get(i), lBound, finalTemperature, "vapour");
// Vapour that did not change state (just heated)
result += inletVapourFlowRate*HeatCapacity.integrate(this.inlet.getFlowSpecies().get(i), lBound, finalTemperature, "vapour");
// Heat of vapourization for vapourized liquid
result += (inletLiquidFlowRate-outletLiquidFlowRate)*heatofVapourization;
}
// If some of the vapour has condensed
Expand Down

0 comments on commit 1aed95d

Please sign in to comment.