Last change
on this file since 996 was
391,
checked in by Argimiro Resende Secchi, 16 years ago

Adding AUTO DAE examples.

File size:
1.2 KB

Line  

1  using "types"; 

2  

3  FlowSheet cstr_dae 

4  

5  PARAMETERS 

6  esc as Real; 

7  fi as Real; 

8  beta as Real; 

9  delta as Real; 

10  q as Real; 

11  alfa as Real; 

12  S as Real; 

13  csi as Real; 

14  delta1 as Real; 

15  delta2 as Real; 

16  gama as Real; 

17  x1f as Real; 

18  x2f as Real; 

19  x3f as Real; 

20  x4f as Real; 

21  qc as Real; 

22  

23  VARIABLES 

24  u1 as Real; 

25  u2 as Real; 

26  u3 as Real; 

27  u4 as Real; 

28  u5 as Real; 

29  u6 as Real; 

30  

31  SET 

32  

33  fi = 0.133; 

34  beta = 8; 

35  delta = 1; 

36  q = 1; 

37  alfa = 1; 

38  S = 0.01; 

39  csi = 1; 

40  delta1 = 10; 

41  delta2 = 1; 

42  gama = 1000; 

43  x1f = 1; 

44  x2f = 0; 

45  x3f = 0; 

46  x4f = 1; 

47  qc = 0; 

48  esc = 1e6; 

49  

50  EQUATIONS 

51  

52  

53  q*(x1fu1)u1*u5*esc*fi  diff(u1)*'s' = 0; 

54  

55  q*(x2fu2)u2*fi*S*u6*esc+u1*fi*u5*esc  diff(u2)*'s' = 0; 

56  

57  q*(x3fu3)+delta*(u4u3)+beta*fi*(u1*u5*esc+alfa*u2*u6*esc*S)  diff(u3)*'s' = 0; 

58  

59  delta1*(qc*(x4fu4)+delta*delta2*(u3u4))  diff(u4)*'s' = 0; 

60  

61  u5*esc + exp(u3/(1+(u3/gama))) = 0; 

62  

63  u6*esc + exp(csi*u3/(1+(u3/gama))) = 0; 

64  

65  GUESS 

66  u1 = 0; 

67  u2 = 0; 

68  u3 = 16; 

69  u4 = 16; 

70  u5 = 3; 

71  u6 = 3; 

72  

73  

74  INITIAL 

75  u1 = 0.6; 

76  u2 = 0.3; 

77  u3 = 3; 

78  u4 = 3; 

79  

80  

81  OPTIONS 

82  TimeEnd = 10; 

83  TimeStep = 0.2; 

84  Dynamic = false; 

85  end 

Note: See
TracBrowser
for help on using the repository browser.