orcaflex-specialist
# OrcaFlex Specialist Skill
What this skill does
# OrcaFlex Specialist Skill
```yaml
name: orcaflex-specialist
version: 1.0.0
category: sme
tags: [orcaflex, offshore, simulation, python-api, automation, marine-dynamics, mooring, riser]
created: 2026-01-06
updated: 2026-01-06
author: Claude
description: |
Expert OrcaFlex workflows, Python API automation, model validation, and best
practices for offshore marine simulations. Covers mooring analysis, riser
dynamics, installation simulations, and advanced post-processing.
```
## When to Use This Skill
Use this skill when you need to:
- Automate OrcaFlex model creation and analysis
- Build parametric OrcaFlex models via Python API
- Perform batch simulations with varying parameters
- Extract and process time series results
- Validate OrcaFlex models against design criteria
- Integrate OrcaFlex with external tools and workflows
- Optimize mooring and riser configurations
- Conduct sensitivity studies and Monte Carlo simulations
## Core Knowledge Areas
### 1. OrcaFlex Python API Basics
Connecting to OrcaFlex and basic model operations:
```python
import OrcFxAPI
import numpy as np
from pathlib import Path
from typing import List, Dict, Optional
def create_new_model(
general_data: dict,
save_path: Path = None
) -> OrcFxAPI.Model:
"""
Create a new OrcaFlex model with general settings.
Args:
general_data: Dictionary with general data parameters
save_path: Optional path to save the model
Returns:
OrcaFlex model object
Example:
>>> general_data = {
... 'ImplicitUseVariableTimeStep': 'Yes',
... 'TargetLogSampleInterval': 0.1,
... 'InnerTimeStep': 0.01,
... 'StageCount': 2,
... 'StageDuration': [100, 3600]
... }
>>> model = create_new_model(general_data)
"""
# Create new model
model = OrcFxAPI.Model()
# Set general data
general = model.general
for key, value in general_data.items():
setattr(general, key, value)
# Save if path provided
if save_path:
model.SaveData(str(save_path))
return model
def load_model(
file_path: Path,
validate: bool = True
) -> OrcFxAPI.Model:
"""
Load existing OrcaFlex model with optional validation.
Args:
file_path: Path to .dat or .sim file
validate: Whether to validate model after loading
Returns:
Loaded OrcaFlex model
Example:
>>> model = load_model(Path('mooring_analysis.dat'))
>>> print(f"Model stages: {model.general.StageCount}")
"""
model = OrcFxAPI.Model(str(file_path))
if validate:
# Run basic validation
state = model.State()
if state != OrcFxAPI.ModelState.Reset:
print(f"Warning: Model state is {state}")
# Check for invalid objects
invalid_objects = []
for obj in model.objects:
try:
obj_type = obj.type
except:
invalid_objects.append(obj.name)
if invalid_objects:
print(f"Warning: Invalid objects found: {invalid_objects}")
return model
def run_static_analysis(
model: OrcFxAPI.Model,
thread_count: int = None
) -> None:
"""
Run static analysis (statics to whole simulation).
Args:
model: OrcaFlex model
thread_count: Number of threads (None = auto)
Example:
>>> model = load_model('mooring.dat')
>>> run_static_analysis(model, thread_count=4)
>>> print("Static analysis complete")
"""
# Configure calculation
if thread_count:
model.general.ThreadCount = thread_count
# Run statics to whole simulation
model.CalculateStatics()
model.RunSimulation()
print(f"Simulation complete. State: {model.State()}")
def run_dynamic_analysis(
model: OrcFxAPI.Model,
save_sim: bool = True,
sim_path: Path = None
) -> Path:
"""
Run dynamic analysis and save results.
Args:
model: OrcaFlex model
save_sim: Whether to save simulation results
sim_path: Path to save .sim file
Returns:
Path to saved simulation file
Example:
>>> model = load_model('mooring.dat')
>>> sim_file = run_dynamic_analysis(model, sim_path=Path('results.sim'))
>>> print(f"Results saved: {sim_file}")
"""
# Run simulation
model.RunSimulation()
# Save results
if save_sim:
if sim_path is None:
# Generate default path
sim_path = Path(model.DataFileName()).with_suffix('.sim')
model.SaveSimulation(str(sim_path))
return sim_path
return None
```
### 2. Building Models Programmatically
Create complex models via Python API:
```python
def create_vessel_model(
vessel_params: dict,
mooring_config: dict,
environment: dict
) -> OrcFxAPI.Model:
"""
Create complete vessel model with moorings and environment.
Args:
vessel_params: Vessel properties
mooring_config: Mooring line configuration
environment: Environmental conditions
Returns:
Complete OrcaFlex model
Example:
>>> vessel_params = {
... 'name': 'FPSO',
... 'mass': 150000, # tonnes
... 'length': 300, # m
... 'draft': 20,
... 'draft_fore': 20,
... 'draft_aft': 20
... }
>>> mooring_config = {
... 'pattern': 'spread',
... 'line_count': 8,
... 'line_length': 1500,
... 'line_type': 'chain_wire_chain'
... }
>>> environment = {
... 'water_depth': 1200,
... 'current_speed': 1.0,
... 'wave_height': 5.0,
... 'wave_period': 12.0
... }
>>> model = create_vessel_model(vessel_params, mooring_config, environment)
"""
# Create new model
model = OrcFxAPI.Model()
# Set environment
env = model.environment
# Water depth
env.WaterDepth = environment['water_depth']
# Current profile
env.RefCurrentSpeed = environment['current_speed']
env.CurrentDepths = [0, -environment['water_depth']]
env.CurrentSpeeds = [environment['current_speed'], 0.5 * environment['current_speed']]
# Waves (JONSWAP spectrum)
env.WaveType = 'JONSWAP'
env.WaveHs = environment['wave_height']
env.WaveTp = environment['wave_period']
env.WaveGamma = 3.3
# Create vessel
vessel = model.CreateObject(OrcFxAPI.otVessel, vessel_params['name'])
# Set vessel properties
vessel.Length = vessel_params['length']
vessel.Draft = vessel_params['draft']
vessel.DraftAtRest = vessel_params['draft']
vessel.Mass = vessel_params['mass']
# Displacement check
rho_sw = 1025 # kg/m³
g = 9.81
displacement = vessel_params['mass'] * 1000 * g # N
print(f"Vessel displacement: {displacement/1e6:.1f} MN")
# Create mooring lines
create_mooring_system(
model=model,
vessel=vessel,
config=mooring_config,
water_depth=environment['water_depth']
)
return model
def create_mooring_system(
model: OrcFxAPI.Model,
vessel: OrcFxAPI.OrcaFlexObject,
config: dict,
water_depth: float
) -> List[OrcFxAPI.OrcaFlexObject]:
"""
Create mooring system attached to vessel.
Args:
model: OrcaFlex model
vessel: Vessel object
config: Mooring configuration
water_depth: Water depth [m]
Returns:
List of mooring line objects
Example:
>>> config = {
... 'pattern': 'spread',
... 'line_count': 8,
... 'line_length': 1500,
... 'fairlead_radius': 40,
... 'anchor_radius': 1400,
... 'line_sections': [
... {'type': 'R4 Studless Chain', 'length': 300},
... {'type': '76mm Wire', 'length': 900},
... {'type': 'R4 Studless Chain', 'leRelated in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.