examples.levelSet.electroChem.adsorption¶
This example tests 1D adsorption onto an interface and subsequent depletion from the bulk. The governing equations are given by,
and on the interface
There is a dimensionless number
The test solution provided here is for the case of interface limited kinetics. The analytical solutions are given by,
and
Make sure the dimensionless parameter is large enough
>>> (diffusion / cinf / L / L / rateConstant) > 100
True
Start time stepping:
>>> currentTime = 0.
>>> from builtins import range
>>> for i in range(totalTimeSteps):
... surfEqn.solve(surfactantVar, dt = dt)
... bulkEqn.solve(bulkVar, dt = dt)
... currentTime += dt
Compare the analytical and numerical results:
>>> theta = surfactantVar.interfaceVar[1]
>>> numerix.allclose(currentTimeFunc(theta), currentTime, rtol = 1e-4)()
1
>>> numerix.allclose(concentrationFunc(theta), bulkVar[1:], rtol = 1e-4)()
1
Last updated on Feb 14, 2025.
Created using Sphinx 7.1.2.