-
Notifications
You must be signed in to change notification settings - Fork 7
Refactor Tgov1 model: new parameter parsing, safe valve logic #195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
3a72c72
Adding new files that we changed
ceca20f
Apply pre-commmit fixes
WiktoriaZielinskaORNL ead64bf
Update examples/PhasorDynamics/Tiny/TwoBus/Tgov1/TwoBusTgov1.cpp
shakedregev e83b71e
Testing username
8e683c9
Testing username
WiktoriaZielinskaORNL 96113f9
Refactor Tgov1: remove unused machine_type, added documentation
WiktoriaZielinskaORNL 82fbb8d
Apply pre-commmit fixes
WiktoriaZielinskaORNL 5a6a083
Style fix again
WiktoriaZielinskaORNL d153b44
Move 'using namespace' to top of main() for clarity
WiktoriaZielinskaORNL 10ac191
Apply pre-commmit fixes
WiktoriaZielinskaORNL d7b1c2e
Styling
WiktoriaZielinskaORNL ac53335
Clean up TGOV1 model.
pelesh 2cad8fc
Fix TGOV1 default parameter values.
pelesh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,38 +1,66 @@ | ||
| /** | ||
| * @file Tgov1Data.hpp | ||
| * @author Wiktoria Zielinska (zielinskawa@ORNL.gov) | ||
| * @author Luke Lowery (lukel@tamu.edu) | ||
| * @brief Modeling data for TGOV1 | ||
| * | ||
| */ | ||
|
|
||
| #pragma once | ||
|
|
||
| #include <Model/PhasorDynamics/ComponentData.hpp> | ||
|
|
||
| namespace GridKit | ||
| { | ||
| namespace PhasorDynamics | ||
| { | ||
| namespace Governor | ||
| { | ||
| /** | ||
| * @brief Contains modeling data for a TGOV1 Governor model. | ||
| * | ||
| * @tparam RealT Real parameter data type | ||
| * @tparam IdxT Integer parameter data type | ||
| * @brief Parameter keys for TGOV1 Governor model. | ||
| * | ||
| * Integer parameters are of the same type as matrix and vector indices. | ||
| * These enum values serve as keys for the parameters map in ComponentData. | ||
| */ | ||
| enum class Tgov1Parameters | ||
| { | ||
| R, ///< Droop Constant | ||
| T1, ///< Valve Time Delay | ||
| T2, ///< Turbine Numerator Time Constant | ||
| T3, ///< Turbine Delay | ||
| Pvmax, ///< Max Valve Power | ||
| Pvmin, ///< Min Valve Power | ||
| Dt ///< Damping Coefficient | ||
| }; | ||
|
|
||
| /** | ||
| * @brief Placeholder enum for TGOV1 ports. | ||
| */ | ||
| enum class Tgov1Ports | ||
| { | ||
| }; | ||
|
|
||
| /** | ||
| * @brief Placeholder enum for TGOV1 monitorable variables. | ||
| */ | ||
| enum class Tgov1MonitorableVariables | ||
| { | ||
| }; | ||
|
|
||
| /** | ||
| * @brief Modeling data for TGOV1 Governor using ComponentData base. | ||
| * | ||
| * @todo Decide on naming scheme for model parameters. | ||
| * @tparam RealT Real number type (e.g., double) | ||
| * @tparam IdxT Index type (e.g., size_t) | ||
| */ | ||
| template <typename RealT, typename IdxT> | ||
| struct Tgov1Data | ||
| struct Tgov1Data : public ComponentData<RealT, IdxT, Tgov1Parameters, Tgov1Ports, Tgov1MonitorableVariables> | ||
| { | ||
| RealT R{0.05}; ///< Droop Constant | ||
| RealT T1{0.5}; ///< Valve Time Delay | ||
| RealT T2{2.5}; ///< Turbine Numerator Time Constant | ||
| RealT T3{7.5}; ///< Turbine Delay | ||
| RealT Pvmax{1.0}; ///< Max Valve Power | ||
| RealT Pvmin{0.0}; ///< Min Valve Power | ||
| RealT Dt{0.0}; ///< | ||
| Tgov1Data() = default; | ||
|
|
||
| using Parameters = Tgov1Parameters; | ||
| using Ports = Tgov1Ports; | ||
| using MonitorableVariables = Tgov1MonitorableVariables; | ||
| }; | ||
|
|
||
| } // namespace Governor | ||
| } // namespace PhasorDynamics | ||
| } // namespace GridKit |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.