Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
I am having trouble understanding why I can't get a solution using the defined variables but am able to get one when I put in a value for the variable. My issue arises because the values X, Y and Z depend on Twall. I want to be able to loop this with an update to Twall at each dt. Any help would be appreciated.
mathcad prime9
.
Please attach the Prime worksheet (.mcdx file).
Other than that: I guess you're not interested in the complex answers for T, nor the negative one, so only the first answer is needed.
And you only need a numeric answer. In that case it's better to use the root() function, instead of solve. You can set it to not give you negative or complex answers by supplying two extra parameters that give limits of the range within which you expect your answer.
Look it up in the help information of the program.
Success!
Luc
Thanks Luc. What I am doing is a transient heat transfer case. Yes, I only need the positive root. But, I need to use that root and resolve for all the variables after a time-step and resolve for Twall. Repeat until Twall is equal to Thot. I know how to do the programming, I just can't get the initial part to work. My worksheet has some other stuff at the bottom that I was trying to get to work as well.
thanks
This is what I'm talking about:
Now, I don't see you calculating new values of A,B,C,D,E,F,X,Y or Z based on this temperature value. You're using the same inputs over and again. Then there's no point in iterating.
Success,
Luc
thanks..
I am not sure what happened. it was working
You should attach the prime worksheet file.
Success!
Luc
I figured it out. I can't have the "=" after the X1 and Z1. I was just checking units, but for some reason it didn't like it,
thanks
@AH_10527716 wrote:
I figured it out. I can't have the "=" after the X1 and Z1. I was just checking units, but for some reason it didn't like it,
thanks
This is because you cant numerically evaluate a function definition!
After all, which result would you expect from f(x):=x^2= ?
Even if you already had defined a value for a variable x before - the x in the function definition is a formal function argument and has nothing to do with that variable x.