Close this search box.
Clear all

Error in implementing python codes from Mechanics of Solid Polymers

1 Posts
1 Users
0 Reactions
Posts: 1
Topic starter
New Member
Joined: 3 months ago

I am new to hyperelasticity and material modeling. I am using Jurgens book as a study tool. 


As a part of that learning I tried to implement the python codes given in chapter 5 in the book and in the file. I keep running into an error in the uniaxial_stress function. 


The error is: 


F = array([[L1,0,0], [0,L2,0], [0,0,L3]])
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 2 dimensions. The detected shape was (3, 3) + inhomogeneous part.


The error comes up no matter wich material model I select. Has anyone had the same error when trying to use the codes? and knows of a fix. 

Best Hakon

Topic Tags