Skip to content

Conversation

@kdemmich
Copy link
Collaborator

  • based on Direct Power Method as described in ITTC
  • only considers added resistance due to wind
  • can only operate at fixed working point of 75% SMCR and corresponding speed

kdemmich and others added 23 commits March 27, 2025 12:22

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@kdemmich kdemmich requested a review from MartinPontius April 22, 2025 12:00
if config.SHIP_TYPE == 'SAL':
raise NotImplementedError('Ship type SAL is not yet supported!')
if config.BOAT_TYPE == 'direct_power_method':
print('Using direct power method')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use logger instead of print.


if config.ALGORITHM_TYPE == 'speedy_isobased':
ship = ConstantFuelBoat(config)
else:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we don't use "else" and the user sets BOAT_TYPE to something else than speedy_isobased, the ship object will be overridden. This behavior is not intended, is it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope. Is fixed now.

ship_params - ShipParams object containing ship parameters like power consumption and fuel rate
"""

ship_path: str # path to ship configuration file
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ship_path is never set or used.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.


def __init__(self, config):
super().__init__(config)
config_obj = ShipConfig(file_name=config.CONFIG_PATH)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If a user has specified the configuration via a dictionary, the ShipConfig will not be initialized correctly. Instead, an error will be thrown.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.


for i_coord in range(0, n_coords):
wave_direction.append(
self.approx_weather(weather_data['VMDR'], lats[i_coord], lons[i_coord], time[i_coord]))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is i_coord used to index lons, although i_coord ranges from 0 to len(lats)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The arrays lats and lons have the same length by design as they store the latitude and longitude values at every routing step.

estimates power & fuel consumption based on the so-called Direct Power Method
The following approximations are used:
- a fixed working point of 70% SMCR power and an average ship speed is assumed
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it 75 %?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

self.calculate_head_wind_coeff()

logger.info(form.get_log_step('The boat speed provided is assumed to be the speed that corresponds '
'to 70% SMCR power.'))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it 75 %?

@kdemmich kdemmich merged commit ef68ada into main May 13, 2025
1 check passed
@kdemmich kdemmich deleted the SimpleFuelModel branch May 14, 2025 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

None yet

3 participants