DPsim
Base_Ph1_PiLine.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 
14 namespace CPS {
15 namespace Base {
16 namespace Ph1 {
17 class PiLine {
18 
19 public:
28 
29  explicit PiLine(CPS::AttributeList::Ptr attributeList)
30  : mSeriesRes(attributeList->create<Real>("R_series")),
31  mSeriesInd(attributeList->create<Real>("L_series")),
32  mParallelCap(attributeList->create<Real>("C_parallel")),
33  mParallelCond(attributeList->create<Real>("G_parallel")){};
34 
36  void setParameters(Real seriesResistance, Real seriesInductance,
37  Real parallelCapacitance = 0,
38  Real parallelConductance = 0) const {
39  **mSeriesRes = seriesResistance;
40  **mSeriesInd = seriesInductance;
41  **mParallelCond = parallelConductance;
42  **mParallelCap = parallelCapacitance;
43  }
44 };
45 } // namespace Ph1
46 } // namespace Base
47 } // namespace CPS
const Attribute< Real >::Ptr mParallelCap
Capacitance in parallel to the line [F].
const Attribute< Real >::Ptr mParallelCond
Conductance in parallel to the line [S].
const Attribute< Real >::Ptr mSeriesInd
Inductance along the line [H].
const Attribute< Real >::Ptr mSeriesRes
Resistance along the line [ohms].