Parent Directory | Revision Log

Revision **2649** -
(**show annotations**)
(**download**)
(**as text**)

*Wed Dec 12 12:39:25 2012 UTC*
(11 years, 10 months ago)
by *jpye*

File MIME type: text/x-ascend

File size: 1753 byte(s)

File MIME type: text/x-ascend

File size: 1753 byte(s)

Fixing GPL header, removing postal address (rpmlint incorrect-fsf-address)

1 | (* ASCEND modelling environment |

2 | Copyright (C) 1998, 2007 Carnegie Mellon University |

3 | |

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, see <http://www.gnu.org/licenses/>. |

16 | *) |

17 | REQUIRE "atoms.a4l"; (* => atoms.a4l, measures.a4l, system.a4l, basemodel.a4l *) |

18 | (* |

19 | by Art Westerberg, 1998 |

20 | |

21 | This model illustrates how variables are declared and relations written. |

22 | The model contains no initialisation for any of the variable values, and |

23 | does not specify which variables are 'fixed' and which ones should be |

24 | solved for. For this reason, when loaded, this model will cause problems |

25 | that ASCEND will attempt to resolve through warnings to the user. |

26 | *) |

27 | |

28 | MODEL vesselPlain; |

29 | |

30 | (* variables *) |

31 | side_area, end_area IS_A area; |

32 | vessel_vol, wall_vol IS_A volume; |

33 | wall_thickness, H, D IS_A distance; |

34 | H_to_D_ratio IS_A factor; |

35 | metal_density IS_A mass_density; |

36 | metal_mass IS_A mass; |

37 | |

38 | (* equations *) |

39 | FlatEnds: end_area = 1{PI} * D^2 / 4; |

40 | Sides: side_area = 1{PI} * D * H; |

41 | Cylinder: vessel_vol = end_area * H; |

42 | Metal_volume: (side_area + 2 * end_area) * wall_thickness = wall_vol; |

43 | HD_definition: D * H_to_D_ratio = H; |

44 | VesselMass: metal_mass = metal_density * wall_vol; |

45 | |

46 | END vesselPlain; |

john.pye@anu.edu.au | ViewVC Help |

Powered by ViewVC 1.1.22 |