Troubleshooting a Four Bar Equation for Personal Programming Project

  • Thread starter RandyPhantom
  • Start date
In summary, the program calculates the cosine and sine of theta from the given angles and velocities.
  • #1
RandyPhantom
7
0
Hello; I am trying to write a four bar program; it is not for school, but it is a personal project to refresh myself with programming and dynamics. I have a input with height 80 pixels, angular velocity of pi/12 rad/s and the initial angle is pi/2; the coupler is with length of 107.703296 pixels,an initial angle of .380506377 and the angular velocity was calculated to be 1.22597x10^-17 rad/s. the follower link's initial angle is pi/2 with a angular velocity of 0.1745329 rad/s and height of 120 pixels. I was assuming that linear equation would be (length*cos(initial angle + angular velocity*time),length*sin(initial angle+angularvelocity*time) but this only worked for the input link. so I know that the velocity of the second point on a rigid body is written as angular velocity of the first link cross product of the length and angle of the first point + the angular velocity of the second cross product of the length and angle of the second point.

Homework Equations



w1*r1*cos(phi1)+w2*r2*cos(phi2)+w3*r3*cos(phi3) = 0
-w1*r1*sin(phi1)-w2*r2*sin(phi2)-w3*r3*sin(phi3) = 0
w2 = -(w1*r1*cos(phi1)+w3*r3*cos(phi3))/(r2*cos(phi2))
w3 = -w1*r1*(-cos(phi1)*sin(phi2)+cos(phi2)*sin(phi1))/r3*(cos(phi2)*sin(phi3) - cos(phi3)*sin(phi2))

The Attempt at a Solution


I was using [x?,y?] = [r?*(cos(phi?+w?*t)),r?*sin(phi?+w?*t)), but this works only on the the input link
 
Last edited:
Physics news on Phys.org
  • #2
I also went in another direction

r1*cos(theta1)+r2*cos(theta2) = r4*cos(theta0)+r3*cos(theta3)
r1*sin(theta1)+r2*sin(theta2) = r4*sin(theta0)+r3*sin(theta3)

solved for cos(theta2) and sin(theta2) and used (cos(theta2))^2+(sin(theta2))^2 = 1

came up with the equation:
r1^2-2*r1*sin(theta1)*r4*sin(theta0)-2*r1*r3*sin(theta1)*sin(theta3)+r4^2+2*r4*sin(theta0)*r3*sin(theta3)+c^2-2*r1*cos(theta1)*r4*cos(theta0)-2*r1*cos(theta1)*r3*cos(theta3)+2*r4*cos(theta0)*r3*cos(theta3)-r2 = 0
 
  • #3
The Freudmann equation crashes also, so any suggestion would be appreciated.
 

Related to Troubleshooting a Four Bar Equation for Personal Programming Project

1. What is a four bar equation?

A four bar equation is a mathematical equation that involves four variables and their corresponding coefficients. It is typically used in mechanical engineering and physics to model the motion of four-bar linkages.

2. How do I solve a four bar equation?

To solve a four bar equation, you will need to use algebraic equations and trigonometric functions. First, you must identify the four variables and their corresponding coefficients. Then, you can use substitution or elimination methods to solve for the unknown variables.

3. What are some real-life applications of four bar equations?

Four bar equations have various applications in engineering, such as in the design of machines, mechanisms, and structures. They are also used in robotics, biomechanics, and even in the study of animal locomotion.

4. Can I use a calculator to solve a four bar equation?

Yes, you can use a calculator to solve a four bar equation. However, it is important to have a basic understanding of algebra and trigonometry to properly input the equation and interpret the results.

5. What are some common mistakes when solving a four bar equation?

Some common mistakes when solving a four bar equation include incorrect identification of variables and coefficients, errors in algebraic and trigonometric calculations, and forgetting to include all necessary equations to solve for all unknown variables.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
2
Views
2K
Replies
5
Views
948
Replies
2
Views
626
  • Engineering and Comp Sci Homework Help
Replies
1
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
2K
Replies
11
Views
2K
  • Introductory Physics Homework Help
Replies
2
Views
2K
  • Introductory Physics Homework Help
Replies
11
Views
774
  • Programming and Computer Science
Replies
4
Views
639
  • Special and General Relativity
Replies
11
Views
228
Back
Top