FlowRef.jl is a small library for computation of consistent reference quantities for inviscid and viscous flows. These are helpful when using non-dimensionalized/scaled flow equations.
The package defines a ReferenceFlowQuantities struct that stores all necessary reference quantities for scaling
of the compressible Navier-Stokes equations. A derivation of the reference quantities in the context of multi-species
multi-temperature Navier-Stokes equations can be found here.
To ensure that the quantities are computed in a consistent manner, utility functions are provided that return
a ReferenceFlowQuantities instance given a set of independent reference quantities that are used define all
other reference values:
p_m_rho_L(p_ref, m_ref, rho_ref, L_ref)- computes all reference quantities given a reference pressurep_ref, reference massm_ref, reference densityrho_ref, and referenceL_refp_T_rho_L(p_ref, T_ref, rho_ref, L_ref)- computes all reference quantities given a reference pressurep_ref, reference temperatureT_ref, reference densityrho_ref, and referenceL_refT_v_rho_L(T_ref, v_ref, rho_ref, L_ref)- computes all reference quantities given a reference temperatureT_ref, reference velocityv_ref, reference densityrho_ref, and referenceL_ref
A dictionary may be instantiated from ReferenceFlowQuantities instance rfq by simply calling dict_rfq = Dict(rfq).
Example usage:
rfq = p_m_rho_L(101325.0, 4.65e-26, 1.1375, 1.0) # atmospheric pressure, N2 molecular mass, 1.1375 kg/m^3 density, 1 m reference length
println(rfq.T_ref) # 300.0094102901551
println(rfq.v_ref) # 298.4575733281417
# we can use computed quantities and check that we get our reference pressure and mass
rfq2 = T_v_rho_L(rfq.T_ref, rfq.v_ref, 1.1375, 1.0)
println(rfq2.p_ref) # 101324.99999999999
println(rfq2.m_ref) # 4.650000000000001e-26The ReferenceFlowQuantities struct has the following fields:
p_ref: reference pressureT_ref: reference temperaturerho_ref: reference densityv_ref: reference velocityn_ref: reference number densitym_ref: reference masse_ref: reference specific energy (per unit mass)c_v_ref: reference specific heatR_specific_ref: reference specific gas constantt_ref: reference timeμ_ref: reference viscosity coefficientλ_ref: reference thermal conductivity coefficientDiff_ref: reference diffusion coefficientReynolds_ref: reference Reynolds number