fedoo.core.BoundaryCondition
- class BoundaryCondition(bc_type, node_set, variable, value, time_func=None, start_value=None, name='')
Basic boundary conditions.
- __init__(bc_type, node_set, variable, value, time_func=None, start_value=None, name='')
Define some standard boundary conditions (Dirichlet of Neumann BC)
Notes
The created object is not automatically associated to a problem.
In most cases, the Problem.bc.add method should be prefered to define standard boundary conditions. * To avoid errors, it is recommanded to avoid associating a BoundaryCondition object to several problems.
- Parameters:
bc_type (str) – Type of boundary condition: ‘Dirichlet’ or ‘Neumann’.
variable (str) – Variable name (str) over which the bc is applied.
value (scalar or scalar array) – Final value of the variable (Dirichlet) or the adjoint variable (Neumann). e.g. the adjoint variable associated to displac bdsement is the force.
node_set (int, list of int or str) – list of node index (list of int) or name of a node_set associated to the reference mesh (str) or dof indice (for global variables)
time_func (function) – Function that gives the temporal evolution of the BC value (applyed as a factor to the specified BC). The function should be y=f(x) where x in [0,1] and y in [0,1]. For x, 0 denote the begining of the step and 1 the end. By default, a linear evolution of the value is considered.
start_value (float, array or None (default)) – if None, the start_value is keep to the current state. if scalar value: The start_value is the same for all dof defined in BC if array: the len of the array should be = to the number of dof defined in the BC
name (str (default = "")) – Define the name of the Boundary Conditions.
Methods
BoundaryCondition.change_value(newvalue[, ...])BoundaryCondition.create(bc_type, node_set, ...)Create one or several standard boundary conditions (Dirichlet or Neumann BC)
BoundaryCondition.generate(problem, t_fact)BoundaryCondition.get_true_value([t_fact, ...])Return the true bc value.
BoundaryCondition.get_value([t_fact, t_fact_old])Return the bc value to enforce.
BoundaryCondition.initialize(problem)Return a condensed one line str describing the object