Hello Jorge Garcia Garcia
It is my understanding that you are trying to solve a PDE and further extract the natural frequencies of the system from the solution.
Given that you are defining your model as follows:
modelpde = createpde("structural","static-planestress");
This will create an object of the ‘StructuralModel’ class with the ‘AnalysisType’ property set as “static-planestress”.
On passing this object to the “solve” function, the output returned is a ‘StaticStructuralResults’ object. Static structural analysis does not compute natural frequencies and only computes the following properties:
modalresults =
Displacement: [1×1 FEStruct]
Strain: [1×1 FEStruct]
Stress: [1×1 FEStruct]
VonMisesStress: [6511×1 double]
Mesh: [1×1 FEMesh]
Natural frequencies of the system can be computed and accessed by passing an object of the ‘StructuralModel’ class with the ‘AnalysisType’ property set as “modal-<insert required type>” to the function ‘solve’ that will then return a ‘ModalStructuralResults’ object and accessing its ‘NaturalFrequencies’ property.
You can refer to the following code snippet to extract the natural frequencies of a system:
length = 5;
height = 0.1;
E = 3e7;
nu = 0.3;
massDensity = 0.3/386;
%Create a modal static-stress model, assign a geometry, and generate a mesh.
modelpde = createpde("structural","modal-planestress")
gdm = [3;4;0;length;length;0;0;0;height;height];
g = decsg(gdm,'S1',('S1')');
geometryFromEdges(modelpde,g);%
% Define a maximum element size (five elements through the beam thickness).
hmax = height/5;
msh=generateMesh(modelpde,Hmax=hmax);
%Specify the structural properties and boundary constraints.
structuralProperties(modelpde,'YoungsModulus',E, ...
'MassDensity',massDensity, ...
'PoissonsRatio',nu);
structuralBC(modelpde,Edge=4,Constraint="fixed");
%Compute the analytical fundamental frequency (Hz) using the beam theory.
I = height^3/12;
analyticalOmega1 = 3.516*sqrt(E*I/(length^4*(massDensity*height)))/(2*pi)
%Specify a frequency range that includes an analytically computed frequency and solve the model.
modalresults = solve(modelpde,FrequencyRange=[0,1e6])
%The solver finds natural frequencies and modal displacement values at nodal locations. To access these values, use modalresults.NaturalFrequencies and modalresults.ModeShapes.
modalresults.NaturalFrequencies
For more information on this, you can refer the following MathWorks Documentation:
- Refer to the “Input Arguments” section. https://in.mathworks.com/help/pde/ug/createpde.html
- Refer to the “Output Arguments” section. https://in.mathworks.com/help/pde/ug/pde.femodel.solve.html#bvizufn-3
- Refer to the “Properties” section. https://in.mathworks.com/help/pde/ug/pde.modalstructuralresults.html
I hope this helps!