sogno-platform / dpsim

Real-time power system simulator including powerflow, (dynamic) phasors and EMT
https://sogno.energy/dpsim/
Mozilla Public License 2.0
67 stars 49 forks source link

Resolve FIXME, CHECK, TODO, DEPRECATED and THISISBAD comments #132

Open dinkelbachjan opened 1 year ago

dinkelbachjan commented 1 year ago
JTS22 commented 1 year ago

I started working on FIXMEs in #142

Comments on the non-solved FIXMEs:

JTS22 commented 1 year ago

https://github.com/sogno-platform/dpsim/blob/0a9d00cefcc75ccd51072e41619ed2e755e265f5/dpsim-models/src/DP/DP_Ph1_VoltageSourceRamp.cpp#L66-L67 https://github.com/sogno-platform/dpsim/blob/0a9d00cefcc75ccd51072e41619ed2e755e265f5/dpsim-models/src/EMT/EMT_Ph1_VoltageSourceRamp.cpp#L63-L64

The VoltageSourceRamp should be superceded by the SignalGenerator in the normal VoltageSource. The classes above are only used in one example and not bound to Python, so they can probably be deleted. The issue comes up once more in the DP_Ph1_PQLoadCS: https://github.com/sogno-platform/dpsim/blob/0a9d00cefcc75ccd51072e41619ed2e755e265f5/dpsim-models/src/DP/DP_Ph1_PQLoadCS.cpp#L96-L97 I dont know if this class is still needed as it is also not bound to Python. Even if there is probably a way to get around setting the right_vector to dynamic. Since the class implements mnaApplyRightSideVectorStamp I do not know whether the mRightVector is even read at all...

JTS22 commented 1 year ago

https://github.com/sogno-platform/dpsim/blob/0a9d00cefcc75ccd51072e41619ed2e755e265f5/dpsim/src/MNASolver.cpp#L40-L52 This is probably harder to solve because one needs to rework the MNA Solver for parallel frequencies (if that is even a working usecase right now)

JTS22 commented 1 year ago

https://github.com/sogno-platform/dpsim/blob/0a9d00cefcc75ccd51072e41619ed2e755e265f5/dpsim-models/include/dpsim-models/Signal/DecouplingLine.h#L49-L50 https://github.com/sogno-platform/dpsim/blob/0a9d00cefcc75ccd51072e41619ed2e755e265f5/dpsim-models/include/dpsim-models/Signal/DecouplingLineEMT.h#L49-L50

I dont know what states this is talking about. The Matrix attribute itself is only used as a task dependency but never read or written to...

JTS22 commented 1 year ago

https://github.com/sogno-platform/dpsim/blob/0a9d00cefcc75ccd51072e41619ed2e755e265f5/dpsim-models/src/DP/DP_Ph1_ResIndSeries.cpp#L16-L17 Removing the R attribute seems to go against the purpose of the class. But then again, the class is never used / not even compiled so maybe we can just delete it altogether?

JTS22 commented 1 year ago

https://github.com/sogno-platform/dpsim/blob/0a9d00cefcc75ccd51072e41619ed2e755e265f5/examples/Notebooks/Components/Trafo.ipynb?short_path=8ca3d82#L69-L71 I cannot comment on this, should be easy to resolve though.

JTS22 commented 1 year ago

https://github.com/sogno-platform/dpsim/blob/0a9d00cefcc75ccd51072e41619ed2e755e265f5/examples/Notebooks/Components/SynGenDq7od_ParameterStudy.ipynb?short_path=5253b86#L454 The notebook does not even run the simulation to completion, so this seems like a secondary issue...

JTS22 commented 1 year ago

https://github.com/sogno-platform/dpsim/blob/0a9d00cefcc75ccd51072e41619ed2e755e265f5/examples/Notebooks/Components/SynGen_trStab.ipynb?short_path=7c394d7#L35 I can confirm this is still an issue, there is even an entire notebook for examination: https://github.com/sogno-platform/dpsim/blob/master/examples/Notebooks/Components/SynGen_trStab_logger_test.ipynb The core issue remains unsolved though, probably something to do with the logger only writing out files when the object is deleted from memory...