forums

TNT Basic Forums > Programming Q&A
Stellar dynamics
< Last Thread     Next Thread >
Author
Thread        Post A Reply

02-06-2008 20:38

Posted by:
jonlavis

Location:
Exeter, UK

Click Here to Email jonlavis   Find more posts by jonlavis

I am looking for a programming language for a particular project. I wish to create software to model star clusters - how the stars move, facilities for different integration schemes etc. I know I should be using Fortran or C or C++ but I got fed up with Fortran a long time agao and I am allergic to curly brackets. There is a similar (much larger) project at www.artcompsci.org. They are using Ruby but that is too much like C++ or Java for my taste. I won't be wanting to have huge numbers of particles, I am more interested in small clusters and how the stars behave.

So my question is, could I use TNT to do this? Is TNT up to some serious science?

02-07-2008 02:07

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

I'd say it's possible but some parts may be more painful than in other languages, and slower.

For instance, if you want to display stuff in 3D, in C++ with some 3D engine you could just tell the coordinate, while in TNT you will need to do all projection stuff yourself, with no support for matrices or anything.

How it will work depends on your math - probably you should compare the maths you need and TNT's features

02-07-2008 10:51

Posted by:
jonlavis

Location:
Exeter, UK

Click Here to Email jonlavis   Find more posts by jonlavis

I have two reasons for this project. One is historical interest, the other and more important reason is as a vehicle for teaching numerical analysis. Since I want to teach the concepts without all the mathematical apparatus of real analysis and proof, I am going to use the movement of bodies under the influence of gravity as a teaching tool. This is also where the historical interest comes in, numerical analysis was invented to handle 3 or greater bodies in space.

Essentially, I'll set up a piece of code that can handle all the book keeping and display, my students will write code to carry out integration of equations of motion to investigate various algorithms. So I need a nice simple language (I don't want to also have to teach C++) for them to play with.

Speed is not an issue, nor is 3d display since the main point of interest will be what the numbers are doing. I will probably provide a similar display to piece of software I already have which provides two 2d displays of the bodies in motion. In fact, something slower will be an advantage since we will then be able to see real advantages from more efficient integration schemes. I suspect I will actually be getting more speed out of our group of G5s and TNT than the original researchers got out of huge computers and Fortran in the 1970s.

02-07-2008 17:31

Posted by:
swagIT

Location:
Great Wet North (Vancouver)

Find more posts by swagIT

I'm with 'someone' on this one. I would take a look at all the different Math Commands from here:

http://www.tntbasic.com/learn/help/TNT%20Basic%20Help.htm

and make certain everything you need is available.

If it is - I see no reason why you cannot use TNT for this project.

The simplicity of the language is a definite advantage

My two-bits

cheers

barry

All times are GMT        Post A Reply

Forum Jump:
< Last Thread     Next Thread >

< Contact Us - TNT Basic >

Powered by: vBulletin Lite Version 1.0.1 Lite
Copyright © Jelsoft Enterprises Limited 2000.