DPsim
Loading...
Searching...
No Matches
Base_Ph1_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
11
#include <
dpsim-models/AttributeList.h
>
12
#include <
dpsim-models/Definitions.h
>
13
14
namespace
CPS
{
15
namespace
Base
{
16
namespace
Ph1
{
17
class
Transformer
{
18
protected
:
20
Real
mNominalVoltageEnd1
;
22
Real
mNominalVoltageEnd2
;
23
24
public
:
26
const
Attribute<Real>::Ptr
mRatedPower
;
28
const
Attribute<Complex>::Ptr
mRatio
;
30
const
Attribute<Real>::Ptr
mResistance
;
32
const
Attribute<Real>::Ptr
mInductance
;
33
34
explicit
Transformer
(
CPS::AttributeList::Ptr
attributeList)
35
:
mRatedPower
(attributeList->create<
Real
>(
"S"
)),
36
mRatio
(attributeList->create<
Complex
>(
"ratio"
)),
37
mResistance
(attributeList->create<
Real
>(
"R"
)),
38
mInductance
(attributeList->create<
Real
>(
"L"
)){};
39
41
void
setParameters
(
Real
nomVoltageEnd1,
Real
nomVoltageEnd2,
Real
ratioAbs,
42
Real
ratioPhase,
Real
resistance,
Real
inductance) {
43
mNominalVoltageEnd1
= nomVoltageEnd1;
44
mNominalVoltageEnd2
= nomVoltageEnd2;
45
**
mRatio
= std::polar<Real>(ratioAbs, ratioPhase);
46
**
mResistance
= resistance;
47
**
mInductance
= inductance;
48
}
49
};
50
}
// namespace Ph1
51
}
// namespace Base
52
}
// namespace CPS
AttributeList.h
CPS::Attribute::Ptr
AttributePointer< Attribute< T > > Ptr
Definition
Attribute.h:250
CPS::AttributeList::Ptr
std::shared_ptr< AttributeList > Ptr
Definition
AttributeList.h:26
CPS::Base::Ph1::Transformer::mRatedPower
const Attribute< Real >::Ptr mRatedPower
Rated Apparent Power [VA].
Definition
Base_Ph1_Transformer.h:26
CPS::Base::Ph1::Transformer::mNominalVoltageEnd2
Real mNominalVoltageEnd2
Nominal voltage of secondary side.
Definition
Base_Ph1_Transformer.h:22
CPS::Base::Ph1::Transformer::Transformer
Transformer(CPS::AttributeList::Ptr attributeList)
Definition
Base_Ph1_Transformer.h:34
CPS::Base::Ph1::Transformer::mNominalVoltageEnd1
Real mNominalVoltageEnd1
Nominal voltage of primary side.
Definition
Base_Ph1_Transformer.h:20
CPS::Base::Ph1::Transformer::mInductance
const Attribute< Real >::Ptr mInductance
Inductance [H].
Definition
Base_Ph1_Transformer.h:32
CPS::Base::Ph1::Transformer::setParameters
void setParameters(Real nomVoltageEnd1, Real nomVoltageEnd2, Real ratioAbs, Real ratioPhase, Real resistance, Real inductance)
Definition
Base_Ph1_Transformer.h:41
CPS::Base::Ph1::Transformer::mResistance
const Attribute< Real >::Ptr mResistance
Resistance [Ohm].
Definition
Base_Ph1_Transformer.h:30
CPS::Base::Ph1::Transformer::mRatio
const Attribute< Complex >::Ptr mRatio
Complex transformer ratio.
Definition
Base_Ph1_Transformer.h:28
Definitions.h
CPS::Base::Ph1
Definition
Base_Ph1_Capacitor.h:16
CPS::Base
Definition
Base_AvVoltageSourceInverterDQ.h:15
CPS
Definition
Attribute.h:17
CPS::Real
double Real
Definition
Definitions.h:62
CPS::Complex
std::complex< Real > Complex
Definition
Definitions.h:63
dpsim-models
include
dpsim-models
Base
Base_Ph1_Transformer.h
Generated by
1.13.2