Laserfiche WebLink
<br />. <br /> <br />. <br /> <br />. <br /> <br />OOJj35 <br /> <br />II get river inflow slot <br /> <br />rinSlot = (SeriesSlot *) reachptr->getSlot("lnflow"); <br />(( SeriesSlot *)rinSlot)->getV alue (getCu rrent Ti mestepO, <br />riv_inflow, 1.0, STDUNITS); <br />unitConverter->convert( riv_inflow , 1.0, FLOW, <br />rivjnflow, 1.0, VOLUME, getStepSeconds()); <br /> <br />II get minimum river concentration <br /> <br />riv_minSlot = <br />(TableSlot *) reachptr->getSlot("Minimum Salt Concentration"); <br />riv_minimum = ((TableSlot *)riv_minSlot)->getValue(0,0,1.0,STDUNITS); <br /> <br />II compare current river concentration to minimum and <br />II determine if we can meet the minimum reach quality <br /> <br />if (diversionSaltConc < riv_minimum) <br /> <br />II the river is already short on quality - wqip will be debted and <br />II the return flow quality will be set to zero <br /> <br />( <br /> <br />II note - leave equal to 0.0 if not using concentrating affect <br /> <br />returnFlowSaltConc = 0.0; <br />returnFlowSaltDebt = returnFlowSaltDebt(-1) + mass_requested; <br />returnFlowSaltConc = returnFlowSaltConc + concentrated; <br />} <br />else <br /> <br />II the river has some of the salt that wqip needs - test if all or not <br /> <br />{ <br />double est out vol = riv inflow + rf vol - div vol; <br />- - - - - <br />mass_thaCcan_be = (riv_inflow * diversionSaltConc ) <br />- (escouCvol . riv_minimum); <br />if (mass_thaccan_be > mass_requested) <br />( <br /> <br />II river can meet all requested - use any excess to pay the debt <br /> <br />returnFlowSaltConc = returnFlowSaltPickup; <br />returnFlowSaltDebt = returnFlowSaltDebt(-1) - <br />(mass_thaccan_be - mass_requested); <br />