01-05-2011 06:40 AM
Is it possible to use one equation with 2 or more variables and make one of these variable as an output without changing the equation?
Take the equation below example:
R=x/(0.28706/0.46153+x)*(101.325/P)
As usual, by inserting the values of x and P, then value of R will be answered.
But if only the value of R and x can be inserted, how can the value of P to be answered without altering the equation.
The equation is being used multiple time in the same VI. One is for generating one part of a graph (Mollier Diagram) and the others are to be used to find the value at the intersection.
I hope my question is understandable.
Thank you in advance
-sikat
Solved! Go to Solution.
01-05-2011 07:10 AM
Have you looked at the formula node? See attached picture.
01-05-2011 07:41 AM
The case structure is a very straightforward program element. Test to see whether R or P has been entered, then select that case which implements the version of the equation for that input combination.
If P then R = (x/(a+x)*(b/P)
If R then P = (x/(a+x)*(b/R)
Lynn
01-05-2011 02:48 PM
R = (x/(a+x)*(b/P) ... thx, this really will be helping me to make this Eq more understandable
Formula Node:
It seem that when i entered an equation(Eq), only the left side of the Eq can only be one variable thus producing a single output.
Case Structure(or SELECT function):
It changes the formula to a new form for every output. Let say i want make x an output. That means i need to create a new Eq : x=(P*R/b-1)*a, which i want to avoid if posible .
.... Does this means that a new Eq must be created/converted for each output.
Newton Raphson zero finder vi: (base on this N-R Example)
I have tried using this VI by making my Eq equivalent to zero and using SELECT function depending on situation. Somehow i think it will work, but the VI seem too bulky for one simple formula (with 2 variable and 1 output), which i want to avoid since many more formula will be used.
I ll be glad to see more suggestions.
01-05-2011 03:09 PM
You simply need to program both formulas:
R(x,P)
P(x,R)
and select the one depending on the inputs and desired outputs.
N-R should be reserved for cases where there is not analytical solution.