Open main menu

CDOT Wiki β

BetaT

Revision as of 16:52, 15 February 2017 by Jadach1 (talk | contribs)

BetaT

Assignment 1

Profile Assessment


Naiver Strokes equation for Flow Velocity.

There are a lot of different waves and equations, this one is based off the naiver-stokes equation.

All this program does is calculate the deviation of the wave. It will calculate the velocity and dip. The wave is only going in one direction and is going to drop but at what degree and velocity.

The wave equation takes the distance between wave trophs, so two waves and the distance between them. The height of the wave, and the amount of time it takes each wave to reach its destination. It will perform a calculation to give us the speed per second.

Navier–Stokes equations are useful because they describe the physics of many phenomena of scientific and engineering interest. They may be used to model the weather, ocean currents, water flow in a pipe and air flow around a wing. The Navier–Stokes equations in their full and simplified forms help with the design of aircraft and cars, the study of blood flow, the design of power stations, the analysis of pollution, and many other things. Coupled with Maxwell's equations they can be used to model and study magnetohydrodynamics. courtesy of wikipedia ("https://en.wikipedia.org/wiki/Navier%E2%80%93Stokes_equations")

The problem with this application comes in the main function trying to calculate the finite-difference

 // Finite-difference loop:
 for (int it=1; it<=nt-1; it++)
   {
     for (int k=0; k<=nx-1; k++)
   {
     un[k][it-1] = u[k][it-1];
   }
     for (int i=1; i<=nx-1; i++)
   {
     u[0][it] = un[1][it-1];
     u[i][it] = un[i][it-1] - c*dt/dx*(un[i][it-1]-un[i-1][it-1]);
   }
   }


The user inputs 2 values which will be used as a reference for the loop.

Testing the application

Test List

}
Naiver Equation
n for loop
100 x 100 23