Skip to content

Commit

Permalink
Initial files
Browse files Browse the repository at this point in the history
  • Loading branch information
paulf81 committed Aug 27, 2019
1 parent 3447111 commit 07a198c
Show file tree
Hide file tree
Showing 4 changed files with 95 additions and 0 deletions.
41 changes: 41 additions & 0 deletions WTC_toolbox/controller.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Copyright 2019 NREL

# Licensed under the Apache License, Version 2.0 (the "License"); you may not use
# this file except in compliance with the License. You may obtain a copy of the
# License at http://www.apache.org/licenses/LICENSE-2.0

# Unless required by applicable law or agreed to in writing, software distributed
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.

import numpy as numpy
from ccblade import CCAirfoil, CCBlade

class Controller():
"""
Class controller can be used to read in / write out controller param files
And update tunings
"""

def __init__(self):
"""
Maybe just initialize the internal variables
This also lists what will need to be defined
"""
pass

def read_param_file(self, param_file):
"""
Load the parameter files directly from a FAST input deck
"""

def write_param_file(self, param_file):
"""
Load the parameter files directly from a FAST input deck
"""

def tune_controller(self, turbine):
"""
Given a turbine model, tune the controller parameters
"""
10 changes: 10 additions & 0 deletions WTC_toolbox/sim.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Copyright 2019 NREL

# Licensed under the Apache License, Version 2.0 (the "License"); you may not use
# this file except in compliance with the License. You may obtain a copy of the
# License at http://www.apache.org/licenses/LICENSE-2.0

# Unless required by applicable law or agreed to in writing, software distributed
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.
42 changes: 42 additions & 0 deletions WTC_toolbox/turbine.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Copyright 2019 NREL

# Licensed under the Apache License, Version 2.0 (the "License"); you may not use
# this file except in compliance with the License. You may obtain a copy of the
# License at http://www.apache.org/licenses/LICENSE-2.0

# Unless required by applicable law or agreed to in writing, software distributed
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.

import numpy as numpy
from ccblade import CCAirfoil, CCBlade

class Turbine():
"""
Class turbine defines a turbine in terms of what is needed to design the controller
and to run the 'tiny' simulation
"""

def __init__(self):
"""
Maybe just initialize the internal variables
This also lists what will need to be defined
"""
# Should names match fast or can be more simple
self.gb_ratio = None # Initialize all to none?

def load_from_fast(self, fast_folder):
"""
Load the parameter files directly from a FAST input deck
"""

def load_from_sowfa(self, fast_folder):
"""
Load the parameter files directly from a SOWFA directory
"""

def load_from_csv(self, fast_folder):
"""
Load from a simple CSV file containing the parameters
"""
2 changes: 2 additions & 0 deletions examples/example_01.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Example_01
# Load a turbine model

0 comments on commit 07a198c

Please sign in to comment.