Concrete strength from the footing's text
64-bitThe concrete strength in MPa read from text such as 4000 psi, 28 MPa or C30/37.
MPa = psi × 0.00689476
The psi factor is rounded: the exact value is 0.006894757293…, so the result is high by about 4 parts in 10 million. Text with no recognized unit gives 28 MPa without a warning from this function.
/** The concrete's f'c in MPa from the footing's text: "4000 psi", "28 MPa", "C30/37" (f'ck of the cylinder). */
export function fcOf(text) {
const s = String(text || '');
let m = s.match(/(\d+(?:\.\d+)?)\s*psi/i); if (m) return Number(m[1]) * 0.00689476;
m = s.match(/C(\d+)\s*\/\s*\d+/i); if (m) return Number(m[1]);
m = s.match(/(\d+(?:\.\d+)?)\s*MPa/i); if (m) return Number(m[1]);
return 28;
}