psychrometrics / psychrolib

šŸ“š Library of psychrometric functions to calculate šŸŒ”ļø thermodynamic properties of air for Python, C, C#, Fortran, R, JavaScript and VBA/Excel
MIT License
219 stars 59 forks source link

GetTDewPointFromTWetBulb error? #81

Closed Syloreon closed 2 years ago

Syloreon commented 3 years ago

Describe the bug I'm using the following in python psy.SetUnitSystem(psy.IP) psy.GetTDewPointFromTWetBulb(100, 40, 12.23) and the answer is -126.65009138804012

To Reproduce Steps to reproduce the behavior:

  1. Open Python
  2. psy.SetUnitSystem(psy.IP)
  3. psy.GetTDewPointFromTWetBulb(100, 40, 12.23)
  4. -126.65009138804012

Expected behavior The dew point at 100Fdb and 40Fwb at 12.23 psi barometric pressure would not give a negative dew point.

Screenshots image

Desktop (please complete the following information):

dmey commented 3 years ago

Pressure needs to be in Pa. See https://psychrometrics.github.io/psychrolib/api_docs.html#psychrolib.GetTDewPointFromTWetBulb

Syloreon commented 3 years ago

Hello The documentation indicates IP would be in psi. Is the documentation incorrect?

Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10

From: @.> Sent: Saturday, July 10, 2021 10:00 AM To: @.> Cc: @.>; @.> Subject: Re: [psychrometrics/psychrolib] GetTDewPointFromTWetBulb error? (#81)

Pressure needs to be in Pa

ā€” You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fpsychrometrics%2Fpsychrolib%2Fissues%2F81%23issuecomment-877651480&data=04%7C01%7C%7Cbef200f015d74a6d3c8208d943b385c2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637615260584225695%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=R%2FnzHtiaT4QgzkhRm1O0KXHm6E5KzGkd7xLchtccwPg%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FATAP2IHTIZUYLB3QHP2G3QTTXBOCRANCNFSM5AEJWIWA&data=04%7C01%7C%7Cbef200f015d74a6d3c8208d943b385c2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637615260584235651%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=1XQR5%2FkTjy5rWpGrPCE436QYDRid%2BEp8CqpS22rzshg%3D&reserved=0.

dmey commented 3 years ago

Sorry -- yes let me check again actually misread your issue thought this was SI.

Syloreon commented 3 years ago

Hello very sorry, I entered in values that would generate an error. I just checked against https://sugartech.co.za/psychro/index.php It would be better to have it kick back a null value instead of a value to avoid someone using the data. Thanks.

Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10

From: @.> Sent: Saturday, July 10, 2021 10:05 AM To: @.> Cc: @.>; @.> Subject: Re: [psychrometrics/psychrolib] GetTDewPointFromTWetBulb error? (#81)

Sorry -- yes let me check again actually misread your issue thought this was SI.

ā€” You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fpsychrometrics%2Fpsychrolib%2Fissues%2F81%23issuecomment-877652123&data=04%7C01%7C%7Cbee9e5ea7392458f398f08d943b41837%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637615263042001423%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=u0zT6jpHIW2OzhEpkH3uzIOzOEW%2BJ7pyBHvfUTqxTeA%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FATAP2IF5TKPO4TSCCXHDEADTXBOR3ANCNFSM5AEJWIWA&data=04%7C01%7C%7Cbee9e5ea7392458f398f08d943b41837%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637615263042011379%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=3oiuC4PMVZodFagzGRlFH%2BQ7J9aOtW0J%2FY4qsQP6Czw%3D&reserved=0.

dmey commented 3 years ago

no problems and good point thanks -- we do have checks but this has clearly gone unnoticed. I'll mark this as a TODO for the next release bit cannot guarantee you when it will be fixed right now.

Syloreon commented 3 years ago

Thanks no worries on my end. Iā€™m working with actual data so not likely to get wrong inputs.

Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10

From: @.> Sent: Saturday, July 10, 2021 10:22 AM To: @.> Cc: @.>; @.> Subject: Re: [psychrometrics/psychrolib] GetTDewPointFromTWetBulb error? (#81)

no problems and good point thanks -- we do have checks but this has clearly gone unnoticed. I'll mark this as a TODO for the next release bit cannot guarantee you when it will be fixed right now.

ā€” You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fpsychrometrics%2Fpsychrolib%2Fissues%2F81%23issuecomment-877654835&data=04%7C01%7C%7C4961fe92dfe9409d888308d943b69285%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637615273678981305%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=SeqpCVELLCk%2Fp6aBkZKl0M4Mkg9NHozm88JxLKMVsJ4%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FATAP2IBXOXSR7ZTQ3BBHAOLTXBQUNANCNFSM5AEJWIWA&data=04%7C01%7C%7C4961fe92dfe9409d888308d943b69285%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637615273678991262%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=hq%2BWVFXkTYAEd4phBSV8niyxhLdYlFG5UefEW3qeY7k%3D&reserved=0.