我正在为
做模拟time step = 1.0 e^-7 &
total number of steps ==> nsteps = 1.0 e^8
我必须找到达到n#步的模拟总时间。两者相乘可以得到模拟时间吗?
time of simulation = time step * total number of steps
time of simulation = 1.0 e^-7 * 1.0 e^8
time of simulation = 10
这是对还是错?提前感谢。
这是一个是非问题,所以:
不是(或者是,取决于你想要的答案有多准确)!
但是你真的很接近…您需要减去一个time_step
,因此答案实际上是:
time_of_simulation = time_step * total_number_of_steps - time_step;
如果你考虑计算秒数,你就会明白原因。从一个数字开始,看看如果你一次数一秒,你能走多远。
1, 2, 3 => 3次测量,但只有2秒。
然而,在你的情况下,我猜你已经足够接近了,没有最后的减法,因为
time of simulation = 9.999999 is pretty close to 10