MathCAD/MatLab program for non-linear spring-mass-damper system

Click For Summary

Discussion Overview

The discussion revolves around modeling a non-linear spring-mass-damper system for a machining operation using MathCAD or MATLAB. Participants are addressing the formulation of the differential equations, programming challenges, and numerical methods for solving the system.

Discussion Character

  • Homework-related
  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant outlines the problem, specifying the parameters of the system, including mass, damping, and the form of the non-linear spring.
  • The same participant expresses difficulty in defining the variable for the non-linear spring in MathCAD, noting an error related to the undefined variable.
  • Another participant suggests solving the problem by reducing it to a system of first-order ordinary differential equations (ODEs) and applying a Runge-Kutta method.
  • A later reply emphasizes the need to express the system correctly as a differential equation before applying numerical methods, pointing out discrepancies in variable usage.
  • Another participant proposes converting the equations of motion to state-space form and using MATLAB's ode45 for simulation.

Areas of Agreement / Disagreement

Participants express differing approaches to solving the problem, with some advocating for numerical methods while others focus on the correct formulation of the equations. There is no consensus on the best method or solution path.

Contextual Notes

Participants have not resolved the issue of defining the variable for the non-linear spring in MathCAD, and there are unresolved questions about the formulation of the differential equations.

Who May Find This Useful

Students and practitioners interested in modeling dynamic systems, particularly those involving non-linear elements, using computational tools like MathCAD and MATLAB.

sailsinthesun
Messages
23
Reaction score
0

Homework Statement



The cutting force developed during a particular machining operation is shown in figure (a).
Model the system as a SDF with equivalent mass of the cutting head = 25 kg. The damping is linear viscous (ξ = 0.1), and the equivalent spring is nonlinear “hardening” spring of the form k = k1 + k2*x^2, where k1 = 400 kN/m, and k2 = 40 kN/m3. Assume the initial conditions x(0) = 0 and
x' (0) = 0.

I need to write a computer program in MathCAD, Matlab, or similar to solve this problem.(These two programs are available to me)

(a) Draw the analytical model and write the D.E. of the motion of the system.
(b) Computer printout of the program listing.
(c) Computer output of results (t, x, x' )
(d) Computer plot for x(t) vs. t
(e) Computer plot for x'(t) vs. t
(f) Compute the inaccuracies (in the vertical direction) in the surface finish due to the cutting force.

Homework Equations



m(d^2y/dt^2)+c(dy/dt)+ky=Fo*sin(wt)

The Attempt at a Solution



The first real problem I've run into is modeling the non-linear spring. In MathCAD, when I put k:= 400+40y^2 it's saying y is undefined, which is true, but how should I define it? I'm not given like 0<y<5 or anything, so again, how should it be defined?
 

Attachments

  • problem5.JPG
    problem5.JPG
    34.8 KB · Views: 1,100
  • problem6.JPG
    problem6.JPG
    8.7 KB · Views: 1,011
Physics news on Phys.org
did you ever get this complete?
 
Not sure why you bumped a year old thread, but can't you just solve this by reducing it to a system of first order ODES and applying a runge kutta method or something similar?
 
The Gringo said:
Not sure why you bumped a year old thread, but can't you just solve this by reducing it to a system of first order ODES and applying a runge kutta method or something similar?
Given that it's intended to be solved in Mathcad or Matlab (the latter with no presumption of the symbolic toolbox), it would seem that's the appropriate general method.

However, the first step is to express the actual system as a DE using the variables given. (Apart from not being in the correct form for an ODE, the Mathcad fragment doesn't even use the same variable).
 
Does anybody have anymore insight into this problem?
 
I would take my equations of motion, convert them to a state-space form, and write a simulation using ode45 in MATLAB.
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
5K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
Replies
12
Views
2K
  • · Replies 41 ·
2
Replies
41
Views
10K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 5 ·
Replies
5
Views
4K