| 1 |
REQUIRE "simple_fs_ext.a4c"; |
| 2 |
(* => simple_fs_ext.a4c, simple_fs.a4c, atoms.a4l, measures.a4l, |
| 3 |
* system.a4l, basemodel.a4l *) |
| 4 |
REQUIRE "Guthrie_costs.a4l"; |
| 5 |
(* => Guthrie_costs.a4l, atoms.a4l, measures.a4l, system.a4l, basemodel.a4l *) |
| 6 |
PROVIDE "simple_fs_cost.a4c"; |
| 7 |
(* |
| 8 |
* This file is part of the ASCEND Modeling Library and is released |
| 9 |
* under the GNU Public License as described at the end of this file. |
| 10 |
*) |
| 11 |
|
| 12 |
ATOM cash_flow REFINES cost_per_time; |
| 13 |
lower_bound := -1.0e50 {USdollar/min}; |
| 14 |
nominal := 1.0 {USdollar/s}; |
| 15 |
END cash_flow; |
| 16 |
|
| 17 |
|
| 18 |
MODEL flowsheet_cost; |
| 19 |
|
| 20 |
tc IS_A test_controller; |
| 21 |
cm1,cr1,cfl1 IS_A simple_pressure_vessel_cost; |
| 22 |
|
| 23 |
feed_cost,bleed_value, |
| 24 |
product_value, |
| 25 |
annual_profit, |
| 26 |
annual_investment_cost IS_A cash_flow; |
| 27 |
price[tc.fs.m1.out.components], |
| 28 |
fuel_price IS_A cost_per_mass; |
| 29 |
payout_time IS_A time; |
| 30 |
|
| 31 |
|
| 32 |
tc.fs.m1.feed[1], |
| 33 |
tc.fs.m1.out, |
| 34 |
tc.fs.r1.out, |
| 35 |
tc.fs.fl1.liq, |
| 36 |
tc.fs.fl1.vap, |
| 37 |
tc.fs.sp1.out[1..2] IS_REFINED_TO mod_stream; |
| 38 |
|
| 39 |
|
| 40 |
cm1.gc.ci, |
| 41 |
cr1.gc.ci, |
| 42 |
cfl1.gc.ci ARE_THE_SAME; |
| 43 |
|
| 44 |
cm1.vol_flow, |
| 45 |
tc.fs.m1.out.Vtot_liq ARE_THE_SAME; |
| 46 |
|
| 47 |
cr1.vol_flow, |
| 48 |
tc.fs.r1.feed.Vtot_liq ARE_THE_SAME; |
| 49 |
|
| 50 |
cfl1.vol_flow, |
| 51 |
tc.fs.fl1.feed.Vtot_liq ARE_THE_SAME; |
| 52 |
|
| 53 |
annual_investment_cost = (cm1.installed_cost + cr1.installed_cost |
| 54 |
+ cfl1.installed_cost)/payout_time; |
| 55 |
|
| 56 |
feed_cost = price['B']*tc.fs.m1.feed[1].w['B'] |
| 57 |
*tc.fs.m1.feed[1].state.yw['B']; |
| 58 |
|
| 59 |
bleed_value = fuel_price*tc.fs.sp1.out[1].Wtot; |
| 60 |
|
| 61 |
product_value = price['C']*tc.fs.fl1.liq.w['C'] |
| 62 |
*tc.fs.fl1.liq.state.yw['C']; |
| 63 |
|
| 64 |
annual_profit = product_value+bleed_value-feed_cost |
| 65 |
-annual_investment_cost; |
| 66 |
|
| 67 |
MAXIMIZE annual_profit; |
| 68 |
|
| 69 |
|
| 70 |
METHODS |
| 71 |
|
| 72 |
METHOD clear; |
| 73 |
RUN tc.clear; |
| 74 |
RUN cm1.clear; |
| 75 |
RUN cr1.clear; |
| 76 |
RUN cfl1.clear; |
| 77 |
|
| 78 |
feed_cost.fixed := FALSE; |
| 79 |
bleed_value.fixed := FALSE; |
| 80 |
product_value.fixed := FALSE; |
| 81 |
price[tc.fs.m1.out.components].fixed := FALSE; |
| 82 |
fuel_price.fixed := FALSE; |
| 83 |
payout_time.fixed := FALSE; |
| 84 |
|
| 85 |
END clear; |
| 86 |
|
| 87 |
METHOD specify; |
| 88 |
RUN tc.specify; |
| 89 |
RUN cm1.specify; |
| 90 |
RUN cr1.specify; |
| 91 |
RUN cfl1.specify; |
| 92 |
|
| 93 |
cm1.vol_flow.fixed := FALSE; |
| 94 |
cr1.vol_flow.fixed := FALSE; |
| 95 |
cfl1.vol_flow.fixed := FALSE; |
| 96 |
|
| 97 |
price[tc.fs.m1.out.components].fixed := TRUE; |
| 98 |
fuel_price.fixed := TRUE; |
| 99 |
payout_time.fixed := TRUE; |
| 100 |
END specify; |
| 101 |
|
| 102 |
METHOD reset; |
| 103 |
RUN clear; |
| 104 |
RUN specify; |
| 105 |
END reset; |
| 106 |
|
| 107 |
METHOD values; |
| 108 |
|
| 109 |
RUN tc.values; |
| 110 |
|
| 111 |
payout_time.nominal := 2{yr}; |
| 112 |
price['A'] := 0.15{dollar/lbm}; |
| 113 |
price['B'] := 0.15{dollar/lbm}; |
| 114 |
price['C'] := 0.30{dollar/lbm}; |
| 115 |
|
| 116 |
fuel_price := 0.1 {dollar/lbm}; |
| 117 |
payout_time := 3 {yr}; |
| 118 |
|
| 119 |
cm1.gc.ci.MandSindex := 990.8; |
| 120 |
cm1.gc.ci.Fp := 1.0; |
| 121 |
cm1.gc.ci.Fm := 1.0; |
| 122 |
|
| 123 |
cm1.H_to_D := 2.0; |
| 124 |
cm1.liq_holdup_time := 10{s}; |
| 125 |
cr1.H_to_D := 2.0; |
| 126 |
cr1.liq_holdup_time := 10{s}; |
| 127 |
cfl1.H_to_D := 2.0; |
| 128 |
cfl1.liq_holdup_time := 10{s}; |
| 129 |
|
| 130 |
END values; |
| 131 |
|
| 132 |
END flowsheet_cost; |
| 133 |
|
| 134 |
|
| 135 |
(* |
| 136 |
* simple_fs_cost.a4c |
| 137 |
* by Arthur W. Westerberg |
| 138 |
* Part of the ASCEND Library |
| 139 |
* $Date: 1998/06/17 19:43:47 $ |
| 140 |
* $Revision: 1.3 $ |
| 141 |
* $Author: mthomas $ |
| 142 |
* $Source: /afs/cs.cmu.edu/project/ascend/Repository/models/simple_fs_cost.a4c,v $ |
| 143 |
* |
| 144 |
* This file is part of the ASCEND Modeling Library. |
| 145 |
* |
| 146 |
* Copyright (C) 1994-1998 Carnegie Mellon University |
| 147 |
* |
| 148 |
* The ASCEND Modeling Library is free software; you can redistribute |
| 149 |
* it and/or modify it under the terms of the GNU General Public |
| 150 |
* License as published by the Free Software Foundation; either |
| 151 |
* version 2 of the License, or (at your option) any later version. |
| 152 |
* |
| 153 |
* The ASCEND Modeling Library is distributed in hope that it |
| 154 |
* will be useful, but WITHOUT ANY WARRANTY; without even the implied |
| 155 |
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 156 |
* See the GNU General Public License for more details. |
| 157 |
* |
| 158 |
* You should have received a copy of the GNU General Public License |
| 159 |
* along with the program; if not, write to the Free Software |
| 160 |
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139 USA. Check |
| 161 |
* the file named COPYING. |
| 162 |
*) |