getfem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Getfem-commits] r4823 - /trunk/getfem/interface/tests/matlab/demo_plast


From: Yves . Renard
Subject: [Getfem-commits] r4823 - /trunk/getfem/interface/tests/matlab/demo_plasticity.m
Date: Wed, 26 Nov 2014 15:06:49 -0000

Author: renard
Date: Wed Nov 26 16:06:48 2014
New Revision: 4823

URL: http://svn.gna.org/viewcvs/getfem?rev=4823&view=rev
Log:
minor modification

Modified:
    trunk/getfem/interface/tests/matlab/demo_plasticity.m

Modified: trunk/getfem/interface/tests/matlab/demo_plasticity.m
URL: 
http://svn.gna.org/viewcvs/getfem/trunk/getfem/interface/tests/matlab/demo_plasticity.m?rev=4823&r1=4822&r2=4823&view=diff
==============================================================================
--- trunk/getfem/interface/tests/matlab/demo_plasticity.m       (original)
+++ trunk/getfem/interface/tests/matlab/demo_plasticity.m       Wed Nov 26 
16:06:48 2014
@@ -40,10 +40,10 @@
 NX = 50;
 NY = 20;
 
-% alpha is parametr of the generalized integration algorithms The
+% alpha is parameter of the generalized integration algorithms.
 % The choice alpha = 1/2 yields the mid point method and alpha = 1 leads to
 % backward Euler integration
-alpha = 1;
+alpha = 1/2;
 
 
 
@@ -156,7 +156,7 @@
   %expr_sigma = strcat('(', B_inv, '*(Von_Mises_projection((-(H)*', Enp1, 
')+(', ApH, '*(',Enp1,'-',En,')) + (', B, '*sigma), von_mises_threshold) + H*', 
Enp1, '))');
   
   %expression de sigma for generalized alpha algorithms
-   expr_sigma = strcat('(', B_inv, 
'*(Von_Mises_projection((',B,'*(1-alpha)*sigma)+(-(H)*(((1-alpha)*',En,')+(alpha*',
 Enp1, ')))+(alpha*', ApH, '*(',Enp1,'-',En,')) + (alpha*', ...
+  expr_sigma = strcat('(', B_inv, 
'*(Von_Mises_projection((',B,'*(1-alpha)*sigma)+(-(H)*(((1-alpha)*',En,')+(alpha*',
 Enp1, ')))+(alpha*', ApH, '*(',Enp1,'-',En,')) + (alpha*', ...
     B, '*sigma), von_mises_threshold) + (H)*(((1-alpha)*',En,')+(alpha*', 
Enp1, '))))');
   
   gf_model_set(md, 'add nonlinear generic assembly brick', mim, 
strcat(expr_sigma, ':Grad_Test_u'));
@@ -198,7 +198,11 @@
     % Compute new plasticity constraints used to compute 
     % the Von Mises or Tresca stress
     if (with_hardening)
-      sigma = gf_model_get(md, 'interpolation', expr_sigma, mim_data);
+      sigma_0 = gf_model_get(md, 'variable', 'sigma');
+      sigma = (gf_model_get(md, 'interpolation', expr_sigma, mim_data) - 
(1-alpha)*sigma_0)/alpha;
+      
+      % sigma = gf_model_get(md, 'interpolation', expr_sigma, mim_data);
+      
       gf_model_set(md, 'variable', 'sigma', sigma);
       gf_model_set(md, 'variable', 'Previous_u', U);
       




reply via email to

[Prev in Thread] Current Thread [Next in Thread]