Changeset 14 for mso/template
- Timestamp:
- Aug 26, 2006, 5:15:39 PM (17 years ago)
- Location:
- mso/template
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
mso/template/flowsheet.mso
r1 r14 1 #* EMSO template file for new flowsheets. 2 * 3 * The user should edit the contents of this file in order 4 * to develop a new flowsheet. 5 * 6 * $ID$ 7 *# 1 #* 2 * EMSO template file for new flowsheets. 3 * 4 * The user should edit the contents of this file in order 5 * to develop a new flowsheet. 6 * 7 * $Id$ 8 *# 8 9 9 #* The using command makes available entities declared in another files. 10 * 11 * With this command the user can make use of the EML models 12 *# 10 #* 11 * The using command makes available entities declared in another files. 12 * 13 * With this command the user can make use of the EML models 14 *# 13 15 using "stage_separators/flash"; 14 16 15 17 #* 16 * A new flowsheet is declared with the FlowSheet keyword and a name.17 * A flowhseet can have several sections presented above:18 *#18 * A new flowsheet is declared with the FlowSheet keyword and a name. 19 * A flowhseet can have several sections presented above: 20 *# 19 21 FlowSheet MyFlowSheet 20 22 #* 21 * In the PARAMETERS section we can define the constants of the22 * FlowSheet. When the model requires thermodynamic calculations23 * we should create an special parameter called PP and select24 * the model and components of the mixture, as follows:25 *#23 * In the PARAMETERS section we can define the constants of the 24 * FlowSheet. When the model requires thermodynamic calculations 25 * we should create an special parameter called PP and select 26 * the model and components of the mixture, as follows: 27 *# 26 28 PARAMETERS 27 29 PP as CalcObject(Brief="Physical Properties", File="vrpp"); … … 34 36 35 37 #* 36 * In the DEVICES section the components of the process are declared.37 * Each device is based in a previously defined mathematical model, coming38 * from the EML or developed by the user.39 *#38 * In the DEVICES section the components of the process are declared. 39 * Each device is based in a previously defined mathematical model, coming 40 * from the EML or developed by the user. 41 *# 40 42 DEVICES 41 43 STR101 as stream_therm; … … 43 45 44 46 #* 45 * Once the devices of the process were declared we can connect them46 * in the CONNECTIONS section47 *#47 * Once the devices of the process were declared we can connect them 48 * in the CONNECTIONS section 49 *# 48 50 CONNECTIONS 49 51 STR101 to FLASH101.Feed; 50 52 51 53 #* 52 * In order to simulate the process the user should specify some variables53 *#54 * In order to simulate the process the user should specify some variables 55 *# 54 56 SPECIFY 55 57 STR101.F = 496.3 * "kmol/h"; … … 63 65 64 66 #* 65 * We can adjust the parameters of the devices in any point after66 * its declaration.67 *#67 * We can adjust the parameters of the devices in any point after 68 * its declaration. 69 *# 68 70 SET 69 71 FLASH101.Q = 1 * "kJ/h"; … … 72 74 73 75 #* 74 * Besides the usual specifications, dynamic models require the specification75 * of initial conditions.76 *#76 * Besides the usual specifications, dynamic models require the specification 77 * of initial conditions. 78 *# 77 79 INITIAL 78 80 FLASH101.OutletL.T = 330 *"K"; … … 85 87 86 88 87 -
mso/template/flowsheet_eqs.mso
r1 r14 1 1 #* 2 * Arquivo modelo para a drescição de um FlowSheet baseado em equações.2 * EMSO template file for new equation flowsheets. 3 3 * 4 * Adicione seus comentários e modifique este arquivo para5 * obter seu novo FlowSheet baseado em equações.4 * The user should edit the contents of this file in order 5 * to develop a new flowsheet. 6 6 * 7 * Autor : 8 * Versão: 9 * 7 * $Id$ 10 8 *# 11 9 12 10 11 #* 12 * The using command makes available entities declared in another files. 13 * 14 * With this command the user can make use of the EML types 15 *# 16 using "types"; 17 18 #* 19 * A new model is declared with the Model keyword and a name. 20 * A model can have several sections presented above: 21 *# 22 FlowSheet CustomFlowSheet 13 23 14 using "EMSOTypes"; 15 #* 16 * O comando using, faz com que identificadores declarados em arquivos 17 * externos sejam reconhecidos. 18 * Com o comando using "EMSOTypes" tornam-se disponíveis os tipos padrão 19 * do sistema, gravados no arquivo "EMSOTypes.mso". 20 * Modelos podem também ser descritos em arquivos em separado e então 21 * disponibilizados com o comando using. 22 * 23 *# 24 #* 25 * In the PARAMETERS section we can define the constants of the 26 * model. 27 * A parameter will never be the result of the simulation its value 28 * need to be specified by the user. 29 *# 30 PARAMETERS 31 V as volume(Brief="The model volume"); 32 A as area(Brief="Cross section area"); 24 33 25 FlowSheet CustomEquationBasedFlowSheet 34 #* 35 * In the VARIABLE section we declare the variables of the model. 36 * The values of the variables will be calculated by the system 37 * in order to respect the model equations. 38 *# 39 VARIABLES 40 h as length(Brief="The level"); 41 42 #* 43 * In the EQUATIONS section we declare equality expressions involving 44 * the any previously declared parameter or variable. 45 * The equations will be used to determine the value of the variables. 46 *# 47 EQUATIONS 48 A * h = V; 26 49 27 PARAMETERS28 50 #* 29 * Dentro da seção de parametros são declarados os parâmetros. 30 * Cada parâmetro é baseado em um tipo normalmente já declarado no 31 * arquivo "stdtypes.mso". 32 * Por exemplo: 33 * Parametro1 as Real(Brief="Primeiro Parametro", Default = 0, Lower = -100, Upper = 1e3); 34 * Declara um parâmetro chamado Parametro1, baseado no tipo Real com modificações na 35 * descrição breve, valor por omissão e limites do parâmetro. 36 * 51 * Additionally, in the case of dynamic models we can declare initial 52 * conditions exactly as in the EQUATIONS section. 53 * Equations declared on the INITIAL section will be used to determine 54 * the initial condition of dynamic models. 37 55 *# 38 39 VARIABLES40 #*41 * Na seção de variáveis são delcaradas as variáveis, de forma42 * análoga aos parâmetros.43 * Por exemplo:44 * V as Volume(Brief="Volume do atual do reator");45 * Declara uma variável chamada V, baseada no tipo Volume com a descrição dada.46 * F as FlowRate(Brief="Alimentação");47 * Declara uma variável chamada F.48 *49 *#50 51 EQUATIONS52 #*53 * Na seção de equações são declaradas equações de igualdade, normalmente54 * são os fenômenos físicos e restrições que regem o comportamento do55 * equipamento que se está modelando.56 * Por exemplo:57 * "Balanço Global" diff(M) = F - (V + L);58 * Declara uma equação chamada "Balanço Global" com a expressão matemática dada.59 *60 *#61 62 56 INITIAL 63 #*64 * Seção de declaração de condições iniciais (sistemas dinâmicos).65 * O número de condições iniciais deve ser igual ao número de graus66 * de liberdade dinâmicos do sistema.67 * Cada condição inicial é especificada na forma de equação de igualdade.68 * Exemplos:69 * "Massa inicial" Mtotal = 60 * "kg";70 * "Estado estacionário" diff(Mtotal) = 0;71 *72 *#73 74 SET75 #*76 * Nesta seção devem fixados todos os parâmetros do FlowSheet, isto77 * inclui os parâmetros declarados no próprio FlowSheet e aqueles78 * pertencentes aos Device's.79 * Exemplos:80 * length = 10 * "m";81 * heater.area = 100 * "m^2";82 *83 *#84 57 end -
mso/template/model.mso
r1 r14 1 1 #* 2 * Arquivo modelo para a drescição de um Model. 3 * 4 * Adicione seus comentários e modifique este arquivo para 5 * obter seu novo modelo. 6 * 7 *# 2 * EMSO template file for new models. 3 * 4 * The user should edit the contents of this file in order 5 * to develop a new model. 6 * 7 * $Id$ 8 *# 8 9 9 10 10 11 #* 11 * O comando using, faz com que identificadores declarados em arquivos 12 * externos sejam reconhecidos. Exemplos: 13 * using "types"; 14 * using "tanks"; 15 * 16 * Com o comando using "types" tornam-se disponíveis os tipos padrão 17 * do sistema, gravados no arquivo "types.mso". 18 * Modelos podem também ser descritos em arquivos em separado e então 19 * disponibilizados com o comando using. 20 * 21 *# 12 * The using command makes available entities declared in another files. 13 * 14 * With this command the user can make use of the EML types 15 *# 22 16 using "types"; 23 17 24 18 #* 19 * A new model is declared with the Model keyword and a name. 20 * A model can have several sections presented above: 21 *# 25 22 Model CustomModel 26 23 24 #* 25 * In the PARAMETERS section we can define the constants of the 26 * model. 27 * A parameter will never be the result of the simulation its value 28 * need to be specified by the user. 29 *# 27 30 PARAMETERS 31 V as volume(Brief="The model volume"); 32 A as area(Brief="Cross section area"); 33 28 34 #* 29 * Dentro da seção de parametros são declarados os parâmetros. 30 * Cada parâmetro é baseado em um tipo normalmente já declarado no 31 * arquivo "types.mso" ou criado pelo usuário. 32 * Por exemplo: 33 * Parametro1 as Real(Brief="Primeiro Parametro", Default = 0, Lower = -100, Upper = 1e3); 34 * 35 *# 35 * In the VARIABLE section we declare the variables of the model. 36 * The values of the variables will be calculated by the system 37 * in order to respect the model equations. 38 *# 39 VARIABLES 40 h as length(Brief="The level"); 41 42 #* 43 * In the EQUATIONS section we declare equality expressions involving 44 * the any previously declared parameter or variable. 45 * The equations will be used to determine the value of the variables. 46 *# 47 EQUATIONS 48 A * h = V; 36 49 37 VARIABLES38 50 #* 39 * Na seção de variáveis são delcaradas as variáveis, de forma 40 * análoga aos parâmetros. 41 * Por exemplo: 42 * V as Volume(Brief="Volume do atual do reator"); 43 * F as FlowRate(Brief="Alimentação"); 44 * 45 *# 46 47 EQUATIONS 48 #* 49 * Na seção de equações são declaradas equações de igualdade, normalmente 50 * são os fenômenos físicos e restrições que regem o comportamento do 51 * equipamento que se está modelando. 52 * Por exemplo: 53 * "Balanço Global" diff(M) = F - (V + L); 54 * 55 *# 56 51 * Additionally, in the case of dynamic models we can declare initial 52 * conditions exactly as in the EQUATIONS section. 53 * Equations declared on the INITIAL section will be used to determine 54 * the initial condition of dynamic models. 55 *# 57 56 INITIAL 58 #*59 * Declara condições iniciais. A sintaxe é a mesma da seção60 * EQUATIONS, mas as equações declaradas nesta seção são utilizadas61 * apenas na inicialização dos sistemas dinâmicos.62 *63 *#64 65 57 end
Note: See TracChangeset
for help on using the changeset viewer.