Source code for festim.boundary_conditions.fluxes.flux_bc
from festim import BoundaryCondition
import sympy as sp
import fenics as f
[docs]
class FluxBC(BoundaryCondition):
"""
Boundary condition ensuring the gradient of the solution
so that:
-D * grad(c) * n = f or -lambda * grad(T) * n = f
depending if applied to mobile concentration or temperature
Args:
surfaces (list or int): the surfaces of the BC
value (sp.Expr or float, optional): value of the flux. Defaults to
None.
"""
def __init__(self, surfaces, value=None, **kwargs) -> None:
super().__init__(surfaces=surfaces, **kwargs)
self.value = value