CodeCogs - An iteractive open source Numerical library Welcome... Login
CodeCogs
shopping cart
OSXWindowsLinux
Search CodeCogs
Numerical Components

Valid RSS

EngineeringThermodynamics

work

Freely available under GPL terms only
get a GPL licence
viewed 33 times and licensed 5 times

Computes the work done by a thermal machine. Computes the work done by a thermal machine.

Controller: johnylol  Contact Controller
+View version details
Contents hide toc
get GPL

Interface

#include <codecogs/engineering/thermodynamics/work.h>

double work (double in_heat, double out_heat, int cycle)[inline]
Computes the work done by a thermal machine. Computes the work done by a thermal machine.

Function Documentation

Work Calculator
  
Add calculator to website or email
 
doubleworkdoublein_heat
doubleout_heat
intcycle )[inline]
According to Thermodynamics second law, a thermal machine works in cycles receiving and losing heat and receiving or doing work. (Act as a machine or refrigerator)

Q_{1} - Q_{2} = W

Q_{1} ~~ is ~the~ incoming~ heat\par  Q_{2} ~~ is~ the~ lost~ heat\par  W ~~ is~ the~ work~ done~/~received
Example 1:
The work done by a machine receiving 10J of heat and losing 4J to ambient, with cycle in clockwise direction
printf("%d",work(10,4,1));
Output: 6
Output: 6
Note:
Input for cycle must be -1 or 1 (counter-clockwise and clockwise), if a value different from those is inputted, the function will return 0.
Parameters:
in_heatThe incoming heat (Any value)
out_heatThe lost heat to ambient(Any value)
cycleThe cycle direction ( 1 for clockwise, -1 for counter-clockwise )
Returns:
The work done by the machine
Authors:
Johny Void (November 2008)
Source Code:

To view or download source code you need a GP Licence.

get GPL

Not a member, then Register with CodeCogs. Already a Member, then Login.


Page Comments

Format Excel Equations

  You must login to leave a messge


Last Modified: 28 Nov 08 @ 08:30     Page Rendered: 2010-03-11 01:36:29

Valid CSS!   Valid XHTML 1.0 Transitional