{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Rain Gauge Float Coefficients\n", "\n", "Before any sensors can be repaired or replaced, it must be possible to recreate their current coefficients. Once current coefficients can be reliably reproduced, then new coefficients could be derived for any repairs or replacements.\n", "\n", "## How to relate orifice collection to tank level\n", "\n", "Most preciptation collectors at HJ have different diameters at the tank(s) and the orifice.\n", "\n", "### Checking the equation\n", "\n", "Convert everything to cm, since cm$^3$ = cc = ml" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": false, "jupyter": { "outputs_hidden": false } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "0.1 in in the orifice leads to 0.130066176471 in tank\n", "1.30066176471\n", "0.768839391712\n", "1.30066176471\n", "0.768839391712\n" ] }, { "data": { "text/plain": [ "0.1" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from math import pi\n", "\n", "def area_circ(n, radius=True, diameter=False):\n", " r = n if radius and not diameter else n/2\n", " a = pi * r**2\n", " return a\n", "\n", "def vol_to_depth(vol_ml, diam_cm):\n", " cm2 = area_circ(diam_cm, diameter=True)\n", " cm3 = vol_ml\n", " cm = cm3/cm2\n", " \n", " return cm\n", "\n", "# so if we get 0.1 in of precip, what happens in the tank\n", "\n", "# convert 0.1 in precip to cm\n", "precip = 0.1*2.54\n", "\n", "# With a 13.3\" orifice, convert depth to vol\n", "orificeDiam = 13.3*2.54\n", "orificeArea = area_circ(orificeDiam, diameter=True)\n", "\n", "vol01inch = precip * orificeArea\n", "\n", "# Now calculate the vol in the tank \n", "diam_float_rod = 5/8*2.54\n", "diamtank1 = 10*2.54\n", "diamtank2 = 6*2.54\n", "\n", "tankarea = area_circ(diamtank1, diameter=True)\n", "tankarea += area_circ(diamtank2, diameter=True)\n", "tankarea -= area_circ(diam_float_rod, diameter=True)\n", "\n", "dpth_in_tank = vol01inch/tankarea\n", "\n", "print '0.1 in in the orifice leads to '+ str(dpth_in_tank/2.54) + ' in tank'\n", "\n", "\n", "print 0.130066176471/0.1\n", "print tankarea/orificeArea\n", "print orificeArea/tankarea\n", "\n", "print precip/dpth_in_tank\n", "\n", "dpth_in_tank * (tankarea/orificeArea)/2.54\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "So, first calculate the volume that comes into an orifice of known dimmensions when it rains 0.1\"\n", "\n", "Then calculate the depth that volume would be in tanks of known cross sectional area, making sure to subtract the cross sectional area taken up by any instruments.\n", "\n", "Then, it turns out that the ratio of depth of precip to depth in tank, is equal to the ratio of orifice area, to tank area.\n", "\n", "--------------------------------------------------------------------\n", "So let's reduce the math. The precip is the depth accumulated within the orifice, so:\n", "\n", "$DepthInorifice_{cm} = \\frac{RainVolume_{cm^3}}{orifice Area_{cm^2}} = \\frac{TankDepth_{cm} * TankArea_{ cm^2}}{orificeArea cm^2} = TankDepth_{cm} * \\frac{TankArea_{cm^2}}{orificeArea_{cm^2}} = TankDepth_{cm} * coef$\n", "\n", "or to summarize for known area\n", "\n", "$coef = \\frac{TankArea}{orificeArea}$\n", "\n", "or to summarize for known volume\n", "\n", "$coef = \\frac{DepthInorifice_{cm}}{TankDepth_{cm}}$\n", "\n", "### Writing a function" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": false, "jupyter": { "outputs_hidden": false } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "test with Shelter \n" ] }, { "data": { "text/plain": [ "0.7682616428004211" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "def tank_coef(diam_orifice, diam_tank1, diam_sensor, diam_tank2=None):\n", " def diam2A(diam):\n", " return pi*(diam/2)**2\n", " \n", " A_or = diam2A(diam_orifice)\n", " \n", " A_tk = diam2A(diam_tank1)\n", " A_tk -= diam2A(diam_sensor)\n", " A_tk += diam2A(diam_tank2) if diam_tank2 else 0.0\n", " \n", " return A_tk/A_or\n", " \n", "print 'test with Shelter '\n", "# Orifice 13.3\", twin tanks, 10\" + 6\"\n", "tank_coef(13.305,6,5/8,10)\n" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "collapsed": false, "jupyter": { "outputs_hidden": false } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " 3.67\" in the tank equals 1.0 of precip\n", "0.272479564033\n", "0.2715234375\n", "99.6491015625 % of reported\n" ] } ], "source": [ "# from the documents, for the SA \n", "# (https://andrewsforest.oregonstate.edu/sites/default/files/lter/data/studies/ms01/meta/uplmet.htm#ppt)\n", "print ' 3.67\" in the tank equals '+ str(3.67 * (1/3.67)) + ' of precip'\n", "# OR\n", "print 1/3.67\n", "\n", "t = tank_coef(20.,10.0,5/8.,3.)\n", "print t\n", "print str(t/(1/3.67)*100) + ' % of reported'" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Well that's close...\n", "\n", "\n", "## Prototype UPLO SH tipping bucket\n", "OK, I'll try to work it out for the shelter going into a tipping bucket with a 0.01\" tip." ] }, { "cell_type": "code", "execution_count": 7, "metadata": { "collapsed": false, "jupyter": { "outputs_hidden": false } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "0.367647100192\n", "so 1 tip in the tipping bucket is 0.0933823634487 mm of rain\n", "0.361806772571\n", "or, the precip in each tip in cm is 0.00933823634487\n", "just to check the function0.0904516931426\n" ] } ], "source": [ "#rad_cm_sh_or = (13.3/2)*2.54\n", "#a_sh_or = pi*rad_cm_sh_or**2\n", "a_sh_or = area_circ(13.3*2.54, diameter=True)\n", "\n", "# 0.01\" = 8.37 ml in the TR-525USW\n", "# Orrifice depth = Precip Vol/ Orrifice Area\n", "precip_or = 8.37/a_sh_or\n", "\n", "# coef = orifice depth / tank depth\n", "coef = precip_or/ (0.01*2.54)\n", "print coef\n", "\n", "# tank depth * coef = orrifice depth\n", "print 'so 1 tip in the tipping bucket is ' + str(coef*0.01*25.4) + ' mm of rain'\n", "#coef = tank area/orifice area\n", "print (pi*4**2)/(pi*(13.3/2)**2)\n", "print 'or, the precip in each tip in cm is ' + str(precip_or)\n", "print 'just to check the function' + str(tank_coef(13.3,0.,0.,4.))" ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "collapsed": false, "jupyter": { "outputs_hidden": false } }, "outputs": [ { "data": { "text/plain": [ "0.009338236344866397" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Double checking in cm\n", "8.37/area_circ(13.3*2.54, diameter=True)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Correction\n", "8.24 ml/tip\n" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "0.09193198026487351" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "8.24/area_circ(13.3*2.54, diameter=True) *10" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Use of a 4-20mA magnetorestrictive float\n", "Both the shelter and stand alone rain gauges have used these since the '90's, but they are breaking, so I need to be able to configure a replacement. The final coefficient needs to convert sensor signal to mm, and then convert mm measured in tank to mm collected in orifice.\n", "\n", "### The sensor\n", "The sensor sends a current down a rod at a known speed (electrical constant) generating an electromagnetic field. When the current hits a magnetic float, the signal is bounced back. The end of the rod has a dampener, so that the magnetic field is not reflected back upwards. This means there is a dead zone at the bottom of the sensor. The sensor transmits the reading using a current from 4-20 mA. 4 means the float is at the bottom of the rod (empty tank) and 20 means the sensor is at the top of the rod.\n", "\n", "This is the best source of information I have found about this [video](https://www.youtube.com/watch?v=seS-W8vPbSg) and [concept explained](https://www.predig.com/indicatorpage/back-basics-fundamentals-4-20-ma-current-loops)\n", "\n", "### Reading the output\n", "The data logger then needs to measure the current returned by the sensor. To do this, we create a current shunt and measure the voltage drop across it. In other words, we send 12 V to the sensor and on the negative side, we put a resistor between the return current, and the ground. To achieve this, we: \n", "\n", "1. bring the negative sensor wire to an H Diff port.\n", "2. run a resistor from the H Diff port to the L Diff port\n", "3. run a jumper wire from the L Diff to Ground. \n", "\n", "So the power is not going through either the H or L port. It is returning from the sensor, passing through the resistor and jumper back to ground, but the logger can read the voltage at both the L and H ports. This way, it works like a shunt.\n", "\n", "#### Max output\n", "If the tank is full, the sensor will output 20 mA. The logger has a 12.4 $\\Omega$ resistor so it will measure:\n", "\n", "$E = R * I = 12.4 \\Omega * 20 mA = 248 mV$\n", "\n", "**This is why the Diff chanel is set to a 250 mV range**\n", "\n", "#### Min output\n", "If the tank is empty, the sensor will output 4mA. The resistor value stays the same.\n", "\n", "$E = R * I = 12.4 \\Omega * 4 mA = 49.6 mV$\n", "\n", "### Convert the output to mm\n", "It seems like a straight forward units conversion using dimmensional analysis should work. The sensor height is listed as 105\" [here](https://andrewsforest.oregonstate.edu/sites/default/files/lter/data/studies/ms01/meta/instlist.htm#PPT_SAR1). However, manual inspections at VARA and UPLO found model LT420113, which is 113\" on the SA, and LT420053 (53\") at the shelters. CENT SA sensor cannot be visualized without cutting the roof off.\n", "\n", "So:\n", "\n", "$\\frac{Physical range}{Signal range}* Signal = \\frac{mm}{mV}*Signal_{mV}$ \n", "\n", "Is the signal range 20mA, or 20-4=16 mA. Since it's measured in mV, it probably makes more sense to do $\\frac{mm}{mV}$ than $\\frac{mm}{mA}$.\n", "\n", "## Converting sensor to orifice measurements\n", "This isn't seeming to line up quite right. Let's try some things." ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "collapsed": false, "jupyter": { "outputs_hidden": false } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "11.5733870968\n", "3.14244584803\n", "0.845652811635\n", "14.466733871\n", "3.92805731004\n", "1.05706601454\n", "\n", "\n", "4.51477709374\n", "0.942935900947\n" ] } ], "source": [ "def sensor_coef(range_mA, range_in, resistor=12.4, SAE=True):\n", " range_mm = range_in*25.4 if SAE else range_in\n", " range_mV = range_mA*resistor\n", " return (range_mm/range_mV)\n", " \n", "r20 = sensor_coef(20,113)\n", "r16 = sensor_coef(16,113)\n", "\n", "sa = tank_coef(20.,10.0,5./8.,3.)\n", "sh = tank_coef(13.3,6,5/8.,10)\n", "print r20\n", "print r20*sa\n", "print ((r20*sa)/3.716)\n", "print r16\n", "print r16*sa\n", "print ((r16*sa)/3.716)\n", "print '\\n'\n", "\n", "r_sh = sensor_coef(16,54-(5+3))*sh\n", "print r_sh\n", "print r_sh/4.788" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "So this doesn't line up quite right.\n", "\n", "* 16 A is definitely the correct range to use.\n", "* A visit to CENT discovered that the sensor is 53\", not 54\" (big improvement).\n", "* At VARA, it turns out the orrifice is 19.7917\" and the sensor is 113\"\n", "* the manual is pretty clear that 4 mA should be at 3\" but 20 mA is at a user set height which is *usually* 5\"\n", "\n", "\n", "1. SH 4.7880\n", "5. SA 3.716\n", "6. VARA 3.7434\n", "\n", "Maybe it will be better if we subtract the mounting and dead zones from the length...\n", "\n", "### VARA test" ] }, { "cell_type": "code", "execution_count": 9, "metadata": { "collapsed": false, "jupyter": { "outputs_hidden": false } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "3.86194297395\n", "1.03166719398\n", "\n", "\n", "3.75466678023\n", "1.00300977193\n" ] } ], "source": [ "sa = tank_coef(19.71917,10.0,5/8.,3.)\n", "\n", "height_sub_mount = 113-5\n", "coef_sub_mount = sensor_coef(16,height_sub_mount)\n", "\n", "height_sub_all = 113-5-3\n", "coef_sub_all = sensor_coef(16, height_sub_all)\n", "\n", "print coef_sub_mount*sa\n", "print coef_sub_mount*sa/3.7434\n", "print '\\n'\n", "\n", "print coef_sub_all*sa\n", "print coef_sub_all*sa/3.7434\n", "\n", "\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "OK, let's try with the other sites" ] }, { "cell_type": "code", "execution_count": 14, "metadata": { "collapsed": false, "jupyter": { "outputs_hidden": false } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "UPLO/CENT SA with 113\" sensor and 19.75\" orifice\n", "3.74295376471\n", "1.00725343507\n", "UPLO/CENT SH with 53\" sensor\n", "4.41331086303\n", "0.92174412344\n" ] } ], "source": [ "sa_tank = tank_coef(19.75,10.0,5/8.,3.)\n", "lt420 = sensor_coef(16, 113-5-3)\n", "coef = lt420*sa_tank\n", "\n", "print 'UPLO/CENT SA with 113\" sensor and 19.75\" orifice'\n", "print coef\n", "print coef/3.716\n", "\n", "sh_tank = tank_coef(13.305,10.0,5/8.,6.)\n", "lt420 = sensor_coef(16,53-5-3)\n", "coef = lt420*sh_tank\n", "\n", "print 'UPLO/CENT SH with 53\" sensor'\n", "print coef\n", "print coef/4.788" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Can't get the correct coef for VARA, but can get it for UPLO/CENT if the copper heating pipes are subtracted." ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [], "source": [ "orifice_area = area_circ(19.75*25.4)\n", "tank_area = area_circ(10*25.4)\n", "tank_area += area_circ(3*25.4)\n", "# subtract the sensor rod plus the 2 copper heating pipes (1/2\" ID/nominal; 5/8\" OD)\n", "tank_area -= 3*area_circ(5/8*25.4)\n", "# 4-20 mA signal X 12.4ohm resitor = volts)\n", "mv_range = 12.4*(20-4)\n", "\n", "# sensor has 108\" of usable range with 200 mv of signal\n", "correct_coef = tank_area/orifice_area * (105*25.4)/mv_range\n" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "UPLO/CENT SA near exact recreation subtracting heating pipes\n", "3.7160299137209196\n", "1.000008049978719\n", "\n", "VARA larger orifice coef doesn't match\n", "3.727658675064088\n", "0.9926884419834695\n" ] } ], "source": [ "print(\"UPLO/CENT SA near exact recreation subtracting heating pipes\")\n", "print(correct_coef)\n", "print(correct_coef/3.716)\n", "\n", "orifice_area = area_circ(19.71917*25.4)\n", "vara_coef = tank_area/orifice_area * (105*25.4)/mv_range\n", "print(\"\\nVARA larger orifice coef doesn't match\")\n", "print(vara_coef)\n", "print(correct_coef/3.7434)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Forensic Coefficient Examination\n", "\n", "With the contradictory information obtained from on-site sensor labels (53\"/113\" not 54\"/105\"), as well as notes on VARA orifice size that imply other SA are 19.75, the coefficients for the SA's can be recreated within 0.5%. However the UPLO and CENT SH cannot be recreated within +-7%. Below is a deep dive into dispersed notes to try and find potential causes of this variation. \n", "\n", "Based on notes from VARA, a remeasurement of the orifice diameter may assist at both sites. If we **infer from VARA's notes, that the orifice's were known to be 19.75\", instead of 20\", we finally get under 1%**...\n", "\n", "**The manual clearly states that the factory set point is 4 mA at 3\" and that typicaly 20 mA is -5\" from top**, but the top can be adjust by the installer/operator... Subtracting 8\" from the total length seems to better match coeficients currently in use.\n", "\n", "The notes on VARA explain:\n", "\n", "```\n", "\n", "; 4. Modified on 9-22-99. Remeasured the funnel diameter and came up with a average of 19.7917 instead of 19.75.\n", "; Changed the resistor for the level transmitter from 55.8 OHMs to 12.4 +_ 0.1%. Changed instruction 1 mult\n", "; from 0.8463 to 3.7434 and offset from -63.233 to -185.67.\n", "\n", "...\n", ";MEASURE LEVEL TRANSMITTER\n", "\n", "1: Volt (Diff) (P2)\n", " 1: 1 Reps\n", " 2: 4 250 mV Slow Range\n", " 3: 1 DIFF Channel\n", " 4: 1 Loc [ PRECIP ]\n", " 5: 3.7434 Mult\n", " 6: -185.67 Offset\n", " \n", "```\n", "\n", "#### CENT\n", "The CENT SA sensor length cannot be confirmed without cutting a portion of the roof off, which will need to wait until summer. However, it is a safe assumption that it is the same as UPLO and VARA since it was constructed in-between the two.\n", "\n", "\n", "\n", "I can confirm the coefficients from the time the CR1000's were installed in 2015:\n", "```\n", "\n", " 'MEASURE STAND ALONE RAIN GAGE FLOAT\n", " VoltDiff (SA_PRECIP,1,mV250,3,True,0,_60Hz,3.7160,-184.31)\n", " '\n", " 'MEASURE SHELTER RAIN GAGE FLOAT\n", " VoltDiff (SH_PRECIP,1,mV250,4,True,0,_60Hz,4.7880,-237.48)\n", " \n", "```\n", "\n", "It looked like it changed around a bit in the early days. Here is the 2013 status with notes, we don't have to seem anything earlier...?\n", "\n", "```\n", "\n", ";{CR23X}\n", ";;Program: CENT13.CSI - Central Met. Station\n", ";\n", "; 1. Modified 9-26-96.\n", "; A. Changed multiplier on instruction to measure shelter float raingage\n", "; from 1.065 to 1.0785\n", "...\n", "; 3. Modified 11-2-00. Changed both raingage bridge resistors to 12.4 ohms and the\n", "; ranges to 250mv slow to improve accuracy. Also added Stand Alone Raingage orifice\n", "; temperature to the 5 minute output.\n", "...\n", ";MEASURE STAND ALONE RAINGAGE FLOAT\n", "\n", "24: Volt (Diff) (P2)\n", " 1: 1 Reps\n", " 2: 23 200 mV, 60 Hz Reject, Slow Range\n", " 3: 4 DIFF Channel\n", " 4: 25 Loc [ SA_PRECIP ]\n", " 5: 3.7160 Mult\n", " 6: -184.31 Offset\n", ";\n", ";MEASURE SHELTER RAINGAGE FLOAT\n", "\n", "25: Volt (Diff) (P2)\n", " 1: 1 Reps\n", " 2: 23 200 mV, 60 Hz Reject, Slow Range\n", " 3: 5 DIFF Channel\n", " 4: 26 Loc [ SH_PRECIP ]\n", " 5: 4.7880 Mult\n", " 6: -237.48 Offset\n", "\n", "```\n", "\n", "#### UPLO\n", "It looks like it uses the same coefficients as CENT, although it was a bit more turbulent in the early years.\n", "```\n", "\n", ";{CR23X}\n", ";;Program: UPLO_227_V22.CSI - UPLO Met. Station\n", "...\n", ";\n", ";5. Modified 10-15-97 Added insruction 20 (port set) at the end of table 1 to allow setting of port 7 to open\n", "; solenoid valve on stand alone. FAB\n", ";\n", ";6. Modified 3-8-99 Changed Stand Alone Raingage Float instruction multiplyer from .3776 to .3873 and offset from\n", "; -181.69 to -184.82. This was necessary because the intake funnel was changed.\n", ";\n", ";7. Modified 3-15-99 Changed program to bypass faulty relay in the multiplexer that is used for the Stand Alone\n", "; Raingage orifice temperature. Added third multiplexer loop.\n", ";\n", ";8. Modified 3-24-99 Added Stand Alone Raingage orifice temperature to 5 minute output.\n", ";\n", ";9. Modified 11/4/99. Changed bridge resistors for measuring stand alone and shelter\n", "; raingages to 12.4 ohms and ranges to 250 mv slow to improve resolution of data. FAB\n", "...\n", ";16. Modified 11-29-2004. Dropped new 100CM soil temp probe. Have an intermittent problem with the SAR\n", "; raingage and have been trying a number of things to try and solve problem. Times out after apx. 5 days.\n", "; Changed control port for SAR heater control from 4 to 6. Changed SAR heater flag from 4 to 5. Changed\n", "; SAR Relay Driver connections from 1 to 3. Removed shelter heater control.\n", ";\n", ";17. Modified 12-13-2004. Put back in shelter heater control.\n", ";\n", "...\n", ";MEASURE STAND ALONE RAINGAGE FLOAT\n", "\n", "22: Volt (Diff) (P2)\n", " 1: 1 Reps\n", " 2: 23 200 mV, 60 Hz Reject, Slow Range\n", " 3: 7 DIFF Channel\n", " 4: 25 Loc [ SA_PRECIP ]\n", " 5: 3.7160 Mult\n", " 6: -184.31 Offset\n", ";\n", ";MEASURE SHELTER RAINGAGE FLOAT\n", "\n", "23: Volt (Diff) (P2)\n", " 1: 1 Reps\n", " 2: 23 200 mV, 60 Hz Reject, Slow Range\n", " 3: 8 DIFF Channel\n", " 4: 26 Loc [ SH_PRECIP ]\n", " 5: 4.7880 Mult\n", " 6: -237.48 Offset\n", " ...\n", " \n", "```\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Variation on estimates of shelter tank area\n", "The solid colored tank is \"IPS DR64\" which is 63 PSI (1/2 of 125 PSI) irrigation pipe. The notes I could find from Craig use inside diameters that are a little off from nominal diameter. I try them out below and they seem to work a lot better. " ] }, { "cell_type": "code", "execution_count": 17, "metadata": { "collapsed": false, "jupyter": { "outputs_hidden": false } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "UPLO/CENT SH with 53\" sensor and irrigation pipe (larger) tank diameters\n", "4.78802243657\n", "1.000004686\n" ] } ], "source": [ "sh_tank = tank_coef(13.305,10.414,5/8.,6.25)\n", "lt420 = sensor_coef(16,53-5-3)\n", "coef = lt420*sh_tank\n", "\n", "print 'UPLO/CENT SH with 53\" sensor and irrigation pipe (larger) tank diameters'\n", "print coef\n", "print coef/4.788" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Well, with a 53\" sensor and irrigation pipe diameters, that's fantastically close.\n", "\n", "Reports also state that 0.1 ft in the tank == 0.1 inch in the shelter orifice. Does that still hold true for the irrigation pipe, whose inside diameter is larger than the nominal diameter?" ] }, { "cell_type": "code", "execution_count": 15, "metadata": { "collapsed": false, "jupyter": { "outputs_hidden": false } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Using irrigation pipe\n", "0.00193382780259\n", "\n", "V.S. nominal pipe (e.g. home plumbing)\n", "0.0800426818927\n", "\n", "V.S. irrigation pipe, but forgetting to subtract the rod the float travels on\n", "-0.000716124144949\n" ] } ], "source": [ "ft2in = 0.1*12\n", "\n", "sh_ir = tank_coef(13.3,6.25,5./8.,10.414)\n", "print 'Using irrigation pipe'\n", "print 1-(sh_ir * ft2in)\n", "\n", "sh_nom = tank_coef(13.3,6,5./8.,10)\n", "print '\\nV.S. nominal pipe (e.g. home plumbing)'\n", "print 1-(sh_nom * ft2in)\n", "\n", "sh_no_sense = tank_coef(13.3,6.25,0.,10.414)\n", "print '\\nV.S. irrigation pipe, but forgetting to subtract the rod the float travels on'\n", "print 1-(sh_no_sense * ft2in)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "It seems fair to assume that when calculating the cross sectional area of the tank, the originators new the non-standard inside diamters used, especially since the numbers in the notes are pretty close to those measured. However, it seems likely that they forgot to subtract the cross sectional area of the rod that the float travels up and down on." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ " \n", " #### Errors from high wire resistance\n", " " ] }, { "cell_type": "code", "execution_count": 83, "metadata": { "collapsed": false, "jupyter": { "outputs_hidden": false } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "45.4545454545 - 204.545454545 ohms max loop resistance\n", "25.0 - 28.5 V max supply voltage\n", "2.21829268293\n", "3.52519379845\n" ] }, { "data": { "text/plain": [ "0.831721810164509" ] }, "execution_count": 83, "metadata": {}, "output_type": "execute_result" } ], "source": [ "#Maybe loop resistance is an issue\n", "def rlmax(vSupply):\n", " #max resistance of entire ciruit where sensor can still function\n", " #dependent on supply voltage\n", " return (vSupply-10.5)/0.022\n", "\n", "def vsupp(rl):\n", " # max operating voltage\n", " # dependent on max resistance\n", " return 24+(rlmax(rl)*0.022)\n", " \n", " \n", "max11 = rlmax(11.5)\n", "max15 = rlmax(15)\n", "print str(max11) + ' - ' + str(max15) + ' ohms max loop resistance'\n", "\n", "max11 = vsupp(11.5)\n", "max15 = vsupp(15)\n", "print str(max11) + ' - ' + str(max15) + ' V max supply voltage'\n", "\n", "def loopresistance(length, mm2, english=True, AWG=False):\n", " # Assumes copper\n", " meters = (length/12.)*3.21 if english else legth\n", " m2 = mm2*10**-6\n", " return (meters * 1.7*10**-8)/m2\n", " \n", "print loopresistance(100,0.205)#24 AWG\n", "print loopresistance(100, 0.129)#26AWG\n", "sh\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Even after adding the 12.4 $\\Omega$ resistor, we are nowhere near loop resistance issues.OK, so let's try it with what the website says about the stand alone:\n", "\n", "[link](https://andrewsforest.oregonstate.edu/sites/default/files/lter/data/studies/ms01/meta/instlist.htm#PPT_SAR1)\n", "\n", "\n", ">The heated orifice section is a **20\"** diameter stainless steel\n", "funnel with copper tubing\n", ">\n", ">...\n", ">\n", "The standpipe section is a **10\"** diameter schedule 40 aluminum pipe\n", "14' long with a 2' square piece of aluminum plate welded on one\n", "end as an end cap. Triangular stiffeners are also welded between\n", "the plate and the pipe. The stand-pipe is bolted to a 4' square\n", "concrete pad. A drain valve is located near the bottom and a\n", "filling tube near the top. One inch diameter threaded nipples\n", "welded to the pipe in line 3'6\" and 12'6\" from the bottom are for\n", "attachment of a **3\"** diameter pvc measurement tube to the side of\n", "the aluminum pipe.\n", "\n", "This results in:\n", "\n", ">In this gage **1 inch of precipitation causes a rise of 3.67\" in**\n", "the standpipe.\n", ">\n" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.16" }, "widgets": { "application/vnd.jupyter.widget-state+json": { "state": {}, "version_major": 2, "version_minor": 0 } } }, "nbformat": 4, "nbformat_minor": 4 }