(* 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 = { Gamma -> 3.74116898182615, J -> 0.0307678189755062, Kc -> 27.2372124161502, Ko -> 16.5788431231261, Nt -> 0.5, Rd -> 0.0307674936008629, Rp -> 3.2, TPU -> 0.0307585098788555, Vcmax -> 0.0307602623029146, gm -> 0.0307740792044142, CO2 -> 24.5, O2 -> 21.0, RuBP -> 2.0, chloroplast -> 1.0 }; assignments = { oxygenation[phi_,Vc_,Vj_,Vp_] -> (phi*(Vp + (Vc + Vj - Abs[Vc - Vj])/2 - Abs[-Vp + (Vc + Vj - Abs[Vc - Vj])/2]))/2, 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, phi -> (0.21*gm*Kc*O2)/(Ko*(CO2*gm + Rd - v\[LetterSpace]c)), v\[LetterSpace]c -> (-Abs[-Vp + (-Abs[Vc - Vj] + Abs[Vc + Vj])/2] + Abs[Vp + (-Abs[Vc - Vj] + Abs[Vc + Vj])/2])/2, Vc -> (Vcmax*(CO2 + (-CO2 - Kc*(1 + O2/Ko) - (-Rd + Vcmax)/gm + Sqrt[(4*((CO2 + Kc*(1 + O2/Ko))*Rd + (-CO2 + Gamma)*Vcmax))/gm + (CO2 + Kc*(1 + O2/Ko) + (-Rd + Vcmax)/gm)^2])/2))/(CO2 + Kc*(1 + O2/Ko) + (-CO2 - Kc*(1 + O2/Ko) - (-Rd + Vcmax)/gm + Sqrt[(4*((CO2 + Kc*(1 + O2/Ko))*Rd + (-CO2 + Gamma)*Vcmax))/gm + (CO2 + Kc*(1 + O2/Ko) + (-Rd + Vcmax)/gm)^2])/2), Vp -> (3*TPU*(CO2 - (-Rd + 3*TPU)/gm))/(CO2 - Gamma - (-Rd + 3*TPU)/gm), NADP -> Nt - NADPH[t], Vj -> (J*(CO2 + (-CO2 - 2*Gamma - (J - 4*Rd)/(4*gm) + Sqrt[(CO2 + 2*Gamma + (J - 4*Rd)/(4*gm))^2 + (4*(((-CO2 + Gamma)*J)/4 + (CO2 + 2*Gamma)*Rd))/gm])/2))/(4*(CO2 + 2*Gamma + (-CO2 - 2*Gamma - (J - 4*Rd)/(4*gm) + Sqrt[(CO2 + 2*Gamma + (J - 4*Rd)/(4*gm))^2 + (4*(((-CO2 + Gamma)*J)/4 + (CO2 + 2*Gamma)*Rd))/gm])/2)) }; 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]}]