function plan = plate_fd_plan(params) % PLATE_FD_PLAN Grid, time step, cost and statics of the explicit scheme, before a run. % % plan = plate_fd_plan(params) assembles the model (plate_model) and reports % plan.nx, plan.ny, plan.dx, plan.dy grid (nodes include the edges of the box) % plan.dt_max largest stable time step [s] % plan.dt step actually used, params.fd.cfl * dt_max % plan.nsteps, plan.ncells, plan.cell_steps problem size (ncells counts every grid node) % plan.nunknowns nodes the scheme actually updates % plan.rigid_hz frequencies of the rigid-body modes the % mount leaves (sway, swing, spin or heave and % tilts), NaN for an unstable one % plan.rigid_names the rigid-body coordinates of the mount % plan.rigid_mode_names the coordinate that dominates each mode % plan.sag largest static deflection under gravity [m] % plan.gx, plan.gy, plan.gz direction of gravity in plate coordinates % plan.mass, plan.xc, plan.yc plate mass and centre of mass % plan.tension thread tensions [N] (empty otherwise) % plan.notes remarks about the mount and the statics % % Because the step scales with dx^2, halving the grid spacing costs eight % times as many cell updates for the same simulated time; and because the % pendulum motion of a hanging plate takes a second or so to show while the % step is a few microseconds, a run is hundreds of thousands of steps. mdl = plate_model(params); plan.nx = mdl.nx; plan.ny = mdl.ny; plan.dx = mdl.dx; plan.dy = mdl.dy; plan.dt_max = mdl.dt_max; plan.dt = mdl.dt; plan.nsteps = mdl.nsteps; plan.ncells = mdl.ncells; plan.nunknowns = mdl.nunknowns; plan.cell_steps = plan.ncells * plan.nsteps; plan.rigid_hz = mdl.rigid_hz(:)'; plan.rigid_names = mdl.mnt.rigid_names; plan.rigid_mode_names = mdl.rigid_mode_names; plan.sag = mdl.st.sag; plan.gx = mdl.mnt.gx; plan.gy = mdl.mnt.gy; plan.gz = mdl.mnt.gz; plan.mass = mdl.mnt.mass; plan.xc = mdl.mnt.xc; plan.yc = mdl.mnt.yc; plan.tension = zeros(1, 0); if mdl.ps.solved && any(strcmp(mdl.mnt.type, {'thread', 'threads'})) plan.tension = mdl.ps.up(mdl.ps.fixed_nodes)'; end plan.Om2 = mdl.Om2; plan.notes = mdl.notes; end