from mole fractions to mass fractions

56 views
Skip to first unread message

tullio viola

unread,
Oct 31, 2022, 3:05:53 PM10/31/22
to Cantera Users' Group
Hello everyone,
I'm using this code to save simulation data into csv file ( pressure, time, temperature and molar fraction of chemical species) How can I save directly in mass fractions?

while(tnow < tfinal):
    tnow = reactorNetwork.step()

    i +=1
    # Storing results after every step can be excessive. Instead, store results
    # every 10 steps, or more frequently if large steps are being taken.
    if tnow-tprev > 1e-2 or i == 10:
        i = 0
        tprev = tnow
        tHyBatchBOX_base.loc[tnow] = reactorNetwork.get_state()
        tHy_buffer.append(r.thermo.state, t=tnow)


Best regards

Tulllio



       
    
Reply all
Reply to author
Forward
0 new messages