メインコンテンツ

Mechanical Angle-Based Rotational Domain

The angle-based rotational domain declaration is shown below.

domain rotational
% Mechanical Angle-Based Rotational Domain
% For every node, rotational velocity is the derivative of angle.

% Copyright 2024-2025 The MathWorks, Inc.

variables
    theta = { 0,  'rad'   };  % Angle
    w     = { 0 , 'rad/s' };  % Angular velocity
end

variables(Balancing=true)
    t = { 0 , 'N*m' }; % Torque
end

equations
    der(theta) == w;
end

end

The domain contains the following variables and parameters:

  • Across variable theta (angle), in rad

  • Across variable w (angular velocity), in rad/s

  • Through variable t (torque), in N*m

The domain has two Across variables (angle and angular velocity) and only one Through variable (torque). Therefore, the equations section contains one equation that establishes the mathematical relationship between the angle and angular velocity, der(theta) == w. For more information, see Domain Equations.

To refer to this domain in your custom component declarations, use the following syntax:

foundation.rotational.rotational 

See Also

Topics