Write a cpp program to calculate the liquid level of a tank

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

INTRODUCTION TO PROGRAMMING

DESIGN PROJECT 1: C++ PROGRAM TO CALCULATE THE LIQUID LEVEL OF A TANK

Spring 2016 Problem Statement: A tank is shown in Figure 1. The tank had four inlet pipes (A, B, C, and D) each controlled by a valve and an outlet pipe (E).

614_Tank Diagram.png

Figure 1. Tank Diagram

The initial level of liquid in the tank at time zero or t(0) is 495 gallons. Inlet A has a flow rate of 5 gallons per second. The valve for inlet A is open for 10 seconds and then closes for 10 seconds and this cycle repeats as shown in Figure 2.

1391_Inlet A Flow Rate.png

Figure 2. Inlet A Flow Rate

Inlet B has a flow rate of 10 gallons per second. The valve for inlet B is open for 20 seconds and then closes for 20 seconds and this cycle repeats. Inlet C has a flow rate of 2.5 gallons per second. The valve for inlet C is open for 5 seconds and then closes for 5 seconds and this cycle repeats. Inlet D has a flow rate of 7.5 gallons per second. The valve for inlet D is open for 15 seconds and then closes for 15 seconds and this cycle repeats. Liquid continually flows out of outlet E at a rate of 20 gallons per second.

Develop a computer program using the engineering problem solving methodology to determine at which time the tank will be empty based upon the following conditions.

• If the valve for inlet A is open meaning liquid in flowing into the tank from inlet A, then the flow rate of inlet B is reduced by one half.
• The valve for inlet C can only be open if the valves for inlet A or B are closed.
• The valve for inlet D can only be open if two of the other three valves are open.

The results of the program should show in table format

A. Time steps (increments) of one second and the sum of the inlet flow rates (A+B+C+D) based on the above conditions
B. Time steps and the level of liquid in the tank. (Hints see page 142 of textbook_for an example of a C++ program to put values in a table and the tank will he empty before60 seconds or OM.
C. The program should also contain at least one if statement, one iflelse statement, one switch statement, and either a while loop or for loop.

Reference no: EM131028315

Questions Cloud

How many different combinations are there : A person has 3 different letters to write, 2 interviews to do, and 2 commercials to review. In making aschedule, (first, second, etc.) how many different combinations are there?
Create a script that presents a word guessing game : Create a script that presents a word guessing game. allow users to guess the word one letter at a time by entering a character in a form. start by assigning secret word to a variable.
Calculate the dc voltage that would be measured across r2 : Calculate the dc voltage that should exist across R2 without the Voltmeter present. Calculate the dc voltage that would be measured across R2 using a 10 kΩ/V analog voltmeter set to the 10-V range.
Briefly describe the supply chain management system : Briefly describe the supply chain management system. Review the product procurement process (product flow). Describe the activities used to coordinate key players in the product procurement process.
Write a cpp program to calculate the liquid level of a tank : C++ PROGRAM TO CALCULATE THE LIQUID LEVEL OF A TANK. Develop a computer program using engineering problem solving methodology to determine at which time tank will be empty based upon the following conditions.
Research paper outline based on the information below : One of the central concerns of the sociology of development is change. In societies of all times there is change affecting every realm of life social, economic, cultural, technological, demographic, ecological and so on.
Role of colonization : Study the development process of Jamaica by addressing the main themes covered in the textbook: role of colonization/path to independence/nation formation; early development policies; impact of neoliberalism and globalization on the economy and so..
Understanding of processes of global social change : The questions will focus on your understanding of processes of global social change. Your answers should be essays of 150 words each. 1. What are the global benefits of improving women's living conditions and status around the world?
Critics view literature through lens of modern psychology : "Critics view literature through the lens of modern psychology, exploring human behavior (conscious, subconscious and unconscious), literary language and symbolism

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  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.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  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.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

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

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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