SUBSIM Radio Room Forums

SUBSIM Radio Room Forums (https://www.subsim.com/radioroom/index.php)
-   Dangerous Waters (https://www.subsim.com/radioroom/forumdisplay.php?f=181)
-   -   Sub physics - experts needed (https://www.subsim.com/radioroom/showthread.php?t=125372)

Dr.Sid 12-02-07 10:56 AM

Quote:

Originally Posted by goldorak

Credit goes to Xabbarus. Textures now are 5 minutes in mspaint, but it looks quite OK even now. :|\\

goldorak 12-02-07 11:04 AM

Quote:

Originally Posted by Dr.Sid
Credit goes to Xabbarus. Textures now are 5 minutes in mspaint, but it looks quite OK even now. :|\\

The model even without textures is really nice, good job Xabbarus.
I know that you're working on the physics engine for the time being, but what about the graphics engine ? :hmm:
Are you going with opengl ?

MarkShot 12-02-07 11:05 AM

Bubblehead Nuke,

Although it is rather late this year, you should contact Neal for the 2009 Subsim Almanac. Those stories you tell about radical maneuvers on a sub are a good read and also your writing style is good too. You would definitely do well with a chapter in one of Neal's annual publications. I think he pretty much solicits in Q2 and wrap up is around the end of Q3. He had asked me this year about doing something on getting old subsims running on newer machines, but being in poor health these days I tend to avoid making committments to projects. But it sounds like you have some great stories to tell!

Dr.Sid 12-02-07 11:58 AM

Quote:

Originally Posted by goldorak
Quote:

Originally Posted by Dr.Sid
Credit goes to Xabbarus. Textures now are 5 minutes in mspaint, but it looks quite OK even now. :|\\

The model even without textures is really nice, good job Xabbarus.
I know that you're working on the physics engine for the time being, but what about the graphics engine ? :hmm:
Are you going with opengl ?

OpenGL, right. Sound will be OpenAL (nothing now). I'm keeping the possible ports to Linux or Mac in mind.
The graphics are very simple now, only 'feature' is that under the water there is more fog then above the water. I'm making least possible steps in each area now. GUI was first, then some basic graphics, now some basic mechanics (well it's more then basic now but still just a pilot), now will come the stations, then sonar.

Dr.Sid 12-02-07 12:16 PM

Ok .. so here comes the first live simulation.

http://roger.questions.cz/other/sim.zip

Just unzip, read the readme.txt for controls, go to bin, run the exe. It runs in window, it can be resized as you wish, just note that the picture will try to keep aspect from 3:4 to 16:10.

You can control: speed, planes, rudder, tanks and there is also course autopilot.

What is simulated now:
Engine thrust, speed and angle dependent drag. Drag caused by turbulences while surfaced is not simulated.
Dynamic lift - you can try to dive the boat with empty tanks or surface boat with full tanks.
Dynamic stabilization - boat tries to point to where it goes, just try surfacing from deep with zero speed.
Hydrostatic lift, hydrostatic stabilization in pitch axis - visible especially on the surface, ship tries to 'lie on the water'.
Bank axis is fixed for now. If you try to pitch your boat to 90 degrees it will collide with rudder effect and boat will twist in very very weird fashion. Don't do that or your submariners will get sick ! :-D Will be solved later.
Change of weight (flooding tanks) - buoyancy change is constant, does not depend on depth at the moment.
Most effect depends on how much the boat is submerged (drag for example) so even jumping out of the water should be more or less correct (like the boat will eventually fall down).

Only animated part of the boat is the screw now. There is some limit of how fast it rotates because some ugly interferences shows up at the high speeds. We will need some blurred screw model for these high speeds, similar to what flight sims use.

There is no depth limit, no fuel or HP air limit. There is no ground. Water is flat now, no waves or spherical shape.

So take this as a basis, do some tests .. and tell me what do you think about it, especially about the physics.

BTW: I know I was talking about the particles .. there are none at the moment, sorry for that.

To be 12-02-07 12:28 PM

Planes are very very powerful, and seem to react instantly. I just did an outward loop. Going to surface upside down now :D

Dr.Sid 12-02-07 12:43 PM

Quote:

Originally Posted by To be
Planes are very very powerful, and seem to react instantly. I just did an outward loop. Going to surface upside down now :D

Well this is possible only at high speeds and high planes deflection. My judgement is that they must react well at low speeds too, I based their effectiveness on that. It would be hard to turn real sub on it's back. It would turn sail up because of different centers of gravity and buoyancy, but as I said, I do not simulate bank axis now at all. I guess crew would not like it too :-D

The sub upside down looks like a airship .. or dead fish .. lol. New Navy model .. 889.

Btw. the depth is from center of gravity and in meters, not feet. Speed is in kts anyway.

MarkShot 12-02-07 02:10 PM

Just curious how you are modeling your physics?

I recall from flight sim design there are two standard approaches:

(1) Equation driven.

(2) Table driven.

#1 has the advantage a greater accuracy and avoiding discontinuities across the range of behavior. The disandvantage being more complex the get correct and computationally expensive.

#2 has the advantage of easy to implement; does not require lots of theory and delivers good performance. Also, easy to tweak and unlike equations does not necessarily produce a ripple effect throughout the entire model.

Thanks.

Dr.Sid 12-02-07 02:48 PM

I'm aware of 'oversimulation' .. I will use as many tables as possible and convenient. Especially for the tweaking. I can for example compute hydrostatics completely from the 3d model and most probably even realtime, but that would be really hard to tune to what you want. Good for ship design .. not good for game.

For now there are no tables, just basic approximations with sin and cos. For example submerged volume is interpolated with single sinus function now. I have little program to draw graphs and I made a curve of what would it really would look like for 688 .. and the sin fits it with few percent difference and much less space for mistakes. Later I will swap it for table. I still didn't decided interpolation curves for the tables. Anyway for example Orbiter seems to do just right with linear approximation only (for lift & drag curves for example).

Bubblehead Nuke 12-02-07 06:54 PM

Quote:

Originally Posted by jmr
Wow 30-40 degree rolls?!?!?!? That's amazing.

One time, while trying to clear a radio broadcast in a high sea state while at PD, we were experiencing high AND low level alarms concurrently on the primary and secondary systems.

Those of you who have been as sea know how far we were rock and rolling. You could ALMOST walk on the walls. We could for sure walk down passageways with one foot on the deck and the other on the wall, hopping from side to side as the boat rolled.

Bubblehead Nuke 12-02-07 07:23 PM

Quote:

Originally Posted by Dr.Sid
Ok .. so here comes the first live simulation.

So take this as a basis, do some tests .. and tell me what do you think about it, especially about the physics.

Nice..

I like..

I can't wait to see how you intergrate pitch and roll changes due to rudder and plane input.

Dr.Sid 12-02-07 07:36 PM

Quote:

Originally Posted by Bubblehead Nuke
I can't wait to see how you intergrate pitch and roll changes due to rudder and plane input.

Can't wait too :cool:
I need to add just few lines but I must think about it just a day or two more.
Now what bothers me are these planes on sail on original 688. What are they good for ?
They are too close to center of gravity so they can't affect pitch much.
Are they for lift ? Like wing for airplane ? Or maybe those small lift needed to balance buoyancy changes ?

Bubblehead Nuke 12-02-07 08:25 PM

Quote:

Originally Posted by Dr.Sid
Now what bothers me are these planes on sail on original 688. What are they good for ?
They are too close to center of gravity so they can't affect pitch much.
Are they for lift ? Like wing for airplane ? Or maybe those small lift needed to balance buoyancy changes ?

They are called FAIRWATER planes. They effect depth without having as much an effect on pitch.

Here is a decent explaination of them for you:

http://yarchive.net/mil/sub_bowplanes.html

I invite everyone to read them as they talk about some of these 'wild' angles I have been describing

jmr 12-02-07 08:57 PM

Quote:

Originally Posted by Bubblehead Nuke
Here is a decent explaination of them for you:

http://yarchive.net/mil/sub_bowplanes.html

I invite everyone to read them as they talk about some of these 'wild' angles I have been describing

Cool link there. Brings a tear to my eye to see what Usenet was like before the unwashed masses ruined it.

Dr.Sid 12-03-07 10:46 AM

I'm doing tests with bank angle. Now that really brings 'piloting' into it. Now I understand why they have 2 men driving the sub.

By my guess, there are 4 major forces effecting bank:

1) hydrostatic stability. Since center of buoyancy is higher then center of gravity, sub 'wants' to stand sail up even at zero speed.

2) hydrodynamic stability. Center of side-drag is similar to center of buoyancy for 688 .. near the centerline of the column-shaped body, or even higher because of the sail. Because of that, when water flows from the side of the sub, it will bank away from the water flow direction. This happens even in simple turn - in right turn sail banks to the right. Also if sub dives straight down, this helps keep the sail up. Sail is kind of flag so it turns to opposite of 'wind' direction.
If the sub surfaces straight up, this force would force the sail down (to 'flag' behind the main body). In this case hydrodynamic stability fights against hydrostatic stability.

3) screw rotation. Forces the body to rotate in opposite direction.

4) planes input. Used to fight all these effects.

Now amount of individual effects is quite mystery to me. I could compute at least hydrostatics quite well, but I would need to know where exactly point of gravity lies in 688. I don't know that. This too affects hydrodynamics. Screw effects ? No idea. At what vertical speed is the hydrodynamics stronger then hydrostatics ? No idea.
Planes effects .. is it possible to turn the sub upside down ? Can planes fight over hydrostatic stability ?

Anyway this really complicates all maneuvers. Simple right turn for example will bank the sub to the right which will make the banked rudder to pitch sub down. I know this really happens, but again, the amount is unknown.

Any ideas ?


All times are GMT -5. The time now is 03:35 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 1995- 2025 Subsim®
"Subsim" is a registered trademark, all rights reserved.