DPsim
Loading...
Searching...
No Matches
Base_Ph3_Transformer.h
Go to the documentation of this file.
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
13
14namespace CPS {
15namespace Base {
16namespace Ph3 {
18protected:
29
30public:
32 Real nominalVoltageAt(UInt terminal) const {
33 return terminal == 0 ? mNominalVoltagePrimary : mNominalVoltageSecondary;
34 }
35
38
39 explicit Transformer(CPS::AttributeList::Ptr attributeList)
40 : mRatio(attributeList->create<Complex>("ratio")){};
41
43 void setParameters(Real nomVoltagePrimary, Real nomVoltageSecondary,
44 Real ratedPower, Real ratioAbs, Real ratioPhase,
45 Matrix resistance, Matrix inductance) {
46 mNominalVoltagePrimary = nomVoltagePrimary;
47 mNominalVoltageSecondary = nomVoltageSecondary;
48 mRatedPower = ratedPower;
49 **mRatio = std::polar<Real>(ratioAbs, ratioPhase);
50 mResistance = resistance;
51 mInductance = inductance;
52 }
53};
54} // namespace Ph3
55} // namespace Base
56} // namespace CPS
AttributePointer< Attribute< T > > Ptr
Definition Attribute.h:249
std::shared_ptr< AttributeList > Ptr
Real mNominalVoltagePrimary
Nominal voltage of primary side.
Real mNominalVoltageSecondary
Nominal voltage of secondary side.
const Attribute< Complex >::Ptr mRatio
Transformer ratio.
void setParameters(Real nomVoltagePrimary, Real nomVoltageSecondary, Real ratedPower, Real ratioAbs, Real ratioPhase, Matrix resistance, Matrix inductance)
Matrix mResistance
Resistance [Ohm].
Matrix mInductance
Inductance [H].
Real nominalVoltageAt(UInt terminal) const
Nominal voltage of the winding at the given terminal.
Real mRatedPower
Rated Apparent Power [VA].
Transformer(CPS::AttributeList::Ptr attributeList)
Eigen::Matrix< Real, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor > Matrix
Dense matrix for real numbers.
Definition Definitions.h:79
double Real
Definition Definitions.h:60
std::complex< Real > Complex
Definition Definitions.h:61
unsigned int UInt
Definition Definitions.h:58