One-step delay in Voltage source
martinmoraga opened this issue · 0 comments
@dinkelbachjan @gnakti @m-mirz
When a simulation starts the initial values of all components are calculated for t=0. Hence, the first simulation step should calculate the results for the time
To fix this error, the parameter "time" of the functions EMT::Ph1::VoltageSource::updateVoltage(Real time) and EMT::Ph3::VoltageSource::updateVoltage(Real time) must be updated to time = time + timestep
.
In addition, the log must be adapted accordingly. Currently, the column time of the log files also has a one-step delay, as shown in the table below:
time | variable1 | variable2 | ... |
---|---|---|---|
t=0 | value of variable1 for t=timestep | value of variable 2 for t=timestep | ... |
t=timestep | value of variable1 for t=timestep*2 | value of variable1 for t=timestep*2 | ... |
... | ... | ... | ... |
t=k | value of variable1 for t=timestep*(k+1) | value of variable2 for t=timestep*(k+1) | ... |
In my opinion, for time 0 we should log the initial values and the column time should not have a one-step delay:
time | variable1 | variable2 | ... |
---|---|---|---|
t=0 | initial value of variable1 | initial value of variable 2 | ... |
t=timestep | value of variable1 for t=timestep | value of variable2 for t=timestep | ... |
... | ... | ... | ... |
t=k | value of variable1 for t=timestep*(k) | value of variable2 for t=timestep*(k) | ... |