Show Posts

Pages: [1]

1

Java Game APIs & Engines / Java 3D / Re: 3d maths fundamentals for high level APIs

on: 20031107 08:39:55

Calculation of the drag force is fairly straight forward for simple shapes such as spheres or teardrops in air.
Drag = 0.5 * density * crosssectionalarea *velocity ^2 *Cd
where Cd  drag coefficient, remembering to use consistent UNITS of course!!!
the drag coefficient for simple shapes can be found on the web for a sphere this is roughly 0.5, however, if you wish to perform more accurate aerodynamic predicitions than this does vary with a dimensionless number called the Reynolds number. The Reynolds number is a function of the density, vsicosity, velocity and a characteristic dimension of the object i.e. the diameter of the sphere.



2

Game Development / Game Mechanics / Re: Drag calculations

on: 20030605 19:26:58

Appologies, I changed my comment at the last second as what I originally wrote is not strictly true for all cases.
Inviscid (laminar) and viscous (turbulent) flows, hence, by calculation of the Reynolds number you can determine if the flow is in the inviscid (laminar) or viscous (turbulent) flow regime.
Reynolds Number, Re = density * velocity * characteristic length / dynamic viscosity
A characteristic length would be the wing chord length, or for a sphere the diameter etc
As for your estimates on calculation times, to give you some kind of order of magnitude of the time it would take to solve using the panel method for inviscid flows on a typical home pc, I would be looking at a few minutes rather than hours for a model consisting of 200300 polygons.
I also neglected to mention that you can also use the panel method for flows where viscous effects are important by including what is known as boundary layer model. The boundary layer is the region next to the surface where the viscous shearing forces occur. This only adds slightly to the complexity and cost of the calculation without having to resort to full viscous calculations.
For hydrodynamic flows similar approaches to the panel method are frequently used in conjunction with boundary layer and wake models. to model the drag on the hull and bow wave pattern generated on the water surface.



3

Game Development / Game Mechanics / Re: Drag calculations

on: 20030605 15:26:51

Inviscid flows are where the effects of fluid viscosity are negligible, as opposed to viscous flows where the effects of viscosity are significant.
The Reynolds number gives an indication as to the flow regime you are operating in i.e. if the flow is laminar or turbulent. For an aerofoild section the transition from laminar to turbulent flow occurs at roughly 0.5E6 and for a sphere at approximately 50.



4

Game Development / Game Mechanics / Re: Drag calculations

on: 20030604 20:26:57

Just a few points to hopefully add some additional value to this topic.
The drag coefficient is dependent not only on shape but also on a dimensionless number called the Reynolds number (among others)  the Reynolds number is a function of the fluid properties, velocity and characteristic dimension of the object.
For the majority of cases there are two main contributions to the drag of an object pressure drag and viscous drag. Viscous drag and fluid compressible effects only starts to become important at higher speeds, usually over Mach 0.3 (about the top speed of an F1 car on current race circuits), however for an efficient aerodynamic design this can rise to about 0.50.6.
Two computational approaches have developed in the field of Computational Fluid Dynamics (CFD) for solving these types of problems, the first, appropriate for inviscid problems is the Panel Method (more formally known as the Boundary Element Method, BEM) which solves a reduced form of the governing equations called the Euler Equations, and the second for viscous problems which solves the full NavierStokes equations.
Which approach you should "ideally" use is therefore dependent on what the problem is. The inviscid panel method is used by most Auto/F1 teams for the bulk of their aerodynamic calculations, however, viscous calculations are perfomed in conjunction with inviscid calcs in the aerospace industry.
However, for game development, solving the NavierStokes equations in gametime even on the fastest of PC's available is not really possible as even the very simplest of 3D problems consisting of several hundred calculations points can take a noticeable amount of time to solve, if infact a solution is obtained. A typical industrial CFD problem would consist of several hundred thousand calculation points for accurate results. Also, baring in mind that the drag AND drag coefficient will change depending on what the object is currently doing and therefore will have to be updated frequently. Thats assuming the average game developer can code what is essentially one of the most complex software applications on the planet.
Performing gametime calculations using the Panel method would be feasible since the computational cost of such calculations is considerably reduced due to the simpler form of the equations used and the fact that the method only requires a 2D surface description of the object (your polygon model for example) as opposed to a 3D computational domain for the full equations. Again you just have to code it!





Add your game by posting it in the WIP section,
or publish it in Showcase.
The first screenshot will be displayed as a thumbnail.

javagaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org

