Skip to content

possible issue in "spActiveZebrafishVicsek()" #1

@YUXUANCHENG

Description

@YUXUANCHENG

psi.at(ci) += dt*((1.0/vtau)*asin(cos(psi.at(ci))*cell(ci).cvel(1) - sin(psi.at(ci))*cell(ci).cvel(0)) + 4.0*Dr*PI*(r1 - 0.5));

file location: /src/active2D.cpp
function: spActiveZebrafishVicsek
possible issue: "asin(cos(psi.at(ci))*cell(ci).cvel(1) - sin(psi.at(ci))*cell(ci).cvel(0))" where cvel needs to be normalized. Because: | a x b | = |a| . |b| . sin(theta) then sin(theta) = | a x b | / (|a| . |b|).

But be careful that (|a| . |b|) could be zero, thus should divide by (|a| . |b| + e) where e is a small number.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions