Orcaflex Modeling License Check

Sub-skill of orcaflex-modeling: License Check (+2).

vamseeachanta Updated

File contents

License Check (+2)

License Check

from digitalmodel.orcaflex.orcaflex_utilities import OrcaflexUtilities

utils = OrcaflexUtilities()
if utils.is_orcaflex_available():
    print("OrcaFlex license available")
else:
    print("Running in mock mode")

Model Loading

# Load simulation with metadata
model, metadata = utils.get_model_and_metadata("simulation.sim")
print(f"Simulation period: {metadata['period']} seconds")
print(f"Time step: {metadata['timestep']} seconds")

Wave Calculations

# Calculate theoretical maximum wave height
Hmax = utils.get_theoretical_hmax({
    "Hs": 6.0,          # Significant wave height (m)
    "Tp": 12.0,         # Peak period (s)
    "duration": 3600,   # Storm duration (s)
    "gamma": 3.3        # JONSWAP peakedness
})
print(f"Theoretical Hmax: {Hmax:.2f} m")

# Calculate associated period
Tassociated = utils.get_tassociated(Hmax, Tp=12.0)
print(f"Associated period: {Tassociated:.2f} s")

vamseeachanta/workspace-hub/tree/main/.agents/skills/_archive/engineering/marine-offshore/orcaflex-modeling/license-check commit 40bdded813

Frequently asked questions

npx skillmds@latest add vamseeachanta/orcaflex-modeling-license-check