{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

a4_cee3804_2011

# a4_cee3804_2011 - CEE 3804 Computer Applications in Civil...

This preview shows pages 1–2. Sign up to view the full content.

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 so-called basic resistance of a high-speed 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 train-specific 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 High-Speed 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 s-s/m-m 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 high-speed train for a range of velocities ranging from 1 to 85 m/s. In your analysis create VBA code that includes a FOR-NEXT 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 High-Speed 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.

{[ snackBarMessage ]}

### Page1 / 5

a4_cee3804_2011 - CEE 3804 Computer Applications in Civil...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online