From c31e73b3a1c83441a6e9d3b3c1bfed97e6530509 Mon Sep 17 00:00:00 2001 From: Torkel Date: Wed, 22 May 2024 18:19:11 -0400 Subject: [PATCH 1/2] init --- docs/src/model_creation/examples/hodgkin_huxley_equation.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/src/model_creation/examples/hodgkin_huxley_equation.md b/docs/src/model_creation/examples/hodgkin_huxley_equation.md index ab1f072b6b..08d98d5b6e 100644 --- a/docs/src/model_creation/examples/hodgkin_huxley_equation.md +++ b/docs/src/model_creation/examples/hodgkin_huxley_equation.md @@ -77,6 +77,7 @@ I = I₀ * sin(2*pi*t/30)^2 # get the gating variables to use in the equation for dV/dt @unpack m,n,h = hhrn +Dₜ = default_time_deriv() eqs = [Dₜ(V) ~ -1/C * (ḡK*n^4*(V-EK) + ḡNa*m^3*h*(V-ENa) + ḡL*(V-EL)) + I/C] @named voltageode = ODESystem(eqs, t) nothing # hide @@ -88,6 +89,7 @@ Finally, we add this ODE into the reaction model as ```@example hh1 @named hhmodel = extend(voltageode, hhrn) +hhmodel = complete(hhmodel) nothing # hide ``` From 377d711f493c315f690a066da15607b7db39b2a9 Mon Sep 17 00:00:00 2001 From: Torkel Date: Wed, 29 May 2024 17:23:58 -0400 Subject: [PATCH 2/2] up --- docs/pages.jl | 2 +- docs/src/model_creation/examples/hodgkin_huxley_equation.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/pages.jl b/docs/pages.jl index fd9cfa18ab..e4c1441a70 100644 --- a/docs/pages.jl +++ b/docs/pages.jl @@ -20,7 +20,7 @@ pages = Any[ "Model creation examples" => Any[ "model_creation/examples/basic_CRN_library.md", "model_creation/examples/programmatic_generative_linear_pathway.md", - #"model_creation/examples/hodgkin_huxley_equation.md", + "model_creation/examples/hodgkin_huxley_equation.md", #"model_creation/examples/smoluchowski_coagulation_equation.md" ] ], diff --git a/docs/src/model_creation/examples/hodgkin_huxley_equation.md b/docs/src/model_creation/examples/hodgkin_huxley_equation.md index 08d98d5b6e..a2091035b1 100644 --- a/docs/src/model_creation/examples/hodgkin_huxley_equation.md +++ b/docs/src/model_creation/examples/hodgkin_huxley_equation.md @@ -13,7 +13,7 @@ cells such as neurons and muscle cells. We begin by importing some necessary packages. ```@example hh1 using ModelingToolkit, Catalyst, NonlinearSolve -using DifferentialEquations, Symbolics +using OrdinaryDiffEq, Symbolics using Plots t = default_t() D = default_time_deriv()