Ad Widget

Collapse

arithmetic involving natural logarithm

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ekm
    Junior Member
    • May 2020
    • 3

    #1

    arithmetic involving natural logarithm

    In the arithmetic expression defining a calculated item, is it possible to take the natural log of a subexpression?

    The application is to transform ambient temperature and relative humidity to dewpoint using a formula:
    b ( ln(h/100) + a*t/(b+t) )
    ---------------------------
    a - ln(h/100) - a*t/(b+t)
    Last edited by ekm; 12-02-2021, 22:03. Reason: make formula expression more legible
  • ekm
    Junior Member
    • May 2020
    • 3

    #2
    Just realized I did not share my solution.

    The environment monitoring device is a Room Alert 11E. This device provides as input the temperature and relative humidity as SNMP objects, available as input items:

    sensor3-1 = temperature (C)
    sensor3-3 = relative humidity (%)

    Using these inputs, I created two synthetic items:

    sensor3-lnrh = natural log of relative humidity.
    formula = last("sensor3-3")
    preprocessing = JavaScript, return Math.log(value/100);

    sensor3-edew = estimated dewpoint (C)
    formula = 243.04*(last("sensor3-lnrh")+(17.625*last("sensor3-1")/(243.04+last("sensor3-1"))))/(17.625-last("sensor3-lnrh")-(17.625*last("sensor3-1")/(243.04+last("sensor3-1"))))

    The formula above is an estimation using the method described by: rklarsen. "Calculating Dew Point Temperature from Relative Humidity." vCalc.com, which cites as source: Lawrence, M. G. (2005). "The relationship between relative humidity and the dewpoint temperature in moist air: A simple conversion and applications." Bulletin of the American Meteorological Society, 86(2), 225-233.

    From these items, and referring to ASHRAE 2015 thermal guidelines for allowable humidity range, non-condensing, for a class A1 data center, I wrote moisture alert expressions:

    warning:
    {roomalert1:sensor3-3.last()} > 60
    or
    {roomalert1:sensor3-edew.last()} < -9
    or
    {roomalert1:sensor3-edew.last()} > 15

    danger:
    {roomalert1:sensor3-3.last()} < 8
    or
    {roomalert1:sensor3-3.last()} > 80
    or
    {roomalert1:sensor3-edew.last()} < -12
    or
    {roomalert1:sensor3-edew.last()} > 17

    Because the outputs of the Room Alert 11E sensors are jittery, these should be rewritten to use more than just the last observation, to prevent alert spam. I have not tested the following expressions but they would probably do the trick:

    warning:
    {roomalert1:sensor3-3.min(15m)} > 60
    or
    {roomalert1:sensor3-edew.min(15m)} < -9
    or
    {roomalert1:sensor3-edew.max(15m)} > 15

    danger:
    {roomalert1:sensor3-3.min(15m)} < 8
    or
    {roomalert1:sensor3-3.max(15m)} > 80
    or
    {roomalert1:sensor3-edew.min(15m)} < -12
    or
    {roomalert1:sensor3-edew.max(15m)} > 17

    Comment

    Working...