Skip to content

Commit

Permalink
CCS class created and tested, CCS_3comp.py ready for trial runs
Browse files Browse the repository at this point in the history
  • Loading branch information
sashgeophysics committed Nov 12, 2019
1 parent 4ce1df7 commit 07bdc55
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/modules/mupopp.py
Original file line number Diff line number Diff line change
Expand Up @@ -1118,8 +1118,8 @@ def advection_diffusion_three_component(self,W,mesh,sol_prev,dt,f_source,K=1.0,z

F += vc*(uc - u0)*dx + dt*(vc*dot(u, grad(u_mid))*dx\
+ dot(grad(vc), grad(u_mid)/self.Pe)*dx) \
+ dt*f11/self.phi*vc*dx - self.beta*dt*f_source*vc*dx \
+ qc*(cc - c0)*dx + dt*f21/(1-self.phi)*qc*dx+ qc1*(cc1 - c1)*dx - dt*f21/(1-self.phi)*qc1*dx
+ (dt*f11/self.phi)*vc*dx - self.beta*dt*f_source*vc*dx \
+ qc*(cc - c0)*dx + dt*(f21/(1-self.phi))*qc*dx+ qc1*(cc1 - c1)*dx - dt*(f21/(1-self.phi))*qc1*dx
# Residual
h = CellDiameter(mesh)
r = uc - u0 + dt*(dot(u, grad(u_mid)) - div(grad(u_mid))/self.Pe+f11/self.phi)\
Expand Down
15 changes: 10 additions & 5 deletions src/run/CCS2D/CCS_3comp.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@
####################################

# Parameters for initializing the object
Da0 = 1.0e-4
Pe0 = 1.0e6
Da0 = 0.1
Pe0 = 5.0e2
alpha0= 1.0e-8 # beta = alpha0/phi
Fe=0.1
c01_temp=Expression("0.1",degree=1) #Fe
cfl0 = 0.1
phi0 = 0.1
phi0 = 0.05
beta=alpha0/phi0
# Parameters for iteration
T0 = 2.0
Expand Down Expand Up @@ -213,11 +213,16 @@ def value_shape(self):
X = FunctionSpace(mesh,"CG",1, constrained_domain=pbc)
# Define boundary conditions
G=BoundarySource(mesh,element=V)
u0=Constant((0.0,-1.0))
u0=Constant((0.0,-0.5))
#bc1 = DirichletBC(W.sub(0),G, top)
#Constant velocity at the top boundary
bc1 = DirichletBC(W.sub(0),u0, top)
#Constant H2CO3 concentration at the top boundary
bc2 = DirichletBC(W.sub(2),Constant(0.1), top)
bc = [bc1,bc2]
#Zero velocity at the bottom boundary
#u_bot=Constant((0.0,0.0))
#bc3 = DirichletBC(W.sub(0),u_bot, bottom)
bc = [bc1,bc2]#,bc3]

###########################
## Create an object
Expand Down

0 comments on commit 07bdc55

Please sign in to comment.