Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Work from normal force on a pendulum in non homogeneous field

  • 29-12-2013 3:39pm
    #1
    Registered Users, Registered Users 2 Posts: 321 ✭✭


    I would like to study the work from the force from wall. For this, I study a simple 2d shape: a circle attract by a point mass M. Mass M is fixed. First image show the diagram and second image show the code (python language). I don't find 0 for the sum but it could. I don't compute all the movement of the circle, only a delta angle (very small angle). I compute all position of point to study in red circle, the length (distance) between this point and mass M. And the force.

    For compute the sum (I'm not sure the method is good), I look for angle and I multiply by the mean force. I try to sum only cos but it's the same I don't have 0.

    Second image showing a circle attract by a fixed mass. The normal force N from wall must not be like that for the red point. The red point would have the force like Nr not N I think. In a uniform field it's ok, back forces compensate front forces, but here I don't know where all these works from N can be compensated.

    Maybe a problem with atan ? or I need to take in account the angle between force and N force.
    # -*- coding: utf-8 -*-
    
    
    from math import *
    
    R = 10.0 
    d = 1.0
    r = 2.0
    ys = 0.3 ## y at start
    dys = 0.00000001 ## delta angle to move
    k = 1.0 ## the force of attraction, can be mMG
    nb = 900000 ## number if steps
    PI = 3.1415927 
    xc = [] ## all positions x of point to study around the circle
    yc = [] ## all positions y of point to study around the circle
    xc2 = [] ## idem but after moved
    yc2 = []
    f = [] ## all forces at start
    f2 = [] ## all forces after moved
    
    
    ####################################################### 
    
    x = 0.0
    for i in range(0,nb):
        x = x + 2.0 * PI / nb
        xc.append((R-r)*sin(ys) - cos(x))
        yc.append(d + R - (R-r)*cos(ys) + sin(x))
        lg = sqrt( yc[i]*yc[i] + xc[i]*xc[i] )
        f.append(k / lg)
     
    ####################################################### 
     
    ys = ys - dys
    x = 0.0
    for i in range(0,nb):
        x = x + 2.0 * PI / nb
        xc2.append((R-r)*sin(ys) - cos(x))
        yc2.append(d + R - (R-r)*cos(ys) + sin(x))
        lg = sqrt( pow(yc[i],2.0) + pow(xc[i],2.0) )
        f2.append(k / lg)
      
    ####################################################### 
      
    sum = 0.0
    for i in range(0,nb):
        if yc2[i]-yc[i] != 0 :
            angle = PI - ys - atan( (xc2[i]-xc[i]) / (yc2[i]-yc[i]) )
        else:
            angle = PI/2.0
    
        ##sum = sum + (f[i]+f2[i])/2.0 * cos(angle) ## sum of works from N
        sum = sum + cos(angle) ## sum of works from N
     
    
    print(sum)
    
    
    
    
    


Advertisement