Functions to compute stress and strain in steel rod

Assignment Help C/C++ Programming
Reference no: EM1354776

Write a main function and the following functions to compute the stress and strain in a steel rod of diameter D (inches) and the length L (inches) subject to the compression loads P of 10,000 to 1,000,000 pounds in increments of 100,000 pounds. The modulus of elasticity E for steel is 30 X 106. A function to compute the stress from the formulas Stress f =P/A Where A=prD^2 / 4.0 A function to compute the strain from the formulas Elongated or shortened length ?L=fL/E Strain e=?L/L=f/E A function to output the stress and strain at different loads of P. 


Formatting instructions:required to write three functions: stress, strain, and output. 
The stress function takes two parameters ( load & diameter ) and uses these values to compute and return a single value representing the amount of stress. 

The strain function takes only a single parameter ( which is the stress value computed by the stress function ) and computes and returns the correct strain value. 

The output function takes three parameters (the load, stress, and strain ) and simply outputs each of these to the screen in a presentable format. 

The main program is what "calls" each of the functions.You are required to present what the stress and strain values would be for multiple samples of loads. Thus, your main program should loop through each required load value. Each loop iteration should call each of the three functions above. (Note: the length value is not required to calculate the result ) 

Output should look as follows: 
Enter diameter and length of rod: 10 10 

Load Stress Strain 
10000 127.323936 0.000004 
110000 1400.563354 0.000047 
210000 2673.802734 0.000089 
310000 3947.042236 0.000132 
410000 5220.281738 0.000174 
510000 6493.520996 0.000216 
610000 7766.760254 0.000259 
710000 9040.000000 0.000301 
810000 10313.239258 0.000344 
910000 11586.478516 0.000386 

Reference no: EM1354776

Questions Cloud

Explain find a business article about the importance : Explain find a business article about the importance of Integrity in business OR an example of integrity gone sour
Purposes of analysis : Eastern Telecom is planning to decide whether to increase its cash dividend immediately or use funds to rise its future growth rate. It will use the dividend valuation model originally presented in purposes of analysis.
Explain this week we continue the reports : Explain This week we continue the reports on the different countries and The second report is on the culture of each chosen country.
Problem regarding test anxiety : What are some examples of items you would include in an assessment of an individual's level of test anxiety? How would you evaluate the appropriateness of your items and each item's performance in the assessment?
Functions to compute stress and strain in steel rod : Write a main function and the following functions to compute the stress and strain in a steel rod of diameter D (inches) and length L (inches) subject to the compression loads P of 10,000 to 1,000,000 pounds.
Occupational-academic and counseling : Explain who is qualified to administer and interpret the measure and the settings such as occupational, academic, or counseling in which it would be appropriate to use the measure.
Explain what are some ways a new supervisor : Explain What are some ways a new supervisor can use power and authority effectively
Function to count number of times the given number occured : Write a main function to input 20 integers in the range of 1 to 6. Write a function to count the number of times the numbers 2 and 5 occur. The function should declare static variables count2 and count5.
Explain ways to collect the relevant data for evaluating : Explain Ways to collect the relevant data for evaluating the current situation and How should the raw data be selected for evaluating the project?

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create class integerset

Create class IntegerSet for which each object can hold integers in the range 0 through 100. Represent the set internally as a vector of bool values. Element a[i] is true if integer i is in the set. Element a[j] is false if integer j is not in the set..

  Develop a simple poker game

Develop a simple poker game

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Write a program to calculate students average test scores

Write a program to calculate students average test scores

  Design for storing the maze layout

Design and implement a C++ program for maze layout

  Program to store lists of names and ages in parallel arrays

Write a C++ program that stores lists of names (the last name first) and ages in parallel arrays and sorts the names into alphabetical order keeping the ages with the correct names.

  Write the code

Write a program that allows an instructor to keep a grade book. Each students has scores for exams, homework assignments, and quizzes.

  Calculate the trajectory of a soccer ball

Write a program to calculate the trajectory (flight path) of a soccer ball

  Computer programming techniques

Construct a program from a design and use appropriate functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Insert the missing code in the c program

You are to insert the missing code in the C program given for combinational equivalence checking. This program will interface with the CUDD package and will parse netlist files in ISCAS85 circuit format. Next, BDDs will be created for each circuit an..

  Prepare a program that uses at least two functions

Prepare a program that uses at least two functions that can be called from your main.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd