Skip to content

Calculation of stoichiometric / theoretical combustion air #806

Answered by EvenSol
ngom52 asked this question in use of NeqSim
Discussion options

You must be logged in to vote

Hi.

In neqsim (2.5.5+) you can calculate afr using a script like:

elements_h = 0.0
elements_c = 0.0
sum_hc = 0.0
molmass_hc = 0.0
wtfrac_hc = 0.0

for i in range(fluid.getNumberOfComponents()):
   if fluid.getComponent(i).isHydrocarbon():
       sum_hc = sum_hc + fluid.getComponent(i).getz()
       molmass_hc = molmass_hc + fluid.getComponent(i).getz() * fluid.getComponent(i).getMolarMass()
       elements_c = elements_c + fluid.getComponent(i).getz() * fluid.getComponent(i).getElements().getNumberOfElements("C")
       elements_h = elements_h + fluid.getComponent(i).getz() * fluid.getComponent(i).getElements().getNumberOfElements("H")

if sum_hc == 0:
   print('no hydrocarbons in fluid '…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@ngom52
Comment options

@ngom52
Comment options

@EvenSol
Comment options

@ngom52
Comment options

Answer selected by ngom52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants