Laserfiche WebLink
<br />fJCn)33:J <br /> <br />. <br /> <br />hi-vol, 1.0, VOLUME, getStepSecondsO); <br />unitConverter->convert( return Flow, 1.0, FLOW, <br />ri_vol, 1.0, VOLUME, getStepSecondsO); <br />unitConverter->convert( diversion, 1.0, FLOW, <br />div_vol, 1.0, VOLUME, getStepSeconds()); <br /> <br />double stor_sum = storage + storage(-1) + 2.0' deadStorage; <br /> <br />II stor_sum is a recycled variable <br /> <br />. <br /> <br />if(stor_sum != 0.0) <br />weighting_factor += 0.6 . ((tjn_vol + rCvol) <br />+ (out_vol + div_vol + outboundBS)) <br />I stor_sum; <br />stocsum = (storage + deadStorage + (weighting_factor <br />. (ouCvol + div_vol + outboundBS))) <br />1(1.0 + weighting_factor); <br />if (stor_sum == 0.0) <br />reservoirSaltConc = 0.0; <br />else <br />reservoirSaltConc = ((reservoirSaltConc(-1) . (storage(-l) + deadStorage) <br />+ getAvgSaltConclnO . in_vol <br />+ hydrolnflowSaltConc . hi-vol <br />+ getAvgRFSaltConcO . ri_vol <br />+ inboundBS_SaltMass <br />- reservoirSaltConc(-1)' (oucvol + div_vol) <br />- reservoirSaltConc(-1)' outboundBS) <br />I (1.0 + weighting_factor)) <br />I stor_sum; <br /> <br />II compute reservoir salt mass <br /> <br />reservoirSaltMass = reservoirSaltConc . storage; <br /> <br />/I compute reservoir outflow concentration <br /> <br />outflowSaltConc = (reservoirSaltConc(-1) <br />+ weighting_factor' reservoirSaltConc) <br />1(1.0 + weighting_factor); <br /> <br />return METHOD_SUCCESS; <br />} <br /> <br />. <br />