Closed GVE871 closed 2 months ago
Time-dependent boundary conditions are a bit more complicated to use since the operator (which applies the boundary condition) actually needs to know the current time. I suggest the following solution:
class TESPDE(PDEBase):
def evolution_rate(self, state, t=0):
return FieldCollection(
[
-state[0].gradient(bc_fluid, args={"t": t}) + (state[1] - state[0]),
(state[1] - state[0]),
]
)
Note that I replaced the state[0].grid.make_operator
call by a simple gradient, which is more efficient since otherwise make_operator
would be called each time step.
That fixed it thanks
Hello, I am trying to solve a simple pde with a time dependent boundary condition:
but I get the error