How to assign a variable based on an equation?
42 views (last 30 days)
I need to update certain material properties as a system cools. The properties are dependant on temperature, and I have equations that relate the values of the properties to temperature.
Is there a way to store an equation of a single variable, then use that equation to determine the value for a new variable?
I want to be able to define the equation at the start of the code and use that equation to determine the new property.
Something along the lines of:
Density_equation = x^2 + 2x + 10
T = 1000
Density = Density_equation(T)
I hope this makes sense, I am having trouble articulating my question.