File size: 1,077 Bytes
b1a89a3 f82e8a1 b1a89a3 f0d634e b1a89a3 f0d634e b1a89a3 ed693a3 b1a89a3 1798914 b1a89a3 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
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"):
# Fluid properties
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 # Dynamic viscosity [m^2/s]
# Flow properties
D = st.number_input("Characteristic Length [m]", step=1e-6, format="%.5f") # Characteristic Length [m]
u_inf = st.number_input("Freestream velocity [m/s]", step=1e-6, format="%.5f") # Freestream velocity [m/s]
y_plus = st.number_input("Y+ [-]", step=1e-6, format="%.5f") # Y+ [-]
Re = rho*u_inf*D/mu # Reynold's number
C_f = .0576*Re**(-.2) # Skin friction coefficient
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}') |