py_UMom spreadsheet and OptShearCap3600 function

I have now transferred the Ultimate Limit State design functions from the VBA RC Design Functions spreadsheet to Python format. The new spreadsheet and Python code can be downloaded from:

The code also includes the OptShearCap3600 function, described in the previous post.

The python code requires pyxll to connect to Excel. If this is installed, and “RC_UMom” is added to the list of modules to load at start-up in the pyxll.cfg file, the new functions should be available from any spreadsheet.

The included functions are:

py_UMom: ULS design of rectangular sections with two layers of reinforcement under combined bending, axial load, shear and torsion, to Australian and international codes. (Provision for prestressing will be added in the near future):

py_UmomPF: As above, but for Eurocode and British codes using a partial factor approach:

MaxAx: Maximum axial load for short or slender columns:

Devlength: Reinforcement development length to Australian, Eurocode, or British codes:

ShearCap3600: Shear capacity to current AS 3600 and 5100.5:

OptShearCap3600: Optimise shear capacity for given moment/shear ratio by adjusting the compression strut angle:

Extracts of the OptShearCap3600 function code are shown below. The scipy.optimize.brentq function is used to adjust the applied loads to be equal to the design section capacity:

# create list of arguments for the py_Umom function, called by the Scipy brentq function
    args = [InCells, Puin, 13, 1, Muin, [] , ShearReo, Code, VTuin] 
    # Use scipy.optimize.brentq to adjust the input shear force to be equal to the design capacity
        res  = sopt.brentq(call_Umom, mincap, maxcap, args = args, maxiter = 100)  
        outA[0,0] = 1
        return outA

# The call_Umom function adjusts the input loads in proportion to the shear force 
#  passed by brentq, then calls py_Umom and returns the difference between the 
#  applied shear and shear capacity

def call_Umom(Vstar, args):
    args[8][0,0] = Vstar
    args[4][0] = Vstar * MoV
    if ToV != 0: args[8][0,1] = Vstar * ToV
    if PoV != 0: args[1][0] = Vstar * PoV
    res = py_Umom(*args )
    return res[1]

Similar procedures are used to adjust the applied moment when this is critical, or the compression strut angle in the intermediate range, so that both shear and moment capacities are equal to the applied actions.

This entry was posted in Excel. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.