Search
Close this search box.
Notifications
Clear all

Error in implementing python codes from Mechanics of Solid Polymers

1 Posts
1 Users
0 Reactions
185 Views
Posts: 1
Topic starter
(@hakonh)
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 Polymer_Mechanics_Chap05.py 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
Share: