gdtk-uq / gdtk

The Gas Dynamics Toolkit (GDTk) is a set of software tools for simulating high speed fluid flow, maintained at The University of Queensland and the University of Southern Queensland, Australia.
https://gdtk.uqcloud.net/
Other
59 stars 15 forks source link

header lines not written when config.write_loads is false #38

Closed uqngibbo closed 5 months ago

uqngibbo commented 9 months ago

Volker Hanneman from DLR has found that running the steady state solver with:

config.write_loads=false write_loads_count = 100,

Produces a malformed "times" file in the loads directory, which breaks some scripts for reading loads. Specifically this occurs because the header line is written during init_simulation, which honours the write_loads flag, but the loads files are written in steadystate_core, which does not.

Alex-Muirhead commented 9 months ago

Would this modification to Line 1106 of eilmer/steadystate_core.d fix the issue?

// write out the loads
- if (!dual_time_stepping &&  ( (step % writeLoadsCount) == 0 || finalStep || step == GlobalConfig.write_loads_at_step )) {
+ if (!dual_time_stepping && GlobalConfig.write_loads && ( (step % writeLoadsCount) == 0 || finalStep || step == GlobalConfig.write_loads_at_step )) {
    if (GlobalConfig.is_master_task) {
uqngibbo commented 9 months ago

That's one option. We were discussing always writing the times header file or perhaps removing write_loads completely, and relying on a positive value for writeLoadsCount and dt_loads.

uqngibbo commented 9 months ago

There wasn't much a consensus so I haven't done anything about this yet.

uqngibbo commented 5 months ago

Fixed in eilmer 5