Go Back   Physics Help Forum > High School and Pre-University Physics Help > Thermodynamics and Fluid Mechanics

Thermodynamics and Fluid Mechanics Thermodynamics and Fluid Mechanics Physics Help Forum

LinkBack Thread Tools Display Modes
Old Feb 14th 2010, 05:32 AM   #1
Junior Member
Join Date: Nov 2009
Posts: 3
Energy Values

Hi all,
I have written a program that numerically solves the Euler equations and it does this correctly. I am now trying to calculate the total energy at each time step using the following:
$\displaystyle E=\int_{0}^{L}{}\int_{0}^{L}\frac{1}{2}\rho (H(u^{2}+v^{2})+g\eta^{2})dxdy$
To calculate this I am using the following code:
for (int i = 1; i <= N-1; i++){
for (int j = 1; j <= N-1; j++){
double x = 0.5*rho*(H*(pow(u.getValue(i,j,N),2) + pow(v.getValue(i,j,N),2)) + g*pow(eta.getValue(i,j,N),2));//*Deltax*Deltay;
My question is this...
Do I need to include the dx and dy at the end of the calculation. I calculate the difference between the exact and the approximate after the energy reaches steady state and when I add the dxdy the value is huge 3.61x10^14. Since the lengthscale is 1,000,000 m and my grid is 10x10, dx and dy are 100,000 each. The analytic and numerical are supposed to converge as the number of grid sizes increases and they do but it is difficult to tell.
3.61x10^14, 2.7x10^14, 2.1x10^14...
when I don't include dxdy it is more like
908,767, 604,653, 477,999 ...
which seems more sensible

which of the following seem sensible for ocean gyre energy values?

7x10^15 J


230,000 J

really sorry for the long post
davefulton is offline   Reply With Quote
Old Feb 14th 2010, 01:20 PM   #2
Join Date: Feb 2010
Posts: 66
An typical electric heater uses 2000J every second.
empiler1 is offline   Reply With Quote

  Physics Help Forum > High School and Pre-University Physics Help > Thermodynamics and Fluid Mechanics

energy, values

Thread Tools
Display Modes

Similar Physics Forum Discussions
Thread Thread Starter Forum Replies Last Post
Solar energy to mechanical energy transformation thinhnghiem Light and Optics 1 Aug 30th 2016 10:51 AM
ionistaion energy of H atom and energy released ling233 Nuclear and Particle Physics 3 Oct 20th 2014 04:27 PM
Finding minimum values for problems hooperoo Kinematics and Dynamics 2 Aug 3rd 2013 04:28 PM
voltage values stealth Electricity and Magnetism 1 Feb 28th 2010 11:37 PM
Is the increase in kinetic energy equal to the decrease in potential energy? s3a Energy and Work 1 May 28th 2009 07:02 PM

Facebook Twitter Google+ RSS Feed