Agent skill
marine-offshore-engineering-1-buoyancy-and-stability
Sub-skill of marine-offshore-engineering: 1. Buoyancy and Stability (+1).
Install this agent skill to your Project
npx add-skill https://github.com/vamseeachanta/workspace-hub/tree/main/.claude/skills/_archive/engineering/marine-offshore/marine-offshore-engineering/1-buoyancy-and-stability
SKILL.md
1. Buoyancy and Stability (+1)
1. Buoyancy and Stability
def calculate_metacentric_height(
displacement: float, # tonnes
waterplane_area: float, # m²
center_of_buoyancy_height: float, # m
center_of_gravity_height: float # m
) -> float:
"""
Calculate metacentric height (GM) for stability.
GM = KB + BM - KG
Where:
- KB = Center of buoyancy above keel
- BM = Metacentric radius = I/V
- KG = Center of gravity above keel
Args:
displacement: Vessel displacement
waterplane_area: Area at waterline
center_of_buoyancy_height: KB
center_of_gravity_height: KG
Returns:
Metacentric height in meters
"""
rho = 1.025 # t/m³
volume = displacement / rho
# Second moment of area (simplified for rectangular waterplane)
I = waterplane_area**1.5 / 12 # Approximation
# Metacentric radius
BM = I / volume
# Metacentric height
GM = center_of_buoyancy_height + BM - center_of_gravity_height
return GM
2. Riser Stress
def calculate_riser_stress(
top_tension: float, # kN
weight_per_length: float, # kg/m
water_depth: float, # m
diameter: float, # mm
wall_thickness: float # mm
) -> dict:
"""
Calculate riser stresses.
Args:
top_tension: Top tension
weight_per_length: Riser weight in water
water_depth: Water depth
diameter: Outer diameter
wall_thickness: Wall thickness
Returns:
Stress components
"""
# Cross-sectional area
D_outer = diameter / 1000 # Convert to m
D_inner = D_outer - 2 * wall_thickness / 1000
A = np.pi * (D_outer**2 - D_inner**2) / 4 # m²
# Effective tension at bottom
w = weight_per_length * 9.81 / 1000 # kN/m
bottom_tension = top_tension - w * water_depth
# Axial stress (top)
sigma_axial_top = top_tension * 1000 / (A * 1e6) # MPa
# Axial stress (bottom)
sigma_axial_bottom = bottom_tension * 1000 / (A * 1e6) # MPa
return {
'top_stress_MPa': sigma_axial_top,
'bottom_stress_MPa': sigma_axial_bottom,
'bottom_tension_kN': bottom_tension
}
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
gsd-complete-milestone
Archive completed milestone and prepare for next version
gsd-reapply-patches
Reapply local modifications after a GSD update
gsd-verify-work
Validate built features through conversational UAT
gsd-thread
Manage persistent context threads for cross-session work
clinical-trial-protocol
Generate clinical trial protocols for medical devices or drugs through a modular, waypoint-based architecture with research-only and full protocol modes.
single-cell-rna-qc
Performs quality control on single-cell RNA-seq data (.h5ad or .h5 files) using scverse best practices with MAD-based filtering and comprehensive visualizations.
Didn't find tool you were looking for?