LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

create shear stress formula

Solved!
Go to solution

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!

0 Kudos
Message 1 of 34
(3,605 Views)

Try Formula Node from structure palette with your formula?

*************************************************
CLD
*************************************************
0 Kudos
Message 2 of 34
(3,588 Views)

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.

Message 3 of 34
(3,585 Views)

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.

0 Kudos
Message 4 of 34
(3,578 Views)

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!

0 Kudos
Message 5 of 34
(3,577 Views)

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.

Andy Chang
National Instruments
LabVIEW Control Design and Simulation
0 Kudos
Message 6 of 34
(3,566 Views)

temp.png

Andy Chang
National Instruments
LabVIEW Control Design and Simulation
Message 7 of 34
(3,565 Views)

Mathscript and control&simulation are both optional toolkits. I would recommend to stick with a plain LabVIEW solution.

Message 8 of 34
(3,556 Views)

Hi altenbach,

What do you mean about plain LabView solution? Could you please give an example vi about this? Thanks again.

0 Kudos
Message 9 of 34
(3,547 Views)

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.

0 Kudos
Message 10 of 34
(3,543 Views)