Dynamics of a ship with partally flooded compartment