sogno-platform / dpsim Goto Github PK
View Code? Open in Web Editor NEWReal-time power system simulator including powerflow, (dynamic) phasors and EMT
Home Page: https://sogno.energy/dpsim/
License: Mozilla Public License 2.0
Real-time power system simulator including powerflow, (dynamic) phasors and EMT
Home Page: https://sogno.energy/dpsim/
License: Mozilla Public License 2.0
pygments
, the code contained in the documentation is currently not correctly highlighted (Markus: we just need to mark the code blocks correctly)index.html
Some of these issues could be solved by using other tools better suited for building code documentation, e. g. mdbook. This results in a file structure similar to here: https://github.com/rust-lang/nomicon/tree/master/src
The integration of powerflow and dynamic simulation (SP,DP,EMT) should be improved.
The idea is to
The picture below shows the proposed class structure.
Are these files duplicates?
Apparently, only the latter is used.
Attributes should be declared as member variables of the component class to avoid something like attribute<Complex>("V_ref")->get()
during the simulation. This is not efficient and the attributes of a component class are not easily deduced from looking at the component class declaration.
mInductance = addAttribute<Real>("L", Flags::read | Flags::write);
Each attribute should include
Accordingly, the python print should include more columns for this information.
Attribute list for object with name cs:
name type size value
-----------------------------------------------------------------------------------------------
I_ref Complex 10.000000<0.000000
f_src Real 50.000000
i_intf MatrixReal 1x1 [...]
name String "cs"
right_vector MatrixReal 0x0 [...]
uid String "cs"
v_intf MatrixReal 1x1 [...]
To make the work with the attributes more comfortable in the component classes, some operators like cast () and assignment operator might be overwritten but this should be limited as much as possible.
We also need to improve the mechanism for describing the output - input relation between two components.
Currently, it is possible to change the map value for a key calling something like this:
voltageSource->setAttributeRef("V_ref", attribute<Real>("V_ref"));
If you store are reference to an attribute inside a component like below, the stored reference might be invalid after calling the function above.
voltageRef = attribute<Complex>("V_ref");
We could add one member variable to the Attribute class that points to referenced Attributes, which describes an input output relation. Still, the value pointer address should be overwritten for the input Attribute to minimize the overhead when reading the value during simulation time.
Naming of SG models has become quite heterogenous. We envision the following nomenclature:
SynchronGenerator<OrderNumber><OptionallyModelVariant><SolutionMethod>
Example: SynchronGenerator6aVBR
Abbreviations for possible solution methods:
Also GeneratorType
has become quite heterogenous. We could envision the following:
enum class GeneratorType {PVNode, IdealVoltageSource, IdealCurrentSource, [DifferentialEquationSystemModels]}
Where [DifferentialEquationSystemModels]
enumerates the models describing the synchronous generator in terms of a differential equation system. The entries could look as follows:
Order<OrderNumber><OptionallyModelVariant><SolutionMethod>
Example: Order6aVBR
Instead of setting many parameters in the Simulation class and later again in the Solver class, we want to group all these parameters in on class called SimulationParameters. Then, the simulation needs basically only two inputs: SystemTopology and SimulationParameters
Since reworking the attributes entails reading through a lot of DPsim's current code, here are some random things I noticed that might be worked on later on:
In the EMT::Ph3::NetworkInjection
class, the attribute references are set in the constructor as well as in every setParameters
method. As long as setParameters
does not recreate the sub-VoltageSource, the first call to setReference
in the constructor should be sufficient.
The Base::Ph1::PQLoad class is never used. Delete it.
The DP::Ph1::SynchronGeneratorTrStab has an option for setting a reference for Omega and Delta (mUseOmegaRef
). This can probably be implemented better using the new dynamic attributes (see comments in the code).
The SP::Ph1::PiLine defines attributes that access individual Matrix sub-components. While this can be implemented using dynamic attributes, this seems kinda overkill. Especially since these attributes only seem to be used in one example and only for logging purposes (which has derive-methods already)
Base::Ph1::Resistor
and Base::Ph3::Resistor
have a property mConductance
. It is always the inverse of the resistance (as it should be?). Maybe make these derived attributes or calculate them directly in the code using them.
From the various SynchronGenerator classes, some of them have no header file at all while others derive from Base::SynchronGenerator in the header, but try to call the child constructor of some nonexistant class SynchronGeneratorBase
. Currently, none of these classes should compile: DP::Ph3::SynchronGeneratorDQSmpl, DP::Ph3::SynchronGeneratorVBR, DP::Ph3::SynchronGeneratorVBRStandalone, EMT::Ph3::SynchronGeneratorDQSmpl, EMT::Ph3::SynchronGeneratorDQSmplCompSource, EMT::Ph3::SynchronGeneratorVBRSmpl, EMT::Ph3::SynchronGeneratorVBRStandalone
Move small methods currently implemented in header files into the corresponding cpp files when the class is not header-only
The MNASolver uses different attributes depending on if it computes multiple frequencies in parallel (expressed through mFrequencyParallel)
- The corresponding attributes mLeftSideVectorHarm
and mLeftSideVector
should probably be unified
Many of the basic components (Capacitor, Resistor, Inductance...) are (partly) derived from a base class which contains only the components main parameter (C, R, L...). Since these base classes are currently not derived from AttributeList
, their attributes can not be initialized in the usual way, rather the initialization has to be moved into the subclasses.
mAttributes
list has to be changed somehow. The clone
and setParameters
methods are very similar for many basic components. Maybe a clone
could just clone all attributes that have a certain "parameter" flag set. However, this could lead to problems because setParameters
often has side effects. Maybe make a new issue for reforming the whole parameter system?
For some DP and SP components (e.g. {DP,SP}::Ph3::VoltageSource), the component code is nearly identical. One might consider reusing the relevant computation tasks.
Use a standardized formatter and check for formatting in the CI pipeline
The DP::Ph1::PQLoadCS sets its right_vector
attribute (which is declared in MNAInterface
) to reference the right_vector
of its sub-component. The right_vector
should not be set to dynamic, so is there a better alternative here? This also happens in {DP, EMT}::Ph1::VoltageSourceRamp.
There exists many attributes which are either never used at all or only written to but never read. Many of them are marked with FIXME or CHECK comments and can probably be deleted.
Perform a dead-code analysis.
The SP::Ph1::Load::updatePQ method references attributes P_nom
and Q_nom
that are never declared
Some of the Signal-Components (e. g. FIRFilter, Integrator, PLL, PowerControllerVSI) rely on attributes being explicitly set by outside code. While possible, this requirement should be documented or facilitated through an explicit setter method.
The DPsim documentation for a Docker-based setup refers to the rwthacs/dpsim-dev
image which hasnt been updated for 7 months:
https://dpsim.fein-aachen.org/docs/getting-started/build/
I think it would also be much nicer if a user could start without building the image himself.
The current instructions seem far to complex.
In DP_Ph3_VoltageSource Line 69 the stamp for phase C differs from A and B:
`if (terminalNotGrounded(0)) {
...
Math::addToMatrixElement(systemMatrix, matrixNodeIndex(0, 1), mVirtualNodes[0]->matrixNodeIndex(PhaseType::B), Complex(-1, 0));
Math::addToMatrixElement(systemMatrix, mVirtualNodes[0]->matrixNodeIndex(PhaseType::B), matrixNodeIndex(0, 1), Complex(-1, 0));
Math::addToMatrixElement(systemMatrix, matrixNodeIndex(0, 2), mVirtualNodes[0]->matrixNodeIndex(PhaseType::C), Complex(-1, 0));
Math::addToMatrixElement(systemMatrix, mVirtualNodes[0]->matrixNodeIndex(PhaseType::C), matrixNodeIndex(0, 2), -Complex(-1, 0));
}`
This leads to phase C beeing shifted when transformed into EMT frame and unintended model behaviour:
Bug ( with -Complex(-1,0)); )
The DP_Ph1_VoltageSourceRamp
and EMT_Ph1_VoltageSourceRamp
classes should be superseded by the SignalGenerator in the normal VoltageSource. The classes are only used in one example and not bound to Python, so they can probably be deleted.
dpsim/dpsim-models/src/DP/DP_Ph1_RXLoad.cpp
Line 122 in cfb4e2c
Here &**mSubInductor->mRightVector
should be changed to &**mSubCapacitor->mRightVector
.
Hello @m-mirz,
cim:PowerTransformer
are ignored when they are imported and have 3 cim:PowerTransformerEnd
. Implementing the 3 winding transformer model would be useful for large scenarios and complex networks where they are quite common.
In the Examples.h, we should add for each set of parameters a literature reference whenever possible.
It should look like:
Line 89 in 44f7335
@martinmoraga @gnakti Please go through Examples.h
, add a literature reference whenever possible and leave a comment here and a PR when you are done.
Refactor options
of CommandLineArgs
Line 116 in 44f7335
options
of type std::map<String, String>
to store options uniformly as String
type. Remove options_bool
. Instead, perform conversion to Real
, or Bool
by implementing getOptionReal
and getOptionBool
. This will also enable to easily implement getOptionString
.Hi in order to build DPsim on the OPAL-RT opalrtlinux target we need to find a way to build it without linking against libstdc++fs
as this dependency is not available on this target:
/usr/lib/gcc/x86_64-poky-linux/8.3.0/../../../../x86_64-poky-linux/bin/ld: cannot find -lstdc++fs
It appears to me that the filesytem library is not a hard requirement for building DPsim.
Can we disable certain features of DPsim which require it with "#ifdefs"?
https://dpsim.fein-aachen.org/docs/getting-started/install/
docker build -t sogno/dpsim:dev -f Packaging/Docker/Dockerfile.dev .
All villas related examples should be located in examples/villas and included in the tests if possible.
Examples using old interface can be moved to a villas-deprecated folder.
Focus for the examples should be on:
Could be based on this implementation:
https://moodycamel.com/blog/2013/a-fast-lock-free-queue-for-c++.htm
Requirements:
I tried to run one of examples, but I have got the following error:
import dpsimpy
ModuleNotFoundError: No module named 'dpsimpy''
What means dpsimpy?
It would be better to group the GitHub Actions jobs for each OS.
The version currently used in the DPsim docker images (Villas commit b94746effb015aa98791c0e319ef11223d18e8b0) uses VILLAScommon on commit 25cd53ee6882c3f66746d6d8c27790ef22d18322 as a submodule. This version cannot be compiled with GCC version 12+. Apparently, the repos used in the new ManyLinux Docker image (added in #139 ) changed during the last days to now download GCC 12 instead of 11. This broke the Docker image build between https://github.com/sogno-platform/dpsim/actions/runs/3480565146/jobs/5821064882 and https://github.com/sogno-platform/dpsim/actions/runs/3565405165/jobs/5990523552. Because the current master commit of VILLASnode also still uses the same subcommit of VILLAScommon, just updating the version of VILLASnode in dpsim will not suffice, but either dpsim needs to manually checkout a newer subcommit of VILLAScommon (probably not a good idea) or the VILLASnode master needs to include a newer subcommit.
At least the basic tests should be migrated from gitlab-ci (https://git.rwth-aachen.de/acs/public/simulation/dpsim/dpsim) to github workflow before we can completely migrate the DPsim development to github. This issue tracks the progress of implementing the workflow.
This documentation should build upon #133 and include
SimPowerComp
has a vector mSubComponents
of subcomponents but most classes derived from SimPowerComp
have their subcomponents as separate member variables, not utilizing this list.
mSubComponents
to harmonize calling pre- and poststep routines, as for example shown hereReuse the order-specific auxiliar constants in the domain specific VBR models
DP_Ph1_SynchronGenerator4OrderVBR
and SP_Ph1_SynchronGenerator4OrderVBR
Base_ReducedOrderSynchronGenerator
_t
as subscript e.g. mAd_t
Specify and reuse the order-specific resistance matrix constants in the domain specific VBR models
EMT_Ph3_SynchronGenerator4OrderVBR
and SP_Ph1_SynchronGenerator4OrderVBR
Base_ReducedOrderSynchronGenerator
Remove Ef
from auxiliar constants
Ef
Rename Cq
to Dq
Reconsider zero component in EMT_Ph3 models
Use resistance matrix constants A
and B
in EMT_Ph3_SynchronGenerator4OrderVBR
Simplify the DP-DQ interface to obtain armature voltage (and armature current), which currently looks as follows
dpsim/models/Source/DP/DP_Ph1_SynchronGeneratorVBR.cpp
Lines 97 to 102 in 2499325
dpsim/models/Source/DP/DP_Ph1_SynchronGeneratorVBR.cpp
Lines 65 to 67 in 2499325
Harmonize implementation of DQ-DP and DQ-SP interface implementation
dpsim/models/Source/SP/SP_Ph1_SynchronGeneratorVBR.cpp
Lines 80 to 82 in 15657fe
Simplify definition of VBR resistance matrix in DP_Ph1 models according to equivalent derivation
dpsim/models/Source/DP/DP_Ph1_SynchronGeneratorVBR.cpp
Lines 47 to 50 in e6f3776
Rename DP_Ph1_SynchronGeneratorVBR
and SP_Ph1_SynchronGeneratorVBR
to be consistent with EMT_Ph3_ReducedOrderSynchronGeneratorVBR
Make SGModel
of type String
. Then you can use '6a'
and '6b'
instead of 6
and 7
, which can become confusing in particular if we have models 6c
, 6d
etc. in the future
We can add another case distinction during calculation of constants in Base::ReducedOrderSynchronGenerator
, since mAd_t
and mBd_t
are only used within the fourth-order model.
dpsim/dpsim-models/src/Base/Base_ReducedOrderSynchronGenerator.cpp
Lines 216 to 217 in 2cca71a
Currently, DPsim can not be built with Eigen3 installed as a submodule as the CMake imported target Eigen3::Eigen3
is only available after the find_package(Eigen3)
call which gets only executed if Eigen3 is not installed via the submodule.
I propose to call find_package(Eigen3)
regardless whether the submodule is used or not
@martinmoraga We should add a common namespace in Examples.h
for the newly introduced SMIB examples of #64 in order to ensure that all examples have a consistent parametrisation.
This could look like
namespace Examples {
namespace Grids {
namespace SMIBType2 {
struct Line {
...
}
struct Fault {
...
}
...
}
}
}
MnaSolver::initialize
identifyTopologyObjects
MnaSolver::createEmptySystemMatrix
MnaSolverEigenDense
and MnaSolverEigenSparse
mSwitchedMatrices
and mLuFactorizations
(number depends on number of switches)MnaSolverEigenSparse::createEmptySystemMatrix
additionally creates mBaseSystemMatrix
(number also depends on number of switches)MnaSolver::initializeComponents
initializeFromNodesAndTerminals
initialize
(here only signal comps, currently initialize
of SimPowerComps in SystemTopology
)mnaInitialize
MnaSolver::initializeSystem
initializeSystemWithParallelFrequencies
or initializeSystemWithPrecomputedMatrices
MnaSolver::initializeSystemWithPrecomputedMatrices
: stamps static elements by calling switchedMatrixStamp
(implemented by Sparse or Dense)
MnaSolverEigenSparse::switchedMatrixStamp
stamps all static elements to mSwitchedMatrices
and calculates corresponding mLuFactorizations
MnaSolverSysRecomp
mSwitchedMatrices
according to mCurrentSwitchStatus
mLuFactorizations
according to mCurrentSwitchStatus
PFSolver::initialize
PFSolver::initializeComponents
initializeFromNodesAndTerminals
calculatePerUnitParameters
PFSolver::determinePFBusType
We require a Python example that demonstrates the export and import functionality based on villas-node. So, far there is only an example available that exports data to MQTT:
https://github.com/sogno-platform/dpsim/blob/master/Examples/Python/Shmem/shmem-cigre-mv-pf-profiles.py
This is a CPP example that includes import and export:
https://github.com/sogno-platform/dpsim-villas/blob/main/examples/cxx/ShmemDistributedVillas.cpp
Two DPsim instances are interconnected via one villas-node that is configured more or less like here:
https://github.com/sogno-platform/dpsim/blob/master/Configs/villas-shmem.conf
This example can based on the shmem-cigre-mv-pf-profiles.py example and should go in the same folder.
DPsim started as a GPL3 project, partly due to its dependency on VILLASnode, which is licensed under the GPL3 as well. Since the GPL3 is a strong barrier for many potential contributors, I would like to relicense the whole project under the MPL2 license.
The MPL2 is not as viral as the GPL3 and also Eigen3, one of the core libraries used in DPsim is licensed under the MPL2. Of course, I would move the code associated to VILLASnode to an external repository.
Some of the Jupyter-Notebooks using the new Python Interface (see #22 ) take multiple minutes for a full run-through, which causes the test pipeline to run quite long. This table aims to summarize the current run times (using the notebooks in #22 ) for evaluation and adaption of simulation run times and pipeline tests. The full notebook runtime is measured in a single run of pytest --durations=0 -v
, the simulation run times are measured using the iPython %%timeit
cell magic with the time calculated as the average over seven runs. Simulation run times contain the full setup and run of the dynamic simulation without PowerFlow or later data evaluation / plotting. Please note that this is not meant as a complete, accurate benchmark but rather as an overview over which notebooks should be tweaked when tested in the CI-pipeline.
61 notebooks in Circuits, Components or Grids
7 notebooks skipped in pytest
(11,5%)
25 notebooks with asserts (41,0%)
Full pytest
-run in 760.53s (0:12:40)
26 passed, 2 skipped (92.9% tested)
10 of 28 notebooks with asserts (35,7%)
Notebook | Pytest runtime | Simulation runtime(s) | Asserts | Remarks |
---|---|---|---|---|
Compare_EMT_DP_Slack_PiLine_PQLoad | 4.14s | 1.73s (EMT), 419 ms (DP) | DP vs EMT | |
Compare_EMT_SynGenDQ7odTrapez_ DP_SynGenTrStab_SMIB_Fault | Skipped | 48.6s (EMT), 4.25s (DP) | - | Notebook contains no error, so test could be enabled |
CS_R2CL print_attributes | 2.79s | 12.5 µs (EMT), 12.5 µs (DP) | - | Notebook exists to show off attribute print functions, so comparisons with SL got stripped |
CS_R2CL | 3.36s | 11.8 µs (EMT), 11.4 µs (DP) | EMT vs SL, DP vs SL | |
DP_Slack_PiLine_PQLoad_with_PF_Init | 2.49s | 71.6 µs | - | Plots currently plot the wrong time interval |
DP_Slack_PiLine_VSI_Ramp | 26.20s | - | - | Notebook does not use dpsimpy, plot labels are in german |
DP_Slack_PiLine_VSI_with_PF_Init | 47.27s | 45.8s | - | wrong time interval plotted, plot labels in german |
DP_SP_SynGenTrStab_3Bus_Fault | 32.01s | 8.94s (DP), 8.52s (SP) | - | |
DP_SP_SynGenTrStab_3Bus_SteadyState | 12.71s | 2.28s (DP), 2.11s (SP) | - | |
DP_SP_SynGenTrStab_SMIB_Fault | 17.57s | 4.06s (DP), 4.11s (SP) | - | |
DP_SP_SynGenTrStab_SMIB_SteadyState | 12.29s | 1.70s (DP), 1.45s (SP) | - | |
EMT_DP_Slack_PiLine_VSI_ Control_OnOff | 34.25s | 10.4s (EMT, control on), 11.2s (EMT, control off), 5.04s (DP, control on), 4.71s (DP, control off) | - | |
EMT_DP_SP_Slack_PiLine_VSI | 107.11s | 11.1s (EMT), 48s (DP), 47.6s (SP) | - | |
EMT_DP_VS_Init | 3.12s | 49.2ms (DP, set params), 88ms (EMT, set params), 45.1ms (DP, set attribute), 74.6ms (EMT, set attribute), 40.7ms (DP, set from node), 83.8ms (EMT, set from node) | EMT vs DP | DP vs EMT assert on set attribute commented out |
EMT_DP_VS_RLC | 19.35s | 1.62s (EMT, VS+R), 518ms (DP, VS+R), 480ms (SP, VS+R), 2.82s (EMT, VS+RL), 785ms (DP, VS+RL), 856ms (SP, VS+RL), 2.79s (EMT, VS+RC), 758ms (DP, VS+RC), 865ms (SP, VS+RC) | EMT vs DP vs SP | |
EMT_Slack_PiLine_PQLoad_with_PF_Init | 2.77s | 493ms | - | Plots the wrong time interval |
EMT_Slack_PiLine_VSI_with_PF_Init_Params | 69.97s | 27.9s (Kp variation), 43.7s (Ki variation), 4.33s (final choice) | - | |
EMT_Slack_PiLine_VSI_with_PF_Init | 12.65s | 11.3s | - | |
EMT_SynGenDQ7odTrapez_ OperationalParams_SMIB_Fault_JsonSyngenParams | 93.01s | 51.5s (no JSON-config), 50.4s (with JSON-config) | JSON-config vs No JSON-config | |
EMT_SynGenDQ7odTrapez_ OperationalParams_SMIB_Fault_ParamsModification | 94.22s | 50.8s (first parameter), 52.8s (second parameters) | - | |
EMT_SynGenDQ7odTrapez_ OperationalParams_SMIB_Fault | 93.72s | 52.9s (fundamental params), 54.5s (operational params) | Fundamental vs operational params | |
EMT_SynGenDQ7odTrapez_SMIB_Fault | 50.24s | 53.6s | - | |
RL_SourceStep_ParameterStudy | Skipped | - | - | Notebook does not use dpsimpy |
SP_Slack_PiLine_VSI_with_PF_Init | 3.69s | 2.17s | - | |
VS_CS_R4 | 3.39s | 29.8ms (EMT), 52.4ms (DP) | EMT vs SL, DP vs SL | |
VS_R2L3 | 3.47s | 33.7ms (EMT), 63.1ms (DP) | EMT vs SL, DP vs SL | |
VS_RC1 | 4.22s | 19.9ms (EMT), 37.5ms (DP) | EMT vs SL, DP vs SL | |
VS_RL1 | 3.77s | 21.2ms (EMT), 33.9ms (DP) | EMT vs SL, DP vs SL |
Full pytest
-run in 133.57s (0:02:13)
10 passed, 1 skipped (92.9% tested)
7 of 11 notebooks with asserts (63,6%)
Notebook | Pytest runtime | Simulation runtime(s) | Asserts | Remarks |
---|---|---|---|---|
Diakoptics | 2.91s | 44ms (VS_CS_R4), 114ms (VS_CS_R4_Diakoptics), 56.3ms (VS_R2L3), 127ms (VS_R2L3_Diakoptics) | - | |
Inverter_Grid_Test | 49.46s | 46s | DP vs ML | DP vs SL has no asserts, comparison is only plotted |
Line | 19.37s | 904ms (SP Elements), 1.1s (SP Component), 951ms (DP Elements), 1.04s (DP Component), 2.13s (DP Diakoptics), 4.58s (EMT Elements), 6.14s (EMT Component), 79.9ms (Decoupling Line Elements), 109ms (Decoupling Line Component), 68.4ms (Decoupling Line EMT) | Elements vs Component for DP, SP, EMT; DP vs EMT component | |
Slack | 11.18s | 433ms (SP Elements), 774ms (SP Component), 481ms (DP Elements), 850ms (DP Component), 938ms (EMT Elements), 1.27s (EMT Component) | Elements vs Component for DP, SP, EMT; SP vs DP component, DP vs EMT component | |
SynGen_trStab_logger_test | 1.40s | - | - | This example exists to show errors in logger behaviour when multiple simulations interact with each other so timing it does not make sense here |
SynGen_trStab | 2.15s | 8.7ms (SteadyState), 17.8ms (LoadStep) | wr_gen(t=0) vs wr_gen(t=0.1) | |
SynGenDq7od_ParameterStudy | Skipped | 1.81s (DP ODE), 1.57s (EMT ODE), 1.34s (DP Trapez), 1.07s (EMT Trapez) | - | Tries to evaluate files which are not actually generated by the simulation |
SynGenDq7od_SteadyState _DP_EMT | 7.67s | 1.81s (DP ODE), 1.44s (EMT ODE), 1.29s (DP Trapez), 1.07s (EMT Trapez) | - | SL results are loaded and compared to in plots, but there are no asserts |
SynGenDq7od_ThreePhFault_DP_EMT | 8.15s | 1.84s (DP ODE), 1.55s (EMT ODE), 1.25s (DP Trapez), 1.09s (EMT Trapez) | EMT vs SL | |
SynGenDq7od | 6.77s | 22.6ms (DP ODE SteadyState), 1.82s (DP ODE Fault), 1.31s (DP Trapez Fault) | DP ODE Fault vs SL, DP Trapez Fault vs SL | |
Trafo | 12.79s | 736ms (SP Elements), 950ms (SP Component), 627ms (DP Elements), 851ms (DP Component), 2.03s (EMT Elements), 3.92s (EMT Components) | Elements vs Component for DP, SP, EMT; SP vs DP component, DP vs EMT component |
Full pytest
-run in 223.14s (0:03:43)
18 passed, 4 skipped (81,8% tested)
8 of 22 notebooks with asserts (36,4%)
Notebook | Pytest runtime | Simulation runtime(s) | Asserts | Remarks |
---|---|---|---|---|
case9 | 1.80s | 14.6ms | - | |
case14 | 1.58s | 26ms | - | |
case145 | 6.60s | 895ms | - | |
case300 | 8.87s | 2.0s | - | |
CIGRE_MV_pf-interactive-dpsimpy | Skipped | - | - | There is no full simulation, only one step |
CIGRE_MV_powerflow_profiles-dpsimpy | Skipped | 1.81s | - | Notebook contains no error, so test could be enabled |
CIGRE_MV_powerflow-dpsimpy | Skipped | 24.4ms | DPsim vs NEPLAN | Notebook contains no error, so test could be enabled |
CIGRE_MV_powerflow | 2.54s | - | DPsim vs NEPLAN | Non-dpsimpy version of CIGRE_MV_powerflow-dpsimpy, probably obsolete |
cigre-mv-pf-profiles-shmem | Skipped | - | - | Does not run at all |
DP_CIGRE_MV_withDG_withLoadStep | 19.76s | 14.3s | - | |
DP_CIGRE_MV_withDG | 17.84s | 14.1s | - | |
DP_CIGRE_MV_withoutDG | 6.06s | 2.13s | - | |
EMT_CIGRE_MV_withDG_ withLoadStep | 39.09s | 36.0s | - | |
EMT_CIGRE_MV_withDG | 38.16s | 35.0s | - | |
EMT_CIGRE_MV_withoutDG | 10.26s | 3.92s | - | |
IEEE_LV_powerflow | 2.91s | 539ms | DPsim vs NEPLAN | |
PF_CIGRE_MV_withDG | 2.52s | 105ms | - | |
SP_SMIB_SynGenTrStab_KundurExample1 | 19.56s | - | DPsim vs PSAT | |
SP_WSCC_9-bus_dyn_switch | 12.09s | 7.38s | DPsim vs PSAT | |
WSCC_9-bus_dyn_switch | 15.98s | 9.22s | DPsim vs SL | |
WSCC_9-bus_dyn | 13.18s | 9.95s | Last value vs first value for all logged phasors | |
WSCC_9-bus | 3.98s | 998ms | Last value vs first value for all logged phasors |
This interface should take advantage of a deeper VILLASnode integration compared to the shmem interface making it easier to use.
A branch of VILLASnode should be used here which includes a CPP version of the node class:
https://git.rwth-aachen.de/acs/public/villas/node/-/tree/node-cpp
This is mainly implemented in the dpsim-villas module / project:
https://github.com/JTS22/dpsim-villas/tree/villas-interface
It would be convenient to able to print the complete lists of attributes of each component from the Python interface including each attribute's type, e.g. real or complex.
Because it causes the buildbot to OOM kill arbitrary processes because of memory contraints:
Example: https://git.rwth-aachen.de/acs/public/simulation/dpsim/dpsim-github/-/jobs/1951371
Enable sonar cloud scan for C++ code.
Motivation
To test basic unsymmetric simulations an unsymmetric input signal is needed.
Implemented Solution
As a preliminary solution I implemented a new EMT_Ph3_NetworkInjection1ph and EMT_Ph3_VoltageSource1ph which basically connects to just one phase in the 3ph EMT domain and provides unsymmetric behaviour.
Alternatives?
Are such additional components necessary or is there an easier way e.g. combining EMT 3ph and EMT 1ph components?
Extensions
If the solution is suitable the concept can be extended by enabling a connection to a combination of phases as well as different signals for each phase. Possible implementations would be a new class (like in the basic implementation) or a extension of the basic EMT_Ph3_NetworkInjection and EMT_Ph3_VoltageSource classes.
procps is required for hybrid C++ Python debugging.
error
- all errorswarn
- all warningsoff
- recommended to use e.g. when running case studies where exclusively the simulation results should be loggedinfo
- logging of information that are basic and that are logged only once before/after the simulationdebug
- logging of information for debugging (extended static information, e.g. initialization values, matrix stamps, subcomponents)trace
- logging of information in each simulation stepA declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.