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

Radar and Spinner Lidar Sampling #954

Merged
merged 53 commits into from
Mar 8, 2024
Merged

Conversation

ndevelder
Copy link
Contributor

Large commit for new sampling that mimics Spinner Lidar and Radar

@ndevelder
Copy link
Contributor Author

Ok, so I'm moving this out of draft as soon as all the checks go through. I think I've addressed everything (albeit in the most minimal way possible). There are a few details to note:

  • I removed ConeSampler since it is untested and not part of any work package...it was a waypoint on the path to getting the radar sampler in.
  • The spinner and radar sampler unit tests only check the expected number of sampling locations, but could have a lot more work done to them. I'm hoping we can file this under future nice things to have. We've tested both samplers outside of the unit and reg test frameworks and have thought the results are reasonable.
  • After thinking about it some more, I don't think there is a place for actuator testing here...the sampler "attaches" to one openfast instance and reads the orientation matrix coming from openfast...but has no actual interaction with actuator points. And it seems like we're still working on a simple/seamless integration of openfast models in the testing infrastructure? If there are any ideas on something to test related to this I'm happy to consider, but I think we need openfast testing integration first?

I'd also like to add a reg test for each sampler in a subsequent PR. I can open an issue and assign to myself if that seems worth it.

@ndevelder ndevelder marked this pull request as ready for review February 22, 2024 19:26
return vnew;
}

void spherical_cap_quadrature(
Copy link
Contributor

Choose a reason for hiding this comment

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

There is a lot of code added in SamplingUtils, and these standalone functions seem like good candidates for unit testing. Don't need tests for every single one, but ideally if there is a basic problem with a known solution for a few of the complicated ones, it would help solidify this part of the code and rule out errors here if there is debugging required in the future.

@mbkuhn
Copy link
Contributor

mbkuhn commented Feb 27, 2024

I think this PR is really close. 2 things come to mind: unit tests for SamplingUtils, which I mentioned above, and the preexisting sampling methodology. Because this PR reworked some of the functions in Sampling.cpp, is there any concern that the changes have affected the ordinary sampling there? Unit tests exist for some of that already, I'm just wanting to confirm that this aspect has been looked at.

@ndevelder
Copy link
Contributor Author

Jumping back into this today! A couple points related to your comments:

  • Happy to look at sampling utils and construct a test or two
  • We've done testing and production runs with this PR for the RAAW project (multiple samplers in addition to the spinner) and Dan didn't see any problems. I do think messing with the buffer variable comes with some risk, but we haven't been able to break it yet.
  • Other than that, it was mostly tidying, line-of-sight calculation for the radar, and allowing for data reduction in the sampler (with the default for most samplers that num points = num output points)

@mbkuhn
Copy link
Contributor

mbkuhn commented Mar 7, 2024

Excellent. @ndevelder I'll approve and merge after some unit tests for Sampling Utils functions are added.

@ndevelder
Copy link
Contributor Author

I got some of the simpler SamplingUtils tests in, but I don't have an easy way to get an independent result for the spherical cap quadrature stuff. That was effectively a direct copy from Nalu-Wind implemented by Robert K. I suppose I could try to put in something random and get a result, and just use that result to make sure it doesn't change in the future?

@mbkuhn
Copy link
Contributor

mbkuhn commented Mar 8, 2024

Thanks for doing this, Nate! That is fine with me, if it's not too much of a lift. Just to safeguard the current version.

@mbkuhn
Copy link
Contributor

mbkuhn commented Mar 8, 2024

Great work, Nate. Thanks for cooperating with my requests and improving the standards of the code.

@mbkuhn mbkuhn enabled auto-merge (squash) March 8, 2024 23:08
@mbkuhn mbkuhn merged commit 0bf6748 into Exawind:main Mar 8, 2024
13 checks passed
@mbkuhn mbkuhn mentioned this pull request Mar 26, 2024
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.

2 participants