
3-34 Extension Reaction Kinetics
3-34
Set hyReactant =
hyContainer.Reactants.Add("AceticAcid")
hyReactant.StoichiometricCoefficientValue
= -1
Set hyReactant =
hyContainer.Reactants.Add("Oxygen")
hyReactant.StoichiometricCoefficientValue
= -0.5
Set hyReactant =
hyContainer.Reactants.Add("VinylAcetate")
hyReactant.StoichiometricCoefficientValue
= 1
Set hyReactant =
hyContainer.Reactants.Add("H2O")
hyReactant.StoichiometricCoefficientValue
= 1
Adds the remaining components and
specifies their stoichiometric coefficients.
hyContainer.BasisConversion = "psia"
Sets the Basis Conversion units to psia.
The Rate Conversion units is left in
HYSYS internal units of kg mole/m
3
-s.
With hyContainer
.SetReactionPropertyState rpReactants,
vsCalculated
.SetReactionPropertyState
rpStoichiometricCoefficients, vsCalculated
.SetReactionPropertyState
rpMinTemperature, vsCalculated
.SetReactionPropertyState
rpMaxTemperature, vsCalculated
.SetReactionPropertyState
rpReactionBasis, vsCalculated
.SetReactionPropertyState
rpReactionPhase, vsCalculated
.SetReactionPropertyState
rpBaseReactant, vsCalculated
.SetReactionPropertyState
rpBasisConversion, vsCalculated
.SetReactionPropertyState
rpRateConversion, vsCalculated
End With
Sets the property states as Calculated so
that they cannot be modified.
The With statement is used for efficiency
since each line uses the
SetReactionPropertyState method of
the hyContainer object.
End If
ErrorTrap:
Line to which the On Error statement
branches if an error occurs
End Function
Signifies the end of the function. This line
does not need to be added.
Code Explanation
Comentários a estes Manuais