set_rate_BC¶
- TransientFickianDiffusion.set_rate_BC(pores, rates=None, total_rate=None, mode='merge', **kwargs)¶
Apply constant rate boundary conditons to the specified locations.
- Parameters
pores (array_like) – The pore indices where the condition should be applied
rates (float or array_like, optional) – The rates to apply in each pore. If a scalar is supplied that rate is assigned to all locations, and if a vector is supplied it must be the same size as the indices given in
pores
.total_rate (float, optional) – The total rate supplied to all pores. The rate supplied by this argument is divided evenly among all pores. A scalar must be supplied! Total_rate cannot be specified if rate is specified.
mode (str, optional) –
Controls how the boundary conditions are applied. The default value is ‘merge’. Options are:
mode
meaning
’merge’
Adds supplied boundary conditions to already existing conditions, and also overwrites any existing values. If BCs of the complementary type already exist in the given locations, those values are kept.
’overwrite’
Deletes all boundary conditions of the given type then adds the specified new ones (unless locations already have BCs of the other type)
Notes
The definition of
quantity
is specified in the algorithm’ssettings
, e.g.alg.settings['quantity'] = 'pore.pressure'
.