main content

reduced-凯发k8网页登录

this example shows how to eliminate degrees of freedom (dofs) that are not on the boundaries of interest by using the craig-bampton reduced-order modeling technique. the example also uses the smaller dimension superelement to analyze the dynamics of the system. for comparison, the example also performs a direct transient analysis on the original structure.

create a structural model for transient analysis.

modelt = createpde("structural","transient-solid");

create a square cross-section beam geometry and include it in the model.

gm = multicuboid(0.05,0.003,0.003);
modelt.geometry = gm;

plot the geometry, displaying face and edge labels.

figure
pdegplot(modelt,"facelabels","on","facealpha",0.5)
view([71 4])

figure contains an axes object. the axes object contains 3 objects of type quiver, patch, line.

figure
pdegplot(modelt,"edgelabels","on","facealpha",0.5)
view([71 4])

figure contains an axes object. the axes object contains 3 objects of type quiver, patch, line.

specify young's modulus, poisson's ratio, and the mass density of the material.

structuralproperties(modelt,"youngsmodulus",210e9, ...
                            "poissonsratio",0.3, ...
                            "massdensity",7800);

fix one end of the beam.

structuralbc(modelt,"edge",[2 8 11 12],"constraint","fixed");

add a vertex at the center of face 3.

loadedvertex = addvertex(gm,"coordinates",[0.025 0.0 0.0015]);
figure
pdegplot(modelt,"vertexlabels","on","facealpha",0.5)
view([78 2.5])

figure contains an axes object. the axes object contains 3 objects of type quiver, patch, line.

generate a mesh.

generatemesh(modelt);

apply a sinusoidal concentrated force in the z-direction on the new vertex.

structuralboundaryload(modelt,"vertex",loadedvertex, ...
                              "force",[0;0;10],"frequency",6000);

specify zero initial conditions.

structuralic(modelt,"velocity",[0 0 0],"displacement",[0 0 0]);

solve the model.

tlist = 0:0.00005:3e-3;
rt = solve(modelt,tlist);

define superelement interfaces using the fixed and loaded boundaries. in this case, the reduced order model retains the degrees of freedom (dofs) on the fixed face and the loaded vertex while condensing all other dofs in favor of modal dofs. for better performance, use the set of edges bounding face 5 instead of using the entire face.

structuralseinterface(modelt,"edge",[2 8 11 12]);
structuralseinterface(modelt,"vertex",loadedvertex);

reduce the structure, retaining all fixed interface modes up to 5e5.

rom = reduce(modelt,"frequencyrange",[-0.1,5e5]);

next, use the reduced order model to simulate the transient dynamics. use the ode15s function directly to integrate the reduced system ode. working with the reduced model requires indexing into the reduced system matrices rom.k and rom.m. first, construct mappings of indices of k and m to loaded and fixed dofs by using the data available in rom.

dofs correspond to translational displacements. if the number of mesh points in a model is nn, then the toolbox assigns the ids to the dofs as follows: the first 1 to nn are x-displacements, nn 1 to 2*nn are y-displacements, and 2nn 1 to 3*nn are z-displacements. the reduced model object rom contains these ids for the retained dofs in rom.retaineddof.

create a function that returns dof ids given node ids and the number of nodes.

getdof = @(x,numnodes) [x(:); x(:)   numnodes; x(:)   2*numnodes];

knowing the dof ids for the given node ids, use the intersect function to find the required indices.

numnodes = size(rom.mesh.nodes,2);
 
loadednode = findnodes(rom.mesh,"region","vertex",loadedvertex);
loaddofs = getdof(loadednode,numnodes);
[~,loadnoderomids,~] = intersect(rom.retaineddof,loaddofs);

in the reduced matrices rom.k and rom.m, generalized modal dofs appear after the retained dofs.

fixedintmodeids = (numel(rom.retaineddof)   1:size(rom.k,1))';

because fixed-end dofs are not a part of the ode system, the indices for the ode dofs in reduced matrices are as follows.

odedofs = [loadnoderomids;fixedintmodeids];

the relevant components of rom.k and rom.m for time integration are:

kconstrained = rom.k(odedofs,odedofs);
mconstrained = rom.m(odedofs,odedofs);
numode = numel(odedofs);

now you have a second-order system of odes. to use ode15s, convert this into a system of first-order odes by applying linearization. such a first-order system is twice the size of the second-order system.

mode = [eye(numode,numode),   zeros(numode,numode); ...
        zeros(numode,numode), mconstrained];
kode = [zeros(numode,numode), -eye(numode,numode); ...
        kconstrained,         zeros(numode,numode)];
fode = zeros(2*numode,1);

the specified concentrated force load in the full system is along the z-direction, which is the third dof in the ode system. accounting for the linearization to obtain the first-order system gives the loaded ode dof.

loadodedof = numode   3;

specify the mass matrix and the jacobian for the ode solver.

odeoptions = odeset;
odeoptions = odeset(odeoptions,"jacobian",-kode);
odeoptions = odeset(odeoptions,"mass",mode);

specify zero initial conditions.

u0 = zeros(2*numode,1);

solve the reduced system by using ode15s and the helper function cmsodef, which is defined at the end of this example.

sol = ode15s(@(t,y) cmsodef(t,y,kode,fode,loadodedof), ...
                                 tlist,u0,odeoptions);

compute the values of the ode variable and the time derivatives.

[displ,vel] = deval(sol,tlist);

plot the z-displacement at the loaded vertex and compare it to the third dof in the solution of the reduced ode system.

figure
plot(tlist,rt.displacement.uz(loadedvertex,:))
hold on
plot(tlist,displ(3,:),"r*")
title("z-displacement at loaded vertex")
legend("full model","rom")

figure contains an axes object. the axes object with title z-displacement at loaded vertex contains 2 objects of type line. one or more of the lines displays its values using only markers these objects represent full model, rom.

knowing the solution in terms of the interface dofs and modal dofs, you can reconstruct the solution for the full model. the reconstructsolution function requires the displacement, velocity, and acceleration at all dofs in rom. construct the complete solution vector, including the zero values at the fixed dofs.

u = zeros(size(rom.k,1),numel(tlist));
ut = zeros(size(rom.k,1),numel(tlist));
utt = zeros(size(rom.k,1),numel(tlist));
u(odedofs,:) = displ(1:numode,:);
ut(odedofs,:) = vel(1:numode,:);
utt(odedofs,:) = vel(numode 1:2*numode,:);

construct a transient results object using this solution.

rtrom = reconstructsolution(rom,u,ut,utt,tlist);

for comparison, compute the displacement in the interior at the center of the beam using the full and reconstructed solutions.

coordcenter = [0;0;0];
idisprt = interpolatedisplacement(rt, coordcenter);
idisprtrom = interpolatedisplacement(rtrom, coordcenter);
figure
plot(tlist,idisprt.uz,"k")
hold on
plot(tlist,idisprtrom.uz,"g*")
title("z-displacement at geometric center")
legend("full model","rom")

figure contains an axes object. the axes object with title z-displacement at geometric center contains 2 objects of type line. one or more of the lines displays its values using only markers these objects represent full model, rom.

ode helper function

function f = cmsodef(t,u,kode,fode,loadedvertex)
fode(loadedvertex) = 10*sin(6000*t);
f = -kode*u  fode;
end
网站地图