Skip to main content
Glama
IBM

Physics MCP Server

by IBM

calculate_projectile_with_drag

Calculate realistic projectile trajectories with air resistance, spin effects, wind, and variable air density for sports balls and other objects.

Instructions

Calculate projectile motion including air resistance (drag).

Uses numerical integration (RK4) to solve motion equations with:
- Quadratic drag force: F_drag = 0.5 * ρ * v² * Cd * A
- Magnus force (spin effects): F_magnus = 0.5 * ρ * Cl * A * ω * r * v
- Wind effects (constant wind vector)
- Variable air density (altitude and temperature effects)

This provides REALISTIC trajectories for sports balls, projectiles,
and other objects moving through air or water. Compare with
calculate_projectile_motion (no drag) to see dramatic differences!

Common drag coefficients (Cd):
    - Sphere: 0.47 (default)
    - Baseball: 0.4
    - Golf ball: 0.25 (dimples reduce drag)
    - Football (American): 0.05-0.15 (orientation-dependent)
    - Basketball: 0.55
    - Soccer ball: 0.25
    - Skydiver (belly-down): 1.0-1.3
    - Streamlined car: 0.25-0.35

Args:
    initial_velocity: Launch velocity in m/s
    angle_degrees: Launch angle in degrees (0-90)
    mass: Object mass in kg
    cross_sectional_area: Cross-section perpendicular to motion in m²
    initial_height: Launch height in meters (default 0)
    drag_coefficient: Drag coefficient Cd (default 0.47 for sphere)
    fluid_density: Fluid density in kg/m³ (air=1.225, water=1000)
    gravity: Gravitational acceleration m/s² (default 9.81)
    time_step: Integration time step in seconds (default 0.01)
    max_time: Maximum simulation time in seconds (default 30)
    spin_rate: Spin rate in rad/s for Magnus force (default 0, no spin)
    spin_axis: Spin axis unit vector [x, y, z] (default [0, 0, 1] = vertical)
    wind_velocity: Wind velocity [vx, vy] in m/s (default [0, 0], no wind)
    altitude: Altitude above sea level in meters (default 0, affects air density)
    temperature: Air temperature in Celsius (default 15, affects air density)

Returns:
    Dict containing:
        - max_height: Maximum altitude reached (m)
        - range: Horizontal distance traveled (m)
        - time_of_flight: Total flight time (s)
        - impact_velocity: Speed at landing (m/s)
        - impact_angle: Angle at landing (degrees below horizontal)
        - trajectory_points: [[x, y], ...] for plotting
        - energy_lost_to_drag: Energy dissipated by drag (J)
        - initial_kinetic_energy: Initial KE (J)
        - final_kinetic_energy: Final KE (J)
        - lateral_deflection: Lateral deflection from spin/wind (m)
        - magnus_force_max: Maximum Magnus force magnitude (N)
        - wind_drift: Total wind drift (m)
        - effective_air_density: Effective air density used (kg/m³)

Example - Baseball curveball (2500 rpm backspin):
    result = await calculate_projectile_with_drag(
        initial_velocity=40.23,  # 90 mph
        angle_degrees=10,
        mass=0.145,
        cross_sectional_area=0.0043,
        drag_coefficient=0.4,
        spin_rate=261.8,  # 2500 rpm = 261.8 rad/s
        spin_axis=[0, 0, 1]  # Backspin (vertical axis)
    )
    # Backspin increases range and height!

Example - Golf ball at altitude (Denver, 1600m):
    result = await calculate_projectile_with_drag(
        initial_velocity=70,
        angle_degrees=12,
        mass=0.0459,
        cross_sectional_area=0.00143,
        drag_coefficient=0.25,
        altitude=1600,  # Denver elevation
        temperature=20  # Summer day
    )
    # Less air resistance = longer drive!

Example - Soccer free kick with wind:
    result = await calculate_projectile_with_drag(
        initial_velocity=25,
        angle_degrees=15,
        mass=0.43,
        cross_sectional_area=0.0388,
        drag_coefficient=0.25,
        wind_velocity=[5, 0],  # 5 m/s tailwind
        spin_rate=50,  # Sidespin for curve
        spin_axis=[0, 1, 0]  # Horizontal axis
    )
    # Wind drift + Magnus curve!

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
initial_velocityYes
angle_degreesYes
massYes
cross_sectional_areaYes
initial_heightNo
drag_coefficientNo
fluid_densityNo
gravityNo
time_stepNo
max_timeNo
spin_rateNo
spin_axisNo[0, 0, 1]
wind_velocityNo[0, 0]
altitudeNo
temperatureNo
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided; description fully compensates by detailing method (RK4), forces, and return fields. No contradictions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Long but well-organized with sections, formulas, and examples. Could be slightly trimmed but earns its length due to complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema, but description fully documents return dict. Examples cover diverse scenarios. Complete for a complex projectile tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema has 0% description coverage; description documents all 15 parameters with defaults, units, and common values, adding immense value well beyond schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states tool calculates projectile motion with drag using numerical integration. Distinguishes from sibling calculate_projectile_motion explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit comparison with no-drag version and multiple sports examples, guiding when to use. Lacks explicit 'when not to use' but context is strong.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/IBM/chuk-mcp-physics'

If you have feedback or need assistance with the MCP directory API, please join our Discord server