Rb-01k.pdf

download Rb-01k.pdf

of 35

Transcript of Rb-01k.pdf

  • 8/11/2019 Rb-01k.pdf

    1/35

    RULE BOOK - ATP -

    ALTERNATIVE TRANSIENT PROGRAM

    CAUE - COMITE ARGENTINO DE USUARIOS DE EMTP - ATPhttp://iitree.ing.unlp.edu.ar/estudios/caue/index.htmBuenos Aires / diciembre 2001

    RB-01K.PDF

    I - K $INCLUDE use for data modularization (includingarguments)

    1K-1/5

    I - L Separate interactive plotting programs 1L-1/2I - L - 1 TPPLOT for sophisticated, single window, plotting 1L1-1/8I - L - 2 WINDOWPLT for simpler, multiple window, plotting 1L2-1/5I - L - 3 MS-DOS interactive plotting program PCPLOT by

    Mustafa Kizilcay

    1L3-1/8

    I L - 4 $Parameters 1L4-1/4I - M Pocket Calculator

  • 8/11/2019 Rb-01k.pdf

    2/35

  • 8/11/2019 Rb-01k.pdf

    3/35

  • 8/11/2019 Rb-01k.pdf

    4/35

  • 8/11/2019 Rb-01k.pdf

    5/35

  • 8/11/2019 Rb-01k.pdf

    6/35

  • 8/11/2019 Rb-01k.pdf

    7/35

  • 8/11/2019 Rb-01k.pdf

    8/35

  • 8/11/2019 Rb-01k.pdf

    9/35

  • 8/11/2019 Rb-01k.pdf

    10/35

  • 8/11/2019 Rb-01k.pdf

    11/35

  • 8/11/2019 Rb-01k.pdf

    12/35

  • 8/11/2019 Rb-01k.pdf

    13/35

  • 8/11/2019 Rb-01k.pdf

    14/35

  • 8/11/2019 Rb-01k.pdf

    15/35

  • 8/11/2019 Rb-01k.pdf

    16/35

  • 8/11/2019 Rb-01k.pdf

    17/35

  • 8/11/2019 Rb-01k.pdf

    18/35

  • 8/11/2019 Rb-01k.pdf

    19/35

  • 8/11/2019 Rb-01k.pdf

    20/35

  • 8/11/2019 Rb-01k.pdf

    21/35

  • 8/11/2019 Rb-01k.pdf

    22/35

  • 8/11/2019 Rb-01k.pdf

    23/35

  • 8/11/2019 Rb-01k.pdf

    24/35

  • 8/11/2019 Rb-01k.pdf

    25/35

  • 8/11/2019 Rb-01k.pdf

    26/35

  • 8/11/2019 Rb-01k.pdf

    27/35

  • 8/11/2019 Rb-01k.pdf

    28/35

  • 8/11/2019 Rb-01k.pdf

    29/35

  • 8/11/2019 Rb-01k.pdf

    30/35

  • 8/11/2019 Rb-01k.pdf

    31/35

    2

    as __MILLIHENRIES__ might be used as illustrated in DCNEW-19. For long names, it is convenient to

    add underscore characters as just illustrated. As explained in Section I-M, an underscore character is as good

    as any letter to indicate the start of a data symbol name. It also can be used freely within the interior of the

    name, and at the end of the name.

    About timing of replacements, the user is offered two choices. If nothing extra is done, data symbol

    evaluation, and replacement in all following data cards, occur at the time the $PARAMETER cards are

    decoded as ATP data. This is the timing of other $-cards such as $UNITS: execution is delayed until the

    card is encountered in natural order as ATP data. Then, the value of each numerical symbol will be confirmedin interpretation. As an illustration, consider Gabor Furst's use to vary resistance as a function of frequency

    in DCNEW-26. The following evaluation occurred on the first pass, with loop counter KNT = 1:Request precedes analytic symbol definitions. |$PARAMETER { This will be serviced by CIMAGE just as any other $-..

    Parameter 1 defined. Value = 2.000000E+00 |RESISTANCE = 2.0 * (1.0 + 0.2 * (KNT - 1.0) ** 1.5)) { Funk-Hantel freq. depen

    Lack of "=" terminates $PARAMETER definitions. |BLANK card ends $PARAMETER definitions that are processed just b4 branch card

    START ONLY is the something extra which, when added to $PARAMETER, will alter the otherwise

    natural timing of use. $PARAMETER START ONLY serves to advance usage to the beginning of execution

    --- before any $INCLUDE or /-card processing for data sorting by class (see Sections I-J and I-K). After

    the output of dynamic dimensioning, and before the heading that precedes the first line of data card

    interpretation, will be found confirmation of the replacement. This is illustrated by DCNEW-19, which

    involved only one such parameter. This parameter, FIVEK, involved no mathematics: Supplemental offsets. | 240000 742

    Next parameter: just simple string replacement. |FIVEK= '5.E+3' Alternative Transients Program (ATP), Salford 80386 translation. ...

    Later, when the same data cards are encountered as part of normal data input and interpretation, no action

    will be taken, although presence of $PARAMETER START ONLY will be noted. From DCN19.LIS,

    truncated on the right: Marker card preceding new EMTP data case. |BEGIN NEW DATA CASE

    Request precedes analytic symbol definitions. |$PARAMETER START ONLY Blank card ends $PARAMETER block being ignored. |BLANK card ends $PAR

    Users of START ONLY are warned about limits of mathematics. Program variables such as DELTAT or

    KNT have not yet been defined, so their use is meaningless. Simple character replacement (case 1) without

    mathematics will operate normally, however --- but only in the original data file. Operation will not extendinside any $INCLUDE file that might be referenced by the original file. This is by design.

    POCKET CALCULATOR VARIES PARAMETERS (PCVP) is a request word that commonly is used

    in conjunction with $PARAMETER definitions. Yet, PCVP is just one powerful application. It is not a

    requirement. In fact, $PARAMETER was developed before PCVP. For details about PCVP, see Section

    II-A. In the illustration above, variable KNT is the pass number of the PCVP loop. It has values 1, 2, 3, etc.,

    and is the one and only deterministic, independent variable of a PCVP study. Typically network parameters

    will be made a function of KNT, although randomness is an alternative.

    If one symbol is contained within another, the longer must be defined before the shorter This is illustrated

    in DCNEW-19. Note that 16-byte __MILLIHENRIES__ precedes 6-byte MILLIH. If the opposite order

    were attempted (i.e., if MILLIH were defined first), execution would be terminated with an error message

    as documented on comment cards. Reason for this should be obvious: The longer symbol must not be

    corrupted by replacement of the shorter one within. This has to do with obvious corruption that would result

    from original names.

    Repeated replacement is a danger about which the user must be warned. The preceding paragraph had to

    do with original data symbol names. It is only these that are protected. But substitution of the second or later

    symbol will occur using data that was modified by the first substitution. Rather than original (incoming) data,

  • 8/11/2019 Rb-01k.pdf

    32/35

    3

    it is current data, at the instant of use, that is considered for substitution. The process is dynamic, not static.

    ATP thus might find and act upon a match that was not present in the original data. Beware.

    Each data symbol definition is limited to a single line. Continuation lines are not allowed. However, for

    the numeric case (not simple character substitution), the right hand side can include one or more

    previously-defined intermediate variables as explained in the next paragraph. Intermediate variables are more

    flexible and efficient than continuation lines.

    $$ (two consecutive dollar signs) is applied to a numeric symbol definition to indicate an intermediatevariable as opposed to a data symbol. Normally the $$ will be applied on the right, where it is conspicuous,

    although in fact any one location is as good as any other. By definition, an intermediate variable is not a data

    symbol. That is, it is not to be searched for, and replaced, in data that follows the blank card ending

    $PARAMETER definitions. Rather, it is a temporary variable that should appear as part of the definition

    of one or more later data symbols defined within the same $PARAMETER group. For a trivial illustration

    of use, see the 5th subcase of DCNEW-25. About storage, intermediate variables contribute nothing to

    $PARAMETER tables. Their use does not affect possible table overflow (see later paragraph). They are a

    burden on storage of the pocket calculator, but not on the storage of $PARAMETER itself.

    An induction motor model from Orlando Hevia in Sante Fe, Argentina, provided an industrial-strength test

    of the new intermediate variables during mid-October of 1998. Working with HFS author Gabor Furst, Mr.Hevia named his file GABMOT.DAT It began by using nine variables to hold nine motor constants. For

    example, the 7thwould seem to specify the rated horsepower: HP = 400.0 $$

    Next came formulas defining four more intermediate variables. The first two of these, which seem to define

    rotor and stator resistance, follow: RROTOR = EFF*SLIP/((1.0-SLIP)*PF) $$

    RSTATO = PF*(1.0-EFF/(1.0-SLIP)) $$

    Finally, five formulas define data fields of series R-L-C branches that represent the motor during a phasor

    solution. Two of the five follow as an illustration. L1____ = PUZ * X1MOT / OMEGAB

    R1H___ = ( PUZ * R1 ) / HSNote that this initial usage was for the old, narrow format. More accuracy is offered by the wide, 16-byte

    alternative, of course.

    Quotation marks may be used to distinguish EMTP symbols from user data symbols. This was an early

    decision associated with the Powell pocket calculator, and was explained in the April, 1997, issue of the

    newsletter. Quotation marks no doubt will continue to be honored forever for this purpose. But are they

    necessary? The author does not believe so. Although some risk of false identification is involved, ATP

    should be capable of telling the difference between the user's data symbol names and EMTP symbol names.

    All user symbol names will be searched first. Only if a name has not been defined by the user will ATP tables

    be searched for it. Quotation marks ceased to be a requirement, and were removed from the 1st subcase of

    DCNEW-19, on 28 November 1998. More than just notation is involved in the difference, it should beexplained. Names within quotation marks are handled differently than names without them. In fact, use of

    quotation marks might result in a slight loss of floating-point precision. This is because optimal numerical

    encoding within a field of width 17 is involved. With one byte required for a decimal point and another for

    a possible minus sign, this leaves just 15 digits (slightly less than precision of the REAL*8 computation).

    Without quotation marks, such encoding is bypassed. As time passes, techniques improve.

    Variable dimensioning of $PARAMETER storage has not yet been performed. As a result, storage is

    capable of overflowing. There are 3 independent limits: 1) 20 = maximum number of data symbols; 2) 300

    = sum of all lengths of all data symbols; and 3) 333 = maximum number of substitutions (later occurrences

  • 8/11/2019 Rb-01k.pdf

    33/35

  • 8/11/2019 Rb-01k.pdf

    34/35

  • 8/11/2019 Rb-01k.pdf

    35/35

    2) "Ready to overflow limit of 25 on intermediate variables ..." For a discussion of intermediate variables,

    see $$ within the $PARAMETER instructions of Section I-L. Although intermediate variables are not

    limited to $PARAMETER use, this is the dominant initial exploitation.

    3) "Ready to overflow limit of 80 on FORTRAN statement ..." This refers to the maximum number of

    non-blank bytes of each single analytical expression. Initially, the limit is being held to 80. But in fact, the

    character strings that hold a statement are longer, and it is expected that the limit will expand with time and

    usage.

    4) "Ready to overflow limit of 500 on assembly language ...." This refers to storage of the compiler output.Since all models that are used in the time-step loop must be stored simultaneously, it is such usage that most

    commonly will threaten the storage limits of output.

    5) "Overflow limit of 20 on parenthesis pairs ..." This limit applies to each FORTRAN statement, of

    course. It easily could be expanded, if a practical need might ever be demonstrated.