cbcflow.bcs.Womersley module

Note: This class is slow for large meshes, and scales poorly (because the inlets/outlets are obviously not distributed evenly). It should be rewritten in C++, but this has not been done because of the lack of Bessel functions that support complex arguments (boost::math:cyl_bessel_j does not). It would also be a quite time-consuming task.

Classes

class cbcflow.bcs.Womersley.Womersley(coeffs, mesh, indicator, nu, scale_to=None, facet_domains=None)

Bases: list

class cbcflow.bcs.Womersley.WomersleyComponent1(args, **kwargs)

Bases: Expression

eval(value, x)
set_t(t)
class cbcflow.bcs.Womersley.WomersleyComponent2(args, **kwargs)

Bases: Expression

eval(value, x)
set_t(t)

Functions

cbcflow.bcs.Womersley.fourier_coefficients(x, y, T, N=25)

From x-array and y-spline and period T, calculate N complex Fourier coefficients.

cbcflow.bcs.Womersley.make_womersley_bcs(coeffs, mesh, indicator, nu, scale_to=None, facet_domains=None, coeffstype='Q', period=None, num_fourier_coefficients=25)

Generate a list of expressions for the components of a Womersley profile.