User:Al Da Best
Contents
Personal Information
Name: Alex Taylor
Email: alex.taylor42@live.co.uk
IRC Name: Al_Da_Best
Brief Background: I am 18 years old, in my first year studying Aeronautical Engineering at Loughborough University (UK). I left College with high grades in maths, physics and computing, with maths being my strong point academically.
Project
Non-vacuum gravity simulator
The current simulation available in BRL-CAD has not been developed in depth, and is quite limited in its implementation. It can currently only simulate very basic situations in vacuums. For this project I aim to vastly improve this area by adding additional features such as variable fluid for the object to fall through, a variable ground surface which would allow simulating reactions from it through use of the coefficient of restitution and other such formulae. Another feature would be to allow for variable gravity, since gravity is weaker at greater distances from the Earth, and indeed other large masses. After some thought and looking at the available physics engines I have opted to go with the Bullet engine. The reasons for this include its superior capability to constantly check for collisions, combined with its relatively fast simulations compared to, say, ODE and it is already integrated to some extent into BRL-CAD.
So there are 3 clear features I want to implement into the simulation system, fluid dynamics, ‘rebound’ mechanics and improved gravitational system.
Fluid Dynamics
This is an area with hugely far reaching possibilities, with CFD potential in the long run, and open source libraries such as OpenFVM being available, however to begin with I intend to keep this relatively simple. To start with, this would consist of having a user-defined fluid, or more specifically if desired, the density of the fluid. From this the software would be able to calculate an estimate of the drag coefficient and thus drag which will result in a more correct representation in the simulation if a user wished to see the position of an object at certain time intervals. I would also want to add the functionality for a variable fluid as this would allow the density to increase say if an aircraft was simulated to drop from 30,000 feet. This would involve the creation of several functions that would include calculating the surface area of the object facing perpendicular to the firm plane, a function to either calculate or retrieve (if it is a standard shape) the value of its coefficient of drag, which would then be passed to a larger set of functions and it would more or less directly counter gravity. This does open up another potential path of functions, for moments. Now, whilst calculating the drag on the surface of the object is a good start, there is much more potential that would allow for the calculation of the rotation of the object as it falls through space, by resolving the forces caused by drag. This would of course mean that the centre of gravity of the object will need to be found, and that is relatively easy to do, but will depend on how complex the shape is and may require some estimation. An issue with objects rotating is that they will create variable drag, and whilst the software will be able to calculate the drag at every point in the simulation, there will be a loss in accuracy since the fluid will be assumed to be moving at a user pre-defined velocity, and this won’t be affected by the motion of the object as it realistically should be.
Collision Physics
There is already some implementation of this within the simulation, however it is in a very early stage and I feel has much more potential than it currently uses. As I briefly mentioned I would like to allow for variable materials. Expanding further upon this, and taking into account the makeup of the Earths’ surface, I would very much like to implement some water physics. By that I mean for the software to be able to simulate the effect of dropping an object from high atmosphere into water, and allowing for forces such as upthrust as this would allow for simulating say, satellites dropping from orbit. Now, there is always potential to do more with simulations, and in this case, it would be possible for the simulation to calculate the forces acting upon the object at impact, and may be able to determine the stress and strain in various regions, which could enable it to point out where the points of highest stress concentration are, and could even visualise fracture lines. For a complex shape this would be quite a lot of work for the software to do of course, however a relatively simple shape would be very easy to simulate. Due to time constraints, it may not be possible to complete a full version of this; therefore I propose a system that can calculate said issues for simple objects such as perfect spheres, squares, rectangles, and so on, just to get the basics of a system down for a future full implementation.
Improved Gravitational System
The simulation currently can certainly handle gravity, however only at a basic level of things falling to the ground. As far as I can tell, it is very lightly implemented, just passing a value of -10 for gravity to the bullet class, this would be replaced by a separate function that would take into account the gradual increase of the acceleration due to gravity since at 500km away from Earth gravity is a fair amount smaller, and simulating that distance would make a noticeable difference between a standard value of 9.81 and the true values. I would want to improve this to take into account other user specified masses. For example, if something were to drop from orbit, there would be a sizable gravitational force upon it from the Earths’ moon. Furthermore, if we are simulating several large objects, to increase accuracy it would be ideal for the simulation to take into account the gravitational pull each object will have on the others, however minor it is.
Deliverables
A system that can calculate the drag resulting from a falling object, as well as calculate rotation due to that drag.
A system that can consistently cope with any collisions with a surface that takes into account the force exerted upon the object by the surface and also allows for said surface to be water, in which the fluid system will take over again.
A system that can calculate gravity at any distance from the surface, which will also take note of the gravitational effect from other large masses.
A method, either command line or GUI, that will allow the user to specify as many options as is possible to allow for a simulation that is suited to the users’ needs.
Development Schedule
(Unless otherwise specified, 40+ hours of work to be assumed):
23rd April – 5th May
- Flesh out any last details in project, have all objectives clear and the schedule complete.
- Gain commit access before or during this point
5th May – 21st May
- Learn as much about any relevant libraries such as Bullet, and BRL-CAD libraries such as librt and libged as I can, to enable me to be able to get straight into coding with the knowledge of what is already there and how to use it.
- Start writing function outlines, header files to make it clearer as to what goes where and how to reuse code efficiently.
- Iron out any current bugs in the simulation files, to ensure a fully working simulation environment.
21st May – 28th May
- Coding begins. Start by working on the gravitational system as this will be the easiest to implement and so will take the shortest amount of time, and will make sure I am completely familiar with the code.
28th May – 4th June
- Milestone 1: Gravitational system complete and fully bug tested.
- Once milestone 1 is reached, begin work on the fluid system, starting with functions to calculate drag on surfaces
4th June – 11th June
- Exam period starts at University, limited time available.
- In available time, work on drag functions and start to implement functions to resolve the forces from the drag (In x,y and z directions)
11th June – 18th June
- Exam period ends
- Carry on implementing functions to resolve forces and start on functions to resolve moment forces to show rotation in the simulation
18th June – 25th June
- Continue working on the fluid system and begin bug testing
- After 22nd June assume 50+ hours working, to make up for lost time during University term
25th June – 2nd July
- Milestone 2: Fluid system complete and fully bug tested.
- Start work on the collision system
2nd July – 9th July
- Preparing for mid-term evaluations, fixing all current code up to this point which will be around two thirds of the whole project
- Continue work on the collision system
9th July - 16th July
- Continue work on the collision system
16th July – 23rd July
- Milestone 3: Collision system completed
- From this point forward, start black box testing to ensure everything works
23rd July – 30th July
- Milestone 4: Black box testing complete
- Start white box testing to ensure code is of a high standard
30th July – 3rd August
- Milestone 5: White box testing complete
- All following time is a buffer zone. If everything complete, begin work on adding more functionality to the fluid system, namely the underwater physics
3rd August – 17th August
- I will be in Germany during this period on holiday. I will however, still have a laptop as well as internet access so although this is a critical time with respect to final evaluations and so on, there is no reason for me to not be able to work
- Time spent cleaning up code if needed, write documentation to enable users to easily utilise any of the functionality of the simulation system.
17th August – 24th August
- Any last minute fixes are made, final evaluations sorted and project finished.
- Milestone 6: Project finish, submit evaluations.
Extra
BRL-CAD interests me because I have some background in CAD and modelling work and I expect to be doing a lot more of it as the years progress on my course and potentially in a working environment in the future. The simulation project caught my eye specifically, as whilst I am interested in several of the ideas, simulations are an area I like to use and would be very interested in improving.
Whilst my knowledge of C/C++ are not as strong as I would like, I am confident that I can learn a lot from this project and build my skills up before the coding begins properly to a more than adequate level. I believe that I have all the mathematical ability that I will need to complete this project, including knowing how and where to use which formula's. Naturally, this would help reinforce what I have been taught which will be useful during exams and the coming years.
I would undoubtedly continue to work on BRL-CAD after this project is complete, most likely on the simulation software as I still have several ideas for improving that, ranging from full computational fluid dynamics modelling to a fully featured fracture system.