reactionMechanismSimulator.jl idealGas() call fails due to no default for stoichmatrix

The basic example of idealGas in reactionMechanism.jl fails to due no default for stoichmatrix.

Advice to fix is much appreciated. Thx!

    using ReactionMechanismSimulator

phaseDict = readinput("src/superminimal.rms")
spcs = phaseDict["phase"]["Species"]
rxns = phaseDict["phase"]["Reactions"]
ig = IdealGas(spcs,rxns,name="gas")
# ERROR: LoadError: Field 'stoichmatrix' has no default, supply it with keyword.
# Stacktrace:
#  [1] error(s::String)
#    @ Base ./error.jl:33
#  [2] IdealGas(species::Vector{Species}, reactions::Vector{ElementaryReaction}; name::String, diffusionlimited::Bool)
#    @ ReactionMechanismSimulator ~/.julia/packages/ReactionMechanismSimulator/MW0YP/src/Phase.jl:32
#  [3] top-level scope
#    @ ~/Projects/SIR/src/RMS.jl:6

initialconds = Dict(["T"=>1000.0,"P"=>1e5,"H2"=>0.67,"O2"=>0.33]) # Initial Temp and Pressure
domain,y0,p = ConstantTPDomain(phase=ig,initialconds=initialconds)

react = Reactor(domain,y0,(0.0,150.1);p=p)
sol = solve(react.ode,CVODE_BDF(),abstol=1e-20,reltol=1e-12)

bsol = Simulation(sol, domain)

I don’t think Matt uses this so you might want to email him directly.

Apologies for being slow in my comprehension.

Who is Matt? What do I tell him?

Thx, Domenico.

Thanks Chris for the ping. I’m having trouble reproducing this issue on master or on v0.3.2. My guess is this is a call syntax thing, it’s possible this might be dependent on julia version, I’m using v1.4.2. I think:

ig = IdealGas(spcs,rxns;name=“gas”)

Should definitely work.

Sincere thx! I will look into it further. To be continued.

Is there any reason why this would no longer work under Julia 1.6? What is a good way to gain more understanding in this matter? Thx again.

I figured out the bug and the fix is merged to master now, but I haven’t had time to do a new release yet.

Thank you so much! We will get back to you on this.