Help with Acceleration Calculations in Visual Basic

  • Thread starter Thread starter bsharp
  • Start date Start date
AI Thread Summary
The discussion focuses on a project involving acceleration calculations in Visual Basic. The user seeks assistance in determining the time and distance required to accelerate from one velocity to another at a specified rate. They have shared their code, which calculates the time to reach maximum velocity and the average velocity, yielding results that appear correct. The user expresses confusion over the calculations despite achieving accurate outputs. The conversation highlights the challenges of understanding acceleration concepts in programming.
bsharp
Messages
7
Reaction score
0
I am working on a project of my own and need a little help. I am writing a program in Visual Basic that involves some precise calculations of Acceleration. I have looked over quite a bit of information and examples on the web and I am more confused now than when I started. I am sure you all have been here at one point or another.

Basically I need to

1: Find the Time it takes to accelerate at a specified rate to a specified velocity from specified velocity.

2: Find the distance it takes to accelerate at a specified rate from a specified velocity to specified velocity

Below is what I have been playing around with in VB. I think I have confused my self.

'in inches per second/second
Dim MaxAcceleration As Double = 200

'in seconds
Dim MaxAcceltime As Double

'in inches
Dim MaxAcceldistance As Double


'inches per second/second
Dim MaxVelocity As Double = 6000
Dim SetVelocity As Double = 20
Dim IntVelocity As Double = 0
Dim AverageVelocity As Double


' The time it takes to go from 0 to Max Velocity in seconds
'Max Acceleration time
MaxAcceltime = ((MaxVelocity - IntVelocity) / MaxAcceleration)

' I get 30.0


' The Average Velocity
AverageVelocity = ((IntVelocity + MaxVelocity) / 2)

'I get 3000.0


'The distance required to go from 0 to Max Velocity
'MaxAccel Distance in inches
MaxAcceldistance = (AverageVelocity * MaxAcceltime)

' I get 90000.0
 
Engineering news on Phys.org
Nice work, bsharp. Your equations and answers are correct.
 
Looks good...

But you might want to edit the comment line on your velocity variables...
bsharp said:
'inches per second/second
Dim MaxVelocity As Double = 6000
Dim SetVelocity As Double = 20
Dim IntVelocity As Double = 0
Dim AverageVelocity As Double


units should be inches per second.
 
Thank you for the reply's. Some times thinking your incorrect and actually being correct is just as bad as thinking your correct and being incorrect. Although I guess it saves on finding out later on.
 
Thread 'Physics of Stretch: What pressure does a band apply on a cylinder?'
Scenario 1 (figure 1) A continuous loop of elastic material is stretched around two metal bars. The top bar is attached to a load cell that reads force. The lower bar can be moved downwards to stretch the elastic material. The lower bar is moved downwards until the two bars are 1190mm apart, stretching the elastic material. The bars are 5mm thick, so the total internal loop length is 1200mm (1190mm + 5mm + 5mm). At this level of stretch, the load cell reads 45N tensile force. Key numbers...
After over 25 years of engineering, designing and analyzing bolted joints, I just learned this little fact. According to ASME B1.2, Gages and Gaging for Unified Inch Screw Threads: "The no-go gage should not pass over more than three complete turns when inserted into the internal thread of the product. " 3 turns seems like way to much. I have some really critical nuts that are of standard geometry (5/8"-11 UNC 3B) and have about 4.5 threads when you account for the chamfers on either...
Back
Top