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

Diff of /trunk/models/vesselMethods.a4c

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

revision 576 by johnpye, Tue May 9 03:42:08 2006 UTC revision 1385 by jpye, Sat Apr 7 09:13:41 2007 UTC
# Line 1  Line 1 
1  REQUIRE "atoms.a4l";  (*  ASCEND modelling environment
2  (* => atoms.a4l, measures.a4l, system.a4l, basemodel.a4l *)      Copyright (C) 1998, 2007 Carnegie Mellon University
3  PROVIDE "vesselMethods.a4c";  
4        This program is free software; you can redistribute it and/or modify
5        it under the terms of the GNU General Public License as published by
6        the Free Software Foundation; either version 2, or (at your option)
7        any later version.
8    
9        This program is distributed in the hope that it will be useful,
10        but WITHOUT ANY WARRANTY; without even the implied warranty of
11        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12        GNU General Public License for more details.
13        
14        You should have received a copy of the GNU General Public License
15        along with this program; if not, write to the Free Software
16        Foundation, Inc., 59 Temple Place - Suite 330,
17        Boston, MA 02111-1307, USA.
18    *)
19  (*  (*
20   * This file is part of the ASCEND Modeling Library and is released      by Arthur W. Westerberg
21   * under the GNU Public License as described at the end of this file.      THIS FILE IS AUTO-IMPORTED INTO THE ASCEND MANUAL! BE CAREFUL WITH EDITS.
22   *)  *)
23    REQUIRE "atoms.a4l";
24    
25  MODEL vessel;  MODEL vessel;
26      NOTES      NOTES
# Line 37  MODEL vessel; Line 53  MODEL vessel;
53          IS_A mass;          IS_A mass;
54    
55      (* equations *)      (* equations *)
56  FlatEnds:   end_area = 1{PI} * D^2 / 4;      FlatEnds:      end_area = 1{PI} * D^2 / 4;
57  Sides:      side_area = 1{PI} * D * H;      Sides:         side_area = 1{PI} * D * H;
58  Cylinder:   vessel_vol = end_area * H;      Cylinder:      vessel_vol = end_area * H;
59  Metal_volume:   (side_area + 2 * end_area) * wall_thickness = wall_vol;      Metal_volume:  (side_area + 2 * end_area) * wall_thickness = wall_vol;
60  HD_definition:  D * H_to_D_ratio = H;      HD_definition: D * H_to_D_ratio = H;
61  VesselMass: metal_mass = metal_density * wall_vol;      VesselMass:    metal_mass = metal_density * wall_vol;
62    
63  METHODS  METHODS
64        METHOD specify;
65  METHOD specify;          NOTES
66      NOTES          'purpose' SELF {to fix four variables and make the problem well-posed}
67      'purpose' SELF {to fix four variables and make the problem well-posed}          END NOTES;
68      END NOTES;          FIX vessel_vol;
69      FIX vessel_vol;          FIX H_to_D_ratio;
70      FIX H_to_D_ratio;          FIX wall_thickness;
71      FIX wall_thickness;          FIX metal_density;
72      FIX metal_density;      END specify;
73  END specify;  
74        METHOD values;
75  METHOD values;          NOTES
76      NOTES          'purpose' SELF {to set the values for the fixed variables}
77      'purpose' SELF {to set the values for the fixed variables}          END NOTES;
78      END NOTES;          H_to_D_ratio        :=  2;
79      H_to_D_ratio        :=  2;          vessel_vol      :=  250 {ft^3};
80      vessel_vol      :=  250 {ft^3};          wall_thickness      :=  5 {mm};
81      wall_thickness      :=  5 {mm};          metal_density       :=  5000 {kg/m^3};
82      metal_density       :=  5000 {kg/m^3};      END values;
83  END values;  
84        METHOD bound_self;
85  METHOD bound_self;      END bound_self;
86  END bound_self;  
87        METHOD scale_self;
88  METHOD scale_self;      END scale_self;
89  END scale_self;  
90        METHOD default_self;
91  METHOD default_self;          D           :=  1 {m};
92      D           :=  1 {m};          H           :=  1 {m};
93      H           :=  1 {m};          H_to_D_ratio        :=  1;
94      H_to_D_ratio        :=  1;          vessel_vol      :=  1 {m^3};
95      vessel_vol      :=  1 {m^3};          wall_thickness      :=  5 {mm};
96      wall_thickness      :=  5 {mm};          metal_density       :=  5000 {kg/m^3};
97      metal_density       :=  5000 {kg/m^3};      END default_self;
 END default_self;  
   
98  END vessel;  END vessel;
99    
100  ADD NOTES IN vessel;  ADD NOTES IN vessel;
101  'description' SELF {This model relates the dimensions of a      'description' SELF {This model relates the dimensions of a
102         cylindrical vessel -- e.g., diameter, height and wall thickness          cylindrical vessel -- e.g., diameter, height and wall thickness
103         to the volume of metal in the walls.  It uses a thin wall          to the volume of metal in the walls.  It uses a thin wall
104         assumption -- i.e., that the volume of metal is the area of          assumption -- i.e., that the volume of metal is the area of
105         the vessel times the wall thickness.}          the vessel times the wall thickness.}
106  'purpose' SELF {to illustrate the insertion of notes into a model}      'purpose' SELF {to illustrate the insertion of notes into a model}
107  END NOTES;  END NOTES;
   
   
 (*  
  *  vesselMethods.a4c  
  *  by Arthur W. Westerberg  
  *  Part of the ASCEND Library  
  *  $Date: 1998/06/17 19:35:03 $  
  *  $Revision: 1.2 $  
  *  $Author: mthomas $  
  *  $Source: /afs/cs.cmu.edu/project/ascend/Repository/models/vesselMethods.a4c,v $  
  *  
  *  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.  
  *)  

Legend:
Removed from v.576  
changed lines
  Added in v.1385

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