We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLS, PDF, TXT or read online on Scribd
You are on page 1/ 9
Chapter 25: Process Modeling
Rules of Thumb for Chemical Engineers, 5th Edition
by Stephen Hall This workbook illustrates the use of Excel and VBA to perform a simulation variable inputs. It accompanies the article, "Process Simulation Using VBA Code with Variable Input Data," written by Stephen M. Hall, published in Pharmaceutical Engineering , from the International Society for Pharmaceutical Engineering (ISPE), Tampa, Florida, September, 2010. This Excel workbook includes Visual Basic for Application function subroutines. Macros must be enabled for them to work. PURIFIED WATER GENERATION AND STORAGE TANK ANALYSIS Copyright 2010 by Stephen M. Hall This workbook may be freely used as an educational tool. It illustrates techniques for incorporating variable input data into a process model, using VBA subroutines. Excel must be configured to allow macros for this worksheet to function properly. There are no claims of accuracy or reliability; the workbook is intended only for the purpose stated. PURIFIED WATER GENERATION AND STORAGE TANK ANALYSIS Parameters Daily Sanitization? TRUE Time 4.00 Duration 3 hours Use Point Description Draw Rate Schedule Duration (min) SD Distribution Usage Starts (minimum per day) Usage Starts (maximum per day) Distribution 1 Formulation Tank 25 Day & Evening 80 0 NA 1 3 Uniform 2 Formulation Tank 35 Day 135 0 NA 0 4 Uniform 3 Washer 10 Anytime 15 5 Normal 2 20 Uniform 4 Washer 10 Anytime 15 7 Normal 10 30 Normal 5 Washer 15 Anytime 5 1 Normal 0 30 Normal Decisions Maximum simultaneous draw 60 Tank size 30,000 Generation Rate 15 per minute Starting level 13,250 Results Time Generation Consumption Avg Draw Rate Net Level Percent 0 900 350 6 550 13,800 46% 1 900 340 6 560 14,360 48% 2 900 450 8 450 14,810 49% 3 900 440 7 460 15,270 51% 4 900 - - 900 16,170 54% 5 900 - - 900 17,070 57% 6 900 - - 900 17,970 60% 7 900 465 8 435 18,405 61% 8 900 120 2 780 19,185 64% 9 900 2,220 37 (1,320) 17,865 60% 10 900 2,530 42 (1,630) 16,235 54% 11 900 2,485 41 (1,585) 14,650 49% 12 900 955 16 (55) 14,595 49% 13 900 2,585 43 (1,685) 12,910 43% 14 900 4,035 67 (3,135) 9,775 33% 15 900 1,225 20 (325) 9,450 32% 16 900 - - 900 10,350 35% 17 900 310 5 590 10,940 36% 18 900 400 7 500 11,440 38% 19 900 350 6 550 11,990 40% 20 900 400 7 500 12,490 42% 21 900 - - 900 13,390 45% 22 900 - - 900 14,290 48% 23 900 - - 900 15,190 51% - 5,000 10,000 15,000 20,000 25,000 30,000 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 V o l u m e
Time Tank Level Over the Day Results for 1 Day Total 21,600 19,660 Minimum 900 - - (3,135) 9,450 32% Maximum 900 4,035 67 900 19,185 64% Average 900 819 14 81 14,275 48% Results for 30 days Generation Consumption Avg Draw Rate Net Level % Full Minimum Daily 20,935 5,935 Maximum Daily 21,600 29,615 Average Daily 21,578 20,056 Minimum Hourly 235 - - (4,050) 2,170 7% Maximum Hourly 900 4,950 83 900 30,000 100% Average Hourly 899 836 14 63 16,188 54% Simulation Parameters Case 1: Tank starting level is a fixed value Case 2: Tank level is carried over from previous day Which case: 2 Number of days to simulate: 30 Intermediate Results from Steps 1 and 2 This sheet simply provides a list of the duration of uses from each use point for one day It uses the data for usage starts minimum, maximum, and distribution from the Parameters section and the time and distribution for each usage The sheet is calculated and filled in with the VBA macro "UsesPerDay" Generated 21,600 Use Point Consumed 19,646 1 2 Number of Usages VBA Duration Usage Data 2 2 1 80 135 2 80 135 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 It uses the data for usage starts minimum, maximum, and distribution from the Parameters section 3 4 5 12 18 20 3.8 21.8 7.7 16 7.8 4.9 13.5 21.3 6.1 9.7 10.7 4.7 17.7 14.8 3.9 13.9 18.3 5.2 18.9 13.8 5.4 13.2 19.8 5 10.6 12.1 5.3 20.3 23.1 6.9 10.7 21.4 6.2 13.9 19 2.4 24.8 3.7 9.9 4.5 30 5.3 9.7 5.6 23.9 4.4 7.4 3.8 3.5 4 Intermediate Results from Step 3 This sheet spreads the uses within the time of day limits parameters The sheet is calculated and filled in with the VBA macro "ScheduleUsePoints" Generated Hourly Consumption Sanitized Consumed 1 2 Midnight 0 900 350 1 900 340 2 900 450 3 900 440 4 900 - X 5 900 - X 6 900 - X 7 900 465 8 900 120 9 900 2,220 2100 10 900 2,530 2100 11 900 2,485 1500 525 12 900 955 500 13 900 2,585 2100 14 900 4,035 1500 2100 15 900 1,225 500 525 16 900 - 17 900 310 18 900 400 19 900 350 20 900 400 21 900 - 22 900 - 23 900 - 3 4 5 350 340 330 120 320 120 300 165 120 120 250 180 310 150 320 135 320 165 240 195 200 310 400 350 400