/[ascend]/trunk/models/simpleflowsheet01cost.a4c
ViewVC logotype

Diff of /trunk/models/simpleflowsheet01cost.a4c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 792 by johnpye, Tue May 9 03:42:08 2006 UTC revision 793 by johnpye, Thu Jul 27 14:14:47 2006 UTC
# Line 1  Line 1 
1  REQUIRE "simpleflowsheet01mass.a4c";  REQUIRE "simpleflowsheet01mass.a4c";
 (* => simpleflowsheet01mass.a4c, simpleflowsheet01.a4c, atoms.a4l, measures.a4l,  
  *    system.a4l, basemodel.a4l *)  
2  REQUIRE "guthriecosts.a4l";  REQUIRE "guthriecosts.a4l";
 (* => guthriecosts.a4l, atoms.a4l, measures.a4l, system.a4l, basemodel.a4l *)  
 PROVIDE "simpleflowsheet01cost.a4c";  
   
 (*  
  *  simpleflowsheet01cost.a4c  
  *  by Arthur W. Westerberg  
  *  Part of the ASCEND Library  
  *  $Date: 2006/04/10 10:08:42 $  
  *  $Revision: 1.95 $  
  *  $Author: a.westerberg $  
  *  
  *  This file is part of the ASCEND Modeling Library.  
  *  
  *  Copyright (C) 1998 Carnegie Mellon University  
  *  
  *  The ASCEND Modeling Library is free software; you can redistribute  
  *  it and/or modify it under the terms of the GNU General Public  
  *  License as published by the Free Software Foundation; either  
  *  version 2 of the License, or (at your option) any later version.  
  *  
  *  The ASCEND Modeling Library is distributed in hope that it  
  *  will be useful, but WITHOUT ANY WARRANTY; without even the implied  
  *  warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
  *  See the GNU General Public License for more details.  
  *  
  *  You should have received a copy of the GNU General Public License  
  *  along with the program; if not, write to the Free Software  
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139 USA.  Check  
  *  the file named COPYING.  
  *)  
   
3    
4    (*  simpleflowsheet01cost.a4c
5        by Arthur W. Westerberg
6        
7        ASCEND modelling environment
8        Copyright (C) 1998 Carnegie Mellon University
9        
10        This program is free software; you can redistribute it and/or modify
11        it under the terms of the GNU General Public License as published by
12        the Free Software Foundation; either version 2, or (at your option)
13        any later version.
14    
15        This program is distributed in the hope that it will be useful,
16        but WITHOUT ANY WARRANTY; without even the implied warranty of
17        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18        GNU General Public License for more details.
19    
20        You should have received a copy of the GNU General Public License
21        along with this program; if not, write to the Free Software
22        Foundation, Inc., 59 Temple Place - Suite 330,
23        Boston, MA 02111-1307, USA.
24    *)
25    
26  ATOM cash_flow REFINES cost_per_time;  ATOM cash_flow REFINES cost_per_time;
27      lower_bound := -1.0e50 {USD/min};      lower_bound := -1.0e50 {USD/min};
28      nominal     := 1.0 {USD/s};      nominal     := 1.0 {USD/s};
29  END cash_flow;  END cash_flow;
30    
   
 MODEL flowsheet_cost;  
31    
32      tc              IS_A    test_controller;  MODEL simpleflowsheet01cost;
33    
34        tc                      IS_A    test_controller;
35      cm1,cr1,cfl1            IS_A    simple_pressure_vessel_cost;      cm1,cr1,cfl1            IS_A    simple_pressure_vessel_cost;
36    
37          feed_cost,bleed_value,      feed_cost,bleed_value, product_value, annual_profit,
38          product_value,      annual_investment_cost  IS_A    cash_flow;
39          annual_profit,  
40          annual_investment_cost  IS_A    cash_flow;      price[tc.fs.m1.out.components],
41          price[tc.fs.m1.out.components],      fuel_price              IS_A    cost_per_mass;
42          fuel_price          IS_A    cost_per_mass;      payout_time             IS_A    time;
     payout_time         IS_A    time;  
   
   
     tc.fs.m1.feed[1],  
         tc.fs.m1.out,  
         tc.fs.r1.out,  
         tc.fs.fl1.liq,  
         tc.fs.fl1.vap,  
         tc.fs.sp1.out[1..2]     IS_REFINED_TO mod_stream;  
   
   
     cm1.gc.ci,  
     cr1.gc.ci,  
     cfl1.gc.ci          ARE_THE_SAME;  
43    
     cm1.vol_flow,  
         tc.fs.m1.out.Vtot_liq   ARE_THE_SAME;  
44    
45      cr1.vol_flow,      tc.fs.m1.feed[1], tc.fs.m1.out, tc.fs.r1.out, tc.fs.fl1.liq,
46          tc.fs.r1.feed.Vtot_liq  ARE_THE_SAME;      tc.fs.fl1.vap, tc.fs.sp1.out[1..2]
47                                IS_REFINED_TO mod_stream;
48    
49      cfl1.vol_flow,  
50          tc.fs.fl1.feed.Vtot_liq ARE_THE_SAME;      cm1.gc.ci, cr1.gc.ci, cfl1.gc.ci ARE_THE_SAME;
51        cm1.vol_flow, tc.fs.m1.out.Vtot_liq ARE_THE_SAME;
52        cr1.vol_flow, tc.fs.r1.feed.Vtot_liq ARE_THE_SAME;
53    
54        cfl1.vol_flow, tc.fs.fl1.feed.Vtot_liq ARE_THE_SAME;
55    
56      annual_investment_cost = (cm1.installed_cost + cr1.installed_cost      annual_investment_cost = (cm1.installed_cost + cr1.installed_cost
57          + cfl1.installed_cost)/payout_time;          + cfl1.installed_cost)/payout_time;
# Line 92  MODEL flowsheet_cost; Line 69  MODEL flowsheet_cost;
69    
70      MAXIMIZE annual_profit;      MAXIMIZE annual_profit;
71    
72    METHODS
   METHODS  
73    
74      METHOD default_self;  METHOD default_self;
75      END default_self;  END default_self;
76    
77      METHOD specify;  METHOD specify;
78      RUN tc.specify;      RUN tc.specify;
79      RUN cm1.specify;      RUN cm1.specify;
80      RUN cr1.specify;      RUN cr1.specify;
# Line 111  MODEL flowsheet_cost; Line 87  MODEL flowsheet_cost;
87      FIX price[tc.fs.m1.out.components];      FIX price[tc.fs.m1.out.components];
88      FIX fuel_price;      FIX fuel_price;
89      FIX payout_time;      FIX payout_time;
90      END specify;  END specify;
91    
92      METHOD reset;  METHOD reset;
93      RUN ClearAll;      RUN ClearAll;
94      RUN specify;      RUN specify;
95      END reset;  END reset;
96    
97      METHOD values;  METHOD values;
98    
99      RUN tc.values;      RUN tc.values;
100    
# Line 141  MODEL flowsheet_cost; Line 117  MODEL flowsheet_cost;
117      cfl1.H_to_D             :=  2.0;      cfl1.H_to_D             :=  2.0;
118      cfl1.liq_holdup_time            :=  10{s};      cfl1.liq_holdup_time            :=  10{s};
119    
120      END values;  END values;
121    
122    METHOD on_load;
123        RUN default_self;
124        RUN reset;
125        RUN values;
126    END on_load;
127    
128    METHOD self_test;
129        ASSERT abs(annual_investment_cost - 1204344{USD/yr}) < 1 {USD/yr};
130        ASSERT abs(annual_profit - -38963990{USD/yr}) < 1 {USD/yr};
131        ASSERT abs(product_value - 72187780{USD/yr}) < 1 {USD/yr};
132    END self_test;
133    
134  END flowsheet_cost;  END simpleflowsheet01cost;

Legend:
Removed from v.792  
changed lines
  Added in v.793

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22