TransformerDP.h 2.04 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/** Ideal Transformer DP
*
* @file
* @author Markus Mirz <mmirz@eonerc.rwth-aachen.de>
* @copyright 2017, Institute for Automation of Complex Power Systems, EONERC
* @license GNU General Public License (version 3)
*
* DPsim
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program.  If not, see <http://www.gnu.org/licenses/>.
*********************************************************************************/

#pragma once

Markus Mirz's avatar
Markus Mirz committed
26
#include "BaseComponent.h"
27
28
#include "RxLineDP.h"
#include "IdealTransformerDP.h"
Markus Mirz's avatar
Markus Mirz committed
29
#include "InductorDP.h"
30
31
32
33
34

namespace DPsim {

	/// Transformer that includes an inductance and resistance
	class TransformerDP : public BaseComponent {
35
36
37
38
39
40
41
42
	private:	
		/// Transformer ratio
		Complex mRatio;
		Real mRatioAbs;
		Real mRatioPhase;
		/// Voltage [V]
		Real mSvVoltage;
		/// Resistance [Ohm]
43
		Real mResistance;
44
		/// Conductance [S]
45
		Real mConductance;
46
		/// Reactance [Ohm]
47
48
49
		Real mReactance;
		/// Inductance [H]
		Real mInductance;
50
51
52
53
54
55
		/// Internal ideal transformer
		shared_ptr<IdealTransformerDP> mIdealTransformer;
		/// Internal RX-line to model losses
		shared_ptr<RxLineDP> mLine;
		/// Internal inductor to model losses
		shared_ptr<InductorDP> mInductor;
56
57
58
59
60
61
62
63
64
65
66
67
68

	public:
		TransformerDP() { };
		TransformerDP(String name, Int node1, Int node2, Real ratioAbs, Real ratioPhase, Real resistance, Real inductance);

		void init(Real om, Real dt);
		void applySystemMatrixStamp(SystemModel& system);
		void applyRightSideVectorStamp(SystemModel& system) { };
		void step(SystemModel& system, Real time) { };
		void postStep(SystemModel& system) { };
	};
}