← Back to team overview

dolfin team mailing list archive

Re: [Question #139887]: how can I change boundary conditions asfunction oftime?

 

Question #139887 on DOLFIN changed:
https://answers.launchpad.net/dolfin/+question/139887

    Status: Answered => Open

Sungick Kim is still having a problem:
Initially, I wanted to change the actual boundary domain.
After checking your answer out, 
I think that changing the value of Dirichlet boundary condition for a fixed boundary would be correct.
So I tried this code below. However, the value is not changing.
Could you give me a hand again?

--------------------------------------------------------------------------------------------
boundary = compile_subdomains("on_boundary")

# approximated step function whose value is 1 for x[0] < t
g = Expression("0.0 + 1.0/(1+exp(10*(x[0]-t)))") 

BC = DirichletBC(Q1, g1, boundary)

# Parameters for time stepping
T = 10.0
dt = 0.1
t = 0.0

while t < T:

    t += dt
    # solve problem
--------------------------------------------------------------------------------------------

-- 
You received this question notification because you are a member of
DOLFIN Team, which is an answer contact for DOLFIN.



Follow ups

References