diff options
author | bnewbold <bnewbold@robocracy.org> | 2016-11-29 23:23:24 -0800 |
---|---|---|
committer | bnewbold <bnewbold@robocracy.org> | 2016-11-29 23:23:24 -0800 |
commit | 4fd86a3325762b40962fe10301f8ce93ac99071a (patch) | |
tree | 65c35e010cf3d1dc5008a252636ffa49333a67ea /examples/hodgkin_huxley/model.modelica | |
parent | a4e33306fffe87cada79c8ba47d4172d39f3fba5 (diff) | |
download | modelthing-4fd86a3325762b40962fe10301f8ce93ac99071a.tar.gz modelthing-4fd86a3325762b40962fe10301f8ce93ac99071a.zip |
more examples (fixed syntax)
Diffstat (limited to 'examples/hodgkin_huxley/model.modelica')
-rw-r--r-- | examples/hodgkin_huxley/model.modelica | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/examples/hodgkin_huxley/model.modelica b/examples/hodgkin_huxley/model.modelica new file mode 100644 index 0000000..9153799 --- /dev/null +++ b/examples/hodgkin_huxley/model.modelica @@ -0,0 +1,23 @@ +model HodgkinHuxley + parameter Real G_Na =120 "conductance"; + parameter Real G_K =36 "conductance"; + parameter Real G_lk =0.3 "conductance"; + parameter Real C =1.0 "membrane capacitance"; + parameter Real V_Na =115 "potential"; + parameter Real V_K =-12 "potential"; + parameter Real V_lk =-49.387 "leakage"; + Real n; + Real alpha_n; + Real Beta_n; + Real m; + Real alpha_m; + Real Beta_m; + Real h; + Real alpha_h; + Real Beta_h; +equation + C * der(V_m) = - G_Na * (Vm - E_Na) - G_K * (V_m - E_K) - G_lk * (V_m - V_lk); + der(n) = - (alpha_n + Beta_n) * n + alpha_n; + der(m) = - (alpha_m + Beta_m) * m + alpha_m; + der(h) = - (alpha_h + Beta_h) * h + alpha_h; +end HodgkinHuxley; |