DPsim
Loading...
Searching...
No Matches
EMT_Ph3_RxLine.h
1/* Copyright 2017-2021 Institute for Automation of Complex Power Systems,
2 * EONERC, RWTH Aachen University
3 *
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at https://mozilla.org/MPL/2.0/.
7 *********************************************************************************/
8
9#pragma once
10
11#include <dpsim-models/Base/Base_Ph3_PiLine.h>
12#include <dpsim-models/CompositePowerComp.h>
13#include <dpsim-models/EMT/EMT_Ph3_Inductor.h>
14#include <dpsim-models/EMT/EMT_Ph3_Resistor.h>
15#include <dpsim-models/Solver/MNAInterface.h>
16
17namespace CPS {
18namespace EMT {
19namespace Ph3 {
20
21class RxLine : public CompositePowerComp<Real>,
22 public Base::Ph3::PiLine,
23 public SharedFactory<RxLine> {
24protected:
27 std::shared_ptr<Inductor> mSubInductor;
29 std::shared_ptr<Resistor> mSubResistor;
31 std::shared_ptr<Resistor> mInitialResistor;
32
33public:
35 RxLine(String uid, String name, Logger::Level logLevel = Logger::Level::off);
37 RxLine(String name, Logger::Level logLevel = Logger::Level::off)
38 : RxLine(name, name, logLevel) {}
39
40 SimPowerComp<Real>::Ptr clone(String name) override;
41
42 // #### General ####
44 void createSubComponents() override;
46 void initializeParentFromNodesAndTerminals(Real frequency) override;
47
48 // #### MNA section ####
49 void mnaCompUpdateVoltage(const Matrix &leftVector) override;
50 void mnaCompUpdateCurrent(const Matrix &leftVector) override;
51
52 void mnaParentAddPreStepDependencies(
53 AttributeBase::List &prevStepDependencies,
54 AttributeBase::List &attributeDependencies,
55 AttributeBase::List &modifiedAttributes) override;
56 void
57 mnaParentAddPostStepDependencies(AttributeBase::List &prevStepDependencies,
58 AttributeBase::List &attributeDependencies,
59 AttributeBase::List &modifiedAttributes,
60 Attribute<Matrix>::Ptr &leftVector) override;
61
63 void mnaParentPreStep(Real time, Int timeStepCount) override;
64 void mnaParentPostStep(Real time, Int timeStepCount,
65 Attribute<Matrix>::Ptr &leftVector) override;
66};
67} // namespace Ph3
68} // namespace EMT
69} // namespace CPS
CompositePowerComp(String uid, String name, Bool hasPreStep, Bool hasPostStep, Logger::Level logLevel)
std::shared_ptr< Resistor > mSubResistor
Resistor submodel.
std::shared_ptr< Inductor > mSubInductor
RxLine(String name, Logger::Level logLevel=Logger::Level::off)
Defines name, component parameters and logging level.
RxLine(String uid, String name, Logger::Level logLevel=Logger::Level::off)
Defines UID, name, logging level.
void mnaParentPreStep(Real time, Int timeStepCount) override
MNA pre and post step operations.
SimPowerComp< Real >::Ptr clone(String name) override
DEPRECATED: Delete method.
void createSubComponents() override
Constructs and registers MNA subcomponents; idempotent.
std::shared_ptr< Resistor > mInitialResistor
Inductor end to ground resistor to facilitate initialization.
void initializeParentFromNodesAndTerminals(Real frequency) override
Derives values from power flow data and pushes them to subcomponents.
String uid()
Returns unique id.