Joe Boyd talks about the transition of Fairport Convention from a band playing American pop to a band playing English folk music like it had never been played before:
And a song from the album, A Sailor’s Life:
Joe Boyd talks about the transition of Fairport Convention from a band playing American pop to a band playing English folk music like it had never been played before:
And a song from the album, A Sailor’s Life:
I discovered today that my latest computer (with 64 bit Windows 10) had not been indexing the content of pdf files, which makes doing a search on local file content pretty much a waste of time. Checking the file search settings I found that the pdf setting indicated : “Registered ifilter is not found”. Searching for a solution I found nothing official from either Microsoft or Adobe; neither did I find a very useful post from a blog by the name of NewtonExcelBach:
The solution is to download the 64 bit ifilter from : http://www.adobe.com/support/downloads/detail.jsp?ftpID=5542
See the link above for more details.
While I was at it, I also decided to install the latest Acrobat Reader, but found at the Adobe site the only version apparently available was the DC (data cloud) version, which I did not want. The secret here is to go to:
which looks like:
Once you select an operating system and a language, it then reveals that yes, actually you can still download the non-DC version of Acrobat Reader.
Last years’ statistics for this blog are now uploaded to Onedrive. The link to each post is preserved in the spreadsheet, so it makes a convenient index to what has been posted over the year, and what people are looking at from previous years. You should be able to access the links in the window below, or open the file in your browser or Excel, or download it.
Of the 2016 posts, the most popular overall was:
| Use Matplotlib from Excel with xlwings |
The most popular in the Newton category was:
| 2D non-linear FEA with Excel |
and the most popular in the Bach category was:
| The Big Short and When the Levee Breaks |
From the “deserving but sadly neglected category” I have chosen (and they are all worth a look/listen):
Newton:
| Non-linear frame analysis; moment curvature and self-weight |
Excel:
| xlwSciPy 1.09 – update for xlwings 0.10 and Scipy 0.18.1 |
Bach:
| Jack Bruce on double bass |
In VBA, if you have an array named a and a variant named b, then the statement “b = a” creates a new array b with the same size and values as a. If the values of either a or b are subsequently changed, the values of the other remain unchanged.
In Python it doesn’t work that way. All variables are objects and “b=a” indicates that the object named a is now also named b. The result is that b not only has the same values as a, it is the same in every other respect. If the values of either a or b are changed, the values of the other are also changed. This behaviour can cause problems for the unwary, and also sometimes it is necessary to create a new object with the same values as the original, but not otherwise connected. Python provides ways of doing this, but the detailed workings are not always obvious, behaviour varies depending on the type of the object, and different ways of achieving the same end can have huge differences in performance. This post therefore looks at the various options for making independent copies of different objects, focussing on Python lists and Numpy arrays.
Suppose we create a list with name ‘a’:
>>> a = [1,2,3]
We can then give that list another name, ‘b’:
>>> b = a
We can check that the two names indeed refer to the same object:
>>> b is a
True
Then any operation we perform on a also affects b, and vice versa:
>>> a[2] = 4
>>> b.append(5)
>>> a
[1,2,4,5]
>>> b
[1,2,4,5]
However, if we assign a new list to one, the other remains unchanged:
>>> a = [4,5,6]
>>> a
[4,5,6]
>>> b
[1,2,4,5]
>>> b is a
False
Methods that can be used to create a new copy of a list include:
To use the copy or deepcopy functions we must first import the copy module, then:
>>> a = [1,2,3]
>>> b = copy.copy(a)
>>> b
[1,2,3]
>>> b is a
False
Copy may also be used on a list of lists, but comes with a catch:
>>> a = [[1,2,3],[4,5,6]]
>>> b = copy.copy(a)
>>> b is a
False
>>> b[0] is a[0]
True
So copy creates a new object for the top level list, but each sub-list refers to the same object as in ‘a’. We could loop through b and create a new copy of each sub-list, or use the deepcopy function:
>>> b = copy.deepcopy(a)
>>> b[0] is a[0]
False
To check how these alternatives work in practice I have set up an Excel function to perform the copy operations on a large array, and return times, data types, and values from both arrays when a value in one is changed.
The screenshot below shows results for 13 different methods of copying a list of lists (click on the image for full-size view). Note that for the results shown in red the process has created an alias, rather than a new copy.
Of the results that do create a new copy of all elements of the original list, method 11 is by far the quickest, using copy to create a new array, then using copy again on each sub-list. The deepcopy function is convenient, but is very much slower.
For Numpy arrays the operation a=b works the same as for lists; b refers to the same array as a. On the other hand the copy and deepcopy functions both create a full new array. There is also a Numpy copy function and a copyto function, and several other ways to copy to a new array, as shown below:
There was much less variation in the times of the different options (other than looping through the array, and assigning item by item), but the simple operation:
y = np.array(x)
was consistently the fastest.
The continuous beam analysis spreadsheet, ConBeamU, is now up to version 4.13 with some minor bug-fixes, and the addition of a non-linear option for the BeamAct functions.
See ConBeamU for more details of the functions available in the spreadsheet.
Download the latest version from ConBeamU.zip.
The BeamAct2D and BeamAct3D user defined functions (UDFs) return beam actions and deflections for any beam subject to specified loads and end deflections. The beam may have any number of segments with different section properties, and may be specified in either global or local coordinate systems. The new non-linear option allows non-linear geometric effects to be taken into account.
Most of the function input is unchanged from previous versions:

The optional non-linear arguments specify if a non-linear analysis is required, the target relative error in maximum deflection, and the maximum number of iterations. The support stiffness (translational and rotational) may also be supplied. The default is fixed at both ends for both translation and rotation:

The output is before, with output at any number of specified locations:

Results are shown below for a 3D analysis of a 10 m long beam under combined axial and transverse load. The blue and green lines are the results ignoring geometric non-linear effects, and the grey and red are the output from both the spreadsheet and a non-linear analysis in Strand7, with the beam divided into 16 segments:

Due to differing approximations in the two programs there are small differences in the shear results:

Bending moments are in good agreement.

The 2D function gives similar results:
Note that these functions are still under development. All results must be independently verified using other software.