Skip to content

Instantly share code, notes, and snippets.

@jsb2505
jsb2505 / Wind.txt
Created November 27, 2022 17:10
A module of wind functions for AFE
Get_C_prob = LAMBDA(return_period, [n], [K],
LET(
p, return_period,
n, IF(ISOMITTED(n), 0.5, n),
K, IF(ISOMITTED(K), 0.2, K),
((1 - K * LN(-LN(1 - 1 / p))) / (1 - K * LN(-LN(0.98)))) ^ n
)
);
Get_C_alt = LAMBDA(altitude, [reference_height],
@jsb2505
jsb2505 / Trees.txt
Last active August 7, 2023 16:21
A module of Tree functions for AFE
Tree_Names = CHOOSECOLS(Tree_Data,1);
/**
Contains a table of trees in the format:
tree_name, tree_type, water_demand, mature_height
*/
Tree_Data = {
"Elm English", "Broad-leafed", "High", 24;
"Elm Wheatley", "Broad-leafed", "High", 22;
@jsb2505
jsb2505 / Timber.txt
Last active October 3, 2023 21:38
A module of timber functions for excel AFE
Materials = {"Softwood", "Hardwood", "Glulam", "LVL", "Green_Oak"};
Material_Properties = {
"strength_class",
"f_m_y_k",
"f_v_k",
"f_c_90_k",
"E_0_mean",
"G_mean",
"E_005",
@jsb2505
jsb2505 / GetAlpha.txt
Last active June 15, 2023 10:11
Excel Lambda function to find alpha value
/*
A function to calculate alpha as given by Appendix G in SCI P398
INPUTS: m, m2 and e
RETURNS: value of alpha
Example:
=GetAlpha(40,45,35)
Returns:
5.345