Sruvey 123 - Hydrant Flow Testing

2622
10
01-29-2018 01:11点
DouglasWenning
New Contributor II

Hello. I am new to Survey 123. I would like to create a survey using the Collector app and Survey 123 for testing fire hydrant flows. I would like to use Collector to select the hydrant, have it open Survey 123 so the inspector can add some information about the hydrant and the flow data (Static, Residual, and Pitot flow data) and then have the capacity calculated automatically by Survey 123. This seems achievable but I am struggling getting the formulas to calculate the capacity and I fear it is something simple in the calculation that I am missing.

HydGPM: Theoretical Discharge through Circular Orifices Formula

Computes a flow-rate in GPM given a psi and coefficient of the flow device.
Q = 29.84 x √P x D² x C or 29.84 x [(√Pitot) x (Diameter²) x (Coefficient)]
Q =流-rate in GPM (Field = HydGRPM)
P = velocity pressure in psi (Pitot- measured at the hydrant in the field)

D = orifice diameter in inches (Diameter= 2.5 inches)
C= coefficient of flow device (Coefficient= 0.9)

HydGPM_20: Equation for Determining Rated Capacity

Computes the flow-rate available at a specified residual
pressure (a.k.a. Rated Capacity). The example below enables
you to find the predicted flow-rate at 0 psi residual pressure.
Use this when fire flow testing hydrants.
QR(20) = QF x (HR0.54/ HF0.54) or QF x [(Static -20)0.54/ (Static - Residual)0.54]
QR(20) = Flow-rate predicted at the desired residual pressure in GPM
QF(20) = Total test flow-rate measured during test in GPM (QF =HydGPMcalculated)
HR = Pressure drop from static pressure to desired residual pressure (Static– 20 psi) (Staticmeasured in the field)
HF = Actual pressure drop measured during the test(Static——实际Residual) (StaticandResidualmeasured in the field)

I realize this is a big ask but I would truly appreciate any help with this. I have attached several screen shots.


Thanks

Doug Wenning

0Kudos
10 Replies
by Anonymous User
Not applicable

Hi Doug,

Taking a quick look at your screenshots, I notice the first line in ScreenCap2 is missing a set of brackets for the sqrt.

It should be sqrt(${Pitot})

You have the opening bracket before the sqrt text not after. See example here://www.gobook3.com/groups/survey123/blog/2016/09/06/new-mathematical-functions-make-your-for...

Once the brackets are fixed up, try and validate your survey again. Missing brackets or brackets in the wrong place in calculations will cause validation and pyxform errors that don't make sense or point directly to the problem in survey.

Phil.

0Kudos
DouglasWenning
New Contributor II

Philip,

Thank you for your response. Your suggestion seem to remove the error but no results were returned on my survey. Those results are supposed to carry through to the following calculations as well. I’m not sure what is going on with that.

Thanks again.

Doug

by Anonymous User
Not applicable

Hi Doug,

Are you able to send me a copy of your survey xlsx file? Please attach to this post or is sensitive please send via private message.

Phil.

0Kudos
DouglasWenning
New Contributor II

Philip,

I appreciate your help. Please see attached.

谢谢,

Doug

0Kudos
DouglasWenning
New Contributor II

See attached.

Thanks!!

0Kudos
by Anonymous User
Not applicable

Hi Doug,

I just tried to load the file you sent me in Connect, however it gets errors as there is a calculation in a row that does not have a field type, name, label etc. Was this a copy and paste mistake? Can you fix up the file and send again how it should be, so I can see where the calculations are not working

0Kudos
DouglasWenning
New Contributor II

Sorry about that

0Kudos
by Anonymous User
Not applicable

Thanks Doug,

In the meantime I had looked back at your original screenshots and worked out the calculation at bottom of survey was suppose to be the first one, so moved it back to where it should be. I have had a more detailed look at your survey and calculations and there are 4 things to note:

1. You still have incorrect brackets on your pow calculations. There should be a set of brackets around the first variable as you are using a minus in there also: pow((XX-XX),XX).

2. Once you fix the above, you also have extra sets of brackets in all calculations that are not needed, and an extra single opening bracket that needs to be removed because of the incorrect pow format. It should look something like follows to keep it simple and work correctly:

29.83*(${Coefficient}*(${Diameter}*${Diameter})*sqrt(${Pitot}))
${HydGPM}*(pow((${Stat}-20),0.54) div pow((${Residual}-20),0.54))
${HydGPM}*(pow((${Stat}-10),0.54) div pow((${Residual}-10),0.54))
${HydGPM}*(pow((${Stat}-0),0.54) div pow((${Residual}-0),0.54))

3. You are using calculate question types for these calculations. The calculation question type is a string type by default (will be created in feature service as esri field type string) and also will be stored in the app and treated as a string. In this case you need to cast the calculations as integer, or set the bind type and esri field bind type to be integer or decimal if you want to treat it as a true numeric value.

4.Calculate question types are hidden on the survey form display. If you want to see them and display to user, then a better option is to set them as integer or decimal question type (the calculation will still work the same) and then make them read only so they can not be edited. Settings them as integer or decimal type will also solve issue 3 above.

Hope this helps.

Phil.

0Kudos
DouglasWenning
New Contributor II

YOU ARE AWESOME!!

Thank you so much for your help.

Doug