Close this search box.
Python Implementati...
Clear all

Python Implementation issue of Small Strain Linear Viscoelasticity from "Mechanics of Solid Polymers

3 Posts
3 Users
0 Reactions
Posts: 8
Topic starter
Active Member
Joined: 11 years ago

Dear All,

This is relevant to the Book published by Jorgen " Mechanics of Solid Polymers". On page 330 there is a python code to draw stress - strain diagram for small strain linear viscoelasticity.

but as the book mentioned, I cannot get the graph as mentioned in the book. I implement this python code in Anaconda platform - Spyder version 3.7.

I tried various ways to obtain this but could not do it.

I included the code exactly as it is included in the book

Could you please someone help me to resolve this.

Mr Jorgen, Can you please help me as this is in the book.



Aravinda Abeygunawardane

2 Replies
Posts: 1
New Member
Joined: 4 years ago

Good day!

Everything is very simple)
The functions defined in this script require several values at the input, including a list of "params". And you simply haven’t defined it.

If you look at the graph on page 331 of this book, you will see what constants were used.

Posts: 1
New Member
Joined: 3 years ago

Hi, leaving the reply here for the next one who wonders as I'm sure you've moved on:

There is one too many indents on your line "return stressVec" which causes the code to return the vector for each iteration and not at the end of your function.