WOLFRAM SYSTEM MODELER

Ball

Ball subject to magnus forces.

Diagram

Wolfram Language

In[1]:=
SystemModel["EducationExamples.Physics.FreeKick.Components.Ball"]
Out[1]:=

Information

Ball Component

The ball component consists of three prismatic joints and one spherical rotation joint connected to a Modelica Standard Library MultiBody bodyShape component. The bodyShape component is connected to a visualizer fixedShape, which animates the ball as a custom external 3D object. The two force components MagnusForce and DragForce are connected to the body and will provide forces in different directions, depending on the body.

Above is the diagram view of the Ball component. The black component connected to the ball is the SoftSupportingPlane component that models the ground. It is connected to a fixed point. There are additional visualizers in the model that visualize the soccer field and the goal tag.

Changing Ball Starting Conditions

To change the ball starting position from the corner position (r_0[3] = {-45, 0, -50}) to another position, in Simulation Center, open the Parameters tab and expand the ball tree. Here you can change the initial velocities, angular velocities, and position by changing the values for initVel, initAngVel, and initPos. Keep in mind that the y coordinate has to be zero at all times for initPos to make the ball start on the ground. A penalty kick would have the coordinates r_0[3] = {0, 0, -39}.

Parameters (6)

ballMass

Value: 0.425

Type: Mass (kg)

Description: Mass of the ball

ballRadius

Value: 0.11

Type: Length (m)

Description: Radius of the ball

temp

Value: 293.15

Type: Temperature (K)

Description: Temperature of the air

initVel

Value: {15, 5, 2}

Type: Velocity[3] (m/s)

initAngVel

Value: {0, 50, 10}

Type: AngularVelocity[3] (rad/s)

initPos

Value: {-45, 0, -50}

Type: Position[3] (m)

Description: Starting position of ball

Connectors (1)

frame_a1

Type: Frame_a

Description: frame to the world component

Components (20)

object

Type: BodyShape

Description: The object(ball) that is being kicked

prismaticX

Type: Prismatic

Description: Prismatic joint in the x direction

prismaticY

Type: Prismatic

Description: Prismatic joint in the y direction

dragForce

Type: DragForce

Description: Component that calculates the drag force

magnusForce

Type: MagnusForce

Description: Component that calculates the Magnus force

prismaticZ

Type: Prismatic

Description: Prismatic joint in the z direction

rotationJoint

Type: Spherical

Description: Rotation joint to the ball

cameraPoint

Type: FixedTranslation

Description: A fixed translation from the ball that is not rotating, used as a camera point

fixed

Type: Fixed

Description: Fixed point to attach the supporting plane

velArrow

Type: FixedArrow

Description: Visualizer arrow for the ball velocity

softSupportingPlane

Type: SoftSupportingPlane

Description: Component used to model the ground

magnusVisualizer

Type: FixedArrow

Description: Visualizer for the magnus force

dragVisualizer

Type: FixedArrow

Description: Visualizer for the drag force

fieldVisPos

Type: FixedTranslation

Description: Fixed translation to put the soccer field in the correct position

goalTag2Pos

Type: FixedTranslation

Description: Fixed translation of frame_b with respect to frame_a

goalTag1Pos

Type: FixedTranslation

Description: Position of first goal tag

visualizergoal1Tag

Type: FixedShape

Description: Visualizing an elementary shape with dynamically varying shape attributes (has one frame connector)

visualizergoal2Tag

Type: FixedShape

Description: Posittion of the second goal tag

visualizerSoccerField

Type: FixedShape

Description: Visualization of the soccer field

visualizerSoccer

Type: FixedShape

Description: Visualizer for the soccer ball

Used in Examples (1)

FreeKickScenario

EducationExamples.Physics.FreeKick

Example model with a soccer ball being kicked from a corner position.