/ proof-of-concept / plate-dynamics-lab-2
Sign in
proof-of-concept / plate-dynamics-lab-2
plate-dynamics-lab-2 / packages / core / src / m / plate_plan_common.m
38 lines · 1.6 KBCodeBlameHistory
2% PLATE_PLAN_COMMON The estimates both plans share.
3%
4% plan = plate_plan_common(params, P) fills the fields that do not depend
5% on the method: the plate's mass and the thread's pendulum frequency
6% sqrt(k / m) / (2 pi), the number of modes to expect below f_max from the
7% modal density of a thin plate, n(f) = (A / 2) sqrt(rho h / D) (an
8% asymptotic count; the small plate here has a few more), the Hertz
9% contact estimates and the coincidence frequency.
11pl = params.plate;
12mu = params.material.rho * pl.thickness;
13area = pl.width * pl.height;
14density = area / 2 * sqrt(mu / P.D);
15plan.plate_mass = P.plate_mass;
16plan.thread_k = P.thread_k;
17plan.pendulum_hz = sqrt(P.thread_k / P.plate_mass) / (2 * pi);
18plan.f_max = P.f_max;
19plan.modes_expected = round(density * P.f_max);
20plan.modes_cap = params.render.modes;
21plan.hertz_duration = P.hertz.duration;
22plan.hertz_impulse = P.hertz.impulse;
23plan.hertz_peak_force = P.hertz.peak_force;
24plan.contact_k = P.hertz.contact_k;
25plan.critical_frequency = P.critical_frequency;
26plan.nsamples = round(params.render.duration * params.render.fs);
27plan.nframes = params.render.nframes;
28plan.notes = {};
29if P.f_max > 0 && plan.modes_expected == 0
30 plan.notes{end + 1} = 'no bending mode is expected below 0.47 fs: raise the sample rate or thin the plate';
31end
32if plan.modes_expected > params.render.modes
33 plan.notes{end + 1} = sprintf('about %d modes below 0.47 fs; only %d are kept (render.modes)', plan.modes_expected, params.render.modes);
34end
35if params.hammer.speed <= 0
36 plan.notes{end + 1} = 'the hammer has no speed: nothing will be struck';
37end
38end
↑↓ move↵openescclose