error: value has units but unitless
error: value has units but unitless
(OP)
I strated learning MATHCAD few days back and started first design worksheet as attached. But i couldnt resolve the error: This value has units:Unitless, but must have units:Pressure..
Iam getting the abov eerror in the program. can someone help me to resolve the error..
Thanks
Iam getting the abov eerror in the program. can someone help me to resolve the error..
Thanks
RE: error: value has units but unitless
RE: error: value has units but unitless
TTFN

FAQ731-376: Eng-Tips.com Forum Policies
Need help writing a question or understanding a reply? forum1529: Translation Assistance for Engineers
RE: error: value has units but unitless
TTFN

FAQ731-376: Eng-Tips.com Forum Policies
Need help writing a question or understanding a reply? forum1529: Translation Assistance for Engineers
RE: error: value has units but unitless
alternately, the whole thing can be written as a compound If statement.
TTFN

FAQ731-376: Eng-Tips.com Forum Policies
Need help writing a question or understanding a reply? forum1529: Translation Assistance for Engineers
RE: error: value has units but unitless
http://files.engineering.com/getfile.aspx?folder=8...
TTFN

FAQ731-376: Eng-Tips.com Forum Policies
Need help writing a question or understanding a reply? forum1529: Translation Assistance for Engineers
RE: error: value has units but unitless
If I want to use compound if statement(conditional branching), how can I assign KLr (calculate max kl/r in the if statement)
Thanks once again for the help..
RE: error: value has units but unitless
TTFN

FAQ731-376: Eng-Tips.com Forum Policies
Need help writing a question or understanding a reply? forum1529: Translation Assistance for Engineers
RE: error: value has units but unitless
In Mathcad a program is only allowed to return values of equal dimensions for all cases. E.g. you can't write a function which returns a length, if the argument is 1 and an area if the argument is 2. The way you have written your routine it may happen, that the line which assigns klr is the last line evaluated and so klr would be returned. klr is unitless and the other possible return values are of dimension pressure and that doesn't work. Using otherwise statements makes it clear to Mathcad that all cases are covered and klr will never be a return value. Its also good habit to use explicit return statements.
See the attached file for a few ways to handle the situation, also covering your question about the assignment of klr in case of the nested if functions, but I in no way would recommend using that confusing display.
RE: error: value has units but unitless
I really liked the way you explained different case scenarios...