Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust Diffusion Scaling #2439

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions arbor/fvm_layout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -397,8 +397,8 @@ fvm_cv_discretize(const cable_cell& cell,
// Compute
auto len = embedding.integrate_length(span);
for (auto& [ion, info]: diffusive_ions) {
// TODO scale to m^2/s (now at 1e-7*m^2/s)
auto sigma = len/embedding.integrate_ixa(span, info.axial_resistivity[0].at(bid));
// TODO scale to m^2/s
auto sigma = 1e7*len/embedding.integrate_ixa(span, info.axial_resistivity[0].at(bid));
info.face_diffusivity[i] = sigma;
}
}
Expand Down
6 changes: 3 additions & 3 deletions doc/concepts/decor.rst
Original file line number Diff line number Diff line change
Expand Up @@ -231,11 +231,11 @@ can't be overridden at cell or region level.

Each ion species has the following properties:

1. *internal concentration*: concentration on interior of the membrane [mM].
2. *external concentration*: concentration on exterior of the membrane [mM].
1. *internal concentration*: concentration on interior of the membrane :math:`[mM]`.
2. *external concentration*: concentration on exterior of the membrane :math:`[mM]`.
3. *reversal potential*: reversal potential [mV].
4. *reversal potential mechanism*: method for calculating reversal potential.
5. *diffusivity*: diffusion coefficient for marker concentration, defaults to zero (unit is currently [10^-7 m^2/s], which will be adapted in the future).
5. *diffusivity*: diffusion coefficient for marker concentration, defaults to zero :math:`[m^2/s]`.

Properties 1, 2 and 3 must be defined, and are used as the initial values for
each quantity at the start of the simulation. They are specified globally,
Expand Down
8 changes: 4 additions & 4 deletions test/unit/test_diffusion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ TEST(diffusion, errors) {

TEST(diffusion, by_initial_concentration) {
auto rec = linear{30, 3, 6}
.set_diffusivity(0.005)
.set_diffusivity(5e-10)
.set_concentration(0.0)
.set_concentration(0.1, "(cable 0 0.5 0.6)"_reg);
result_t exp = {{0.000000, 0.000000, 0.000000},
Expand Down Expand Up @@ -178,7 +178,7 @@ TEST(diffusion, by_initial_concentration) {

TEST(diffusion, by_event) {
auto rec = linear{30, 3, 6}
.set_diffusivity(0.005)
.set_diffusivity(5e-10)
.set_concentration(0.0)
.add_inject()
.add_event(0, 0.005);
Expand Down Expand Up @@ -235,7 +235,7 @@ TEST(diffusion, decay) {

TEST(diffusion, decay_by_initial_concentration) {
auto rec = linear{30, 3, 6}
.set_diffusivity(0.005)
.set_diffusivity(5e-10)
.set_concentration(0.0)
.set_concentration(0.1, "(cable 0 0.5 0.6)"_reg)
.add_decay();
Expand Down Expand Up @@ -264,7 +264,7 @@ TEST(diffusion, decay_by_initial_concentration) {

TEST(diffusion, decay_by_event) {
auto rec = linear{30, 3, 6}
.set_diffusivity(0.005)
.set_diffusivity(5e-10)
.set_concentration(0.0)
.add_decay()
.add_inject()
Expand Down
Loading