# Different materials using PDE tool

17 views (last 30 days)
Vinh Dang on 12 Feb 2016
Commented: Alan Weiss on 16 Feb 2016
I am using 3D-PDE tool to solve problems for the elastic deformation of a thick plate. How can I set different materials for multiple layers on this plate? This is my code (for 1 material)
E = 2.07e11; % elastic modulus of steel in Pascals
nu = 0.3; % Poisson's ratio
c = elasticityC3D(E,nu);
a = 0;
f = [0;0;0]; % Assume all body forces are zero
u = assempde(model,c,a,f); % calculate solution
Thanks

Alan Weiss on 12 Feb 2016
Unfortunately, I don't think that you can do exactly what you want at this point in time. Ideally, you would have different layers specified in your geometry, and could set different coefficients for each layer. But the current toolbox cannot accept different layers to mesh.
Instead, you can fake a solution, but it will not be totally accurate. Set different material properties by setting c to be a nonconstant coefficient. Make sure that your mesh is fine enough to distinguish between your layers. The problem, of course, is that your mesh will not align with your geometry, so the material properties will be set in a fashion that is not 100% aligned with your desired geometry.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation

Show 1 older comment
Alan Weiss on 12 Feb 2016
Suppose you have a slab of material aligned with the x, y, and z axes. The material is one form for 0<=z<=0.3, and is another form for 0.3<=z<=0.5. Find E1 and nu1 for 0<=z<=0.3, and E2 and nu2 for 0.3<=z<=0.5. Set
c1 = elasticity3D(E1,nu1);
c2 = elasticity3D(E2,nu2);
Then define
function ccoeff = slabfn(region,state,c1,c2)
nc = length(c1);
m = length(region.z);
indx = region.z <= 0.3;
ccoeff = repmat(c2,1,m);
ccoeff(:,indx) = repmat(c1,1,sum(indx));
c = @(region,state)slabfn(region,state,c1,c2);
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation
Vinh Dang on 15 Feb 2016
Thank you very much for your code. It works very well. By the way, I would like to ask you the problem in applyBoundaryCondition section. Suppose I have 2 layers, as attached figure. Now I want to apply static load on face F66 and set the displacement in (x,y,z) direction of face F68 equal to those of face F61. Could you please suggest me the code for this issue. Here is my code for applied static load. I do not know it is right or not.
applyBoundaryCondition(model,'Face',51,'u',[0,0,0]); % Dirichlet conditions
myufun = @(region,state)[region.x;region.y;region.z];
applyBoundaryCondition(model,'Face',68,'u',myufun,'Vectorized','on');
myufun = @(region,state)[region.x;region.y;region.z-10]; % distance between F61 and F68 is 10.
applyBoundaryCondition(model,'Face',61,'u',myufun,'Vectorized','on');
Alan Weiss on 16 Feb 2016
Sorry, I really cannot help with this question. Though it seems that you have a typo: face 51 instead of 61.
By the way, you might have better luck getting your question answered if you start a new thread; people might see that this thread has an accepted answer, and would never see the new question.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation