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

Diff of /trunk/models/vesselPlain.a4c

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

revision 1293 by aw0a, Fri Oct 29 20:54:12 2004 UTC revision 1294 by johnpye, Mon Feb 26 22:44:04 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 "vesselPlain.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    REQUIRE "atoms.a4l"; (* => atoms.a4l, measures.a4l, system.a4l, basemodel.a4l *)
20  (*  (*
21   * This file is part of the ASCEND Modeling Library and is released      by Art Westerberg, 1998
22   * under the GNU Public License as described at the end of this file.  
23   *)      This model illustrates how variables are declared and relations written.
24        The model contains no initialisation for any of the variable values, and
25        does not specify which variables are 'fixed' and which ones should be
26        solved for. For this reason, when loaded, this model will cause problems
27        that ASCEND will attempt to resolve through warnings to the user.
28    *)
29    
30  MODEL vessel;  MODEL vesselPlain;
31    
32      (* variables *)      (* variables *)
33      side_area, end_area IS_A    area;      side_area, end_area  IS_A area;
34      vessel_vol, wall_vol    IS_A    volume;      vessel_vol, wall_vol IS_A volume;
35      wall_thickness, H, D    IS_A    distance;      wall_thickness, H, D IS_A distance;
36      H_to_D_ratio        IS_A    factor;      H_to_D_ratio         IS_A factor;
37      metal_density       IS_A    mass_density;      metal_density        IS_A mass_density;
38      metal_mass      IS_A    mass;      metal_mass           IS_A mass;
39    
40      (* equations *)      (* equations *)
41  FlatEnds:   end_area = 1{PI} * D^2 / 4;      FlatEnds:      end_area = 1{PI} * D^2 / 4;
42  Sides:      side_area = 1{PI} * D * H;      Sides:         side_area = 1{PI} * D * H;
43  Cylinder:   vessel_vol = end_area * H;      Cylinder:      vessel_vol = end_area * H;
44  Metal_volume:   (side_area + 2 * end_area) * wall_thickness = wall_vol;      Metal_volume:  (side_area + 2 * end_area) * wall_thickness = wall_vol;
45  HD_definition:  D * H_to_D_ratio = H;      HD_definition: D * H_to_D_ratio = H;
46  VesselMass: metal_mass = metal_density * wall_vol;      VesselMass:    metal_mass = metal_density * wall_vol;
   
 END vessel;  
47    
48    END vesselPlain;
 (*  
  *  vesselPlain.a4c  
  *  by Arthur W. Westerberg  
  *  Part of the ASCEND Library  
  *  $Date: 1998/06/17 19:35:05 $  
  *  $Revision: 1.2 $  
  *  $Author: mthomas $  
  *  $Source: /afs/cs.cmu.edu/project/ascend/Repository/models/vesselPlain.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.1293  
changed lines
  Added in v.1294

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