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:
33
34 explicit Transformer(CPS::AttributeList::Ptr attributeList)
35 : mRatio(attributeList->create<Complex>("ratio")){};
36
38 void setParameters(Real nomVoltageEnd1, Real nomVoltageEnd2, Real ratedPower,
39 Real ratioAbs, Real ratioPhase, Matrix resistance,
40 Matrix inductance) {
41 mNominalVoltageEnd1 = nomVoltageEnd1;
42 mNominalVoltageEnd2 = nomVoltageEnd2;
43 mRatedPower = ratedPower;
44 **mRatio = std::polar<Real>(ratioAbs, ratioPhase);
45 mResistance = resistance;
46 mInductance = inductance;
47 }
48};
49} // namespace Ph3
50} // namespace Base
51} // namespace CPS
AttributePointer< Attribute< T > > Ptr
Definition Attribute.h:250
std::shared_ptr< AttributeList > Ptr
Real mNominalVoltageEnd1
Nominal voltage of primary side.
Real mNominalVoltageEnd2
Nominal voltage of secondary side.
void setParameters(Real nomVoltageEnd1, Real nomVoltageEnd2, Real ratedPower, Real ratioAbs, Real ratioPhase, Matrix resistance, Matrix inductance)
const Attribute< Complex >::Ptr mRatio
Transformer ratio.
Matrix mResistance
Resistance [Ohm].
Matrix mInductance
Inductance [H].
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:81
double Real
Definition Definitions.h:62
std::complex< Real > Complex
Definition Definitions.h:63