Commit 15ce82cb by Jigyasa Watwani

made active stress a saturating function of rho

parent 6e121e6f
Showing with 7 additions and 6 deletions
......@@ -19,7 +19,6 @@ class Growth(object):
# define function space with this mixed element
self.function_space = df.FunctionSpace(self.mesh, mixed_element)
# dirichlet boundaries for u, v
bc1 = df.DirichletBC(self.function_space.sub(0), df.Constant(0.0), 'on_boundary') # u,v at boundary = 0
bc2 = df.DirichletBC(self.function_space.sub(1), df.Constant(0.0), 'on_boundary')
......@@ -33,6 +32,9 @@ class Growth(object):
def advection(self, conc, vel, tconc):
return (df.inner((vel * conc).dx(0), tconc))
def active_stress(self, rho, tv):
return self.lamda * df.inner((rho/(rho + self.saturation_rho)).dx(0), tv)
def reaction_rho(self, rho, trho):
return self.turnover_rho * df.inner(rho - self.average_rho, trho)
......@@ -44,7 +46,6 @@ class Growth(object):
u0 = df.interpolate(u0, self.function_space.sub(0).collapse())
rho0 = df.interpolate(rho0, self.function_space.sub(2).collapse())
# v0_function_space = df.FunctionSpace(self.mesh, 'P', 1, constrained_domain = self.pbc)
v0_function_space = df.FunctionSpace(self.mesh, 'P', 1)
v0 = df.Function(v0_function_space)
......@@ -52,7 +53,7 @@ class Growth(object):
v0form = (df.inner(v0,tv0)
+ self.elasticity * df.inner(u0.dx(0),tv0.dx(0))
+ self.viscosity * df.inner(v0.dx(0), tv0.dx(0))
- self.lamda * df.inner(rho0.dx(0),tv0)
- self.lamda * df.inner((rho0/(rho0 + self.saturation_rho)).dx(0),tv0)
) * df.dx
bcv0 = df.DirichletBC(v0_function_space, df.Constant(0.0), 'on_boundary')
df.solve(v0form == 0, v0, bcv0)
......@@ -75,9 +76,9 @@ class Growth(object):
+ 3/8 * self.elasticity * df.inner(u0.dx(0), tv.dx(0))
+ 1/16 * self.elasticity * df.inner(uminus1.dx(0), tv.dx(0))
- 9/16 * self.lamda * df.inner(rho.dx(0), tv)
- 3/8 * self.lamda * df.inner(rho0.dx(0), tv)
- 1/16 * self.lamda * df.inner(rhominus1.dx(0), tv)
- 9/16 * self.active_stress(rho0, tv)
- 3/8 * self.active_stress(rhominus1, tv)
- 1/16 * self.active_stress(rhominus1, tv)
+ 9/16 * self.viscosity * df.inner(v.dx(0),tv.dx(0))
+ 3/8 * self.viscosity * df.inner(v0.dx(0),tv.dx(0))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment