Skip to content

Commit

Permalink
Fix for constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc Hirschvogel committed Sep 25, 2024
1 parent f181344 commit 13810fb
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/ambit_fe/variationalform.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,20 +150,20 @@ def deltaW_ext_membrane(self, F, Fdot, a, params, dboundary, ivar=None, fibfnc=N

if active is not None:
tau = ivar['tau_a']
if actweight is not None:
w_act = actweight
else:
w_act = 1.0
if params['active_stress']['dir']=='cl':
c0, l0 = fibfnc[0], fibfnc[1]
omega, iota, gamma = params['active_stress']['omega'], params['active_stress']['iota'], params['active_stress']['gamma']
S_act = tau * ( omega*ufl.outer(c0,c0) + iota*ufl.outer(l0,l0) + 2.*gamma*ufl.sym(ufl.outer(c0,l0)) )
dS_act = omega*ufl.outer(c0,c0) + iota*ufl.outer(l0,l0) + 2.*gamma*ufl.sym(ufl.outer(c0,l0))
S_act = w_act * tau * ( omega*ufl.outer(c0,c0) + iota*ufl.outer(l0,l0) + 2.*gamma*ufl.sym(ufl.outer(c0,l0)) )
dS_act = w_act * omega*ufl.outer(c0,c0) + iota*ufl.outer(l0,l0) + 2.*gamma*ufl.sym(ufl.outer(c0,l0))
elif params['active_stress']['dir']=='iso':
S_act = tau * self.I
dS_act = self.I
S_act = w_act * tau * self.I
dS_act = w_act * self.I
else:
ValueError("Unknown ative stress dir!")
if actweight is not None:
w_act = actweight
else:
w_act = 1.0

# wall thickness - can be constant or a field
wall_thickness = params['h0']
Expand Down Expand Up @@ -261,7 +261,7 @@ def deltaW_ext_membrane(self, F, Fdot, a, params, dboundary, ivar=None, fibfnc=N

# add active stress
if active is not None:
S += w_act * S_act
S += S_act

# 1st PK stress P = FS
P = Fmod * S
Expand Down

0 comments on commit 13810fb

Please sign in to comment.