Register to reply

Advice on approcah for humidity conversions in c#

by a_programmer
Tags: advice, approcah, conversions, humidity
Share this thread:
a_programmer
#1
Jan9-13, 11:15 AM
P: 2
Hello all,

First off, I would just like to say hello, as I am a new member :)

I was hoping for some advice on implementing humidity conversions in code.
I have spent about 4-5 days trawling the internet for helpful psychometric functions to help convert relative humidity to absolute humidity and back.

Despite numerous attempts, I have failed in implementing anything that will output anything but garbage values. While I may appreciate some of you are thinking that this is a programming problem, i assure you it isn't.

The only variables I have to play around with are the dry bulb temperature of the air, the altitude, the pressure at that altitude and the absolute humidity for the relative humidity calculation ( and vice versa ). I do not have the dew point.

At this juncture, I would be happy to use something like the Sonntag or Magnus formula.
As a software engineer, this is very much out of my league. Thus, if anyone could give some advice on appropriate approaches, I would be most appreciative.

Best,

A Programmer
Phys.Org News Partner Engineering news on Phys.org
'Smart material' chin strap harvests energy from chewing
Lockheed Martin advances live, virtual, constructive training in flight test
Lockheed Martin conducts flight tests of aircraft laser turret for DARPA
Graniar
#2
Feb4-13, 05:53 PM
P: 71
Hello, collegue :)

//Saturated vapor pressure knowledge (by Sonntag or Magnus formula) is quite enough.

double RelativeHumidity(double AbsoluteHumidity, double Temperature)
{
return AbsoluteHumidity / SaturatedVaporPressure(Temperature);
}
a_programmer
#3
Feb5-13, 04:35 AM
P: 2
Hi Graniar,

Thanks very much for the help. I got it cracked in the end; i used the exact same formula you quoted to get AH, and i just did a recursive search with an increasingly narrow search to provide a decently accurate estimation for the RH.

Thanks again,

A_Programmer


Register to reply

Related Discussions
ESD and Humidity Electrical Engineering 2
Humidity of my lab WAY too low General Engineering 7
What is the relation between humidity and temperature? Mechanical Engineering 1
Humidity and using a telecscope Astronomy & Astrophysics 10