Pure force evaluators for 2D XY slices and full 3D, returning owning SI values. @ownership Inputs are borrowed only for this call; no state or callbacks are retained. @thread Any thread with immutable inputs; reentrant and allocation-free on success. 更多...
#include <ForceModels.h>
静态 Public 成员函数 | |
| static Result< ForceVector > | directional (const DirectionalField &model, ForceVector position, double mass) |
| Sample mass-scaled directional force at a world position in meters. | |
| static Result< ForceVector > | directionalForce (const DirectionalForceField &model, ForceVector position) |
| Sample directional N force with region fade, without body-mass scaling. | |
| static Result< ForceVector > | radial (const RadialField &model, ForceVector position, double mass) |
| Sample attraction/repulsion; the softened center produces zero force. | |
| static Result< ForceVector > | buoyancy (const BuoyancyModel &model) |
| Return -density * displacedVolume * gravity; apply at submerged centroid. | |
| static Result< ForceVector > | damping (const DampingModel &model, ForceVector relativeVelocity, double mass, double dt) |
| Implicit drag over positive dt; relativeVelocity is body minus medium. | |
| static Result< double > | angularDamping2D (const AngularDampingModel &model, double relativeAngularVelocity, double inertia, double dt) |
| Implicit planar angular drag; returns Nm for relative rad/s and positive kg*m^2 inertia. | |
| static Result< ForceVector > | angularDamping3D (const AngularDampingModel &model, ForceVector relativeAngularVelocity, ForceVector principalInertia, double dt) |
| Implicit angular drag in the body's principal-inertia frame; returns torque in that same frame. | |
| static Result< WingSample > | wing (const WingModel &model, ForceVector relativeVelocity) |
| Wing force using body-minus-air velocity at the aerodynamic center. | |
| static Result< ForceVector > | friction (const FrictionModel &model, ForceVector tangentVelocity, ForceVector demandedForce, double normalLoad) |
| Cancel demanded tangent force at rest up to static limit; otherwise oppose slip. | |
| static Result< TireSample > | tire (const TireModel &model, const TireInput &input, double dt) |
| Combined-slip friction-circle tire with implicit wheel/chassis response and bounded brake locking. | |
详细描述
Pure force evaluators for 2D XY slices and full 3D, returning owning SI values. @ownership Inputs are borrowed only for this call; no state or callbacks are retained. @thread Any thread with immutable inputs; reentrant and allocation-free on success.
- 返回
- InvalidArgument for non-finite/invalid input or non-finite output; no partial mutation.
Time is injected in seconds. No RNG. Floating-point parity is tolerance-bounded (relative 1e-5, absolute 1e-6), not bit-exact across platforms. Apply each sample once before its fixed solver step. Damping is implicit over dt to avoid velocity reversal. Tire contact uses implicit slip impulses with frozen per-step stiffness and a bounded brake solve.
在文件 ForceModels.h 第 136 行定义.
成员函数说明
◆ angularDamping2D()
|
static |
Implicit planar angular drag; returns Nm for relative rad/s and positive kg*m^2 inertia.
Applied alone over dt, does not reverse relative rotation. Other torques remain independent.
在文件 Aerodynamics.cpp 第 17 行定义.
引用了 dt, inertia, eve::physics::force_detail::isFinite(), eve::physics::force_detail::isNonnegative(), eve::physics::force_detail::isPositive(), m , 以及 velocity.
◆ angularDamping3D()
|
static |
Implicit angular drag in the body's principal-inertia frame; returns torque in that same frame.
All principal inertias must be positive kg*m^2. Rotate relative angular velocity into that frame, then rotate returned Nm torque to world before applying. Does not include gyroscopic or external torques.
在文件 Aerodynamics.cpp 第 25 行定义.
引用了 eve::physics::force_detail::checked(), dt, eve::Result< T >::failure(), inertia, eve::physics::force_detail::isFinite(), eve::physics::force_detail::isNonnegative(), eve::physics::force_detail::isPositive(), length, m, velocity, x, y , 以及 z.
◆ buoyancy()
|
static |
Return -density * displacedVolume * gravity; apply at submerged centroid.
在文件 ForceFields.cpp 第 67 行定义.
引用了 eve::physics::force_detail::checked(), eve::physics::force_detail::isFinite(), eve::physics::force_detail::isNonnegative(), m , 以及 scale.
◆ damping()
|
static |
Implicit drag over positive dt; relativeVelocity is body minus medium.
在文件 ForceFields.cpp 第 72 行定义.
引用了 eve::physics::force_detail::checked(), dt, eve::physics::force_detail::isFinite(), eve::physics::force_detail::isNonnegative(), eve::physics::force_detail::isPositive(), length, m, rate, scale , 以及 velocity.
◆ directional()
|
static |
Sample mass-scaled directional force at a world position in meters.
在文件 ForceFields.cpp 第 38 行定义.
引用了 eve::physics::force_detail::checked(), eve::physics::force_detail::isFinite(), eve::physics::force_detail::isPositive(), m, p, scale , 以及 weight.
◆ directionalForce()
|
static |
Sample directional N force with region fade, without body-mass scaling.
在文件 ForceFields.cpp 第 43 行定义.
引用了 eve::physics::force_detail::checked(), eve::physics::force_detail::isFinite(), m, p, scale , 以及 weight.
◆ friction()
|
static |
Cancel demanded tangent force at rest up to static limit; otherwise oppose slip.
在文件 ForceFields.cpp 第 81 行定义.
引用了 eve::physics::force_detail::checked(), eve::physics::force_detail::isFinite(), eve::physics::force_detail::isNonnegative(), length, m, required, scale , 以及 velocity.
◆ radial()
|
static |
Sample attraction/repulsion; the softened center produces zero force.
在文件 ForceFields.cpp 第 47 行定义.
引用了 eve::physics::force_detail::add(), eve::physics::force_detail::checked(), distance, eve::physics::force_detail::isFinite(), eve::physics::force_detail::isNonnegative(), eve::physics::force_detail::isPositive(), length, m, p, radius, scale , 以及 weight.
◆ tire()
|
static |
Combined-slip friction-circle tire with implicit wheel/chassis response and bounded brake locking.
Input inverse masses describe diagonal contact response; zero keeps the corresponding chassis velocity prescribed. Returned forces and wheel speed share the same impulses. Slip diagnostics describe predicted end-of-step relative motion. Uses a fixed bounded brake solve; InvalidArgument also reports unrepresentable/nonconvergent numeric input.
在文件 TireDynamics.cpp 第 6 行定义.
引用了 eve::physics::TireInput::angularVelocity, eve::physics::TireInput::brakeTorque, capacity, contact, eve::physics::TireInput::driveTorque, dt, dx, dy, eve::physics::force_detail::isFinite(), eve::physics::force_detail::isNonnegative(), eve::physics::force_detail::isPositive(), eve::physics::TireInput::lateralInverseMass, eve::physics::TireInput::lateralVelocity, eve::physics::TireSample::longitudinalForce, eve::physics::TireInput::longitudinalInverseMass, eve::physics::TireInput::longitudinalVelocity, m, eve::physics::TireInput::normalLoad, out, eve::Result< T >::success(), vx, vy, x , 以及 y.
◆ wing()
|
static |
Wing force using body-minus-air velocity at the aerodynamic center.
在文件 Aerodynamics.cpp 第 40 行定义.
引用了 eve::physics::force_detail::add(), blend, eve::physics::force_detail::dot(), forward, eve::physics::force_detail::isFinite(), eve::physics::force_detail::isNonnegative(), eve::physics::force_detail::isPositive(), length, m, out, scale, eve::Result< T >::success(), up , 以及 velocity.
被这些函数引用 eve::physics::WingAssembly::build().
该类的文档由以下文件生成:
- src/modules/physics/forces/ForceModels.h
- src/modules/physics/forces/Aerodynamics.cpp
- src/modules/physics/forces/ForceFields.cpp
- src/modules/physics/forces/TireDynamics.cpp