Last change
on this file since 44 was
1,
checked in by Rafael de Pelegrini Soares, 17 years ago

Initial import of the library


Property svn:eolstyle set to
native

Property svn:keywords set to
Id

File size:
1.4 KB

Line  

1  #* 

2  * This file is property of the author and cannot be used, copyed 

3  * or modified without permission. 

4  * 

5  * Copyright (C) 2004 the author 

6  * 

7  * Author: Paula B. Staudt 

8  * $Id: cstr.mso 1 20060620 17:33:53Z rafael $ 

9  **# 

10  

11  using "streams"; 

12  

13  Model cstr_basic 

14  PARAMETERS 

15  ext NComp as Integer; 

16  NReac as Integer; 

17  stoic(NComp, NReac) as Real (Brief = "Stoichiometric Matrix"); 

18  

19  VARIABLES 

20  in Inlet as stream; 

21  out Outlet as stream_therm; 

22  q as heat_rate; 

23  Vr as volume (Brief="Reacting Volume"); 

24  M as mol (Brief = "Molar total amount"); 

25  C(NComp) as conc_mol(Brief="Components concentration"); 

26  

27  EQUATIONS 

28  "Molar fraction" 

29  Outlet.z * M = C * Vr; 

30  "Vapourisation Fraction" 

31  Outlet.v = Inlet.v; 

32  end 

33  

34  Model cstr_yield as cstr_basic 

35  PARAMETERS 

36  yield(NReac) as fraction; 

37  

38  EQUATIONS 

39  Outlet.z*Outlet.F = Inlet.z*Inlet.F * sumt(stoic*(1yield)); 

40  "Reactor Energy Balance" 

41  diff(M*Outlet.h) = Inlet.F*Inlet.h  Outlet.F*Outlet.h  q; 

42  end 

43  

44  

45  Model cstr as cstr_basic 

46  VARIABLES 

47  r(NReac) as reaction_mol; 

48  Hr(NReac) as heat_reaction; 

49  

50  EQUATIONS 

51  "Component Molar Balance" 

52  diff(Outlet.z*M) = (Inlet.F*Inlet.z  Outlet.F*Outlet.z) + sumt(stoic*r)*Vr; 

53  

54  "Reactor Energy Balance" 

55  diff(M*Outlet.h) = Inlet.F*Inlet.h  Outlet.F*Outlet.h + 

56  sum(Hr*sum(stoic*r))*Vr  q; 

57  end 

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