# How can I define individual degree of freedom constraints for 3D structural static PDE problems?

3 views (last 30 days)
Jordan on 10 Feb 2022
Answered: Ravi Kumar on 11 Feb 2022
In the below code, face 1 of the 3D block is fixed. I would like to change the structuralBC such that the constraint on face 1 only prevents motion in the X and Z directions. I can't come across any information on using constraints outside of the standard fixed, free, roller, etc. Is there a way to constrain individual degrees of freedom or is there a better way to approach this problem?
% Define material properties
E = 10.3e6; %Elastic Modulus - psi
nu = 0.33; %Poissons ratio - unitless
f1 = [0;-15;40]; %force in lbf
%Define geometry for use
body = 'Block.stl';
%Create static structureal model, import geomtery
smodel = createpde('structural','static-solid');
importGeometry(smodel,body);
%Plot with face labels
pdegplot(smodel,'FaceLabels','on','FaceAlpha',.5);
%Define properties and boundary conditions
structuralProperties(smodel,'YoungsModulus',E,'PoissonsRatio',nu);
structuralBC(smodel,'Face',1,'Constraint','fixed');
%Mesh model
msh = generateMesh(smodel,'Hmax',5,'Hmin',1);
%Solve
R = solve(smodel);
%Plot results
pdeplot3D(smodel,'ColorMapData',R.VonMisesStress,'Deformation',R.Displacement);
figure()
pdeplot3D(smodel,'ColorMapData',R.Displacement.uz,'Deformation',R.Displacement);
figure()
pdeplot3D(smodel,'ColorMapData',R.Displacement.uy,'Deformation',R.Displacement);

Ravi Kumar on 11 Feb 2022
You can constrain X and Z displacement individually setting them to zero in one command like this:
structuralBC(smodel,'Face',1,'XDisplacement',0,'ZDisplacement',0,)
Regards,
Ravi

R2021b

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!