Todo

Improve autoapi module

circadapt.components.connector

Connector objects.

Module Contents

Classes

Connector

Connector objects.

ArtVen

ArtVen connects two nodes with a passive, flow-dependent resistance.

ArtVen2022

ArtVen2022 object.

Diode

Ideal diode describing flow between nodes at positive pressure gradient.

Resistance

Simple Resistance describing flow between nodes.

Valve2022

Module to simulate valvular flow.

Valve

Module to simulate valvular flow.

Valve2024

Module to simulate valvular flow.

Objects

class circadapt.components.connector.Connector(component_type, model, objects=None)[source]

Bases: circadapt.components.Component

Connector objects.

parameters = []
signals = ['q']
parameter_on_set
add(name, prox, dist)[source]
build()
add_object(o)
__repr__()

Object representation in string format.

__getitem__(arg: any) any

Get data.

This function is called when self[arg].

Parameters

arg: slice or string

If slice, return a components object with locs obtained from slice. If str, return the parameter or signal for all locs

__setitem__(arg: str, val: any) any

Set data.

Set data of the parameter given in arg. Only parameter names can be used.

Parameters

arg: str

Parameter name

val: float/int/bool

Value will automatically be translated to type to

__iter__()

Iterate over object, used for dict(self).

class circadapt.components.connector.ArtVen(component_type, model, objects=None)[source]

Bases: Connector

ArtVen connects two nodes with a passive, flow-dependent resistance.

Parameters

k [-]: double

Exponent in pressure-flow relationship

p0 [Pa]: double

Reference pressure at q=q0

q0 [m 3/s]: double

Reference flow at p=p0

Signals

q [m 3/s]: float

Flow over ArtVen

parameters = ['p0', 'q0', 'k']
signals = ['q']
parameter_on_set
add(name, prox, dist)
build()
add_object(o)
__repr__()

Object representation in string format.

__getitem__(arg: any) any

Get data.

This function is called when self[arg].

Parameters
arg: slice or string

If slice, return a components object with locs obtained from slice. If str, return the parameter or signal for all locs

__setitem__(arg: str, val: any) any

Set data.

Set data of the parameter given in arg. Only parameter names can be used.

Parameters
arg: str

Parameter name

val: float/int/bool

Value will automatically be translated to type to

__iter__()

Iterate over object, used for dict(self).

class circadapt.components.connector.ArtVen2022(component_type, model, objects=None)[source]

Bases: Connector

ArtVen2022 object.

parameters = ['p0', 'q0AV', 'kAV']
signals = ['q']
parameter_on_set
add(name, prox, dist)
build()
add_object(o)
__repr__()

Object representation in string format.

__getitem__(arg: any) any

Get data.

This function is called when self[arg].

Parameters

arg: slice or string

If slice, return a components object with locs obtained from slice. If str, return the parameter or signal for all locs

__setitem__(arg: str, val: any) any

Set data.

Set data of the parameter given in arg. Only parameter names can be used.

Parameters

arg: str

Parameter name

val: float/int/bool

Value will automatically be translated to type to

__iter__()

Iterate over object, used for dict(self).

class circadapt.components.connector.Diode(component_type, model, objects=None)[source]

Bases: Connector

Ideal diode describing flow between nodes at positive pressure gradient.

Parameters

R: double

Resistance

Signals

q: float

Flow through the valve

parameters = ['R']
signals = ['q']
parameter_on_set
add(name, prox, dist)
build()
add_object(o)
__repr__()

Object representation in string format.

__getitem__(arg: any) any

Get data.

This function is called when self[arg].

Parameters
arg: slice or string

If slice, return a components object with locs obtained from slice. If str, return the parameter or signal for all locs

__setitem__(arg: str, val: any) any

Set data.

Set data of the parameter given in arg. Only parameter names can be used.

Parameters
arg: str

Parameter name

val: float/int/bool

Value will automatically be translated to type to

__iter__()

Iterate over object, used for dict(self).

class circadapt.components.connector.Resistance(component_type, model, objects=None)[source]

Bases: Connector

Simple Resistance describing flow between nodes.

Parameters

R: double

Resistance

Signals

q: float

Flow through the valve

parameters = ['R']
signals = ['q']
parameter_on_set
add(name, prox, dist)
build()
add_object(o)
__repr__()

Object representation in string format.

__getitem__(arg: any) any

Get data.

This function is called when self[arg].

Parameters
arg: slice or string

If slice, return a components object with locs obtained from slice. If str, return the parameter or signal for all locs

__setitem__(arg: str, val: any) any

Set data.

Set data of the parameter given in arg. Only parameter names can be used.

Parameters
arg: str

Parameter name

val: float/int/bool

Value will automatically be translated to type to

__iter__()

Iterate over object, used for dict(self).

class circadapt.components.connector.Valve2022(component_type, model, objects=None)[source]

Bases: Connector

Module to simulate valvular flow.

This model simulates flow \(q\) based on the pressure gradient between the proximal and distal node \(\Delta p\) by solving the ordinary differential equation:

\[\frac{dq}{dt} = \frac{A_{eff}}{l_{eff}} \Bigg[\frac{q\cdot|q|}{2} (\frac{1}{A_{prox}^2}-\frac{1}{A_{eff}^2})+\frac{\Delta p}{\rho}\Bigg]\]

Parameters

adaptation_Aopen_fac [-]: double

Factor used in adaptation to determine Aopen based on vessel flow.

A_open [m2]: float

Opening area

A_leak [m2]: float

Leaking valve area

l [m]: float

Length of valve

rho_b [kg/m3]: float

Blood density

papillary_muscles [-]: bool

If true, papilary muscle implementation is activated

soft_closure [-]: bool

If true, a soft closure is activated

Signals

q [m3/s]: float

Flow through the valve

dq_dt [m3/s2]: float

Time derivative of the flow q

parameters = ['adaptation_A_open_fac', 'A_open', 'A_leak', 'l', 'L_fac_prox', 'L_fac_dist', 'L_fac_valve',...
signals = ['q', 'dq_dt', 'L', 'A', 'Dp', 'DpB', 'diast']
parameter_on_set
add(name, prox, dist)
build()
add_object(o)
__repr__()

Object representation in string format.

__getitem__(arg: any) any

Get data.

This function is called when self[arg].

Parameters
arg: slice or string

If slice, return a components object with locs obtained from slice. If str, return the parameter or signal for all locs

__setitem__(arg: str, val: any) any

Set data.

Set data of the parameter given in arg. Only parameter names can be used.

Parameters
arg: str

Parameter name

val: float/int/bool

Value will automatically be translated to type to

__iter__()

Iterate over object, used for dict(self).

class circadapt.components.connector.Valve(component_type, model, objects=None)

Bases: Connector

Module to simulate valvular flow.

This model simulates flow \(q\) based on the pressure gradient between the proximal and distal node \(\Delta p\) by solving the ordinary differential equation:

\[\frac{dq}{dt} = \frac{A_{eff}}{l_{eff}} \Bigg[\frac{q\cdot|q|}{2} (\frac{1}{A_{prox}^2}-\frac{1}{A_{eff}^2})+\frac{\Delta p}{\rho}\Bigg]\]

Parameters

adaptation_Aopen_fac [-]: double

Factor used in adaptation to determine Aopen based on vessel flow.

A_open [m2]: float

Opening area

A_leak [m2]: float

Leaking valve area

l [m]: float

Length of valve

rho_b [kg/m3]: float

Blood density

papillary_muscles [-]: bool

If true, papilary muscle implementation is activated

soft_closure [-]: bool

If true, a soft closure is activated

Signals

q [m3/s]: float

Flow through the valve

dq_dt [m3/s2]: float

Time derivative of the flow q

parameters = ['adaptation_A_open_fac', 'A_open', 'A_leak', 'l', 'L_fac_prox', 'L_fac_dist', 'L_fac_valve',...
signals = ['q', 'dq_dt', 'L', 'A', 'Dp', 'DpB', 'diast']
parameter_on_set
add(name, prox, dist)
build()
add_object(o)
__repr__()

Object representation in string format.

__getitem__(arg: any) any

Get data.

This function is called when self[arg].

Parameters
arg: slice or string

If slice, return a components object with locs obtained from slice. If str, return the parameter or signal for all locs

__setitem__(arg: str, val: any) any

Set data.

Set data of the parameter given in arg. Only parameter names can be used.

Parameters
arg: str

Parameter name

val: float/int/bool

Value will automatically be translated to type to

__iter__()

Iterate over object, used for dict(self).

class circadapt.components.connector.Valve2024(component_type, model, objects=None)[source]

Bases: Valve2022

Module to simulate valvular flow.

This model simulates flow \(q\) based on the pressure gradient between the proximal and distal node \(\Delta p\) by solving the ordinary differential equation:

\[\frac{dq}{dt} = \frac{A_{eff}}{l_{eff}} \Bigg[\frac{q\cdot|q|}{2} (\frac{1}{A_{prox}^2}-\frac{1}{A_{eff}^2})+\frac{\Delta p}{\rho}\Bigg]\]

Parameters

adaptation_Aopen_fac [-]: double

Factor used in adaptation to determine Aopen based on vessel flow.

A_open [m2]: float

Opening area

A_leak [m2]: float

Leaking valve area

l [m]: float

Length of valve

rho_b [kg/m3]: float

Blood density

papillary_muscles [-]: bool

If true, papilary muscle implementation is activated

soft_closure [-]: bool

If true, a soft closure is activated

Signals

q [m3/s]: float

Flow through the valve

dq_dt [m3/s2]: float

Time derivative of the flow q

parameters = ['adaptation_A_open_fac', 'A_open', 'A_leak', 'l', 'L_fac_prox', 'L_fac_dist', 'L_fac_valve',...
signals = ['q', 'dq_dt', 'L', 'A', 'Dp', 'DpB', 'diast']
parameter_on_set
add(name, prox, dist)
build()
add_object(o)
__repr__()

Object representation in string format.

__getitem__(arg: any) any

Get data.

This function is called when self[arg].

Parameters
arg: slice or string

If slice, return a components object with locs obtained from slice. If str, return the parameter or signal for all locs

__setitem__(arg: str, val: any) any

Set data.

Set data of the parameter given in arg. Only parameter names can be used.

Parameters
arg: str

Parameter name

val: float/int/bool

Value will automatically be translated to type to

__iter__()

Iterate over object, used for dict(self).