Skip to content

[FEATURE] Warn when a free-flight run models a weightless body #193

Description

@camUrban

Problem Statement

Airplane.weight defaults to 0.0 and OperatingPoint.g_E defaults to (0.0, 0.0, 0.0), so an all-defaults free-flight problem passes the weight == mass * |g_E| consistency check and silently simulates a weightless body in a gravity-free world. Every partial misconfiguration (a nonzero weight without gravity, or gravity without a matching weight) is caught with a loud, well-worded error; the fully-defaulted case is the one silent path through the check, and it is rarely what a free-flight user intends.

Location(s): pterasoftware/problems.py (FreeFlightUnsteadyProblem.__init__), pterasoftware/operating_point.py (the g_E default).

Proposed Solution

Keep the zero defaults (they are deliberate: gravity and rotation rate always physically exist, zero is a valid value of each, and a genuinely weightless body should stay expressible), but log a warning from FreeFlightUnsteadyProblem.__init__ when the norm of g_E is zero, stating that the run will model a weightless body in a gravity-free world and showing how to set standard gravity (for example, g_E=(0.0, 0.0, 9.80665)).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions