Skip to content

Added Quickstart Guide#5

Merged
skygering merged 10 commits intomasterfrom
sg/notebook_example
Apr 4, 2025
Merged

Added Quickstart Guide#5
skygering merged 10 commits intomasterfrom
sg/notebook_example

Conversation

@skygering
Copy link
Copy Markdown
Contributor

I added a quickstart guide as a part of learning and understanding the code. MITRotor is lacking a lot documentation. I think that the most important part is increased clarify on variable names, but we could add more than that if we think would be helpful for current users.

@skygering skygering requested review from iupfal and mhowlan3 March 16, 2025 03:03
@skygering skygering changed the title Quickstart Guide Added Quickstart Guide Mar 16, 2025
Comment thread MITRotor/Momentum.py Outdated
def __init__(
self, averaging: Literal["sector", "annulus", "rotor"] = "rotor", ac: float = 1 / 3, v4_correction: float = 1.0
):
): #TODO: the v4_correction isn't used. Should it be mentioned in the quickstart? Removed? Is ac the starting induction guess?
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what the v4_correction refers to - can you clarify?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Within the constructor for the HeckMomentum model, there is a argument v4_correction that can be provided by the user, but it doesn't seem to be used anywhere, so I didn't mention it in the quickstart guide. I have now removed the comment and kept the parameter, but still am not mentioning it in the quickstart guide. I just wanted to flag the unused parameter.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Skylar and Mike, I added this parameter to allow users to replicate the paper by Lu et al who modified v4. This was the only use case for this parameter. So feel free to keep or remove it as needed.

"metadata": {},
"source": [
"### Rotor Definitions\n",
"The first argument needed to initialize a `BEM` is a `RotorDefinition`. A `RotorDefinition` is a separate class that allows the user to define many of the rotor properties. The most straightforward way to create a new rotor definition is to create a `.yaml` file with each of the necessary fields, just like the files in the `ReferenceTurbines` folder. These files can then be read in using the `from_windio` function, which returns a `RotorDefinition`.\n",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add a reference to windIO here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added in a link to the IEA Wind Systems GitHub repository.

Comment thread examples/MITRotor_quickstart.ipynb Outdated
"\n",
"- `UnifiedMomentum`: arguments `averaging` and `beta`. The argument `averaging` has the same options as for the `HeckMomentum` model. The argument `beta` is the shear layer growth rate parameter and has a default value of 0.1403.\n",
"\n",
"- `MadsenMomentum`: argument `cosine_exponent`, which is an optional exponent on the cosine term in the Madsen model.\n",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add reference to this paper for `MadsenMomentum' https://wes.copernicus.org/articles/5/1/2020/

Comment thread examples/MITRotor_quickstart.ipynb Outdated
"\n",
"- `ClassicalMomentum`: no arguments.\n",
"\n",
"- `HeckMomentum`: arguments `averaging` and `ac`. The options for `averaging` are: `\"sector\"`, `\"annulus\"`, or `\"rotor\"` (with a default of `\"rotor\"`). The default value of `ac`, the initial induction value, is $\\frac{1}{3}$. \n",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread examples/MITRotor_quickstart.ipynb Outdated
"\n",
"- `HeckMomentum`: arguments `averaging` and `ac`. The options for `averaging` are: `\"sector\"`, `\"annulus\"`, or `\"rotor\"` (with a default of `\"rotor\"`). The default value of `ac`, the initial induction value, is $\\frac{1}{3}$. \n",
"\n",
"- `UnifiedMomentum`: arguments `averaging` and `beta`. The argument `averaging` has the same options as for the `HeckMomentum` model. The argument `beta` is the shear layer growth rate parameter and has a default value of 0.1403.\n",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reference https://www.nature.com/articles/s41467-024-50756-5 for `UnifiedMomentum'

Comment thread examples/MITRotor_quickstart.ipynb Outdated
"cell_type": "markdown",
"metadata": {},
"source": [
"There are two options for aerodynamic models, `KraghAerodynamics` and `DefaultAerodynamics`, both of which are concrete subtypes of the `AerodynamicModel` class. They do not take any arguments, and are called internally to get the needed `AerodynamicProperties` for our calculations. As the name suggests, `DefaultAerodynamics` is the default for the BEM unless otherwise specified."
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@skygering skygering merged commit 025ddc2 into master Apr 4, 2025
8 checks passed
@skygering skygering deleted the sg/notebook_example branch April 4, 2025 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants