3DFrame-py rel. 0.40

A new version of 3DFrame-py has been released and can be downloaded from:

3DFrame-py.zip

See Installing 3DFrame-py for installation details, and details of other Python modules required. Also see Python and pyxll for details of the required pyxll package, including a coupon code for a 10% discount.

The main changes are:

  • Beam bending moment results allowing for non-linear geometric effects have been corrected for axial load effects.
  • The moment-curvature adjustment routine has been changed to improve convergence for highly non-linear conditions.
  • The output sheet now includes a record of the number of non-linear iterations, and the maximum normalised displacement error for the last iteration.

The results have been compared with a Strand7 model of the portal frame used in previous checks, but rotated through 45 degrees in plan:

For linear-elastic analysis the spreadsheet results are near exactly equal to Strand7:

For non-linear analysis different approximations are used for both geometric and material non-linear effects, so there are very small differences in the results:

Posted in Beam Bending, Excel, Finite Element Analysis, Frame Analysis, Link to Python, Newton, PyXLL, Strand7, UDFs | Tagged , , , , , , , , , | 5 Comments

Scipy update and Linalgfuncs speed check

I have updated the Scipy code to remove repeated loading of the Numpy code, and to fix a number of other warnings from the pyxll log file. I have also updated the speed check of the various linear algebra solvers, previously reported at Speed of Scipy Linear Algebra Solvers.

The updated files can be downloaded from:

pyLinAlgfuncs3.zip

TimeLinAlg.zip

Note that the spreadsheets require pyxll to link the Python code to Excel. See Python and pyxll for details of the pyxll package, including a coupon code for a 10% discount.

The file Time Lin-Alg2.xlsx has the larger matrix and time results for both:

As before, the solver times show the time for complete solution in the first column, or where applicable the time for factorisation in the first column, and extraction of the results from a factorised matrix in the second. The results are generally similar to before, but there are significant differences in the sparse solver option results:

The pyPardiso library (which must be installed separately to Scipy) remains very much faster than the built-in Scipy options, and is the default solver called by py_Spsolve, where installed. If pyPardiso is not available, option 3 (MMD_AT_PLUS_A) is now significantly faster than the others, and has been set as the default option in that case. These times were using Python 3.12.8, Scipy 1.14.1, and Numpy 2.0.2.

The iterative solver results are similar to before, with Option 7 being significantly faster than the others, and options 4 and 10 still failing to converge.

Posted in Arrays, Excel, Frame Analysis, Link to Python, Newton, NumPy and SciPy, PyXLL, UDFs | Tagged , , , , , , | Leave a comment

Biaxial bending update 2

It was recently reported that the VBA version of the biaxial bending spreadsheet was returning incorrect results when the neutral axis was exactly parallel to the Y axis. This problem has now been fixed, and the revised spreadsheet can be downloaded from:

ULS Design Functions.zip

For more information on the spreadsheet, and discussion of options for algorithms to find the neutral axis angle, see:

Biaxial bending update

Posted in Beam Bending, Concrete, Excel, Newton, UDFs, VBA | Tagged , , , , , , , , | 5 Comments

3D-Frame-py with Numba

I recently upgraded to Python 3.12, and installed the latest version of the Numba just-in-time compiler (0.60.0) which also required upgrading Matplotlib (3.9.3), and downgrading Numpy (2.0.2). I have also edited calls to Numba in the py_3DFrame1_1.py module, and added this to the download file at:

3DFrame-py.zip

See Installing 3DFrame-py for installation details, and details of other Python modules required. Also see Python and pyxll for details of the required pyxll package, including a coupon code for a 10% discount.

The name of the currently active 3DFrame module is now shown on the Output sheet:

To change to the Numba version, enter 1 in cell E3, then click Reload Solvers, and update the function in cell H3:

If the “reload solvers” button doesn’t work, save the file, close Excel and restart, and the selected module will load.

The Numba compilation process takes about 15 seconds, and is required every time the file is opened, but for very large models the Numba code is significantly faster; for instance calculation time of the 3DFrame-py-vvbig.xlsb model, with over 27,500 beams, is reduced from 17.7 seconds to 6.6 seconds.

One other minor code change fixed a problem with data copied from the VBA version of the 3DFrame program. The input for the beams had left the rotation angle column blank. This is treated as zero in VBA, but when imported through a Numpy array into Python it is converted to NAN. This can be dealt with by a single line of code:

    BeamCon[np.isnan(BeamCon)] = 0
Posted in Beam Bending, Excel, Finite Element Analysis, Frame Analysis, Link to Python, Newton, Numerical integration, NumPy and SciPy, PyXLL, Strand7, UDFs | Tagged , , , , , , , , , , , , | Leave a comment

3DFrame-py; non-linear with end releases

The non-linear analysis routines in 3DFrame-py have now been updated to work with beams with end-releases at one or both ends.  Updated files are at:

3DFrame-py.zip

See the previous two posts for details of other software required for installation.

To check the spreadsheet results, 7 portal frames with different end conditions were analysed in Strand7:

From left to right the rotational end releases were specified at:

  • Top beam, both ends
  • Top beam, right
  • Top beam, left
  • Top of both columns
  • Top of right column
  • Top of left column
  • None

Results are shown below for a vertical distributed load of 7500 kN/m applied to the top beam, with a horizontal point load of 2000 kN applied at the top of the left column. For Case 1 and 4 (rotation release at both ends) these loads are close to the buckling load, resulting in horizontal deflections of well over 1 metre (click on image for full-size view):

For this case there are significant differences between the Strand7 and spreadsheet results for both horizontal and vertical deflections and bending moments at the base of the columns. The programs use different approximations for the non-linear geometric effects, and with very large deflections close to the buckling load these result in significant differences in the results.

To display results for other cases, enter the “frame no.” (1-7) in cell C9, and update the end releases on Sheet Input1:

The spreadsheet results are then updated by clicking the “Recalculate” button and can be compared with the Strand7 results:

For this case there is still a significant difference in the vertical deflections at the top of the columns, but the horizontal deflections and forces are all much closer, with a maximum difference of about 1%. The actions at the beam ends are also in good agreement:

Results are also included for linear elastic analyses. These are in near exact agreement:

Posted in Beam Bending, Excel, Finite Element Analysis, Frame Analysis, Link to Python, Newton, NumPy and SciPy, PyXLL, Strand7, UDFs | Tagged , , , , , , , , , | Leave a comment