How to Calculate “Days to Mold” | Posted in General Questions on
I know I can use dpcalc.org but I’m wanting to use the formula in a spreadsheet.
“days to mold” OR “days to mould” “formula” OR “how to calculate” “relative humidity”
dpcalc.org must use a formula or three(depending on which two inputs are given – temperature / relative humidity / dewpoint).
How can I calculate days to mold? Join the leading community of building science experts

Replies

1. | | #1

Some info here:

If you know javascript, you can download the code from dpcalc.com. Basically a table lookup.

1. | | #2

Thanks Jon,
I inspected the code and found a link to a javascript file dpcalc.org/dp.js which included:

var mold = function(t,rh) {
if(t > 45 || t < 2 || rh < 65) return 0;
return pitable[8010 + (Math.round(t) - 2) * 36 + Math.round(rh) - 65];

I don't speak javascript, but I just verified the double-bar means "or".
I'd translate that code as:
If the temperature > 45°F or < 2°F or if r.h. < 65%, the risk of mold is so negligible it can be ignored, otherwise consult the Preservation Index table (the code includes a huge table - alas not one i can see in table or spreadsheet format), and goto(?) row 80 column 10 (or vice versa or something completely different?), then add (Temperature - 2) x 36 + r.h.-65 (with some perhaps-premature rounding).

I wish I could figure out what the 8010 refers to.
I wish I understood the formula.

The organization behind the website has a focus on preserving historical documents, so I'm not sure if their choices of what can be ignored are appropriate for buildings. For example, temperature 90°F r.h. 64% seems at high risk of mold, as does temperature 44°F r.h. 95%.

Thanks for the PDF link. Just started making sense of it.

1. | | #3

With a little editing, you could extract pitable as a comma delimited list which would easily import into a spreadsheet as a single column.

8010 makes array indexing work when the index would otherwise go negative.

1. | | #5

Thanks.
[Replaced with comment below.]

2. | | #6

I got it converted to a single column with 9594 rows.
Any idea what I do with it now? Go to row 8010? Surely not - since the 8010 is part of every formula, whatever the temperature / r.h. / dewpoint, they could just use the contents of row 8010, which is "1", and not have a table at all. Perhaps you already indicated that 8010 is a code, not a reference to anywhere in the data set.
Feel free to edit it, if you wish.
Thanks

2. | | #9

What they've done is taken a 2-dimensional table and flattened it into a one-dimensional one. They want to have a lookup for temperature and humidity.

There are 36 values of humidity that you care about -- 65 through 100. So for each value of temperature there are 36 rows. So the table is organized into sections of 36 rows, each representing all possible values of humidity for one temperature. To find the right section, take the temperature (less 2, the first value you care about) and multiply by 36 to get the section. Then add RH-65 to find the right row within that section.

The table is used for other purposes in the program, so there are 8010 rows at the start of the table that aren't relevant. So you have to start at row 8010, which is why 8010 is added to the calculation.

1. | | #10

OK, figured it out. They actually put two tables into one, the first 8010 rows are a relative humidity lookup and the rest is the mold lookup.

That's a real hack.

2. | | #11

Awesome!

I now understand the 8010 and the "times 36" and the +RH-65 parts of the formula.
If I want to find the rh at T, why is T-2 the first value I should care about?

If you happen to know a way to turn that single column into a table with 36 columns, I'd be interested. Transpose 1-36 to row A, 37-73 to row B, ..., without doing each transposition separately?
For practical purposes, I don't think that's necessary, but it might facilitate understanding and increase confidence in its accuracy.

Was it you who added to the sheet? Thank you!!!

1. | | #12

I didn't add to the sheet, no.
"If I want to find the rh at T, why is T-2 the first value I should care about?"
It's because 2F is the lowest allowed temperature, so that's row zero.

Easiest way to transpose the table is to write some JavaScript. I can do that and paste it into your sheet if you want. Let me know.

2. | | #4

Since the organization is focused on preserving historical documents, I would expect it's risk tolerances are more stringent than for buildings with wood framing and sheathing.

Reading the PDF more, I see the calculation of EMC (Equilibrium Moisture Content) is indeed appropriate for wood.
"Temperature plays a lesser role than RH. Temperature and RH values are lagged by using a 24-hour running average for temperature and a 30-day running average for relative humidity. These lagged values are plugged into the USFPL equations to produce a %EMC value."

Back in the javascript file I see:
var emc = function(t,rh) {
return emctable[(Math.max(-20,Math.min(65,Math.round(t)))+20) * 101 + Math.round(rh)]
I'm still not sure how to read the (huge) tables. [EDIT - I just saw your comment about how to get a table from javascript into a spreadsheet.]

Do you know / any guesses why they need tables? If the table data represents observations (some huge amount of observations), can they not derive a formula from the observed data? If the table data comes not directly from observations but from a formula (considering the amount of data, I think this is more likely), why not just use that formula?

3. | | #7

Reading the PDF I'm understanding it better now. Alas, for Mold Risk, it says "Temperature and RH conditions are checked in a look-up table", but doesn't say where I can find that table.

It also says: "The mold-growth analog to PI [Preservation Index] was produced starting from
a growth model equation created by a microbiologist.." but it doesn't say the equation or the name of the microbiologist.

It is a good article otherwise, but missing the most crucial information.

4. | | #8

Googled: "growth model equation" mold temperature "relative humidity".
This report is very promising - it might include the equation - must read it later. https://www.irbnet.de/daten/iconda/CIB22377.pdf

or perhaps better - by the same lead authors, a few years later:

2. | | #13

I did a little on the spreadsheet and ran out of time. I see you found and fixed the index issue - where javascript indexes start with zero, the spreadsheet needs to start with one to get the same answer as dpcalc.com.

I find it hard to believe that [email protected]% has no risk and [email protected]% will mold in 14 days.

1. | | #14

"I find it hard to believe that [email protected]% has no risk and [email protected]% will mold in 14 days."

I was thinking similar thoughts.

I just asked the lead author of the first paper I mentioned (irbnet.de/daten/iconda/CIB22377.pdf) if his formulae are in a spreadsheet anywhere. I excelled at advanced calculus in university but have not used it since, and only just found that you can get calculus add-ins for spreadsheets, so I don't trust I would be able to bring those formulae into a spreadsheet. If he replies, I'll post a comment here with an update.

• |
• |
• |
• |