Skip to content

Commit d1dcb25

Browse files
committed
Add correct tensors to active model
1 parent a7a182b commit d1dcb25

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

src/pulse/active_model.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def Fe(self, F: ufl.core.expr.Expr) -> ufl.core.expr.Expr:
7575
"""
7676

7777
@abc.abstractmethod
78-
def strain_energy(self, F: ufl.core.expr.Expr) -> ufl.core.expr.Expr:
78+
def strain_energy(self, C: ufl.core.expr.Expr) -> ufl.core.expr.Expr:
7979
r"""Active strain energy function. For example in the
8080
active stress approach, the active stress is added
8181
as an extra stress component
@@ -97,29 +97,29 @@ def strain_energy(self, F: ufl.core.expr.Expr) -> ufl.core.expr.Expr:
9797
9898
Parameters
9999
----------
100-
F : ufl.core.expr.Expr
101-
The deformation gradient
100+
C : ufl.core.expr.Expr
101+
The right Cauchy-Green deformation tensor
102102
103103
Returns
104104
-------
105105
ufl.core.expr.Expr
106106
The active strain energy density function
107107
"""
108108

109-
def S(self, F: ufl.core.expr.Expr) -> ufl.core.expr.Expr:
109+
def S(self, C: ufl.core.expr.Expr) -> ufl.core.expr.Expr:
110110
"""Cauchy stress tensor for the active model.
111111
112112
Parameters
113113
----------
114114
F : ufl.core.expr.Expr
115-
The deformation gradient
115+
The right Cauchy-Green deformation tensor
116116
117117
Returns
118118
-------
119119
ufl.core.expr.Expr
120120
The Cauchy stress tensor
121121
"""
122-
return 2.0 * ufl.diff(self.strain_energy(F), F)
122+
return 2.0 * ufl.diff(self.strain_energy(C), C)
123123

124124
def P(self, F: ufl.core.expr.Expr) -> ufl.core.expr.Expr:
125125
"""First Piola-Kirchhoff stress tensor for the active model.
@@ -134,7 +134,7 @@ def P(self, F: ufl.core.expr.Expr) -> ufl.core.expr.Expr:
134134
ufl.core.expr.Expr
135135
The first Piola-Kirchhoff stress tensor
136136
"""
137-
return ufl.diff(self.strain_energy(F), F)
137+
return ufl.diff(self.strain_energy(F.T * F), F)
138138

139139

140140
class Passive(ActiveModel):
@@ -146,5 +146,5 @@ class Passive(ActiveModel):
146146
def Fe(self, F: ufl.core.expr.Expr) -> ufl.core.expr.Expr:
147147
return F
148148

149-
def strain_energy(self, F: ufl.core.expr.Expr) -> ufl.core.expr.Expr:
150-
return dolfinx.fem.Constant(ufl.domain.extract_unique_domain(F), 0.0)
149+
def strain_energy(self, C: ufl.core.expr.Expr) -> ufl.core.expr.Expr:
150+
return dolfinx.fem.Constant(ufl.domain.extract_unique_domain(C), 0.0)

src/pulse/active_stress.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def strain_energy(self, C: ufl.core.expr.Expr) -> ufl.core.expr.Expr:
9797
Parameters
9898
----------
9999
C : ufl.core.expr.Expr
100-
The deformation gradient
100+
The right Cauchy-Green deformation tensor
101101
102102
Returns
103103
-------

0 commit comments

Comments
 (0)