As you can see from the link below, people struggle to find a simple way of calculating the wet bulb temperature - see link below.
Question on @Quora: How do I calculate the wet bulb temperature? https://www.quora.com/How-do-I-calculate-the-wet-bulb-temperature?ch=18&oid=12012006&share=31ce6760&srid=hZb1i&target_type=question
My own numerical method is shown below and you will find details at the link given. I believe that my method is the shortest method that can be found anywhere.
My method:
I formulated my own numerical solution for calculating the wet bulb temperature fairly accurately. You can use the NOAA calculator to check the accuracy of my method. The NOAA calculator is at https://www.weather.gov/epz/wxcalc_rh
My name is Eddie Miller and here is my solution below.
When writing your program inputs will be Td in deg C, RH and P (P in atm). Td is the dry bulb temperature in deg C (ie air temperature) and Tw is the wet bulb temperature.
Code in Pascal (or Delphi) is below:
Tw:=Td;
repeat
Tw:=Tw-0.001;
A:=611.2*exp(17.502*Tw/(240.97+Tw))-66.8745*(1+0.00115*Tw)*P*(Td-Tw);
B:=6.112*exp(17.502*Td/(240.97+Td));
RHS:=A/B;
until (RHS<=RH);
{Now print Tw}