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

Userdensity #111

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open

Userdensity #111

wants to merge 3 commits into from

Conversation

JonLock1689
Copy link

Delete the text explanations below these headers and replace them with information about your PR.

Purpose

Hello! This pull-request introduces a new fork in which density and blade number have been updated to be user-defined parameters in input_schema.yaml. The changes are implemented in all the relevant files (i.e., ActuatorLine.py, ProblemManager.py). There are some unnecessary comments for debugging which can be removed.

Type of change

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (non-backwards-compatible fix or feature)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Documentation update
  • Maintenance update
  • Other (please describe)

Testing

  1. Write the new parameters in input_schema.yaml.
  2. Update the UnsteadySolver subroutine in ProblemManager.py to incorporate the user-defined density into the Navier-Stokes equations and the corresponding pressure and velocity corrections.
  3. Implement the user-defined parameters in the relevant files: ActuatorLine.py, ActuatorLineDolfin,py.

Checklist

Put an x in the boxes that apply.

  • I have run existing tests which pass locally with my changes
  • I have added new tests or examples that prove my fix is effective or that my feature works
  • I have verified my code additions work in parallel
  • I have added necessary documentation

eyoung55 and others added 3 commits July 11, 2023 13:52
* minor change to warning text

* shift gauss cyld by RD

* fixed cyld, converted point to expression

* fixed jit problem

* added sharpness param to point blockage

* fixed u_k update for constraints

* fixed taylor test convergence

* Added check_totals option

* fixed constraint derivatives, and taylor test inputs

* ALM DEL method

* default params

* updating yaml params

* moving example to demo folder

* renaming example folder

* starting on acuator disks

* fixed inflow angle bug

* made the multiangle solver more robust

* fixing what the fix broke

* yep

* Added fatpack to the install script

* added pandas

* got dolfin actuator disks working

* gotta fix a form_compiler issue, but it seems all good up to the gradient

* got numpy disks working

* added stop_annotation to the debug, and changed how boundary HH velocity calculated

* updated some demos/test, fixed objectives

* initial commit to compare to refactored ALM output to dev

* test push upstream

* minor cleaning after verifying results match

* adding power calc and more cleanup

* getting ready for optimization test

* adding test file for collaborating on optimization

* storing before opt testing original branch

* pushing latest mpi_u_fluid deriv testing

* adding latest test updates

* cleaning up ALM block tests

* syncing print statements for jeff

* refactored imported wind farms

* added empty farm, updated demos/test/docs

* fixed alm adjoint bug, got all test running

* moved test_alm_refactor.yaml to other folder so it doesn't get picked up by pytest

* fixing conflicts before factoring out trans/rots

* wrap values e.g. self.mz as float to avoid jit error

* factoring translation/rotation out of u-fluid and alm

* consistent var names prev vs behind

* fix alm gradients

* take two

* fixing merge conflicts

* fixing mz dijitso error

* added missing input file"

* added verbose to pytest

* added some debug printing

* moar debug

* arg

* arg2

* trying to project tf first

* maybe with stop_annotating'

* quick test of new environment

* adding conda list to the enviroment build

* check if it's the Quadrature space

* now check if it's dolfin adjoint

* updated tfsc, coffee, finat versions

* disabling actuator disk block

* use disk instead of numpy disk

* whoops typo

* remove tsfc from dolfin adjoint helper

* revert back to original skew steady

* attempt tmate session

* rename input csv and txt files

* attempt 2

* reduce skew mesh size

* iea15 rwt

* yaml file case 10 iea15 floating

* reduce number of turbines

* removed some print statements

* bug fix, clean up, update truth

* missed an instance of stop_annotating

* reverting install.sh to see if that helps the parallel stall

* trying restricted scipy

* maybe pip install openmdao and pyoptsparse

* nope

* maybe newer scipy

* reordered tests

* revert to scipy 1.7.0

* alphabetizing packages

* touch ALM unsteady

* untouch ALM unsteady

* adding translation function and consolidating calls

* removing merged orphan

* adding test_alm_refactor and inital motion test

* initial commit of saving data along blade

* remove my test case

* fixing parallel bug caused by hmin disagreement

* wobbling turbines don't pass regression tests

* add nrel5mw files

* added commas to blade_data.csv and the converters output

* Delete windse.egg-info directory

* make global hmin calculation a part of domain finalization

* syncing None boundary fixes from eagle

* fix typo

* fixing typo (correctly)

* updating parallel test

* revert to taking a fixed first dt

* temporary test of smaller dt through cfl_target

* changing ALM truth values for smaller timestep size

* make saving along blade data work in parallel

* changing lift-drag interpolator to handle unstructured data

* update truth values to reflect LinearNDInterpolator calculation

* add axial velocity to saved along-blade data

* add option to turn off tip loss model from yaml file

* create a regular grid interpolation if it doesn't exist

* remove print statement

* limit maximum size of interpolation

* added mpi_eval block

* forgot to add files

* adding code for mpi communication of point evaluations

* quick test for dimension agreement

* generate csv from outb files for floating ptfm

* add option for nacelle rad specification and corresponding lookup adjustments

* change nacelle label to hub for clarity

* Update environment.yaml

* Update environment.yaml

* swapping out old mpi_u_fluid building with mpi_eval function

* switch how parallel tests are ran

* modified the actuater line block to account for the new mpi_u_fluid

* fixed alm for multi turbines

* build no longer exists

* pin to different build

* newer build?

* used wildcards to make compatable between osx and linux

* had to recast a list of coeffs

* removed parallel test

* hunting for parallel bug

* needed repr

* run 10 parallel test

* copied the wrong one

* made fprint

* try python call

* switching to python -u driver.py run

* added stream and spanwise periodic bcs and body force

* updated the opt_test

* forgot key files

* fixed inflow_unit_vector for 2d

* allow imported csv to have comments

* got template working

* fixing mangled commit

* adding draft studies

* testing thickness param

* add skeleton of ALM study

* added disk mesh convergence study

* update study text and references

* forgot to add wind_farm.png

* updated truth value now that disks power measured in MWs

* switched requirement to dolfin_adjoint

* Updated tag number

* Updated tag version

* Update alm_validation.rst

* Update disk_mesh_convergence.rst

* updated alm_validation.yaml with eagle settings

* adding a work around for the 60 turbine limit

* fixing truth values to account for returning to approximate gauss vol

* fixed check for periodic bc

* changed snes linesearch

* Dolfinizing the ALM Code (NREL#94)

* updated version number

* fixed inflow_angle bug and power sum bug

* Pin OM version until bug resolved

* initial commmit of notebook code

* renaming, organizing, and adding better comments

* begin merging notebook with windse

* fixing import errors

* adding very rough time stepping and integrating with solver manager

* use old method to pass tests

* placeholder cl cd values for testing

* added ufl_eval, and dolfin_adjoint friendly lookup tables

* got aoa, cl, cd dolfin adjoint friendly

* syncing changes from force verification testing

* added da tester and listified

* restructured vel_fluid, and ufl_eval

* made a tweak to test_dolfin_adjoint()

* added the new blocks

* adding x_0_prev changes

* adding data save of along-blade quantities

* project per turbine tf, add twist as control

* syncing fx, fy, fz lists

* chunking UFL form into per-blade pieces and adding projection solver

* fix scaling of 2x of actuator width

* removing tip_loss debugging hack

* use Constant method only on Constant type

* rename truth key num_actuator_nodes

* add gha print statements

* saving update_turbine_force call from dev branch

* add option to pass a hard-coded objective scaling value from command line

* fixed path to new option and wrap as float

* adding option to force linear interpolation by changing general:name

* syncing from eagle

* added control updater

* added velocity save during df forward solve

* even more print statements

* add option to perturb single chord values for finite differencing

* try except probing of points to avoid parallel fail

* save chord as csv file

* only save from rank 0

* fix typo

* allow option to specify chord explicitly from CSV file

* commented blade projections to fix forward problem

* fixed adjoint mpi

* fixed one mpi bug

* sync with ethan

* switched to gauss kernel based local vel

* added mpi_eval lines as comments in case we need to switch back

* reverse theta to correct spin direction

* switch to gauss_vel_eval and add motion functions

* use vector of zeros to match shape

* moved the platform_theta outside the blade loop

* syncing eagle changes

* fixed problems with steady optimzer and adjusted alm truth to account for hub node missing

* adding mshr back for the time being, we need to make a pr that completely removes it

* sync power calc change for eagle run

* cleaning up power calc

* scale power calc

* loop over all controls vs skipping first one

* twist too

* point to correct save files for unsteady problem

* syncing output dir change for avg quantity

* allow other platform motions specified via input

* fix list comparison typo

* convert degrees to radians

* swap order of translations and rotations for floating

* save from rank 0 and change twist bounds

* add twist_range as option for twist constraint and parse multiple strings from command line

* cleaned up dolfin alm for merge

* attempting to fix mpi hang by doing a dummy refine

* fixed cu_tag in control updater

* unpin openmdao

* fixed Updater Bug and added floating_alm truth

* misnamed file

---------

Co-authored-by: Jeff Allen <jeffery.allen@nrel.gov>
Co-authored-by: John Jasa <johnjasa11@gmail.com>
Co-authored-by: jefalon <jefalon@gmail.com>

* Disk hybrid (NREL#103)

* changed snes linesearch

* create hybrid disks

* added a save file for the velocity profile

* switched back to old def of WTGbase

* added support for blade_segments input

* moved to custom refine first

* hybrid can now import profile from file

* fixed multiturbine and dolfin_line yaw

* switching ci to mac

* adding some more ci cases

* fix truth data

* add input refactoring changes to doc yaml demos

* add jsonschema package to environment.yaml recipe

* update regression tests with new input format

* provide x_range, y_range, z_range as separate inputs for clarity

* validate using yaml schema, set defaults from schema, refactor custom refine

* make inputs to all refinements kwargs for unpacking from dictionary

* add postprocessing functions

* call post processing functions

* the new windse schema file

* the new postprocessingmanager with routines like write_to_floris

* reconcile merge conflict from is custom_refine none test

* add hybrid_disk as a valid option to the yaml scheme

* add a readthedocs file, move conf.py, add new type for vel_height

* modify calls to constraint when keys are integers

* extract constraint and objective name when keys are ints

* allow non integer keys for non repeated refinements, sort only when necessary

* separate out objective name when key is int

* rename 'type' to 'orientation' to avoid problems with type being cyld_kernel

* move conf back to source

* change path to configuration file

* Update sphinx_requirements.txt to <7.0

* Update sphinx_requirements.txt

* Update environment.yaml to sphinx <7.0.0

* fake the subdomain class to avoid a doc build error

* add pre_build option to yaml, change index to point to new rst file

* add the script to scrape the schema to build params.rst

* add note about paths to rst generating script

* remove reference to old params file

* edit title of parameters.rst

* add units to numeric params

* change nesting formatting, include units where possible

* many changes to schema descriptions, add enum items where possible

* enumerate options for functionspace, problem, and solver

* add units to turb_id, capitalize Newton

* add top level descriptions

* refactored old param file

* cleaned up addtiional parameter notes, added table references

* returned the index to maxdepth 1

* use integer vs number type in schema for integer inputs

* rename write_floris option to write_floris_input

* forgot to rename regression file option

* forgot to delete IntegralPower.py

* Added 2023.07.01 features, bugs and fixed formatting

---------

Co-authored-by: Jeffery M. Allen <jeffery.allen@nrel.gov>
Co-authored-by: John Jasa <johnjasa11@gmail.com>
Co-authored-by: Julian Quick <jquick@el1.ib0.cm.hpc.nrel.gov>
Co-authored-by: pibo <ptrbortolotti@gmail.com>
Co-authored-by: jefalon <jefalon@gmail.com>
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.

None yet

2 participants