CEE 3804: Computer Applications in Civil Engineering
Spring 2011
Assignment 4: VBA Programming
Date Due: March 1, 2011
Instructor: Trani
Problem 1
A simple equation to predict the socalled basic resistance of a highspeed rail system (
R
basic
) moving at speed (
v
) is given by
Davis’ equation and shown below. This equation includes the resistance due to aerodynamic drag and axle load friction
resistance (i.e., resistance between train steel tires and the rail track).
R
basic
=
A
+
Bv
+
Cv
2
where:
A
,
B
,and
C
are trainspecific coefficients and
v
is the train speed in meters per second. The values of
A
,
B
,and
C
are determined using wind tunnel testing and actual testing of the trains in test tracks. The values of
A
,
B
,and
C
for a Japanese HighSpeed Train of the series Shinkasen 300 (see
http://en.wikipedia.org/wiki/Shinkansen
) are
provided below with their corresponding units.
A = 8.20200;
% units are kN
B = 0.10656;
% units are kN s/m
C = 0.01193;
% units are kN ss/mm
Note that the units of A, B and C are consistent to produce a basic resistance of the train in kiloNewtons.
Task 1:
Create a VBA program (i.e., a subroutine) to estimate the basic resistance for the highspeed train for a range of velocities
ranging from 1 to 85 m/s. In your analysis create VBA code that includes a FORNEXT loop to estimate the resistance at various
speeds (in meters/second). Create a run button to execute the code from within the Excel interface. The VBA code should write
the header for velocity and resistance in the 10th row of the Excel spreadsheet. Make sure you place your name and the time of
creation in the Excel spreadsheet. Declare all program variables using the Option Explicit statement.
Task 2:
Improve the code created in Task 1 by adding a separate worksheet to the problem. In this new worksheet include the
description of the problem and add slider controls to set the values of A, B and C to simulate other versions of the HighSpeed
Train family of trains. The interface should let the user select the lower and upper bound of the speeds to be computed in the
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview.
Sign up
to
access the rest of the document.
 Spring '07
 AATrani
 Visual Basic for Applications, Highspeed rail, VBA program, Trani, basic resistance

Click to edit the document details