nuair = 1.6e-5; % kin.visc. m^2/s nuwater = 1e-6; % next set kinematic viscosity if(Substance == 1) nu = nuair; elseif(Substance == 2) nu = nuwater; end % do not care about these yet because we do not consider % convection % pressure gradient (if convection is used) dpdx = 5; % A = 0 -> pure conduction problem (heat eqn) % A = 1 -> conduction and convection problem (CD eqn) A = 0; % velocity U = A*(dpdx/(2*nu))*( (Ly/2)^2 - (Y-Ly/2).^2); V = 0*U;