/[ascend]/trunk/models/johnpye/moody.a4c
ViewVC logotype

Contents of /trunk/models/johnpye/moody.a4c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 912 - (show annotations) (download) (as text)
Fri Oct 27 07:18:21 2006 UTC (12 years, 8 months ago) by johnpye
File MIME type: text/x-ascend
File size: 744 byte(s)
Removed BBOXWHINE (replaced with some one-time-only warnings for the moment)
Added ExtMethodDestroyFn to allow 'user_data' associated with external methods to be destroyed.
Implemented the destroy fn through to 'extpy' module.
Added 'name' as an extra parameter in the user_data for extpy, to help with debug msgs.
Moved 'solvernotes' to a file of its own (was part of listnotes.py)
Added 'repaint' to GTK 'tools' menu (for debugging)
Added 'python.h' to top of library, type files (pygtk) to stop silly warnings.
Working on some diagnosing of problems as noted in Simulation::checkInstance.
Removed some old comments from namio.h and others.
Renamed 'blsys' to 'sys' in integrator.c.
Some work on fixing up the J*v function for IDA (not yet complete).
Added new 'destroyfn' parameter (as NULL) to all calls to 'CreateUserFunctionMethod'.
1 REQUIRE "atoms.a4l";
2
3 IMPORT "dsg";
4 IMPORT "johnpye/extpy/extpy";
5 IMPORT "johnpye/moody";
6 IMPORT "johnpye/solvernotes";
7
8 ADD NOTES IN moody;
9 'QRSlv' iterationlimit {50}
10 END NOTES;
11 MODEL moody;
12 f IS_A positive_factor;
13 Re IS_A positive_factor;
14 eps_on_D IS_A fraction;
15
16 friction: dsg_friction_factor(
17 Re, eps_on_D : INPUT;
18 f : OUTPUT
19 );
20
21 eps IS_A distance;
22 D IS_A distance;
23 eps_on_D = eps / D;
24 METHODS
25 METHOD on_load;
26 EXTERNAL solvernotes(SELF);
27 EXTERNAL setsomevalue(SELF);
28 RUN reset;
29 EXTERNAL checksomevalue(SELF);
30 RUN values;
31 END on_load;
32 METHOD specify;
33 FIX Re, eps, D;
34 END specify;
35 METHOD values;
36 Re := 20000;
37 eps := 0.007 {mm};
38 D := 25.4 {mm};
39 END values;
40 METHOD plot;
41 EXTERNAL moodyplot(SELF);
42 END plot;
43 END moody;

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