(* Generated by JWS Online *) (* This is an experimental feature of JWS Online. Please report any mistakes.*) (* Note that the following notable SBML entities or features are not supported in notebook outputyet: *) (* Events *) (* Constraints *) (* Units and UnitDefinitions *) (* AlgebraicRules *) (* conversionFactors *) variables = { NADPH[t], PGA[t] }; initialValues = { NADPH[0] == 0.21, PGA[0] == 2.4 }; rates = { NADPH\[LetterSpace]prod, PGA\[LetterSpace]cons, PGA\[LetterSpace]prod\[LetterSpace]Vc, PGA\[LetterSpace]prod\[LetterSpace]Vo }; rateEquations = { NADPH\[LetterSpace]prod -> chloroplast*NADPH\[LetterSpace]production[J, NADP, Nt], PGA\[LetterSpace]cons -> chloroplast*PGA\[LetterSpace]consumption[PGA[t], Rp, NADPH[t], Nt, Vcmax], PGA\[LetterSpace]prod\[LetterSpace]Vc -> chloroplast*carboxylation[Vc, Vj, Vp], PGA\[LetterSpace]prod\[LetterSpace]Vo -> chloroplast*oxygenation[phi, Vc, Vj, Vp] }; parameters = { Jmax -> 142.047003854271, Kc -> 26.7125313821435, Ko -> 187891.032274486, Nt -> 0.5, Q -> 1000.0, Rp -> 3.2, TPU -> 0.259027750094988, Vcmax -> 1.91141270310584, a -> 0.0434, alpha -> 0.24, CO2 -> 24.5, O2 -> 21000.0, RuBP -> 2.0, starch -> 0.5, chloroplast -> 1.0 }; assignments = { PGA\[LetterSpace]consumption[S1_,Rp_,R_,Nt_,Vc_] -> (R*S1*Vc)/(Nt*Rp), NADPH\[LetterSpace]production[j_,S1_,Nt_] -> (j*S1)/(2*Nt), carboxylation[Vc_,Vj_,Vp_] -> (Vp + (Vc + Vj - Abs[Vc - Vj])/2 - Abs[-Vp + (Vc + Vj - Abs[Vc - Vj])/2])/2, oxygenation[phi_,Vc_,Vj_,Vp_] -> (phi*(Vp + (Vc + Vj - Abs[Vc - Vj])/2 - Abs[-Vp + (Vc + Vj - Abs[Vc - Vj])/2]))/2, Vj -> (CO2*J)/(4*(CO2 + 2*Gamma)), J -> (0.027692307692307693*alpha*Cst*Q)/Sqrt[1 + (0.81*alpha^2*Q^2)/Jmax^2], NADP -> Nt - NADPH[t], Vp -> (3*TPU)/(1 - Gamma/CO2), Vc -> (CO2*Vcmax)/((CO2 + Kc)*(1 + O2/Ko)), phi -> (0.21*Kc*O2)/(CO2*Ko), Cst -> E^(-0.0398*a*starch), Gamma -> 0.00020430517273754983*O2 }; events = { }; speciesAnnotations = { }; reactionAnnotations = { }; units = { {"time" -> "", "metabolite" -> "", "extent" -> ""} }; (* Time evolution *) odes = { NADPH'[t] == 1.0*NADPH\[LetterSpace]prod -2.0*PGA\[LetterSpace]prod\[LetterSpace]Vc -2.0*PGA\[LetterSpace]prod\[LetterSpace]Vo, PGA'[t] == 2.0*PGA\[LetterSpace]prod\[LetterSpace]Vc +1.5*PGA\[LetterSpace]prod\[LetterSpace]Vo -1.0*PGA\[LetterSpace]cons }; timeCourse = NDSolve[Join[odes, initialValues]//.rateEquations//.assignments//.parameters, variables, {t, 0, 100}]; (* Steady-state solution initialized with result of time evolution *) findRootEquations = odes /.D[_[t],t]->0; findRootVariables = Partition[Flatten[{#, #/.timeCourse/.t->100} &/@variables],2]; steadyStateVariables = FindRoot[findRootEquations//.rateEquations//.assignments//.parameters, findRootVariables, MaxIterations->100] fluxes = #//.assignments//.parameters/.steadyStateVariables&/@rateEquations (* Plot the time evolution of the variables *) plotTable=Table[Plot[variables[[i]]/.parameters/.timeCourse,{t,0,100},PlotLegends->variables[[i]],PlotRange->Full],{i,Length[variables]}]