|
import streamlit as st |
|
import pandas as pd |
|
import numpy as np |
|
|
|
st.write(""" |
|
## First Layer Thickness Calculation based on y+ |
|
""") |
|
|
|
with st.form("my_form"): |
|
|
|
mu = st.number_input("Viscosity [Pa*s]", step=1e-6, format="%.7f") |
|
rho = st.number_input("Density [kg/m^3]", step=1e-6, format="%.5f") |
|
st.form_submit_button('Submit properties') |
|
|
|
|
|
nu = mu/rho |
|
|
|
|
|
|
|
D = st.number_input("Characteristic Length [m]", step=1e-6, format="%.5f") |
|
u_inf = st.number_input("Freestream velocity [m/s]", step=1e-6, format="%.5f") |
|
y_plus = st.number_input("Y+ [-]", step=1e-6, format="%.5f") |
|
|
|
Re = rho*u_inf*D/mu |
|
C_f = .0576*Re**(-.2) |
|
|
|
st.write(""" |
|
## f'Reynolds = {Re:.0f}' |
|
""") |
|
|
|
tau_om = .5*C_f*rho*u_inf**2 |
|
|
|
u_tau = (tau_om/rho)**.5 |
|
|
|
y = y_plus*nu/u_tau |
|
|
|
print(f'Y Centroid = {y:.4f}') |
|
print(f'Yh (First Layer Thickness) = {2*y:.4f}') |