DPsim
Loading...
Searching...
No Matches
Base_Ph3_Transformer.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/AttributeList.h>
12#include <dpsim-models/Definitions.h>
13
14namespace CPS {
15namespace Base {
16namespace Ph3 {
17class Transformer {
18protected:
29
30public:
32 const Attribute<Complex>::Ptr mRatio;
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
Real mNominalVoltageEnd1
Nominal voltage of primary side.
Real mNominalVoltageEnd2
Nominal voltage of secondary side.
const Attribute< Complex >::Ptr mRatio
Transformer ratio.
Matrix mResistance
Resistance [Ohm].
Matrix mInductance
Inductance [H].
Real mRatedPower
Rated Apparent Power [VA].