Timeline for Strange results from NDSolve after using a smooth (Tanh) function to approximate a discontinuous (jump) event
Current License: CC BY-SA 4.0
17 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Nov 10, 2019 at 11:35 | vote | accept | xinxin guo | ||
Nov 10, 2019 at 11:35 | comment | added | xinxin guo |
@Michael E2 Thanks for attentions. I don't think it is a bug and adding "LocationMethod" -> "LinearInterpolation" is helpful, as documented in the builtin reference of NDSolve .
|
|
Nov 9, 2019 at 21:12 | comment | added | Michael E2 |
I don't see why NDSolve should fail to detect the events. I think it's a bug. Please report it to WRI support.
|
|
Nov 9, 2019 at 17:33 | comment | added | Michael E2 |
You might want to plot fc[x1[t], x2[t], x3[t], x1'[t], x2'[t], x3'[t]] - f[u[t], y'[t], x1[t]]) f[u[t], y'[t], x1[t]] versus v[t] to see if every event was captured by NDSolve .
|
|
Nov 9, 2019 at 17:20 | answer | added | Alex Trounev | timeline score: 3 | |
Nov 9, 2019 at 15:26 | history | edited | xinxin guo | CC BY-SA 4.0 |
edited title
|
Nov 9, 2019 at 14:37 | history | edited | xinxin guo | CC BY-SA 4.0 |
edited title
|
Nov 9, 2019 at 14:31 | history | edited | xinxin guo | CC BY-SA 4.0 |
edited title
|
Nov 9, 2019 at 14:25 | history | edited | xinxin guo | CC BY-SA 4.0 |
added 89 characters in body
|
Nov 9, 2019 at 14:22 | comment | added | xinxin guo |
Thanks. Acctually the most important result to me is u[t] .
|
|
Nov 9, 2019 at 14:20 | history | edited | xinxin guo | CC BY-SA 4.0 |
[Edit removed during grace period]
|
Nov 9, 2019 at 14:17 | comment | added | Ulrich Neumann |
Sorry I didn't recognize vmax in sol2. Setting v[t]->1 gives a good match of sol1 and sol2 in your second last plot (don't know why)
|
|
Nov 9, 2019 at 14:12 | comment | added | xinxin guo | Thanks. I tried your suggestion, but sol1 is still apparently different from sol1 (for example u[t] of sol1 and sol2). BTW, why did you suggest that changing v[t]->2.25 to v[t]->1 ? my vmax is 2.25, not 1, and it jumps between 0 and vmax(2.25). | |
Nov 9, 2019 at 14:07 | history | edited | xinxin guo | CC BY-SA 4.0 |
edited body
|
Nov 9, 2019 at 14:05 | comment | added | Ulrich Neumann |
Change your second WhenEvent v[t]->2.25 to v[t]->1 ! Now the solutions sol1 an sol2 are the same!
|
|
Nov 9, 2019 at 14:04 | history | edited | xinxin guo |
edited tags
|
|
Nov 9, 2019 at 13:34 | history | asked | xinxin guo | CC BY-SA 4.0 |