Skip to content
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

Add and rearange initial example #322

Merged
merged 42 commits into from
Feb 28, 2022

Conversation

paulf81
Copy link
Collaborator

@paulf81 paulf81 commented Feb 16, 2022

This pull requests combines former branches which added new initial examples, as well as interactive streamlit demonstrations.

Finally pull requests adds a new notebook which maybe could provide a first overview in critical syntax and how some things are importantly changed from v2 and v3

This pull request also seeks to address issue #318 and issue #315 by providing clearer demonstration of recommended use via the above notebook.

Not yet, still some discussion

Feature or improvement description
Adds four additional examples:
examples/__getting_started.ipynb
examples/00_getting_started.py
examples/12_streamlit_demo.py
examples/13_streamlit_demo_large_farm.py

However the main idea is to agree on the syntax rules laid out in the notebook, then all following examples will be updated

Related issue, if one exists
issue #318
issue #315
issue #345

@paulf81 paulf81 added enhancement An improvement of an existing feature v3 Label to denote focus on v3 labels Feb 16, 2022
@paulf81 paulf81 added this to the v3.0 milestone Feb 16, 2022
@rafmudaf
Copy link
Collaborator

It's great that there's a notebook explaining things slowly and showing the value of variables. Excellent idea @paulf81.

On that notebook, my only feedback is that the tools API will certainly change over the next few days so we'll have to be sure to update the example and explanations.

@paulf81
Copy link
Collaborator Author

paulf81 commented Feb 17, 2022

Sounds good, I think that is my expectation, but still valuable to explain how things work at the present moment and then update as we go.
@rafmudaf : should I go through and update the other examples to follow this syntax (copying the FI for plotting)? And should it be within this pull request or a seperate?

@rafmudaf
Copy link
Collaborator

should I go through and update the other examples to follow this syntax (copying the FI for plotting)?

I'm in the process of redeveloping the floris.tools package now so these API's and patterns will change very soon. I vote lets wait until that's nailed down and then update the examples.

@paulf81
Copy link
Collaborator Author

paulf81 commented Feb 21, 2022

hi @bayc and @rafmudaf I went through all the examples after merging in the latest v3, and updated the visualization methods to the new standards/function name and confirm each example works. I think this doing a better and better job of introducing the key concepts in an incremental way, but will be curious what you (and also @Bartdoekemeijer ) think

"flow_field_grid_points": [200,100,7]
}
fi.reinitialize(solver_settings=solver_settings)
# # Configure this simulation for visualization using the full flow field grid
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should this just be removed? Is it not needed anymore?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done!

# print(farm_power_results)

# # Show the farm results
# df_farm = pd.DataFrame.from_records(farm_power_results, columns = ['model','yaw','power']).set_index(['yaw','model']).unstack()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should this code be removed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done!

st.header("Power Comparison")
st.write(fig_turb_pow)

# print(farm_power_results)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done!

@@ -0,0 +1,176 @@
# Copyright 2021 NREL
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should this be renamed to example 11?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

or we can save 11 for a mulit turbine example?

@rafmudaf rafmudaf changed the base branch from v3 to main February 25, 2022 22:31
@bayc bayc merged commit f1d686b into NREL:main Feb 28, 2022
@paulf81 paulf81 deleted the feature/add_new_initial_example branch March 1, 2022 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An improvement of an existing feature v3 Label to denote focus on v3
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants