Sample model files with diagrams
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
 (626.34 KiB) Downloaded 803 times
 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
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
Re: Sample model files with diagrams
Hi Andras,
Here are some answers to your questions:
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
Here are some answers to your questions:
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
Re: Sample model files with diagrams
Also, a lot of modern text editors, if they detect fortran code, will indicate if you have gone over a line length, e.g. by italicizing or coloring your excess code differently. Mike can correct me if I'm wrong, but I've also seen "&" (ampersand) used as a continuation character in column 6.