ni.com checkout is currently experiencing issues.
Support teams are actively working on the resolution.
ni.com checkout is currently experiencing issues.
Support teams are actively working on the resolution.
02-13-2011 09:50 AM
Hi everyone!
I want to create a formula to use it later in order to take integral and derivative of this equation. The equation has some constants of D=0.026 m; L=3 m. And some other constants which are found at the end of the run in vi. These constants are numerics which are "delta_P_ta"; "delta_P_os"; "U_m_os" and "w=2*pi*freq.". The formula I want to obtain is;
Shear_stress_wall(t)= (delta_P_ta*D/4/L) + (delta_P_os*cos(w*t)*D/4/L) + (1,2*w*D*U_m_os*sin(w*t)/4)
where t is time in second and the shear stress wall is a function of sin, cos and t. Then I will take derivative of this equation with respect to t.
Please help me!!! Is it possible to generate a string and is it possible to use this formula string in order to take its integral??
Is it also possible to draw this equation into waveform graph with respect to time?
Please help me! Thanks a lot!
Solved! Go to Solution.
02-13-2011 01:23 PM
Try Formula Node from structure palette with your formula?
02-13-2011 01:54 PM
LabVIEW does not do symbolic math. Your best bet is to program the integral function and derivative functions manually. Use something that can do symbolic math (such as maple) if you have difficulty with this.
@mechen wrote:
where t is time in second and the shear stress wall is a function of sin, cos and t.
That makes no sense. Your function depends on "t" only (since you apparently know "freq" and other constants.). "Sin" and "cos" are trigonometric functions, not independent variables, right?
If you just want to draw the function, integral, and derivative in a graph and don't require an analytic representation, just calculate your function for a sufficient number of regularly spaced "t" points, then use numeric integration and differentiation. LabVIEW has alll the tools for a numeric solution.
02-13-2011 03:50 PM
Hi altenbach,
Thanks for your reply.
I have a numeric constants as a result of the vi run, which are "freq."; "delta_P_ta"; "delta_P_os" and "U_m_os".
For example; delta_P_ta= 120 Pa; delta_P_os=30 Pa and U_m_os=0.8 m/s. How can I insert these values into the given formula below and then integrate it and draw as a waveform graph in the same vi in which "delta_P_ta"; "delta_P_os" and "U_m_os" are calculated?
The general view of the equation in which the calculated variables will be inserted is:
shear_stress_wall= (0,0266*delta_P_ta/12) + (0,0266*delta_P_os* cos (2*pi*freq.*t)/12) + (0,03192*2*pi*freq.*U_m_os* sin(2*pi*freq.*t)/4)
The four values will be inserted the given equation and the equation will be as a function of only t (time). Then I will integrate it with respect to t and also I will draw this equation with respect to time for example between t=0 and t=50 sec.
Please help me! Can I use "Formula Node" for this? Thanks a lot again.
02-13-2011 03:54 PM
Hi Ivrat,
Thanks for your reply.
I have tried "Formula Node" but I failed. I am a beginner in LabView and can not use the "Formula Node" well.
Could you please help me to obtain the formula in the previously given format using i.e., delta_P_ta=120; delta_P_os=20; U_m_os= 0,5 and freq. =1.
Could you please construct the block diagram of this?
Please help more!
02-13-2011 06:16 PM
Hello Mechen,
Here's one way of implementing it using MathScript Node and For Loop.
I would probably use Control Design and Simulation Loop in place of the For Loop if you are looking to take integral & derivative of the function with variable step size solvers.
Hope this helps.
02-13-2011 06:16 PM
02-13-2011 08:23 PM
Mathscript and control&simulation are both optional toolkits. I would recommend to stick with a plain LabVIEW solution.
02-14-2011 02:13 AM
Hi altenbach,
What do you mean about plain LabView solution? Could you please give an example vi about this? Thanks again.
02-14-2011 02:27 AM
Hi Andy,
thanks a lot for your solution. I hope it will work when I construct it in my vi. If I have a trouble, I will want a help. Thanks again.