How change simscape simulation time from seconds (sec.) to hours (h)
6 views (last 30 days)
I am modelling a gas network (Reservoir, mashed network, multiple consumption units with real data) in the Gas Domain of Simscape. The main subject is to get a deeper understanding of the network's conditions (pressure, velocity in pipes et.) in case of errors et.
Dataset with respect to ~ 60 consumption units are provided in unit/interval length of [kg * hour-1] for one year (8760 rows). As I know, the default simulation time is [sec], so I convert all consumption data with the factor 3600 [sec-1] and mapped it to a condrolled mass flow rate units.
The model is working with the deascc with variable-step solver, however, what are the implications in terms of simulation results to convert from [h] in [s] like this?
- How should i deal with the data - resampling 8760 [h] in [sec] and then backfill isn't really a option because you get 8600*60*60 (rows)?
- How with simulation time configurations (sample time)?
consumption unit in with kg/s:
Thank you in advance for any help you can provide.
Yifeng Tang on 3 Aug 2022
Just to summarize the thread of comments, so the question appears as "Answered".
The easiset way is to multiply the duration of time by 3600. At the same time, any "per time" quantity needs to be scaled accordingly. If Simulink-PS or Simscape units are used, the units may be set as "/hr" so manual conversion won't be necessary.
In addition, the seconds command can convert duration from table imports to seconds, so it's easier to set up the simulation.