## DESCRIPTION
## ENTER DESCRIPTION HERE
## ENDDESCRIPTION

## DBsubject(Mechanics)
## DBchapter(Fluid Dynamics and Medical Applications)
## DBsection(Flow Rate and Relation to Velocity)
## Date(December 2017)
## Institution(Brock University)
## Author(Caroline Promnitz)
## Edited (Connor Wilson, May 15, 2018)
## TitleText1('College Physics')
## AuthorText1('Urone et. al')
## EditionText1('2017')
## Section1('12.1')
## Problem1('15')
## KEYWORDS(fluid, flow, continuity, energy, kinetic, potential, conservation)

DOCUMENT();
loadMacros( "PGbasicmacros.pl",
                     "MathObjects.pl",
	             "PGauxiliaryFunctions.pl",
                     "BrockPhysicsMacros.pl",
	             "PGchoicemacros.pl",
	             "PGanswermacros.pl",
                     "PG_CAPAmacros.pl",
                     "answerHints.pl"
);

TEXT(beginproblem());

$showPartialCorrectAnswers = 1;
$showHint =3;

$da = random(1.20,2.15,0.03);
$ra = ($da*(1/2)*(1/100))**2;
$A = pi*$ra;
$vo = random(0.4,0.6,0.011);
$Qm = $A*$vo;
$Q = $Qm*1000000;
$g = 9.80;
$x = random(0.134,0.264,0.001);
$v2 = (($vo**2)+(2*$g*$x))**(1/2);
$r = ($Qm/(pi*$v2))**(1/2);
$d = 2*$r*100;

Context() -> texStrings;
BEGIN_TEXT

$PAR

<b>If you do not answer this question correctly in $showHint attempts, you can get a hint.</b>

$PAR

Water emerges straight down from a faucet with a \($da\)-\(\textrm{cm}\) diameter at a speed of \($vo\) \(\textrm{m/s}\). Because of the construction of the faucet, there is no variation in speed across the stream. 

$PAR

a) What is the flow rate in \(\textrm{cm}^3\)\(\textrm{/s}\)? 


$PAR

\{ans_rule(40)\} \(\textrm{cm}^3\)\(\textrm{/s}\)

$PAR

END_TEXT
BEGIN_HINT
Can you think of an equation relating the volume flow rate of a fluid to the cross-sectional area of the pipe in which it is contained?
END_HINT

ANS(num_cmp("$Q"));

BEGIN_TEXT

$PAR

b) What is the diameter of the stream \($x\) \(\textrm{m}\) below the faucet?
Neglect any effects due to surface tension. 

$PAR

\{ans_rule(40)\} \(\textrm{cm}\)

$PAR

END_TEXT
BEGIN_HINT
Can you solve for the fluid's final velocity using conservation of energy?
END_HINT

Context() -> normalStrings;

ANS(num_cmp("$d"));


ENDDOCUMENT()