cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Plotting Stress Strain Curve

JayVattappilly
2-Explorer

Plotting Stress Strain Curve

I am trying to plot a stress strain curve using a model but the strain values don't start from zero. wonder if anyone can look at the template attached. 

7 REPLIES 7

Why do you think the plot should start at 0?

The vector epsilon.t start with value 6.137*10^-3 and so does the plot.

B.PNG

Thanks for the question. Looking at the equation for epsilon.t and sigma t, a value of zero sigma t should yield a value of zero epsilon.t. If I just define sigma t as zero, I am in fact getting epsilon.t as zero as it should be. However when I define a set of values for sigma t from zero, it doesn't give me epsilon.t values starting from zero. 

Thanks again for looking into this. 


@Werner_E wrote:

Why do you think the plot should start at 0?

The vector epsilon.t start with value 6.137*10^-3 and so does the plot.

B.PNG



@Werner_E wrote:

Why do you think the plot should start at 0?

The vector epsilon.t start with value 6.137*10^-3 and so does the plot.

B.PNG




Thanks for the question. Looking at the equation for epsilon.t and sigma t, a value of zero sigma t should yield a value of zero epsilon.t. If I just define sigma t as zero, I am in fact getting epsilon.t as zero as it should be. However when I define a set of values for sigma t from zero, it doesn't give me epsilon.t values starting from zero. 

Thanks again for looking into this. 


Thanks for the question. Looking at the equation for epsilon.t and sigma t, a value of zero sigma t should yield a value of zero epsilon.t. If I just define sigma t as zero, I am in fact getting epsilon.t as zero as it should be. However when I define a set of values for sigma t from zero, it doesn't give me epsilon.t values starting from zero.

Yes, I see.

The problem is the calculation of gamma1 and gamma2. epsilon_/2 is a vector and (1-tanh(H)) is a vector, too. So the multiplication of the two is interpreted as the scalar product of these vectors and is not done elementwise.

You have to use vectorization to get the result you intended:

B.png

BTW, its a good idea to apply vectorization ALWAYS when doing calculations with a vector of input values (unless of course you want real vector operations to be done of course).

An even better approach is to set up the sheet so the calculations are done with single scalar input values only, turn them into functions of the input values and only after that you may use those functions vectorized with vectors as input values.
EDIT: See the next post of mine for an example.

Werner_E
25-Diamond I
(To:Werner_E)

Just as an afterthought  - It may be a better idea to turn your calculations into functions dependent on sigma.t. That way you can avoid the vectorization necessary for plotting, get a smoother curve and  have more flexibility for subsequent calculations.

See attached sheet.

Hi

 

You do not need the vectorization of the stress interpolation. 

 

Capture.JPG

Cheers

Terry 


@terryhendicott wrote:

Hi

 

You do not need the vectorization of the stress interpolation. 

 

Capture.JPG

Cheers

Terry 


Thats correct. I haven't even looked at the calculations after the wrong plot but now I have seen that global assignments (which i don't like and would not recommend) are used.

Fortunately "linterp" seems to ignore the vectorization operator as otherwise it should throw an error if used with vectorization.

Announcements

Top Tags