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

feat: Calculation for Boundary Layer Statistics #10

Merged
merged 20 commits into from
Apr 2, 2021
Merged

Conversation

jrwrigh
Copy link
Member

@jrwrigh jrwrigh commented Aug 17, 2020

  • Originally implemented (incompletely) in master branch, but moved to separate branch until it's completed.

@jrwrigh
Copy link
Member Author

jrwrigh commented Sep 1, 2020

I will probably want to flip this into something more flexible. ie.

  1. Have a series of functions that take in vpt.Profile and output boundary layer statistics. One function per statistic (unless it makes sense otherwise)
  2. Have a function that takes in a list of BL thickness functions to evaluate at every point on the wall.
def BL99(profile):
    # Compute delta
return 'delta_99', delta

def BL_momentum(profile):
    # Compute Momentum delta
return 'delta_mom', delta

def computeBLStats(wall, functions):
    for pnt in wall:
        profile = getProfile(dataBlock, pnt)
        for deltafunc in functions:
              deltaName, delta = deltafunc(profile)

This would allow for easy extension in the future while also allowing "on-the-fly" BL stats to be computed easily. This should also generalize to 3D as well.... maybe.

@jrwrigh jrwrigh force-pushed the feat/calcBLStats branch 5 times, most recently from f671aa8 to 9f8d734 Compare January 21, 2021 17:21
@jrwrigh jrwrigh marked this pull request as ready for review March 26, 2021 02:53
@jrwrigh
Copy link
Member Author

jrwrigh commented Mar 26, 2021

Quick speed comparison between sampling all the points up front ("New BL heights") and sampling profiles one at a time ('Get Boundary layer heights'):

In[1]: %timeit runcell('Get Boundary layer heights', '/projects/tools/Models/BoeingBump/DNS/FlatPlate/Post/CRS_4d_HexWedgeCompare.py')
Out[1]: 23.3 s +/- 39.2 ms per loop (mean +/- std. dev. of 7 runs, 1 loop each)

In[2]: %timeit runcell('New BL heights', '/projects/tools/Models/BoeingBump/DNS/FlatPlate/Post/CRS_4d_HexWedgeCompare.py')
Out[2]: 2.91 s +/- 78 ms per loop (mean +/- std. dev. of 7 runs, 1 loop each)

Also confirmed that the results are identical (wall is from the original method, vortInt is from the new method):

In[79]: np.allclose(wall['delta_displace'], vortInt['delta_displace'])
Out[79]: True

In[80]: np.allclose(wall['delta_momentum'], vortInt['delta_momentum'])
Out[80]: True

@jrwrigh jrwrigh changed the title (WIP): Calculation for Boundary Layer Statistics feat: Calculation for Boundary Layer Statistics Apr 2, 2021
@jrwrigh jrwrigh merged commit cd9d0ca into master Apr 2, 2021
@jrwrigh jrwrigh deleted the feat/calcBLStats branch April 2, 2021 17:12
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.

1 participant