More Open Source FEA Code Links

The book Nonlinear Finite Element Analysis of Solids and Structures 2nd Edition has an associated python code package called pyFEM, but a search for this code finds several others with the same or similar names:

The pyFEM sites associated with the book are:

jjcremmers/PyFEM: A Python finite element code (github.com)

and an associated pypi site:

PyFEM-TUE · PyPI

PyFEM is a python-based finite element code accompanies the book: ‘Non-Linear Finite Element Analysis of Solids and Structures’ by R. de Borst, M.A. Crisfield, J.J.C. Remmers and C.V. Verhoosel. The code is open source and intended for educational and scientific purposes only. If you use PyFEM in your research, the developers would be grateful if you could cite the book in your work.

Another github site of the same name, but apparently entirely independent is:

rvcristiand/pyFEM: Finite Elements Analysis with python (github.com)

A third package of the same name, but with the specific purpose of finite element mesh conversion is:

The PyFEM Mesh Conversion Software Library

The PyFEM library is an open -software project for the conversion of 2D and 3D mesh formats. • Primarily designed for conversion of Finite Element meshes as used in numerical simulations in the geosciences.

Posted in Finite Element Analysis, Frame Analysis, Link to Python, Newton | Tagged , , , | Leave a comment

Lost Sydney

Click image for full size view.

Lost Sydney is a Facebook site with 100’s of photographs of Sydney, some dating back well over 100 years.

This is Sydney’s story. Lost Sydney is not just about demolished buildings, it’s also about photos of Sydney’s past.

Lost Sydney

Posted in Arch structures, Bach, Historic Bridges, Newton | Tagged , , | Leave a comment

Extracting text from an Internet table

For use in my Units spreadsheet (Units4Excel) I want to extract the unit conversion values from the comprehensive Wikipedia unit conversion table.

On Wikipedia the table looks like this:

and when copied and pasted as Unicode text into Excel, like this:

To convert the text in the final column to values the following changes are required:

  • Skip the leading non-numeric characters,
  • Remove spaces between numbers.
  • Remove the final numbers enclosed in brackets, indicating the uncertainty in the final digits.
  • Convert the exponent (e.g. x10-27) to Excel format (E-27). Note that a positive exponent displays as a 4 digit number, e.g. x1027.
  • Convert the resulting text string to a number with double data type.
  • Extract the units
  • Skip references to notes.

The following code does the job:

Function ExtractVal(Txt As String, Optional ExtractUnits As Boolean = True)
' Extract number and optionally units from Wikipedia unit conversion factor table
' Remove preceding text and trailing notes, and variance value enclosed in ()
' Convert x10nn to Enn or x10-nn to E-nn
Dim n As Long, m As Long, char As String, ValStr As String, RtnA() As Variant, i As Long, strcode As Long

' Skip over any non-numeric text before the first number
    If ExtractUnits Then
        ReDim RtnA(1 To 2)
    Else
        ReDim RtnA(1 To 1)
    End If
    n = Len(Txt)
    
    For i = 1 To n
        char = Mid(Txt, i, 1)
        If IsNumeric(char) Then Exit For
    Next i
    ValStr = char
    m = i + 1
    
 ' Extract all numbers until the first non-numeric text
 ' Skip over single spaces followed by a number
    For i = m To n
        char = Mid(Txt, i, 1)
        If IsNumeric(char) = False And char <> "." Then
            If IsNumeric(Mid(Txt, i + 1, 1)) = False Or char <> " " Then Exit For
        Else
            ValStr = ValStr & char
        End If
    Next i
    m = i + 1
    
' Skip over numbers enclosed in ()
    char = Mid(Txt, i, 1)
    If char = "(" Then
        For i = m To n
            char = Mid(Txt, i, 1)
            If char = ")" Then
                i = i + 1
                Exit For
            End If
        Next i
    End If

' Extract numbers following 'x10' and add to value string as Enn
' The 'x' in the Wikipedia table is Ascii code 215
    char = Mid(Txt, i, 1)
    strcode = Asc(char)
    If strcode = 215 Then
        m = i + 3
        ValStr = ValStr & "E"
        For i = m To n
            char = Mid(Txt, i, 1)
            strcode = Asc(char)
            If strcode = 45 Then char = "-"
            If IsNumeric(char) = False And char <> "-" Then Exit For
            ValStr = ValStr & char
        Next i
    End If
 ' Convert value string to double and copy to RtnA
    RtnA(1) = CDbl(ValStr)
    
 ' Extract unit text, skip over final note reference
    If ExtractUnits Then
        m = i + 1
        ValStr = ""
        For i = m To n
            char = Mid(Txt, i, 1)
            If char = "[" Then Exit For
            ValStr = ValStr & char
        Next i
        ' Copy unit to RtnA
        RtnA(2) = ValStr
    End If
    
    ExtractVal = RtnA
End Function

This function can be applied to the text at the top of the final column, and copied down, resulting in:

Columns AB and AC are the function output. Column AD uses the built in IsNumber function to confirm that the values in Column AB are indeed valid numbers.

Posted in Excel, Newton, UDFs, VBA | Tagged , , , , , , , | 3 Comments

Tanh-Sinh Quadrature update

Following some comments here Graeme Dennes and I have modified the start-up code for the Tanh-Sinh Quadrature spreadsheet to avoid problems opening the file when first downloaded, or copied to a new computer.

The new file is located (as before) at:

Tanh-Sinh Quadrature

Any problems, please leave a comment below, with details of error messages and Excel version, including 32 bit or 64 bit.

Posted in Excel, Maths, Newton, Numerical integration, UDFs, VBA | Tagged , , , | Leave a comment

Four Forgotten Female Folkies

Barbara Dane

In her speech to the GI Movement of the Vietnam War Era (whose text can be found in the booklet that’s included in Paredon Records’ FTA! Songs of the GI Resistance vinyl album of 1970), Barbara Dane said, “I was too stubborn to hire one of the greed-head managers, probably because I’m a woman who likes to speak for herself. I always made my own deals and contracts, and after figuring out the economics of it, I was free to choose when and where I worked, able to spend lots more time with my three children and doing political work, and even brought home more money in the end, by not going for the ‘bigtime.’ I did make some really nice records, because I was able to choose and work with wonderfully gifted musicians.”[7]

Tia Blake

Tia Blake was the stage name of Christiana Elizabeth Wallman (1952-2015), an American writer and singer…

Wallman was born in Columbus, Georgia, in 1952, and grew up in North Carolina.[1] In 1970 she worked for Farrar, Straus and Giroux in New York for six months, before moving to Paris.[1] In Paris she recorded an album of folk songs at Ossian Studio in 1971. This was released in February 1972 by Société Française de Productions Phonographiques (SFPP) under the title Folk Songs and Ballads: Tia Blake and Her Folk-group.[1]

Bridget St John

Bridget St John (born Bridget Anne Hobbs; 4 October 1946 in Surrey, England)[1] is an English singer-songwriter and guitarist, best known for the three albums she recorded between 1969 and 1972 for John Peel‘s Dandelion record label. Peel produced her debut album Ask Me No Questions. She also recorded a large number of BBC Radio and Peel sessions and toured regularly on the British college and festival circuit. St John appeared at leading folk venues in the UK, along with other folk and pop luminaries of the time such as Nick DrakePaul Simon, and David Bowie, among others.[2] In 1974 she was voted fifth most popular female singer in that year’s Melody Maker readers poll.[3] Blessed with a “rich cello-like”[4] vocal style, she is also an accomplished guitar player who credits John Martyn and Michael Chapman as her “musical brothers”.[5]

Vashti Bunyan

Vashti Bunyan (born Jennifer Vashti Bunyan[2] in 1945[3]) is an English singer-songwriter.

Bunyan released her debut album, Just Another Diamond Day, in 1970. The album sold very few copies and Bunyan, discouraged, abandoned her musical career. By 2000, her album had acquired a cult following; it was re-released and Bunyan recorded more songs, initiating the second phase of her musical career after a gap of thirty years.[4] She subsequently released two albums: Lookaftering in 2005, and Heartleap in 2014.

Posted in Bach | Tagged , , , | 2 Comments