Difference between revisions of "Test"
From www.coria-cfd.fr
(Created page with "<math>m_{\frac k {\sqrt 2}}</math> <syntaxhighlight lang="cpp"> #include <iostream> int main() { std::cout << "hello" << std::endl; exit(0); } </syntaxhighlight>") |
|||
| (5 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
| − | < | + | The notations of this documentation are given hereafter<ref>Most thermodynamic variables are defined for a given system which turns out to be a computational cell in SITCOMB.</ref>: |
| − | + | {| class="wikitable" | |
| − | + | !Notation||Explanation | |
| − | + | |- | |
| − | + | |<math>m_k</math>||mass of species k in the system | |
| − | + | |- | |
| − | + | |<math>m</math>||mass of the system | |
| − | </ | + | |- |
| + | |<math>Y_k</math>||mass fraction of species k in the system | ||
| + | |- | ||
| + | |<math>X_k</math>||molar fraction of species k in the system | ||
| + | |- | ||
| + | |<math>\mathbf{u}</math>||ensemble velocity of the fluid | ||
| + | |} | ||
| + | |||
| + | <source lang="fortran"> | ||
| + | PROGRAM CALCULATE | ||
| + | ! | ||
| + | ! Program to calculate the sum of up to n values of x**3 | ||
| + | ! where negative values are ignored. | ||
| + | ! | ||
| + | IMPLICIT NONE | ||
| + | INTEGER I,N | ||
| + | REAL SUM,X,Y | ||
| + | READ(*,*) N | ||
| + | SUM=0 | ||
| + | DO I=1,N | ||
| + | READ(*,*) X | ||
| + | IF (X.GE.0.0) THEN | ||
| + | Y=X**3 | ||
| + | SUM=SUM+Y | ||
| + | END IF | ||
| + | END DO | ||
| + | WRITE(*,*) 'This is the sum of the positive cubes:',SUM | ||
| + | END | ||
| + | </source> | ||
| + | |||
| + | ==Notes== | ||
| + | <references/> | ||
Latest revision as of 17:11, 22 December 2010
The notations of this documentation are given hereafter[1]:
| Notation | Explanation |
|---|---|
| mass of species k in the system | |
| mass of the system | |
| mass fraction of species k in the system | |
| molar fraction of species k in the system | |
| ensemble velocity of the fluid |
PROGRAM CALCULATE
!
! Program to calculate the sum of up to n values of x**3
! where negative values are ignored.
!
IMPLICIT NONE
INTEGER I,N
REAL SUM,X,Y
READ(*,*) N
SUM=0
DO I=1,N
READ(*,*) X
IF (X.GE.0.0) THEN
Y=X**3
SUM=SUM+Y
END IF
END DO
WRITE(*,*) 'This is the sum of the positive cubes:',SUM
END
Notes
- ↑ Most thermodynamic variables are defined for a given system which turns out to be a computational cell in SITCOMB.