I was interested in using FreeCAD to explore this data. I have previously used the excellent thermo Python library for similar work and since it can be used in FreeCAD, I thought it was appropriate. Although traditional 3D-plotting in e.g. matplotlib might make more sense, I thought it would be an interesting thing to do. Here's the script I used to generate the set of points and insert them into a FreeCAD document as Bézier curves:

Code: Select all

`from thermo.chemical import Chemical`

Patm = 101325

water = Chemical('water')

T_vals = [i*2 + 273 for i in range(0, 11)] + [i*3 + 293 for i in range(0, 11)]

RH_vals = [.01] + [i/10.0 for i in range(1, 11)]

W_vals = []

doc = App.ActiveDocument

def W_from_RH(RH, Pw_sat):

"""

ASAE D271.2 Equation 2.2.6

The factor 0.6219 is the ratio of the molecular weights of water and air.

"""

Pv = RH * Pw_sat

return .6219 * Pv / (Patm - Pv)

for RH in RH_vals:

triples = []

for T in T_vals:

water.T = T

water.calculate()

Pw_sat = water.Psat

W = W_from_RH(RH, Pw_sat)

W_vals.append(W)

T = int(T)

W = int(W * 1e3) # converting to g water/kg air

RHpct = int(RH * 100) # converting to percentage

triples.append((T, RH, W))

poles = [FreeCAD.Vector(p) for p in triples]

curve = doc.addObject('Part::Feature', 'RH' + str(RH * 100))

bez = Part.BezierCurve()

bez.setPoles(poles)

curve.Shape = bez.toShape()

I then created ruled surfaces between each pair of Bézier curves, colored the surfaces according to a simple gradient, and added some explanatory text:

Here's a view in the same plane as the psychrometric chart. Unfortunately the lighting is not so great.

Finally, my file is attached. I know it's not exactly the most advanced use of FreeCAD but it was a fun little distraction!