Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Nutaro, James J
agm
Commits
cd65c989
Commit
cd65c989
authored
Dec 04, 2020
by
Jim Nutaro
Browse files
Lump resistive shunt capacitors into the load
parent
ec28fba1
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/ElectricalData.cpp
View file @
cd65c989
...
...
@@ -96,7 +96,8 @@ void ElectricalData::initialize_circuit()
lines
[
i
].
B
=
Complex
(
0.0
,
0.0
);
lines
[
i
].
Z
=
1.0
/
lines
[
i
].
y
;
lines
[
i
].
R
=
real
(
lines
[
i
].
Z
);
assert
(
imag
(
lines
[
i
].
Z
)
>
0.0
);
if
(
imag
(
lines
[
i
].
Z
)
<=
0.0
)
cerr
<<
"Line "
<<
lines
[
i
].
to
<<
" -> "
<<
lines
[
i
].
from
<<
" has negative reactance."
<<
endl
;
lines
[
i
].
L
=
imag
(
lines
[
i
].
Z
)
/
(
2.0
*
pi
*
freq
);
}
// Calculate load parameters
...
...
@@ -106,8 +107,8 @@ void ElectricalData::initialize_circuit()
nodes
[
i
].
y
=
nodes
[
i
].
Z
=
Complex
(
0.0
,
0.0
);
if
(
nodes
[
i
].
B
!=
Complex
(
0.0
,
0.0
))
{
assert
(
real
(
nodes
[
i
].
B
)
==
0.0
);
if
(
imag
(
nodes
[
i
].
B
)
<
0.0
)
// If its not a pure capacitance, then lump it into the load
if
(
imag
(
nodes
[
i
].
B
)
<
0.0
||
real
(
nodes
[
i
].
B
)
>
0.0
)
nodes
[
i
].
y
+=
nodes
[
i
].
B
;
// Charging as capacitance
else
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment