from Sandy Denny:
Not to be confused with:
from Sandy Denny:
Not to be confused with:
The update to the Glob_to_loc3 and Loc_to_glob3 functions (and associated functions) has now been transferred to the 3DFrame spreadsheet, which will now give correct results when beams are defined in the global negative Z direction. The revised spreadsheet (including full open source code and compiled solver files) may be downloaded from:
See 3DFrame with spring releases for more details, including examples, and 3D Frames, axes and stiffness matrices for information on local axis conventions used, and details of the procedure for generating the 3D stiffness matrix.
Following a comment here I have updated the Glob_to_loc3 and Loc_to_glob3 functions to deal with some problems when the local longitudinal axis is parallel to the global Y or Z axes. The IP2 spreadsheet, including the revised functions, can be downloaded from:
The screen shots below show documentation for the functions, and an example of results with a beam parallel to the Z axis:
The documentation has been edited to clarify the difference between the axis type options:
The same example is used for both functions, with a beam parallel to the global Z axis, with the direction from Node 1 to Node 2 in the negative Z direction:
:
The function also has an option to return the rotation matrix, R0 (Out = 1):
The download file has the input for the Glob_to_loc function linked to the Glob_to_loc3 input, and the associated Gamma angle, to show that the results are consistent. The input for these (or any other example functions) may of course be freely modified.
Edit 3rd Jan 2026: This download is not currently available.
A recent post at Eng-Tips looked for a solution to problems with working with times in Excel, when time differences are required to the nearest millisecond.
The problem is that although times may be entered as a time/date value, and formatted to display milliseconds, the format bar displays the time to the nearest second, and if you press F2 to edit a value, the time value is actually rounded to the second. Pressing F2 then enter not only changes the displayed value, it changes the actual number:
The simplest way to avoid the problem is to enter the number as text, by starting with ‘ . Pressing F2 then Enter will not change the text, but simple arithmetic will work:
Using text does have a few disadvantages though:
An alternative approach is to convert the time to a date value in a formula, which will not be rounded by Excel. A simple user defined function (UDF) that will do the calculation is shown below:
Function msTime(Secs As Double, Optional Mins As Double, _ Optional Hours As Double, Optional days As Double) As Double Const SecsinDay As Long = 86400, MinsinDay As Long = 1440, HoursinDay As Long = 24 msTime = days + Hours / HoursinDay + Mins / MinsinDay + Secs / SecsinDay End FunctionExamples of usage of the UDF are shown in the screenshot below. Note that:
A spreadsheet including the examples shown above, and all three lines of VBA code, may be downloaded from msTime.xlsb
In February 2016 I posted a spreadsheet with examples of linking to the Python Matplotlib library with xlwings. Since then updates to xlwings required some changes to the python code, specifically plot.show has been replaced with pictures.add.
The spreadsheet has now been updated, and can be downloaded from:
Similar code has also been updated in the xlwScipy spreadsheet:
A typical graph example is shown in the scree shot below:
See linking to the Python Matplotlib library for more details. The code in the post has now also been updated.