Mercurial > repos > public > sbplib
comparison +scheme/Elastic2dCurvilinearAnisotropic.m @ 1214:e1d4cb8b5309 feature/poroelastic
Add stress operators to scheme anisotropic curvilinear
author | Martin Almquist <malmquist@stanford.edu> |
---|---|
date | Mon, 21 Oct 2019 18:08:22 -0700 |
parents | 43f1cd11e8e8 |
children | 15865fbda16e |
comparison
equal
deleted
inserted
replaced
1213:43f1cd11e8e8 | 1214:e1d4cb8b5309 |
---|---|
22 C % Elastic stiffness tensor | 22 C % Elastic stiffness tensor |
23 | 23 |
24 D % Total operator | 24 D % Total operator |
25 | 25 |
26 Dx, Dy % Physical derivatives | 26 Dx, Dy % Physical derivatives |
27 sigma % Cell matrix of physical stress operators | |
27 n_w, n_e, n_s, n_n % Physical normals | 28 n_w, n_e, n_s, n_n % Physical normals |
28 | 29 |
29 % Boundary operators in cell format, used for BC | 30 % Boundary operators in cell format, used for BC |
30 T_w, T_e, T_s, T_n | 31 T_w, T_e, T_s, T_n |
31 | 32 |
303 obj.en_w = (obj.n_w{1}*obj.e1_w' + obj.n_w{2}*obj.e2_w')'; | 304 obj.en_w = (obj.n_w{1}*obj.e1_w' + obj.n_w{2}*obj.e2_w')'; |
304 obj.en_e = (obj.n_e{1}*obj.e1_e' + obj.n_e{2}*obj.e2_e')'; | 305 obj.en_e = (obj.n_e{1}*obj.e1_e' + obj.n_e{2}*obj.e2_e')'; |
305 obj.en_s = (obj.n_s{1}*obj.e1_s' + obj.n_s{2}*obj.e2_s')'; | 306 obj.en_s = (obj.n_s{1}*obj.e1_s' + obj.n_s{2}*obj.e2_s')'; |
306 obj.en_n = (obj.n_n{1}*obj.e1_n' + obj.n_n{2}*obj.e2_n')'; | 307 obj.en_n = (obj.n_n{1}*obj.e1_n' + obj.n_n{2}*obj.e2_n')'; |
307 | 308 |
309 % Stress operators | |
310 sigma = cell(dim, dim); | |
311 D1 = {obj.Dx, obj.Dy}; | |
312 E = obj.E; | |
313 N = length(obj.RHO); | |
314 for i = 1:dim | |
315 for j = 1:dim | |
316 sigma{i,j} = sparse(N,2*N); | |
317 for k = 1:dim | |
318 for l = 1:dim | |
319 sigma{i,j} = sigma{i,j} + obj.C{i,j,k,l}*D1{k}*E{l}'; | |
320 end | |
321 end | |
322 end | |
323 end | |
324 obj.sigma = sigma; | |
325 | |
308 % Misc. | 326 % Misc. |
309 obj.refObj = refObj; | 327 obj.refObj = refObj; |
310 obj.m = refObj.m; | 328 obj.m = refObj.m; |
311 obj.h = refObj.h; | 329 obj.h = refObj.h; |
312 obj.order = order; | 330 obj.order = order; |