# B Need help setting up a custom Graph

Tags:
1. Nov 29, 2016

### pac0master

Hey folks, I recently made a little equation and I would like to know if there's any way to plot it on a 2D graph.
Problem is, there's multiple variables. so if anyone here can help me out that would be appreciated.

Here's my formulas:

S2 = (S1-(S1/10))/2x
x= T2/(S1/20)
T2= T1-(S1/10)

S1 is the Initial Strength
S2 is the final Strength
T1 is the Actual Temperature
T2 is the Temperature Difference
x is a variable factor

The Graph is supposed to represent the relation between Temperature and Strength of a fictional Material
It only starts once the Temperature is equal to 10% of the Strength.

Basically, The strength of a material is reduced by half every time the temperature raise by 5% of the initial strength.

An example of how it works is simple.
Let's say we have a Given material with a Strength of 2000 and a temperature of 500
Well, according to the formula, the Final strength of that material would be 225
(2000-10%)/23

EDITED
--- Using Sub Scripts

Last edited: Nov 29, 2016
2. Nov 29, 2016

### Staff: Mentor

Have you played with the equations in Excel? That's how I would start -- just put the equations into an Excel spreadsheet as evolving columns and you can figure out what parts you want to plot.

BTW, you might change your notation to avoid T' and T" etc. That is often used to represent differentiation, and was pretty confusing to me when I started reading your post. Maybe just use subscripts instead...?

3. Nov 29, 2016

### pac0master

Yeah that's how I originally made it. (so much more useful than writing it down with pen and paper)

I've messed around with it but I'm not really sure how to graph it.

Basically, having the Strength on the Y axis and Temperature on the X (or the opposite, I don't think it really matter)

Ill fix it right away.

4. Nov 29, 2016

### Staff: Mentor

Did you have 3 columns for S, x, T, and have initial values for each in the first row, and then see how the values evolved down each row as the equations were applied?

5. Nov 29, 2016

### Staff: Mentor

BTW, is this system stable? Over what initial values of S, x and T?

6. Nov 29, 2016

### pac0master

It was almost exactly as shown above.
I just added more columns for changing the values.

I'm not sure what you mean by "Stable"

As long as the value of the temperature is above 10% of the Strength, there shouldn't be any problem.

7. Nov 29, 2016

### Staff: Mentor

=> x = (T'-(S'/10))/(S'/20) = 20 (T'/S') - 2

Strength and temperature have the same units? How?

How can you calculate a fixed temperate difference (of what?) just based on initial material strength and the initial temperature?

Zero temperature difference leads to a final strength that is different from the initial strength, which looks odd.

Where do those equations come from?

8. Nov 29, 2016

### pac0master

They just works on the same scale for simplicity. Basically, A material with a Strength of 2000 will be severely affected once the temperature reach over 200°C as 200 is 10% of the Initial Strength.

also
I can't seem to plot that formula on Wolfram Alpha nor Google btw.

The temperature difference is based on the 10% Strength factor. so 10% of 2000 is 200. so the Temperature difference between 200 and 500 las shown in my example was 300.
This 300 is 3 time the 5% mark so we divide 1800 (2000-10%) by 2^3
the 10% we removed was to account for the loss before the formula takes place.

Yeah, just like I've explained right above, The formula takes into account the 10% loss before.
Explanation bellow

I made the whole thing up.
It's a simplistic concept to create dynamics materials in a game where the strength of the material depends on the temperature.

The idea is that once the temperature reach 10% of the Total strength, this formula takes place.
Under this temperature it's a linear change up to 10% Which explain why there is a loss of 10% in the formula I've wrote.

If I go back to my previous example where Strength = 2000
.
If the temperature is under 200, (like 100 which is 5%)
Then the strength would be reduced by 5%
The loss of strength bellow 10% is proportional to the % of the temperature over Initial Strength.

9. Nov 29, 2016

### Staff: Mentor

Here is a plot where I chose S1=1, everything scales linearly with this parameter anyway.

10. Nov 29, 2016

### pac0master

Looks pretty interesting but I'm a bit confused.
What represent S1 in this?

11. Nov 29, 2016

### pac0master

Thinking about it right now, It's a Half life Curve. but every formulas I got gives the X axis a low number.
Both axis should show fairly large numbers following exactly this curve. (S1=2000) minus 200 on both axis

Last edited: Nov 29, 2016
12. Nov 30, 2016

### Staff: Mentor

The same as in your first post, the reference strength.

Yes it is an exponential decay, obfuscated by some additional formulas.

13. Nov 30, 2016

### pac0master

Last edited: Nov 30, 2016
14. Nov 30, 2016

### Staff: Mentor

A multiplication by 1 doesn't change anything, so I did not include it explicitly.