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

  C++ programming uml diagrams

The goal of this lab is to better familiarize you with polymorphism and the factory design pattern, two key components in Assignment

  Show the deatils of an emplyoee - c programming

Show the deatils of an emplyoee in a neat format.

  Using opengl to create a cube

Write a program in C/C++ using OpenGL to create (without using built in function) a cube by implementing translation algorithm by translating along 1. X-axis, 2.Y-axis and 3. X and Y plane

  Implementation of sorting technique

Implementation of sorting technique

  Iterative programming problem solving approaches

Write a recursive function void reverse ( ) that reverse a sentence

  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 required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Determine the meaof the numbers in the array

Determine the mean(average) of the numbers in the array, and output the reslt. Use a subprogram to input the numbers, a function to find the mean.

  Code to implement a staque

Write a C++ code to implement a Staque. Since the data structure is all about inserting and deleting numbers, it would be a good option to use a linked list to implement Staque.

  Design and implement a library system

Design and implement a library system that does the following: ? Takes details of a student/library users: first name, last name, other names, user ID number, and nationality.

  Create a base employee class

Create a base Employee class and a derived StudentEmployee class

  Write two short c programs and solve exam-style problem

Write two short C programs and solve four exam-style problems.

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