-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Line 2237 in deeef56
| 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
Labels
No labels