SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SH5 Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 03-27-13, 08:22 AM   #1576
LemonA
Lieutenant
 
Join Date: Jan 2012
Posts: 252
Downloads: 66
Uploads: 0
Default

american u-boat 1944: speed vs. duration

Formular y = 2.402133918·10^-6 x^6 - 2.480632527·10^-4 x^5 + 1.022176849·10^-2 x^4 - 2.159633693·10-1 x^3 + 2.53236561 x^2 - 18.08338354 x + 115.6332116

Battery capacity of type vii C maybe found in commanders handbook

some other info here
http://www.uboat.net/technical/batteries.htm
and her3
http://sourceforge.net/apps/trac/der...i/VIIbatteries

NYGM or GWX3 (SH3) have totally different calculations.
Ex. With ordered submerged speed 6 kts the battery lasts longer than 23 hours but the speed droppes off sharply etc.
__________________
Robert Schmidt, LTJG
U-43

Last edited by LemonA; 03-27-13 at 08:39 AM.
LemonA is offline   Reply With Quote
Old 03-27-13, 09:23 AM   #1577
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by Vanilla View Post
1/3 power (cube root) is to give lesser speed increase at greater speed orders. That is - less and less efficiency (speed increase) at greater and greater PS applies. Just look at the plot of the cube root.
NB: Cube root works well both for positive and negative ordered speeds as compared to even roots (that is why it is not square root - 1/2 power).
that makes perfect sense Thank you

Quote:
Originally Posted by Vanilla View Post
Ok, here is the analysis:

Let's first derive the formula implied in the code:

speed = 30.99133 x cube_root[ (7432.328 / 559500) x (XMM2 + ordered_speed x XMM1) x (ordered_speed x XMM1)^2 ]

or:

speed = 30.99133 x 0.23683266 x cube_root[ (XMM2 + ordered_speed x XMM1) x (ordered_speed x XMM1)^2 ]

We can try to simplify it further but if we just insert this formula into excel/calc we will get to the following values (we drop the negative values since we cannot see what what is done with those from the code excerpt given):
Code:
0             0,00000
0,1          4,38442
0,2          7,55932
0,3          10,58301
0,4          13,54768
0,5          16,48260
0,6          19,40030
0,7          22,30711
0,8          25,20658
0,9          28,10086
1             30,99133
Now we can see that the speed goes way higher than expected max 12 knots. There should be some mechanism that limits either the speed or the orders. My guess that the game actually limits the order by 0,4 this gives 13,6 knots -- close to the max speed.
The other thing to see is that the combination of constants 3.913995 (xmm1) and 7432.328/559500 works so that the max speed at order 1.0 will be equal to the constant given later in the code (30.99133) if we change this number to, say, 20, the speed at 1.0 setting will be also 20 with speeds at other settings changing accordingly (@TDW this can be the answer to your question), at 0.4 setting the speed will be 8.7 knots.
What is puzzling is XMM2 which changes almost nothing. If we set it to 0 the max speed (30.99) will change only by 2 knots to 28 and the speed at 0.4 will be 11.49. Why this xmm2 variable is needed at all?

To put some logic into the formula here is my thinking:
  • 1/3 power (cube root) is used to make the curve that match reduced efficiency at greater power.
  • The 3.913995 number is the conversion coefficient for either PS or RPMs to knots. That is, for example 'we get 3.913995 knots per each 100 RPMs increase if we assume 100% efficiency.
  • The 30.99133 is theoretically possible max speed the sub can achieve. (Though it is puzzling why it is so huge? Surface speed with all the upgrades? Still too much).
  • xmm2 is a puzzle
  • The 7432.328 and 559500 are there just to balance the equation
I will play around with the values to try and verify/figure out what this XMM2 variable is doing This is a great puzzle. I love trying to figure out why a programmer made the code the way they did. This one is one of those hmmmm types
I have to see if those same constants hold true when the sub is surfaced and using diesels for engine power. If so this could answer why the 30.99133 contant.
TheDarkWraith is offline   Reply With Quote
Old 03-27-13, 10:10 AM   #1578
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Brilliant deductions, guys
gap is offline   Reply With Quote
Old 03-27-13, 01:25 PM   #1579
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

@Vanilla: I think you are correct in that the speed in knots from the calculation is the theoretical maximum speed in knots by that engine alone. I did more testing:

VIIC surfaced (5m) with no snorkel using diesel engines (both available):

zeroes out XMM0
loads 1.0 into XMM2
Loads something dealing with engine into XMM1 (9.115489) <----- this number is a constant and does not change with ordered throttle settings. This number changes to a different value when using electric engines
multiplies XMM1 by ordered throttle (0.3) - ordered speed in range -1.0 to 1.0
XMM1 now equals 2.734647
compares XMM0 (0.0) to XMM1
if before or equal then jump to *1*
saves -1.0 to stack variable
jumps to *2*
*1* compares XMM1 to XMM0 (0.0)
if before or equal then jump to *3*
loads XMM2 (1.0) into stack variable
jumps to *2*
*3* loads XMM0 (0.0) into stack variable
*2* compares XMM0 (0.0) to XMM1
loads XMM1 into XMM0 (XMM0 now equals 2.734647)
if before or equal then jump to *4*
changes sign of XMM0
*4* loads constant 0.333333 (1/3) into ST0
adds XMM2 (1.0) to XMM0 (2.734647) thus XMM0 now equals 3.734647
divides XMM0 by 2387200.0 <---- this number is a constant and does not change with ordered throttle settings. This number changes to a different value when using electric engines
XMM0 = 1.564447e-06
multiplies XMM0 by 2840.155 <---- this number is a constant and does not change with ordered throttle settings. This number changes to a different value when using electric engines
XMM0 = 0.004443270
multiplies XMM0 (0.004443270) by XMM1 (2.734647)
XMM0 = 0.1215077
multiplies XMM0 (0.1215077) by XMM1 (2.734647)
XMM0 = 0.332280667
raises XMM0 to the 0.3333333 power (1/3 power) - a function is called to do this and it returns the value in ST0
ST0 = 0.321490681
multiplies ST0 by 50.26548 <---- this number is a constant and does not change with ordered throttle settings. This number changes to a different value when using electric engines
ST0 = 16.15988339 which is the new theoretical maximum speed of this engine in knots at this throttle setting
multiplies ST0 by stack variable
saves ST0 to engine's theoretical maximum speed in knots at this throttle setting to memory address

Notice the constants do not change with different throttle settings. They do change with engine type though (diesel or electric) so that further provides proof. The ordered throttle is the value defined in the unit's .cfg file under [EngineProperties]. I believe that lowering the value highlighted in yellow (or the one in cyan) over the player's career will account for engine wear over time. Agree I'm going to check to see if the game continually writes to this memory value or if it's static (only wrote to at game start).
TheDarkWraith is offline   Reply With Quote
Old 03-27-13, 03:21 PM   #1580
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

what if this number isn't the theoretical maximum speed of the engine in knots but rather the RPM of that engine's shaft (in the water) The constants could be related to gearing reduction.

Anyone have any figures on what the RPM of the shafts were at different bells for the subs?
TheDarkWraith is offline   Reply With Quote
Old 03-27-13, 03:40 PM   #1581
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

it doesn't dictate the shaft's RPM but it does play a part in it somehow Just watched it from external cam. Changed the cyan value to half what it was and speed didn't drop to half it's value (sub's actual speed) but only dropped a few knots. Shaft RPM changed considerably though.
TheDarkWraith is offline   Reply With Quote
Old 03-27-13, 06:27 PM   #1582
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

There are some things that just totally crack you up. While decoding more items out of SHSim.act I came across where it sets the minumum battery capacity allowed (0.001). The offset of this in the SHSim.act (when viewed in debugger) was 0x21BFE....BFE....get it? Coincidence
TheDarkWraith is offline   Reply With Quote
Old 03-27-13, 06:53 PM   #1583
keysersoze
Ensign
 
Join Date: Feb 2012
Location: USA
Posts: 226
Downloads: 344
Uploads: 0
Default

Quote:
Originally Posted by TheDarkWraith View Post
what if this number isn't the theoretical maximum speed of the engine in knots but rather the RPM of that engine's shaft (in the water) The constants could be related to gearing reduction.

Anyone have any figures on what the RPM of the shafts were at different bells for the subs?
Not sure if this is still relevant, but according to uboatarchive.net (for a VIIC), here is the max rpm for both the MAN and GW diesels.

Forward
Flank - 471 rpm
Full - 435 rpm
Standard - 340 rpm
One-Third - 275 rpm
Slow - 180 rpm

Reverse
Flank - 285 rpm
Full - 215 rpm
Standard - 160 rpm
One-Third - 110 rpm
Slow - 55 rpm

This information is from page 17. It is referring specifically to turning radius at different speeds, but in the note at the bottom of the charts, it says "RPM are valid at the moment of running into the turning circle and during the steady turning condition of the boat are accordingly lower."

More general propulsion information can be found on page 118. There's also some great stuff on battery discharge rates on p. 133.

EDIT: sorry, here's the link:
http://www.uboatarchive.net/Manual.htm
keysersoze is offline   Reply With Quote
Old 03-27-13, 08:03 PM   #1584
CaptBones
The Old Man
 
CaptBones's Avatar
 
Join Date: Nov 2010
Location: Rockton, IL
Posts: 274
Downloads: 208
Uploads: 0


Default RPM-speed tables

ALCON may have found the information already, but...

The shaft RPM tables are on pg 14 of the Type VIIC manual at uboatarchive.net. There are also some photos at uboat.net of U-995's engine order telegraphs and RPM-speed table placards.

The engine RPM and shaft RPM are the same in the case of the subject U-Boats. The propulsion plants were (are, actually...as far as the surviving museum boats go) direct-drive with reversible diesel engines and propulsion motors; there are no reduction gears.
CaptBones is offline   Reply With Quote
Old 03-27-13, 08:24 PM   #1585
THE_MASK
Ace of the deep .
 
THE_MASK's Avatar
 
Join Date: Jan 2006
Posts: 9,226
Downloads: 901
Uploads: 73


Default

I think that maybe the orbit listener patches are interfering with the game . I noticed that the ship sunk progress bar doesn't fill anymore . I disabled the orbit patches and then noticed that any save games I had with the orbit patches enabled were not there in the save game load page . cheers .
THE_MASK is offline   Reply With Quote
Old 03-27-13, 10:55 PM   #1586
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by sober View Post
I think that maybe the orbit listener patches are interfering with the game . I noticed that the ship sunk progress bar doesn't fill anymore . I disabled the orbit patches and then noticed that any save games I had with the orbit patches enabled were not there in the save game load page . cheers .
ah so there more to it than meets the eye What happens if you only enable the main loop ones
TheDarkWraith is offline   Reply With Quote
Old 03-27-13, 11:25 PM   #1587
THE_MASK
Ace of the deep .
 
THE_MASK's Avatar
 
Join Date: Jan 2006
Posts: 9,226
Downloads: 901
Uploads: 73


Default

Quote:
Originally Posted by TheDarkWraith View Post
ah so there more to it than meets the eye What happens if you only enable the main loop ones
I will do some testing tonight .
The TDW_SH_NClient_Patch.s5p saved games seem to be working . Loading and saving with either the patch applied or not , all the save games are there every time .
I will now try the Disable orbit listener checks in main game loop .
I will first determine which patch makes save games disappear and then I will check the progress bar not filling up .
I disabled all the orbiter patches and now the progress bar fills up during the campaign .
I enabled the SH_NClient patch and the progress bar didn't fill up .
I then disabled the SH_NClient patch and reloaded the save game and I got a CTD on torpedo impact on an enemy ship .
I cannot remember what I did next to be honest . I think I loaded a previous save and then saved a new save and then deleted the save which would have been used with the enabling and disabling of the patches . I was able to sink the ships with the torps using my current save that wasn't used when disabling and enabling the patches . I wasn't game enough to touch the other 2 orbiter patches , as I just completed north western approaches for the 2nd time in 3 years real time .

Last edited by THE_MASK; 03-28-13 at 10:29 PM.
THE_MASK is offline   Reply With Quote
Old 03-28-13, 12:30 AM   #1588
Fifi
Navy Seal
 
Fifi's Avatar
 
Join Date: Dec 2012
Location: France
Posts: 5,793
Downloads: 457
Uploads: 0


Default

It's affecting the saved game, but also the OHII working...as i said in OHII thread (with the discover of Sober).
With Orbiter stuff enabled, OHII tonnage mission loading bars aren't working anymore, furthermore i don't know if mission can be completed!
As soon as i desabled all Orbiter options and restarted a career, tonnage bars are fonctioning again
Fifi is online   Reply With Quote
Old 03-28-13, 02:07 AM   #1589
hitmanuw
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

i have say that tonnage mission loading bars aren't working anymore here
http://www.subsim.com/radioroom/show...postcount=1554 end i sent a pm to TDW 2 or 3 day ago ....
  Reply With Quote
Old 03-28-13, 06:47 AM   #1590
Vanilla
Lieutenant
 
Join Date: Nov 2006
Location: St. Petersburg, Russia
Posts: 264
Downloads: 72
Uploads: 0
Default

Quote:
Originally Posted by TheDarkWraith View Post
it doesn't dictate the shaft's RPM but it does play a part in it somehow Just watched it from external cam. Changed the cyan value to half what it was and speed didn't drop to half it's value (sub's actual speed) but only dropped a few knots. Shaft RPM changed considerably though.
All the constants (except 'max_speed' cyan constant) are there just to make the curve look like they wanted. Here is the plot of linear relation, simple cube root without all the constants (max_speed constant is still there) and the devs' curve (for electric engines). Why they needed it so -- I have no idea.
Vanilla is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 06:58 AM.


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