How to read these two columns and stored it in a keywords dictionary

41 views Asked by At

Currently, am modelling constant volume reactor-RCM. I am struggling to set the velocity for a wall. my professor told me that the wall velocity has to be set by using the Volume-Time history profile. I dont know how to make these two columns as a profile.

import sys
import cantera as ct
import numpy as np
gas=ct.Solution("gri30.xml")

reac = ct.IdealGasReactor(gas)
env = ct.Reservoir(ct.Solution('air.xml'))

net = ct.Wall(reac, env, velocity=)
netw = ct.ReactorNet([reac])

I have a text file like this. There is a time and volume columns.

VPRO 0.0000001 1.0000000
VPRO 0.54822008E-02 0.99950299
VPRO 0.65802743E-02 1.0026889
VPRO 0.73418149E-02 0.99627431
VPRO 0.90739698E-02 1.0158893
VPRO 0.96140946E-02 1.0028384
VPRO 0.97804742E-02 1.0070171
VPRO 0.10084646E-01 0.99990454
VPRO 0.10693270E-01 1.0107573
VPRO 0.11517717E-01 1.0099201
VPRO 0.11831626E-01 0.99879979
VPRO 0.29057992E-01 1.0034597
VPRO 0.29139576E-01 1.0001761
VPRO 0.29888237E-01 0.99735919
VPRO 0.30740998E-01 1.0048461
VPRO 0.30806940E-01 1.0092222
VPRO 0.31839109E-01 1.0053230
VPRO 0.32515062E-01 0.99802537
VPRO 0.32889860E-01 0.99232409
VPRO 0.35364048E-01 1.0027345
VPRO 0.35843734E-01 0.99307568
VPRO 0.36135389E-01 0.99638039
VPRO 0.36411413E-01 0.99009293
VPRO 0.37458905E-01 1.0028019
VPRO 0.39592186E-01 0.98974443
VPRO 0.40163110E-01 1.0000900
VPRO 0.43210211E-01 1.0070476
VPRO 0.49542261E-01 1.0026439
VPRO 0.49759985E-01 1.0077359
VPRO 0.51519470E-01 1.0026126
VPRO 0.52322467E-01 0.97408403
VPRO 0.52944216E-01 0.96103576
VPRO 0.54105348E-01 0.93095020
VPRO 0.55044882E-01 0.89119653
VPRO 0.55911692E-01 0.84723777
VPRO 0.56457098E-01 0.81692500
VPRO 0.57248888E-01 0.77123227
VPRO 0.57805937E-01 0.73170784
VPRO 0.58648872E-01 0.66863047
VPRO 0.59157635E-01 0.62958903
VPRO 0.59754123E-01 0.58326969
VPRO 0.59957977E-01 0.56727436
VPRO 0.60453182E-01 0.52899850
VPRO 0.60906861E-01 0.49480953
VPRO 0.61257981E-01 0.46852022
VPRO 0.61704079E-01 0.43503065
VPRO 0.61903909E-01 0.41910567
VPRO 0.62206198E-01 0.39576119
VPRO 0.62507156E-01 0.37251365
VPRO 0.62805821E-01 0.34862793
VPRO 0.63055253E-01 0.32943590

Can anyone suggest me to write the code for this? I read it somewhere that these data should be read and stored in a keywords dictionary. Then i can use this for setting the wall velocity. can anyone help me out?

0

There are 0 answers