changeset 1309:f59b849df30f feature/poroelastic

Add displacement BC to viscoelastic
author Martin Almquist <malmquist@stanford.edu>
date Mon, 20 Jul 2020 17:45:58 -0700
parents 5016f3f3badb
children eb015fe9605b
files +scheme/ViscoElastic2d.m
diffstat 1 files changed, 19 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/+scheme/ViscoElastic2d.m	Sun Jul 19 21:24:48 2020 -0700
+++ b/+scheme/ViscoElastic2d.m	Mon Jul 20 17:45:58 2020 -0700
@@ -266,6 +266,7 @@
 
             H       = obj.H;
             RHO     = obj.RHO;
+            ETA     = obj.ETA;
             C       = obj.C;
             Eu      = obj.Eu;
             eU      = obj.eU;
@@ -301,6 +302,24 @@
                     end
                 end
 
+            case {'D','d','dirichlet','Dirichlet','displacement','Displacement'}
+
+                % Get elastic closure and penalty
+                [closure, penalty] = obj.elasticObj.boundary_condition(boundary, bc, tuning);
+                closure = Eu*closure*Eu';
+                penalty = Eu*penalty;
+
+                % Add penalty to strain rate eq
+                l = component;
+                for i = 1:dim
+                    for j = 1:dim
+                        for k = 1:dim
+                            closure = closure - eGamma{i,j}*( (H*ETA)\(C{i,j,k,l}*e*H_gamma*n{k}*e'*eU{l}') );
+                            penalty = penalty + eGamma{i,j}*( (H*ETA)\(C{i,j,k,l}*e*H_gamma*n{k}) );
+                        end
+                    end
+                end
+
             end
 
         end