⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 help.c

📁 电力系统分析计算 学习调试程序 UNIX / LINUX / CYGWIN 系统使用
💻 C
📖 第 1 页 / 共 2 页
字号:
/* AC/DC Power Flow Help. */#include <stdlib.h>//#ifndef WINDOWS//#include <stdio.h>//#else#include "pfwstdio.h"//#endif#include <string.h>#include "param.h"#ifdef ANSIPROTOvoid ErrorStop(char *Msg);#elsevoid ErrorStop();#endif/* ---------------------- ErrorStop ------------------------------------ */#ifdef ANSIPROTOvoid ErrorStop(char *Msg)#elsevoid ErrorStop(Msg)char *Msg;#endif{  fCustomPrint(stdout,"UW Continuation Power Flow (c)1992,1996,1999, 2006 C. Canizares, F. Alvarado and S. Zhang.\n");  if (!NullName(Msg)) fCustomPrint(stdout,"Error: %s\n",Msg);  fCustomPrint(stdout,"\n");  fCustomPrint(stdout,"Usage:\n");  fCustomPrint(stdout,"       Like any other UNIX program, i.e., command-line options (-option)\n");  fCustomPrint(stdout,"       with redirection of output (>) from screen into files:\n");  fCustomPrint(stdout,"\n");  fCustomPrint(stdout,"              uwpflow  [-options]  input_file   [[>]output_file]\n");  fCustomPrint(stdout,"\n");  fCustomPrint(stdout,"Input file:\n");  fCustomPrint(stdout,"       The input_file could be in WSCC/BPA/EPRI format (or Anarede's variation)\n");  fCustomPrint(stdout,"       or IEEE common format (or Electrocon's variation) for the ac system.\n");  fCustomPrint(stdout,"       Other AC formats may be used (see options below).\n");  fCustomPrint(stdout,"       The dc data could be on either WSCC/BPA or multiterminal EPRI format,\n");  fCustomPrint(stdout,"       although it just deals with the standard two-terminal HVDC problem.\n");  fCustomPrint(stdout,"       The FACTS devices format was specifically designed for this program and\n");  fCustomPrint(stdout,"       is explained in the help file and test systems provided with the program.\n");  fCustomPrint(stdout,"\n");  fCustomPrint(stdout,"Output files:\n");  fCustomPrint(stdout,"       The program writes the solution into the output_file in ASCII.  It\n");  fCustomPrint(stdout,"       can also write the solved case in a file in IEEE common format\n");  fCustomPrint(stdout,"       using the -W or -w option (HVDC links are written in EPRI's ETMSP format\n");  fCustomPrint(stdout,"       and FACTS devices are written in their own format).\n");  fCustomPrint(stdout,"       Additional files can be created for post-processing analyses (see\n");  fCustomPrint(stdout,"       options below), such as the bifurcation diagram (nose curve) in column\n");  fCustomPrint(stdout,"       form for plotting with MATLAB or Octave, Jacobians for SMMS or\n");  fCustomPrint(stdout,"       MATLAB/Octave studies, etc.\n");  fCustomPrint(stdout,"\n");  fCustomPrint(stdout,"Solution Technique:\n");  fCustomPrint(stdout,"       The power flows are solved with simultaneous N-R, allowing for\n");  fCustomPrint(stdout,"       asynchronous systems, area interchange, remote voltage control, and\n");  fCustomPrint(stdout,"       local and remote regulating transformers (LTCs and phase shifters\n");  fCustomPrint(stdout,"       controlling voltages, angles, and/or active and reactive power flows).\n");  fCustomPrint(stdout,"\n");  fCustomPrint(stdout,"Options:\n");  fCustomPrint(stdout,"         -a     Turns off tap and angle limits in regulating transformers.\n");  fCustomPrint(stdout,"\n");  fCustomPrint(stdout,"         -A     Turns off interchange area control.\n");  fCustomPrint(stdout,"\n");  fCustomPrint(stdout,"         -b     Solve base case before changing the loading factor lambda.\n");  fCustomPrint(stdout,"\n");  fCustomPrint(stdout,"         -Bnum  PQ bus number 'num' where the voltage is fixed in order to\n");  fCustomPrint(stdout,"                find the loading factor (lambda) for voltage collapse studies.\n");  fCustomPrint(stdout,"                Must be used with -K and -v options.\n");  fCustomPrint(stdout,"\n");  fCustomPrint(stdout,"         -cfile Increases the loading factor lambda using a continuation\n");  fCustomPrint(stdout,"                method for finding voltage profiles.\n");  fCustomPrint(stdout,"                The output (optional 'file') is a list of max. 8 ac voltages\n");  fCustomPrint(stdout,"                that change the most, plus 3 additional variables for each dc\n");  fCustomPrint(stdout,"                bus and for each generator (see -e and -3 options).\n");  fCustomPrint(stdout,"                Must be used with the -K option.\n");  fCustomPrint(stdout,"\n");  fCustomPrint(stdout,"         -Cfile Direct method studies, i.e., find the max. loading factor\n");  fCustomPrint(stdout,"                lambda for a given generation and load direction. The base case\n");  fCustomPrint(stdout,"                loading can be initialized using the -L option; however, the\n");  fCustomPrint(stdout,"                program calculates an initial loading of the system before the\n");  fCustomPrint(stdout,"                direct method is applied.  The left e-vector is written in\n");  fCustomPrint(stdout,"                'file' (optional).  Must be used with the -K option.\n");  fCustomPrint(stdout,"\n");  fCustomPrint(stdout,"         -d     Generates some debug output.\n");  fCustomPrint(stdout,"\n");  fCustomPrint(stdout,"         -Dfile Read load model data from 'file', using Ontario Hydro (OH)\n");  fCustomPrint(stdout,"                format, which is based on the load model: Pl=Pn*V^a+Pz*V^2\n");  fCustomPrint(stdout,"                                                          Ql=Qn*V^b+Qz*V^2\n");  fCustomPrint(stdout,"                If a bus is not defined in the list, Pn=Qn=0 is assumed.\n");  fCustomPrint(stdout,"\n");  fCustomPrint(stdout,"         -e     Output 3 dc variables per dc link, and 3 internal variables for\n");  fCustomPrint(stdout,"                generators in the output list during the continuation process\n");  fCustomPrint(stdout,"                (see the -i option).\n");  fCustomPrint(stdout,"\n");  fCustomPrint(stdout,"         -Efile Print in 'file' the continuation method direction vector at the\n");  fCustomPrint(stdout,"                maximum loading factor (PoC right e-vector).\n");  fCustomPrint(stdout,"\n");  fCustomPrint(stdout,"         -fnum  Output Sensitivity Factors (SF) and Voltage Sensitivity Factors\n");  fCustomPrint(stdout,"                (VSF and tangent vector) during continuation computations.\n");  fCustomPrint(stdout,"                The number 'num' defines the bus for which the voltage entry\n");  fCustomPrint(stdout,"                and rank in the tangent vector are printed out (Tangent Vector\n");  fCustomPrint(stdout,"                Index); if this number is not defined, the program chooses the\n");  fCustomPrint(stdout,"                bus with the maximum initial voltage entry in the tangent\n");  fCustomPrint(stdout,"                vector.\n");  fCustomPrint(stdout,"\n");  fCustomPrint(stdout,"         -Fval  Stability/sparsity value 'val' for factorization (def. 0.01).\n");  fCustomPrint(stdout,"                A value of 0 means choose a pivot based on sparsity only;\n");  fCustomPrint(stdout,"                a value of 1 means choose a pivot based on stability only.\n");  fCustomPrint(stdout,"\n");  fCustomPrint(stdout,"         -g     Force Q in generators to zero when reading data in IEEE\n");  fCustomPrint(stdout,"                common format, since sometimes a value of Qg creates\n");  fCustomPrint(stdout,"                convergence problems.\n");  fCustomPrint(stdout,"\n");  fCustomPrint(stdout,"         -G     Turns off recovery from some ac device limits in the program.\n");  fCustomPrint(stdout,"                For example, the program allows to recover voltage control\n");  fCustomPrint(stdout,"                after a Q-limit is reached by monitoring the voltage; this\n");  fCustomPrint(stdout,"                option eliminates that possibility.\n");  fCustomPrint(stdout,"\n");  fCustomPrint(stdout,"         -h     Prints this message in standard output.\n");  fCustomPrint(stdout,"\n");  fCustomPrint(stdout,"         -Hfile Increases the loading factor lambda using a parameterized\n");  fCustomPrint(stdout,"                continuation method for finding voltage profiles.\n");  fCustomPrint(stdout,"                The output (optional 'file') is a list of max. 8 ac voltages\n");  fCustomPrint(stdout,"                that change the most, plus 3 additional variables for each dc\n");  fCustomPrint(stdout,"                bus (see -e option).  Must be used with the -K option.\n");  fCustomPrint(stdout,"\n");  fCustomPrint(stdout,"         -ifile List of numbers and names in 'file' for printing variable\n");  fCustomPrint(stdout,"                profiles with the -c and -H options. The input format is:\n");  fCustomPrint(stdout,"                Number Bus/AreaName [VarType].\n");  fCustomPrint(stdout,"                Use zero when either the number or the name are unknown.\n");  fCustomPrint(stdout,"                If Name has spaces, wrap it in double or single quotes.\n");  fCustomPrint(stdout,"                VarType is optional and can be: V for voltage (default),\n");  fCustomPrint(stdout,"                D for angle, PG for MW generated, QG for Mvar generated,\n");  fCustomPrint(stdout,"                PL for MW load, QL for Mvar load, or PA for MW area flow.\n");  fCustomPrint(stdout,"                If Name and Number are both equal to 0 and VarType is either \n");  fCustomPrint(stdout,"                PL, QL, PG or QG, the program will print the corresponding \n");  fCustomPrint(stdout,"                total load or generation in MW or Mvar.\n");  fCustomPrint(stdout,"\n");  fCustomPrint(stdout,"         -I     AC input data in IEEE common format.\n");  fCustomPrint(stdout,"\n");  fCustomPrint(stdout,"         -Ip    AC input data in IEEE common format with Power World\n");  fCustomPrint(stdout,"                modifications.\n");  fCustomPrint(stdout,"\n");  fCustomPrint(stdout,"         -jname Write the Jacobian of the solved case in I J VALUE format in\n");  fCustomPrint(stdout,"                'name.jac'.  The equation mismatches and the system variables\n");  fCustomPrint(stdout,"                are also written in 'name.mis' and 'name.var', respectively.\n");  fCustomPrint(stdout,"\n");  fCustomPrint(stdout,"         -Jname With the -B option, it generates the Jacobian, mismatches and\n");  fCustomPrint(stdout,"                variables corresponding to the system without the loading\n");  fCustomPrint(stdout,"                factor as a variable.  For PoC studies (-C option) it generates\n");  fCustomPrint(stdout,"                the nxn system Jacobian, mismatches and variables; for the\n");  fCustomPrint(stdout,"                complete (2n+1)x(2n+1) PoC Jacobian, use the -j option.  The\n");  fCustomPrint(stdout,"                corresponding Jacobian, mismatches and variables are written\n");  fCustomPrint(stdout,"                in I J VALUE format in 'name.jac', 'name.mis' and 'name.var',\n");  fCustomPrint(stdout,"                respectively.\n");  fCustomPrint(stdout,"\n");  fCustomPrint(stdout,"         -kval  Factor 'val' used in the homotopy continuation method for\n");  fCustomPrint(stdout,"                finding the increments in the loading factor lambda (def. 1).\n");  fCustomPrint(stdout,"                Must be used with the -c and -H options.\n");  fCustomPrint(stdout,"\n");  fCustomPrint(stdout,"         -Kfile Read generation and load distribution factors from 'file'.\n");  fCustomPrint(stdout,"                All data is assumed p.u. and must be separated by spaces: \n");  fCustomPrint(stdout,"                BusNumber BusName DPg Pnl Qnl PgMax [Smax Vmax Vmin Pzl Qzl].\n");  fCustomPrint(stdout,"                If the input variables DPg, Pnl, Qnl or PgMax are unknown, give\n");  fCustomPrint(stdout,"                them a value of zero; Smax, Vmax, Vmin, Pzl and Qzl are\n");  fCustomPrint(stdout,"                optional.\n");  fCustomPrint(stdout,"                The generation factors DPg are normalized for each area, i.e.,\n");  fCustomPrint(stdout,"                ||DPg||=1 per area.\n");  fCustomPrint(stdout,"                The load is represented by:\n");  fCustomPrint(stdout,"                     Pl=(Pn+Pnl*lambda)*V^a+(Pz+Pzl*lambda)*V^2\n");  fCustomPrint(stdout,"                     Ql=(Qn+Qnl*lambda)*V^b+(Qz+Qzl*lambda)*V^2\n");  fCustomPrint(stdout,"                where Pn, Qn, Pz, Qz, a, and b are defined with the -D option,\n");  fCustomPrint(stdout,"                and lambda corresponds to the loading factor.  If the -D option\n");  fCustomPrint(stdout,"                is not used, the load model default values are: a=b=0, Pz=Qz=0.\n");  fCustomPrint(stdout,"                Buses not in the list are assumed to have zero distribution\n");  fCustomPrint(stdout,"                factors.   If BusName has spaces, wrap it in double or single\n");  fCustomPrint(stdout,"                quotes.\n");  fCustomPrint(stdout,"\n");  fCustomPrint(stdout,"         -lfile Write standard error output to 'file' (log file).\n");  fCustomPrint(stdout,"\n");  fCustomPrint(stdout,"         -Lval  Loading factor 'val' (def. 0).  Simulates load changes in\n");  fCustomPrint(stdout,"                conjunction with the load distribution factors (-K option).\n");  fCustomPrint(stdout,"\n");  fCustomPrint(stdout,"         -m     Output continuation profiles in MATLAB/Octave format.  If TEF profiles\n");  fCustomPrint(stdout,"                are needed, use the -O option.\n");  fCustomPrint(stdout,"\n");  fCustomPrint(stdout,"         -Mnum  Number 'num' of max. N-R iterations, overriding input data\n");  fCustomPrint(stdout,"                (default 50).\n");  fCustomPrint(stdout,"\n");

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -