source:trunk/sample/miscellaneous/ocfem/OCFEM_ss.mso@976

Last change on this file since 976 was 976, checked in by Argimiro Resende Secchi, 6 years ago

Examples for polynomial approximation.

File size: 1.6 KB
Line
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.
11*
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
22using "MODEL_FE";
23
24FlowSheet OCFEM_ss
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                        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        OPTIONS
66        Dynamic = false;
67
68end
Note: See TracBrowser for help on using the repository browser.