"""Reproduce the screening calculations. Python 3, standard library only. Place this beside geometry.json and run: python3 analysis.py No CFD, measured drag coefficient, thrust curve or certified depth is implied. """ from pathlib import Path import csv, json, math def calculate(geometry): rho,nu,g=998.,1e-6,9.81 area=geometry['projected_area_m2']['frontal']['0.125'] rows=[] for u in [.1,.2,.3,.4,.5,.6,.8]: q=.5*rho*u*u rows.append(dict(speed_m_s=u,Re_hull=u*.7/nu,Re_cable=u*.0038/nu, vehicle_drag_Cd03_N=q*.3*area,vehicle_drag_Cd12_N=q*1.2*area, cable_10m_crossflow_Cd12_N=q*1.2*.0038*10, cable_45_72m_crossflow_Cd12_N=q*1.2*.0038*45.72, dynamic_head_mm=1000*u*u/(2*g))) return dict(study_date='2026-10-06',method='Analytical sensitivity study, not CFD', assumptions=dict(rho_kg_m3=rho,nu_m2_s=nu,g_m_s2=g,water='nominal freshwater near 20 C', reference_frontal_area_m2=area,vehicle_Cd_scenarios=[.3,1.2],cable_Cd_scenarios=[.8,1.2,1.6], coefficient_status='Analyst-selected scenarios, not measurements or confidence bounds', flow='Fully submerged steady axial body flow; straight uniform cable in crossflow; waves and propulsion interaction omitted'), tube_outer_envelope_L=math.pi*.1**2/4*.7*1000, tube_gross_internal_L=math.pi*.094**2/4*.7*1000, bare_tube_frontal_area_m2=math.pi*.1**2/4, nominal_ballast_L=.5,nominal_ballast_mass_change_kg=rho*.0005, nominal_ballast_weight_change_N=rho*g*.0005, nominal_fixed_weights_kg=3.42, model_thruster_spacing_m=.172, sealed_air_pressure_rise_kPa={str(v):101.3*.5/(v-.5) for v in [2,3,4]}, raster_refinement_change_percent={name:100*abs(a['0.125']-a['0.25'])/a['0.125'] for name,a in geometry['projected_area_m2'].items()}, speed_sweep=rows, limitations=['CAD projections include component proxies and are not an as-built survey.', 'No measured CG, CB, Cd, thrust curve, actual bag fill, cable shape or current profile.', 'Cable result is distributed fluid force, not predicted load at the vehicle connector.', 'No maximum speed, electrical power, endurance, dynamic stability or depth rating is established.']) if __name__=='__main__': here=Path(__file__).resolve().parent data=calculate(json.loads((here/'geometry.json').read_text())) (here/'analysis.json').write_text(json.dumps(data,indent=2)) with (here/'speed-sweep.csv').open('w',newline='') as f: writer=csv.DictWriter(f,fieldnames=data['speed_sweep'][0]);writer.writeheader();writer.writerows(data['speed_sweep']) assert abs(data['tube_outer_envelope_L']-5.497787)<1e-5 assert abs(data['nominal_ballast_weight_change_N']-4.89519)<1e-8 assert abs(data['speed_sweep'][4]['cable_45_72m_crossflow_Cd12_N']-26.0082792)<1e-6 print(json.dumps(data,indent=2))