Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ACS
Public
Power System Simulation and Optimization
DPsim
DPsim
Commits
05d99aa2
Commit
05d99aa2
authored
Apr 27, 2017
by
Georg Martin Reinke
Browse files
fix ideal current source
parent
ae0acde0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Source/Components/CurrentSource.cpp
View file @
05d99aa2
...
...
@@ -8,10 +8,14 @@ CurrentSource::CurrentSource(std::string name, int src, int dest, double current
};
void
CurrentSource
::
applyRightSideVectorStamp
(
SystemModel
&
system
)
{
if
(
mNode1
!
=
0
)
{
if
(
mNode1
>
=
0
)
{
system
.
addCompToRightSideVector
(
mNode1
,
currentr
,
currenti
);
}
if
(
mNode2
!
=
0
)
{
if
(
mNode2
>
=
0
)
{
system
.
addCompToRightSideVector
(
mNode2
,
-
currentr
,
-
currenti
);
}
};
}
void
CurrentSource
::
step
(
SystemModel
&
system
,
Real
time
)
{
this
->
applyRightSideVectorStamp
(
system
);
}
Source/Components/CurrentSource.h
View file @
05d99aa2
...
...
@@ -17,8 +17,8 @@ namespace DPsim {
void
init
(
Real
om
,
Real
dt
)
{
}
void
applySystemMatrixStamp
(
SystemModel
&
system
)
{
}
void
applyRightSideVectorStamp
(
SystemModel
&
system
);
void
step
(
SystemModel
&
system
,
Real
time
)
{
}
void
step
(
SystemModel
&
system
,
Real
time
)
;
void
postStep
(
SystemModel
&
system
)
{
}
};
}
#endif
\ No newline at end of file
#endif
Write
Preview
Supports
Markdown
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