## Sample model files with diagrams

Fortran model files with standardized descriptions.
mneely
Posts: 235
Joined: Tue Nov 08, 2011 11:08 am
Contact:

### Sample model files with diagrams

Attached is a .zip archive with several example model files which can be used in Pmetrics. Each has a corresponding .jpg diagram. The files can be edited/customized using any text editor.
Attachments
Models.zip
Model templates

Andras Farkas
Posts: 53
Joined: Thu Nov 17, 2011 9:15 am
Location: Teaneck, NJ
Contact:

### Re: Sample model files with diagrams

Michale,
couple of questions:

1. in the fortran model files, how many characters long can an equation be?
2. if the equation did not fit in 1 row, do we have to put in any special character either to the end of the first row or at the start of the second row or both?

thanks,

Andras

uphill
Posts: 9
Joined: Wed Apr 18, 2012 8:59 am

### Re: Sample model files with diagrams

Hi Andras,

The Fortran statements should be between columns 7 and 72 (inclusive), with the following exceptions:
Column 6 is reserved for a continuation character (e.g., "1" or "2" or "x") if the line is a continuation from
the previous line. Nothing in the previous line tells Fortran the line will be continued.
Columns 1 - 5 are used for numerical labels, which allow a line to be transferred to from another line.

Example:

IF(A .GT. B) GO TO 10

A = B * C - D
GO TO 20

10 A = B - D

20 CONTINUE

Note: Except for format statements, I almost never write code which continues from one line to the next, because
it can be very hard to verify the code is doing what it is supposed to do. The following example shows how
a long statement (which needs two lines) can be broken into smaller statements which are easier to understand:

A = ((B*COS(DEXP(-2.D0*3.14159))*5.784 + (C*SIN(DEXP(2.D0*3.14159
1))*6.9432)/(3.679 - 7.532*TAN(4.21*3.14159))

PI = 3.14159
F1 = B*COS(DEXP(-2.D0*PI))
F2 = C*SIN(DEXP(2.D0*PI))
TOP = F1*5.784 + F2*6.9432
BOT = 3.679 - 7.532*TAN(4.21*PI)
A = TOP/BOT

mneely