You are on page 1of 14

COSMOS LECTURE

Computer Simulations
and
Working Model 2D

Raymond de Callafon
Dynamic Systems & Control Group
Center of Magnetic Recording Research
UCSD, Dept. of MAE
Email: callafon@ucsd.edu

COSMOS @ UCSD - R.A. de Callafon July 14, 2010


Models - physical

Model:
 Description/approximation of reality or object
 Physical Models:
 Scale representation

 Description of observed
physical phenomen

 Solid/computer model

2 COSMOS @ UCSD - R.A. de Callafon July 14, 2010


Models - conceptual

Model:
 Conceptual Model: description of reality or object by
means of conceptual formulations and may include:
 Business models
 Computer models
 Geological models
 Mechanical models
 Statistical models
 Etc. Etc. …

Description of concepts usually based on mathematics!

3 COSMOS @ UCSD - R.A. de Callafon July 14, 2010


Mathematical Models

Mathematical Model: combination of


 A set of assumptions (axioms)
 A set of equations and algorithms that describes how a physical
system or “reality” would behave
 A set of parameters for numerical values of physical properties
 Example:
 Any object with a mass m is subjected to a gravitational force F

where F = m⋅ g
g = 9.81 m / s 2
 The time dependent position x(t) of an object with a constant mass
m subjected to a time dependent force F(t) is described by 2nd
Newton’s law 2
d
m 2 x(t ) = F (t )
dt
4 COSMOS @ UCSD - R.A. de Callafon July 14, 2010
Simulations

With a Mathematical Model a combination of


 A set of assumptions (axioms)
 A set of equations and algorithms
 A set of parameters
Compute the solution to the set of equations?

 Simulating the behavior of a physical system ☺


 Complexity of model or set of equations?
 Explicit computation of solution often impossible 
 Approximation of solution via numerical approximation.

Numerical Approximation via Computer Simulation

5 COSMOS @ UCSD - R.A. de Callafon July 14, 2010


Computer Simulations and Design

Simulations (numerical approximation) using a computer:

 Help predict behavior before actual design


 Make changes to design
 See the effect of changes in parameters

6 COSMOS @ UCSD - R.A. de Callafon July 14, 2010


Computer Simulations and Motion

Simulations (numerical approximation) using a computer:


 Predict motion of object
 Visualize motion of a mechanical system
 See the effect of changes in parameters

Specifically: we will use


Working Model 2D (WM2D)

7 COSMOS @ UCSD - R.A. de Callafon July 14, 2010


Computer Simulations with WM2D

Working Model 2D allows:


 Dynamic simulation of multiple mechanical objects
 Visualize motion of a multiple mechanical objects
 See the effect of changes in parameters

8 COSMOS @ UCSD - R.A. de Callafon July 14, 2010


Computer Simulations with WM2D

Working Model 2D is also a model


 A set of assumptions:
 Each object is assumed to be rigid
 Spring forces are linear or quadratic
 Objects collide with prescribed energy loss
 A set of equations:
 Constraint force algorithm
 Equations of Motion, see also:

http://maelabs.ucsd.edu/cosmos/resources/WM-Documentation/Additional-Documentation/EquationsOfMotion.pdf

 A set of parameters:
 Gravity
 Mass, size and elastic properties of objects
 Integration step size (explained later)

9 COSMOS @ UCSD - R.A. de Callafon July 14, 2010


Computer Simulations with WM2D

Related Questions (see also Computer Simulation


Worksheet):

 How can we use WM2D for the clock project?

Simulate oscillation of your pendulum to predict timing!

 How can we use WM2D for the design of kinetic sculptures?

Simulate balls bouncing and rolling around in a


particular (controlled) part of your (mini) sculpture.

10 COSMOS @ UCSD - R.A. de Callafon July 14, 2010


Computer Simulations with WM2D

LIVE DEMO of WM2D

11 COSMOS @ UCSD - R.A. de Callafon July 14, 2010


Computer Simulations with WM2D

More on numerical precision and integration parameter:

 Step size determines


in how many time
steps numerical
solution is computed.

 Making step size larger:


 Faster simulation
 Less accurate
 Possible erroneous
object collision
detection

12 COSMOS @ UCSD - R.A. de Callafon July 14, 2010


Computer Simulations with WM2D

Tasks:
 Download Example Ball Trap WM2D file and see if the
difference in simulation behavior when changing the step
size and/or accuracy:
http://www.maelabs.ucsd.edu/cosmos/balltrap.wm2d

 Design challenge: Use same


Example Ball Trap WM2D file
and:
 Remove large ball object
 Design sculpture/structure inside
so that small ball hits bottom of
box at exactly 10 seconds!

13 COSMOS @ UCSD - R.A. de Callafon July 14, 2010


Computer Simulations with WM2D

Predicting the oscillation frequency


or timing of your pendulum:

 Import clock pendulum


from autoCAD into WM2D

 Simulate and measure timing.

 Process of importing must be done carefully!

 Documentation on our COSMOS website:

http://maelabs.ucsd.edu/cosmos/resources/WM-Documentation/Importing-Pendulum-to-WORKING-MODEL.htm

14 COSMOS @ UCSD - R.A. de Callafon July 14, 2010

You might also like