Programming science

This is a discussion on Programming science within the C++ Programming forums, part of the General Programming Boards category; Hi. I have a question relating to science, but I need the answer to write a program. So, let's see ...

  1. #1
    Registered User
    Join Date
    Dec 2001
    Posts
    5

    Programming science

    Hi. I have a question relating to science, but I need the answer to write a program. So, let's see if you have an answer.

    Say we are in a place with very little friction. Now, we take a hill and put a car at the top. We also put a car on a crain, holding it up at the same height as the hilltop.
    Without friction, all objects on earth fall at 9.8m/s(squared). Saying we let the car on the hill roll (remember, very little friction), what would be the change in velocity. It would not fall at the same rate. Is there a formula for this?
    I am making a roller coaster sim.

  2. #2
    Hamster without a wheel iain's Avatar
    Join Date
    Aug 2001
    Posts
    1,385
    searching memory for any traces of A level Physics.......

    You need to also take into account the air resistance as it is this that dicates the speed of fall, though the friction generated will also have a minor effect.

    the change in its velocity will depend on the mass of the body (ie : the car) and the vertical and horizontal distances,

    remember bodies accelerate by 9.8ms every second. There is almost certainly a formula for this - but i cannot think of it at the time as it has been over a year since i was doing a level physics.

    dV=(dD)/(dtt-dti)
    is one of the only ones i remember

    i will have a think and post back any more if i remember...
    hth
    Monday - what a way to spend a seventh of your life

  3. #3
    Registered User
    Join Date
    Dec 2001
    Posts
    4
    Given: Acceleration due to gravity = 9.8 m/s

    >>Now, we take a hill and put a car at the top. We also put a car >>on a crain, holding it up at the same height as the hilltop.

    I think we need to know how steep the incline is... however, with little friction, the car will be accelerating at 9.8 m/s, eventually if it keeps going on the same incline, it will reach a maximum speed. Unfortunately, even if you give us the angle, I'm still not sure how to find the velocity ;/

  4. #4
    Hamster without a wheel iain's Avatar
    Join Date
    Aug 2001
    Posts
    1,385
    sorry - forgot to explain the equation

    d = delta and means 'change in'
    V = velocity
    tt = total time taken
    dti = correction for external effects (though i doint remember how to calc them )
    Monday - what a way to spend a seventh of your life

  5. #5
    geek SilentStrike's Avatar
    Join Date
    Aug 2001
    Location
    NJ
    Posts
    1,141
    Assuming no friction or air resistance, the the object will accelerate at g*sin(theta), where theta is angle of the incline. Testing this for two extremes, a flat surface (theta = 0, sin(0) = 0, and a vertical surface (no surface at all, theta = 90, sin(theta) = 1), shows that it works in both extreme conditions.
    Last edited by SilentStrike; 12-13-2001 at 09:44 PM.
    Prove you can code in C++ or C# at TopCoder, referrer rrenaud
    Read my livejournal

  6. #6
    Unregistered
    Guest

    Talk to Newton

    use this formula

    -1/2t^2+i*t+h=c

    where t=time passed
    i=initial velocity (if something falling, use 0)
    h=initial height
    c=current height

    This does not include area resistance or friction but it should do.

  7. #7
    Blank
    Join Date
    Aug 2001
    Posts
    1,034
    As you don't have friction I think you can use

    mgh = (1/2)mv^2

    At least you will find the change in velocity, if you meant acceleration than just use SilentStrikes formula.

  8. #8
    Registered User
    Join Date
    Dec 2001
    Posts
    194
    You are lucky cus i just took a Physics 1 College Exam
    You can use the kinematic equations all ready posted on this board, but you can also use Conservation of Energy to help you out.
    Kenetic energy is equal to 1/2 of the mass time the velocity squared
    KE = 1/2 m * v^2;
    Potential energy is equal Mass * Gravity (9.8) * Height.
    PE = m * g * h
    So if you have a car at the top of the track it is not moving but has PE.
    Then it rolls down a hill and PE transfers into KE.
    So if a car rolls from the top of a hill to a bottom of a dip, the speed can be found from those 2 equations
    1/2 * m * v^2 = m * g * h
    v = sqrt( 2 * g * h )

    Look for a physics book and look up motion with constant acceleration. Conservation of momentum and energy will also help you out.
    Im just curious what classes have you taken in physics/ what is your current level of education?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Frozen water found on Mars
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 55
    Last Post: 06-30-2008, 12:43 PM
  2. Computer science major?
    By aznprincess888 in forum A Brief History of Cprogramming.com
    Replies: 14
    Last Post: 03-26-2008, 06:49 AM
  3. Computer Science Major
    By Dark_Oppressor in forum A Brief History of Cprogramming.com
    Replies: 11
    Last Post: 11-20-2006, 08:18 AM
  4. General question about C++ Programming/Computer Science
    By learning C++ in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 01-05-2004, 09:18 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21