Agent skill
orcaflex-static-debug-incremental-static-testing
Sub-skill of orcaflex-static-debug: Incremental Static Testing (+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/orcaflex-static-debug/incremental-static-testing
SKILL.md
Incremental Static Testing (+1)
Incremental Static Testing
def test_static_incrementally(model_path: str) -> dict:
"""
Test static analysis by progressively enabling components.
Returns which component causes failure.
"""
model = OrcFxAPI.Model()
model.LoadData(model_path)
results = {"tests": [], "failing_component": None}
# Get all lines
lines = [obj for obj in model.objects if obj.typeName == "Line"]
# Disable all lines
for line in lines:
line.IncludedInStatics = "No"
# Test with no lines
try:
model.CalculateStatics()
results["tests"].append({"component": "Base model (no lines)", "passed": True})
except Exception as e:
results["tests"].append({"component": "Base model", "passed": False, "error": str(e)})
results["failing_component"] = "Base model"
return results
# Enable lines one by one
for line in lines:
line.IncludedInStatics = "Yes"
try:
model.CalculateStatics()
results["tests"].append({"component": f"Line: {line.name}", "passed": True})
except Exception as e:
results["tests"].append({
"component": f"Line: {line.name}",
"passed": False,
"error": str(e)
})
results["failing_component"] = line.name
# Disable this line and continue
line.IncludedInStatics = "No"
return results
Solver Settings Adjustment
def adjust_solver_for_convergence(model) -> bool:
"""
Progressively adjust solver settings to achieve convergence.
Returns True if convergence achieved.
"""
# Settings to try
damping_values = [10, 20, 50, 100, 200]
tolerance_values = [1e-5, 1e-4, 1e-3, 1e-2]
for damping in damping_values:
for tolerance in tolerance_values:
try:
# Apply settings
model.general.StaticsDamping = damping
model.general.StaticsTolerance = tolerance
# Try statics
model.CalculateStatics()
print(f"Converged with Damping={damping}, Tolerance={tolerance}")
return True
except OrcFxAPI.OrcaFlexError:
continue
print("Failed to converge with any settings combination")
return False
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?