[976] | 1 | #*--------------------------------------------------------------------- |
---|

| 2 | * EMSO Model Library (EML) Copyright (C) 2004 - 2016 ALSOC. |
---|

| 3 | * |
---|

| 4 | * This LIBRARY is free software; you can distribute it and/or modify |
---|

| 5 | * it under the therms of the ALSOC FREE LICENSE as available at |
---|

| 6 | * http://www.enq.ufrgs.br/alsoc. |
---|

| 7 | * |
---|

| 8 | * EMSO Copyright (C) 2004 - 2016 ALSOC, original code |
---|

| 9 | * from http://www.rps.eng.br Copyright (C) 2002-2004. |
---|

| 10 | * All rights reserved. |
---|

| 11 | * |
---|

| 12 | * EMSO is distributed under the therms of the ALSOC LICENSE as |
---|

| 13 | * available at http://www.enq.ufrgs.br/alsoc. |
---|

| 14 | * |
---|

| 15 | *---------------------------------------------------------------------- |
---|

| 16 | * Author: Argimiro R. Secchi |
---|

| 17 | * COPPE/UFRJ - Group of Modeling, Simulation, Control, |
---|

| 18 | * and Optimization of Processes |
---|

| 19 | * $Id$ |
---|

| 20 | *--------------------------------------------------------------------*# |
---|

| 21 | |
---|

| 22 | using "MODEL_FE"; |
---|

| 23 | |
---|

| 24 | FlowSheet OCFEM_din |
---|

| 25 | |
---|

| 26 | DEVICES |
---|

| 27 | #Carregando o modulo do MCO em elementos finitos |
---|

| 28 | d as MCO_EF; |
---|

| 29 | |
---|

| 30 | PARAMETERS |
---|

| 31 | |
---|

| 32 | Da as Real; |
---|

| 33 | Pe as Real; |
---|

| 34 | m as Real; |
---|

| 35 | |
---|

| 36 | SET |
---|

| 37 | |
---|

| 38 | Da = 5; |
---|

| 39 | m = 1; |
---|

| 40 | Pe = 2; |
---|

| 41 | |
---|

| 42 | SPECIFY |
---|

| 43 | #Define os valores das fronteiras dos elementos finitos(vetor h) e valor da variável |
---|

| 44 | #independente para cálculo da interpolação |
---|

| 45 | |
---|

| 46 | d.h=[0,1/4,2/4,3/4,1]; |
---|

| 47 | |
---|

| 48 | EQUATIONS |
---|

| 49 | |
---|

| 50 | #Equacao do problema |
---|

| 51 | for k in [1:d.ne] do |
---|

| 52 | for i in [2:d.np-1] do |
---|

| 53 | diff(d.y(i,k))*'s' + d.dif1x(i,k) = (1/Pe) * d.dif2x(i,k) - Da*(d.y(i,k))^m; |
---|

| 54 | end |
---|

| 55 | end |
---|

| 56 | |
---|

| 57 | #Especificando as condicoes de contorno |
---|

| 58 | #Para x=x0 |
---|

| 59 | (-1/Pe) * d.dif1x(1,1) = 1 - d.y(1,1); |
---|

| 60 | # d.y(1,1) = 1; |
---|

| 61 | |
---|

| 62 | #Para x=xf |
---|

| 63 | d.dif1x(d.np,d.ne) = 0; |
---|

| 64 | |
---|

| 65 | INITIAL |
---|

| 66 | d.y(2:d.np-1,1:d.ne) = 0; |
---|

| 67 | |
---|

| 68 | OPTIONS |
---|

| 69 | TimeStep = 0.02; |
---|

| 70 | TimeEnd = 0.5; |
---|

| 71 | TimeUnit = 's'; |
---|

| 72 | Dynamic = true; |
---|

| 73 | |
---|

| 74 | end |
---|