The state of the sea, commonly called the sea state, is defined in terms of the
ID: 3862889 • Letter: T
Question
The state of the sea, commonly called the sea state, is defined in terms of the wind speed and the corresponding waves. Deepwater waves occur where the water depth is greater than one-half the wavelength. In the ocean, waves are generated by many sources, and they come together from many directions. The interaction of individual waves creates a complex set of waves with varying peaks and troughs. Assume that deep water waves can be modeled by: s(t) = A sin(2 pi ft +) where A is the amplitude, f is the frequency), and is the phase shift in radians. Analyze the interference patterns of two deep water waves, by developing a program that will: 1) Allow the user to enter the period and height for two waves. 2) Compute 100 points of the sum of the two waves over a period equal to the product of the two individual periods. 3) Find the maximum of the 100 points of the sum, and print an estimate of the maximum wave height of the combined waves plus the corresponding time (assume that the phase difference between the two waves is zero). Your solution must include: 1) Problem statement/definition 2) Input/Output Diagram Hand Example Algorithm C programExplanation / Answer
Find the below answers for the question asked
****************************
Problem statement:
The ocean of water is the state of the sea.
Waves commonly occurs in sea can also be called as
Deepwater waves.
Waves can occurs and it is generated by many sources
and they togeteher come from many directions
generating various peaks and troughs.
waves water can be modelled as
s(t)= Asin(2 *pie *f* t+ phase)
where A is Amplitude
f is Frequency
Problem definition:
We have to analyze the interference pattern of the deep water waves
using the equation s(t)= Asin(2 *pie *f* t+ phase)
ALGORITHM:
STEP 01:
TAKE THE INPUTS FROM THE USER TO ENTER THE PERIOD
AND HEIGHT FOR TWO Waves
STEP 02:
EQUATE THE SUM OF TWO WAVES WITH 100 POINTS
STEP 03:
CALCULATE MAX OF 100 POINTS OF THE SUM
STEP 04:
PRINT THE OUTPUT OF COMBINED WAVES AND THE TIME ASSUMING PHASE IS 0
*******************************
Program
#include <iostream>
#include <math.h>
#include <iomanip>
using namespace std;
#define PI 3.14159265
double s1Wave,s2Wave = 100.0;
double HundredPointsoftheSum =0;
int height,period;
int main() {
int height;
cout << "Please enter an height value: ";
cin >> height;
cout << "The value you entered for height is " << height;
cout << "Please enter the period ";
cin>> period;
cout <<"The value you entered for the period "<< period;
double s3=period*2;
double s4=s1Wave=s2Wave=100;
cout <<"100 PointsoftheSum of two waves =" << s3*s4;
double s5 =s3*s4;
cout << "Maximum of the 100 HundredPointsoftheSum =" << s5;
double s6= height;
double s7 = period;
double result = (height+period)*PI;
cout<<"The Maximum wave height of the combined waves plus the coresponding time: " << result;
return 0;
}
*******Result**************
input : 2 ,4
output : Please enter an height value: The value you entered for height is 2Please enter the period The value you entered for the period 4100 PointsoftheSum of two waves =800Maximum of the 100 HundredPointsoftheSum =800The Maximum wave height of the combined waves plus the coresponding time: 18.8496
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.