-
Notifications
You must be signed in to change notification settings - Fork 1
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
Conversation
I will probably want to flip this into something more flexible. ie.
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. |
b8d5806
to
c7c06c1
Compare
c7c06c1
to
84fda0f
Compare
f671aa8
to
9f8d734
Compare
9f8d734
to
94714e1
Compare
- Brought over from master
- Also fixes sampleAlongVectors reference in the __init__.py
Other Changes: - Add extra data point to fix_delta (to allow for non-zero displacement and momentum thickness) - Change asserts to use 'correct' value instead of 'np.ones()*correct' - Misc formatting
- Also changed RuntimeErrors to ValueErrors - Other misc cleanup
- Added the "notSameSize" case for delta_velInt, which was missing before
94714e1
to
31fc239
Compare
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 ( 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 |
- Typo: 3/23 instead of 3/32
master
branch, but moved to separate branch until it's completed.