Programming with SCILAB (pdf)
Programming with SCILAB (pdf)
Programming with SCILAB (pdf)
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
function [] = FlowClassification(Re,Ma)<br />
//|-------------------------------------|<br />
//| This function classifies a flow |<br />
//| according to the values of the |<br />
//| Reynolds (Re) and Mach (Ma). |<br />
//| Re 1, super-sonic flow |<br />
//|-------------------------------------|<br />
//Classify according to Re<br />
if Re 2000 & Re FlowClassification(1000,0.5)<br />
The flow is laminar and sub-sonic.<br />
-->FlowClassification(10000,1.0)<br />
The flow is turbulent and sonic.<br />
-->FlowClassification(4000,2.1)<br />
The flow is transitional and super-sonic.<br />
An alternative version of the function has no arguments. The input values are<br />
requested by the function itself through the use of the input statement. (Comment<br />
lines describing the function were removed to save printing space).<br />
function [] = FlowClassification()<br />
//Request the input values of Re and Ma<br />
Re = input("Enter value of the Reynolds number: \n")<br />
Ma = input("Enter value of the Mach number:\n")<br />
//Classify according to Re<br />
if Re 2000 & Re