RxLineDP.h 1.94 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
/** RX Line
 *
 * @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/>.
 *********************************************************************************/

24
#pragma once
Viviane's avatar
Viviane committed
25

26
#include "BaseComponent.h"
Viviane's avatar
Viviane committed
27

28
29
namespace DPsim {

30
	class RxLineDP : public BaseComponent {
31
	protected:
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
		Real mResistance;
		Real mConductance;
		Real mVoltageAtNode1Re;
		Real mVoltageAtNode1Im;
		Real mVoltageAtNode2Re;
		Real mVoltageAtNode2Im;

		Real mInductance;
		Real mDeltaVre;
		Real mDeltaVim;
		Real mCurrRe;
		Real mCurrIm;
		Real mCurEqRe;
		Real mCurEqIm;
		Real mGlr;
		Real mGli;
		Real mPrevCurFacRe;
		Real mPrevCurFacIm;
Viviane's avatar
Viviane committed
50

51
		LineTypes mType;
Steffen Vogel's avatar
Steffen Vogel committed
52

Markus Mirz's avatar
Markus Mirz committed
53
54
55
56
57
58
59
		Real correctr, correcti;
		Real cureqr_ind, cureqi_ind;
		Real deltavr_ind;
		Real deltavi_ind;
		Real glr_ind, gli_ind;
		Real currr_ind;
		Real curri_ind;
60
61

	public:
62
63
		RxLineDP() { };
		RxLineDP(String name, Int node1, Int node2, Real resistance, Real inductance, LineTypes type = LineTypes::RxLine3Node);
64

65
		void init(Real om, Real dt);
66
67
		void applySystemMatrixStamp(SystemModel& system);
		void applyRightSideVectorStamp(SystemModel& system) { }
68
		void step(SystemModel& system, Real time);
69
		void postStep(SystemModel& system);
70
		Complex getCurrent(SystemModel& system);
71
72
	};
}